platform.proto 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.visionai.v1alpha1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/visionai/v1alpha1/annotations.proto";
  21. import "google/cloud/visionai/v1alpha1/common.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/protobuf/duration.proto";
  24. import "google/protobuf/field_mask.proto";
  25. import "google/protobuf/timestamp.proto";
  26. option csharp_namespace = "Google.Cloud.VisionAI.V1Alpha1";
  27. option go_package = "google.golang.org/genproto/googleapis/cloud/visionai/v1alpha1;visionai";
  28. option java_multiple_files = true;
  29. option java_outer_classname = "PlatformProto";
  30. option java_package = "com.google.cloud.visionai.v1alpha1";
  31. option php_namespace = "Google\\Cloud\\VisionAI\\V1alpha1";
  32. option ruby_package = "Google::Cloud::VisionAI::V1alpha1";
  33. // Service describing handlers for resources
  34. service AppPlatform {
  35. option (google.api.default_host) = "visionai.googleapis.com";
  36. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  37. // Lists Applications in a given project and location.
  38. rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) {
  39. option (google.api.http) = {
  40. get: "/v1alpha1/{parent=projects/*/locations/*}/applications"
  41. };
  42. option (google.api.method_signature) = "parent";
  43. }
  44. // Gets details of a single Application.
  45. rpc GetApplication(GetApplicationRequest) returns (Application) {
  46. option (google.api.http) = {
  47. get: "/v1alpha1/{name=projects/*/locations/*/applications/*}"
  48. };
  49. option (google.api.method_signature) = "name";
  50. }
  51. // Creates a new Application in a given project and location.
  52. rpc CreateApplication(CreateApplicationRequest) returns (google.longrunning.Operation) {
  53. option (google.api.http) = {
  54. post: "/v1alpha1/{parent=projects/*/locations/*}/applications"
  55. body: "application"
  56. };
  57. option (google.api.method_signature) = "parent,application";
  58. option (google.longrunning.operation_info) = {
  59. response_type: "Application"
  60. metadata_type: "OperationMetadata"
  61. };
  62. }
  63. // Updates the parameters of a single Application.
  64. rpc UpdateApplication(UpdateApplicationRequest) returns (google.longrunning.Operation) {
  65. option (google.api.http) = {
  66. patch: "/v1alpha1/{application.name=projects/*/locations/*/applications/*}"
  67. body: "application"
  68. };
  69. option (google.api.method_signature) = "application,update_mask";
  70. option (google.longrunning.operation_info) = {
  71. response_type: "Application"
  72. metadata_type: "OperationMetadata"
  73. };
  74. }
  75. // Deletes a single Application.
  76. rpc DeleteApplication(DeleteApplicationRequest) returns (google.longrunning.Operation) {
  77. option (google.api.http) = {
  78. delete: "/v1alpha1/{name=projects/*/locations/*/applications/*}"
  79. };
  80. option (google.api.method_signature) = "name";
  81. option (google.longrunning.operation_info) = {
  82. response_type: "google.protobuf.Empty"
  83. metadata_type: "OperationMetadata"
  84. };
  85. }
  86. // Deploys a single Application.
  87. rpc DeployApplication(DeployApplicationRequest) returns (google.longrunning.Operation) {
  88. option (google.api.http) = {
  89. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:deploy"
  90. body: "*"
  91. };
  92. option (google.api.method_signature) = "name";
  93. option (google.longrunning.operation_info) = {
  94. response_type: "DeployApplicationResponse"
  95. metadata_type: "OperationMetadata"
  96. };
  97. }
  98. // Undeploys a single Application.
  99. rpc UndeployApplication(UndeployApplicationRequest) returns (google.longrunning.Operation) {
  100. option (google.api.http) = {
  101. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:undeploy"
  102. body: "*"
  103. };
  104. option (google.api.method_signature) = "name";
  105. option (google.longrunning.operation_info) = {
  106. response_type: "UndeployApplicationResponse"
  107. metadata_type: "OperationMetadata"
  108. };
  109. }
  110. // Adds target stream input to the Application.
  111. // If the Application is deployed, the corresponding new Application instance
  112. // will be created. If the stream has already been in the Application, the RPC
  113. // will fail.
  114. rpc AddApplicationStreamInput(AddApplicationStreamInputRequest) returns (google.longrunning.Operation) {
  115. option (google.api.http) = {
  116. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:addStreamInput"
  117. body: "*"
  118. };
  119. option (google.api.method_signature) = "name";
  120. option (google.longrunning.operation_info) = {
  121. response_type: "AddApplicationStreamInputResponse"
  122. metadata_type: "OperationMetadata"
  123. };
  124. }
  125. // Remove target stream input to the Application, if the Application is
  126. // deployed, the corresponding instance based will be deleted. If the stream
  127. // is not in the Application, the RPC will fail.
  128. rpc RemoveApplicationStreamInput(RemoveApplicationStreamInputRequest) returns (google.longrunning.Operation) {
  129. option (google.api.http) = {
  130. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:removeStreamInput"
  131. body: "*"
  132. };
  133. option (google.api.method_signature) = "name";
  134. option (google.longrunning.operation_info) = {
  135. response_type: "RemoveApplicationStreamInputResponse"
  136. metadata_type: "OperationMetadata"
  137. };
  138. }
  139. // Update target stream input to the Application, if the Application is
  140. // deployed, the corresponding instance based will be deployed. For
  141. // CreateOrUpdate behavior, set allow_missing to true.
  142. rpc UpdateApplicationStreamInput(UpdateApplicationStreamInputRequest) returns (google.longrunning.Operation) {
  143. option (google.api.http) = {
  144. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:updateStreamInput"
  145. body: "*"
  146. };
  147. option (google.api.method_signature) = "name";
  148. option (google.longrunning.operation_info) = {
  149. response_type: "UpdateApplicationStreamInputResponse"
  150. metadata_type: "OperationMetadata"
  151. };
  152. }
  153. // Lists Instances in a given project and location.
  154. rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
  155. option (google.api.http) = {
  156. get: "/v1alpha1/{parent=projects/*/locations/*/applications/*}/instances"
  157. };
  158. option (google.api.method_signature) = "parent";
  159. }
  160. // Gets details of a single Instance.
  161. rpc GetInstance(GetInstanceRequest) returns (Instance) {
  162. option (google.api.http) = {
  163. get: "/v1alpha1/{name=projects/*/locations/*/applications/*/instances/*}"
  164. };
  165. option (google.api.method_signature) = "name";
  166. }
  167. // Adds target stream input to the Application.
  168. // If the Application is deployed, the corresponding new Application instance
  169. // will be created. If the stream has already been in the Application, the RPC
  170. // will fail.
  171. rpc CreateApplicationInstances(CreateApplicationInstancesRequest) returns (google.longrunning.Operation) {
  172. option (google.api.http) = {
  173. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:createApplicationInstances"
  174. body: "*"
  175. };
  176. option (google.api.method_signature) = "name";
  177. option (google.longrunning.operation_info) = {
  178. response_type: "CreateApplicationInstancesResponse"
  179. metadata_type: "OperationMetadata"
  180. };
  181. }
  182. // Remove target stream input to the Application, if the Application is
  183. // deployed, the corresponding instance based will be deleted. If the stream
  184. // is not in the Application, the RPC will fail.
  185. rpc DeleteApplicationInstances(DeleteApplicationInstancesRequest) returns (google.longrunning.Operation) {
  186. option (google.api.http) = {
  187. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:deleteApplicationInstances"
  188. body: "*"
  189. };
  190. option (google.api.method_signature) = "name";
  191. option (google.longrunning.operation_info) = {
  192. response_type: "Instance"
  193. metadata_type: "OperationMetadata"
  194. };
  195. }
  196. // Adds target stream input to the Application.
  197. // If the Application is deployed, the corresponding new Application instance
  198. // will be created. If the stream has already been in the Application, the RPC
  199. // will fail.
  200. rpc UpdateApplicationInstances(UpdateApplicationInstancesRequest) returns (google.longrunning.Operation) {
  201. option (google.api.http) = {
  202. post: "/v1alpha1/{name=projects/*/locations/*/applications/*}:updateApplicationInstances"
  203. body: "*"
  204. };
  205. option (google.api.method_signature) = "name, application_instances";
  206. option (google.longrunning.operation_info) = {
  207. response_type: "UpdateApplicationInstancesResponse"
  208. metadata_type: "OperationMetadata"
  209. };
  210. }
  211. // Lists Drafts in a given project and location.
  212. rpc ListDrafts(ListDraftsRequest) returns (ListDraftsResponse) {
  213. option (google.api.http) = {
  214. get: "/v1alpha1/{parent=projects/*/locations/*/applications/*}/drafts"
  215. };
  216. option (google.api.method_signature) = "parent";
  217. }
  218. // Gets details of a single Draft.
  219. rpc GetDraft(GetDraftRequest) returns (Draft) {
  220. option (google.api.http) = {
  221. get: "/v1alpha1/{name=projects/*/locations/*/applications/*/drafts/*}"
  222. };
  223. option (google.api.method_signature) = "name";
  224. }
  225. // Creates a new Draft in a given project and location.
  226. rpc CreateDraft(CreateDraftRequest) returns (google.longrunning.Operation) {
  227. option (google.api.http) = {
  228. post: "/v1alpha1/{parent=projects/*/locations/*/applications/*}/drafts"
  229. body: "draft"
  230. };
  231. option (google.api.method_signature) = "parent,draft,draft_id";
  232. option (google.longrunning.operation_info) = {
  233. response_type: "Draft"
  234. metadata_type: "OperationMetadata"
  235. };
  236. }
  237. // Updates the parameters of a single Draft.
  238. rpc UpdateDraft(UpdateDraftRequest) returns (google.longrunning.Operation) {
  239. option (google.api.http) = {
  240. patch: "/v1alpha1/{draft.name=projects/*/locations/*/applications/*/drafts/*}"
  241. body: "draft"
  242. };
  243. option (google.api.method_signature) = "draft,update_mask";
  244. option (google.longrunning.operation_info) = {
  245. response_type: "Draft"
  246. metadata_type: "OperationMetadata"
  247. };
  248. }
  249. // Deletes a single Draft.
  250. rpc DeleteDraft(DeleteDraftRequest) returns (google.longrunning.Operation) {
  251. option (google.api.http) = {
  252. delete: "/v1alpha1/{name=projects/*/locations/*/applications/*/drafts/*}"
  253. };
  254. option (google.api.method_signature) = "name";
  255. option (google.longrunning.operation_info) = {
  256. response_type: "google.protobuf.Empty"
  257. metadata_type: "OperationMetadata"
  258. };
  259. }
  260. // Lists Processors in a given project and location.
  261. rpc ListProcessors(ListProcessorsRequest) returns (ListProcessorsResponse) {
  262. option (google.api.http) = {
  263. get: "/v1alpha1/{parent=projects/*/locations/*}/processors"
  264. };
  265. option (google.api.method_signature) = "parent";
  266. }
  267. // ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
  268. // Processors.
  269. rpc ListPrebuiltProcessors(ListPrebuiltProcessorsRequest) returns (ListPrebuiltProcessorsResponse) {
  270. option (google.api.http) = {
  271. post: "/v1alpha1/{parent=projects/*/locations/*}/processors:prebuilt"
  272. body: "*"
  273. };
  274. option (google.api.method_signature) = "parent";
  275. }
  276. // Gets details of a single Processor.
  277. rpc GetProcessor(GetProcessorRequest) returns (Processor) {
  278. option (google.api.http) = {
  279. get: "/v1alpha1/{name=projects/*/locations/*/processors/*}"
  280. };
  281. option (google.api.method_signature) = "name";
  282. }
  283. // Creates a new Processor in a given project and location.
  284. rpc CreateProcessor(CreateProcessorRequest) returns (google.longrunning.Operation) {
  285. option (google.api.http) = {
  286. post: "/v1alpha1/{parent=projects/*/locations/*}/processors"
  287. body: "processor"
  288. };
  289. option (google.api.method_signature) = "parent,processor,processor_id";
  290. option (google.longrunning.operation_info) = {
  291. response_type: "Processor"
  292. metadata_type: "OperationMetadata"
  293. };
  294. }
  295. // Updates the parameters of a single Processor.
  296. rpc UpdateProcessor(UpdateProcessorRequest) returns (google.longrunning.Operation) {
  297. option (google.api.http) = {
  298. patch: "/v1alpha1/{processor.name=projects/*/locations/*/processors/*}"
  299. body: "processor"
  300. };
  301. option (google.api.method_signature) = "processor,update_mask";
  302. option (google.longrunning.operation_info) = {
  303. response_type: "Processor"
  304. metadata_type: "OperationMetadata"
  305. };
  306. }
  307. // Deletes a single Processor.
  308. rpc DeleteProcessor(DeleteProcessorRequest) returns (google.longrunning.Operation) {
  309. option (google.api.http) = {
  310. delete: "/v1alpha1/{name=projects/*/locations/*/processors/*}"
  311. };
  312. option (google.api.method_signature) = "name";
  313. option (google.longrunning.operation_info) = {
  314. response_type: "google.protobuf.Empty"
  315. metadata_type: "OperationMetadata"
  316. };
  317. }
  318. }
  319. // All the supported model types in Vision AI App Platform.
  320. enum ModelType {
  321. // Processor Type UNSPECIFIED.
  322. MODEL_TYPE_UNSPECIFIED = 0;
  323. // Model Type Image Classification.
  324. IMAGE_CLASSIFICATION = 1;
  325. // Model Type Object Detection.
  326. OBJECT_DETECTION = 2;
  327. // Model Type Video Classification.
  328. VIDEO_CLASSIFICATION = 3;
  329. // Model Type Object Tracking.
  330. VIDEO_OBJECT_TRACKING = 4;
  331. // Model Type Action Recognition.
  332. VIDEO_ACTION_RECOGNITION = 5;
  333. // Model Type Occupancy Counting.
  334. OCCUPANCY_COUNTING = 6;
  335. // Model Type Person Blur.
  336. PERSON_BLUR = 7;
  337. // Model Type Vertex Custom.
  338. VERTEX_CUSTOM = 8;
  339. }
  340. // Represents a hardware accelerator type.
  341. enum AcceleratorType {
  342. // Unspecified accelerator type, which means no accelerator.
  343. ACCELERATOR_TYPE_UNSPECIFIED = 0;
  344. // Nvidia Tesla K80 GPU.
  345. NVIDIA_TESLA_K80 = 1;
  346. // Nvidia Tesla P100 GPU.
  347. NVIDIA_TESLA_P100 = 2;
  348. // Nvidia Tesla V100 GPU.
  349. NVIDIA_TESLA_V100 = 3;
  350. // Nvidia Tesla P4 GPU.
  351. NVIDIA_TESLA_P4 = 4;
  352. // Nvidia Tesla T4 GPU.
  353. NVIDIA_TESLA_T4 = 5;
  354. // Nvidia Tesla A100 GPU.
  355. NVIDIA_TESLA_A100 = 8;
  356. // TPU v2.
  357. TPU_V2 = 6;
  358. // TPU v3.
  359. TPU_V3 = 7;
  360. }
  361. // Message for adding stream input to an Application.
  362. message CreateApplicationInstancesRequest {
  363. // Required. the name of the application to retrieve.
  364. // Format:
  365. // "projects/{project}/locations/{location}/applications/{application}"
  366. string name = 1 [
  367. (google.api.field_behavior) = REQUIRED,
  368. (google.api.resource_reference) = {
  369. type: "visionai.googleapis.com/Application"
  370. }
  371. ];
  372. // Required. The resources being created.
  373. repeated ApplicationInstance application_instances = 2 [(google.api.field_behavior) = REQUIRED];
  374. // Optional. An optional request ID to identify requests. Specify a unique request ID
  375. // so that if you must retry your request, the server will know to ignore
  376. // the request if it has already been completed. The server will guarantee
  377. // that for at least 60 minutes since the first request.
  378. //
  379. // For example, consider a situation where you make an initial request and t
  380. // he request times out. If you make the request again with the same request
  381. // ID, the server can check if original operation with the same request ID
  382. // was received, and if so, will ignore the second request. This prevents
  383. // clients from accidentally creating duplicate commitments.
  384. //
  385. // The request ID must be a valid UUID with the exception that zero UUID is
  386. // not supported (00000000-0000-0000-0000-000000000000).
  387. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  388. }
  389. // Message for removing stream input from an Application.
  390. message DeleteApplicationInstancesRequest {
  391. // Required. the name of the application to retrieve.
  392. // Format:
  393. // "projects/{project}/locations/{location}/applications/{application}"
  394. string name = 1 [
  395. (google.api.field_behavior) = REQUIRED,
  396. (google.api.resource_reference) = {
  397. type: "visionai.googleapis.com/Application"
  398. }
  399. ];
  400. // Required. Id of the requesting object.
  401. repeated string instance_ids = 2 [
  402. (google.api.field_behavior) = REQUIRED,
  403. (google.api.resource_reference) = {
  404. type: "visionai.googleapis.com/Instance"
  405. }
  406. ];
  407. // Optional. An optional request ID to identify requests. Specify a unique request ID
  408. // so that if you must retry your request, the server will know to ignore
  409. // the request if it has already been completed. The server will guarantee
  410. // that for at least 60 minutes since the first request.
  411. //
  412. // For example, consider a situation where you make an initial request and t
  413. // he request times out. If you make the request again with the same request
  414. // ID, the server can check if original operation with the same request ID
  415. // was received, and if so, will ignore the second request. This prevents
  416. // clients from accidentally creating duplicate commitments.
  417. //
  418. // The request ID must be a valid UUID with the exception that zero UUID is
  419. // not supported (00000000-0000-0000-0000-000000000000).
  420. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  421. }
  422. // Message for requesting list of Applications.
  423. message ListApplicationsRequest {
  424. // Required. Parent value for ListApplicationsRequest.
  425. string parent = 1 [
  426. (google.api.field_behavior) = REQUIRED,
  427. (google.api.resource_reference) = {
  428. child_type: "visionai.googleapis.com/Application"
  429. }
  430. ];
  431. // Requested page size. Server may return fewer items than requested.
  432. // If unspecified, server will pick an appropriate default.
  433. int32 page_size = 2;
  434. // A token identifying a page of results the server should return.
  435. string page_token = 3;
  436. // Filtering results.
  437. string filter = 4;
  438. // Hint for how to order the results.
  439. string order_by = 5;
  440. }
  441. // Message for response to listing Applications.
  442. message ListApplicationsResponse {
  443. // The list of Application.
  444. repeated Application applications = 1;
  445. // A token identifying a page of results the server should return.
  446. string next_page_token = 2;
  447. // Locations that could not be reached.
  448. repeated string unreachable = 3;
  449. }
  450. // Message for getting a Application.
  451. message GetApplicationRequest {
  452. // Required. Name of the resource.
  453. string name = 1 [
  454. (google.api.field_behavior) = REQUIRED,
  455. (google.api.resource_reference) = {
  456. type: "visionai.googleapis.com/Application"
  457. }
  458. ];
  459. }
  460. // Message for creating a Application.
  461. message CreateApplicationRequest {
  462. // Required. Value for parent.
  463. string parent = 1 [
  464. (google.api.field_behavior) = REQUIRED,
  465. (google.api.resource_reference) = {
  466. child_type: "visionai.googleapis.com/Application"
  467. }
  468. ];
  469. // Required. Id of the requesting object.
  470. string application_id = 2 [(google.api.field_behavior) = REQUIRED];
  471. // Required. The resource being created.
  472. Application application = 3 [(google.api.field_behavior) = REQUIRED];
  473. // Optional. An optional request ID to identify requests. Specify a unique request ID
  474. // so that if you must retry your request, the server will know to ignore
  475. // the request if it has already been completed. The server will guarantee
  476. // that for at least 60 minutes since the first request.
  477. //
  478. // For example, consider a situation where you make an initial request and t
  479. // he request times out. If you make the request again with the same request
  480. // ID, the server can check if original operation with the same request ID
  481. // was received, and if so, will ignore the second request. This prevents
  482. // clients from accidentally creating duplicate commitments.
  483. //
  484. // The request ID must be a valid UUID with the exception that zero UUID is
  485. // not supported (00000000-0000-0000-0000-000000000000).
  486. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  487. }
  488. // Message for updating an Application.
  489. message UpdateApplicationRequest {
  490. // Optional. Field mask is used to specify the fields to be overwritten in the
  491. // Application resource by the update.
  492. // The fields specified in the update_mask are relative to the resource, not
  493. // the full request. A field will be overwritten if it is in the mask. If the
  494. // user does not provide a mask then all fields will be overwritten.
  495. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  496. // Required. The resource being updated.
  497. Application application = 2 [(google.api.field_behavior) = REQUIRED];
  498. // Optional. An optional request ID to identify requests. Specify a unique request ID
  499. // so that if you must retry your request, the server will know to ignore
  500. // the request if it has already been completed. The server will guarantee
  501. // that for at least 60 minutes since the first request.
  502. //
  503. // For example, consider a situation where you make an initial request and t
  504. // he request times out. If you make the request again with the same request
  505. // ID, the server can check if original operation with the same request ID
  506. // was received, and if so, will ignore the second request. This prevents
  507. // clients from accidentally creating duplicate commitments.
  508. //
  509. // The request ID must be a valid UUID with the exception that zero UUID is
  510. // not supported (00000000-0000-0000-0000-000000000000).
  511. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  512. }
  513. // Message for deleting an Application.
  514. message DeleteApplicationRequest {
  515. // Required. Name of the resource.
  516. string name = 1 [
  517. (google.api.field_behavior) = REQUIRED,
  518. (google.api.resource_reference) = {
  519. type: "visionai.googleapis.com/Application"
  520. }
  521. ];
  522. // Optional. An optional request ID to identify requests. Specify a unique request ID
  523. // so that if you must retry your request, the server will know to ignore
  524. // the request if it has already been completed. The server will guarantee
  525. // that for at least 60 minutes after the first request.
  526. //
  527. // For example, consider a situation where you make an initial request and t
  528. // he request times out. If you make the request again with the same request
  529. // ID, the server can check if original operation with the same request ID
  530. // was received, and if so, will ignore the second request. This prevents
  531. // clients from accidentally creating duplicate commitments.
  532. //
  533. // The request ID must be a valid UUID with the exception that zero UUID is
  534. // not supported (00000000-0000-0000-0000-000000000000).
  535. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  536. // Optional. If set to true, any instances and drafts from this application will also be
  537. // deleted. (Otherwise, the request will only work if the application has no
  538. // instances and drafts.)
  539. bool force = 3 [(google.api.field_behavior) = OPTIONAL];
  540. }
  541. // Message for deploying an Application.
  542. message DeployApplicationRequest {
  543. // Required. the name of the application to retrieve.
  544. // Format:
  545. // "projects/{project}/locations/{location}/applications/{application}"
  546. string name = 1 [
  547. (google.api.field_behavior) = REQUIRED,
  548. (google.api.resource_reference) = {
  549. type: "visionai.googleapis.com/Application"
  550. }
  551. ];
  552. // If set, validate the request and preview the application graph, but do not
  553. // actually deploy it.
  554. bool validate_only = 2;
  555. // Optional. An optional request ID to identify requests. Specify a unique request ID
  556. // so that if you must retry your request, the server will know to ignore
  557. // the request if it has already been completed. The server will guarantee
  558. // that for at least 60 minutes since the first request.
  559. //
  560. // For example, consider a situation where you make an initial request and t
  561. // he request times out. If you make the request again with the same request
  562. // ID, the server can check if original operation with the same request ID
  563. // was received, and if so, will ignore the second request. This prevents
  564. // clients from accidentally creating duplicate commitments.
  565. //
  566. // The request ID must be a valid UUID with the exception that zero UUID is
  567. // not supported (00000000-0000-0000-0000-000000000000).
  568. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  569. // Optional. Whether or not to enable monitoring for the application on deployment.
  570. bool enable_monitoring = 4 [(google.api.field_behavior) = OPTIONAL];
  571. }
  572. // Message for undeploying an Application.
  573. message UndeployApplicationRequest {
  574. // Required. the name of the application to retrieve.
  575. // Format:
  576. // "projects/{project}/locations/{location}/applications/{application}"
  577. string name = 1 [
  578. (google.api.field_behavior) = REQUIRED,
  579. (google.api.resource_reference) = {
  580. type: "visionai.googleapis.com/Application"
  581. }
  582. ];
  583. // Optional. An optional request ID to identify requests. Specify a unique request ID
  584. // so that if you must retry your request, the server will know to ignore
  585. // the request if it has already been completed. The server will guarantee
  586. // that for at least 60 minutes since the first request.
  587. //
  588. // For example, consider a situation where you make an initial request and t
  589. // he request times out. If you make the request again with the same request
  590. // ID, the server can check if original operation with the same request ID
  591. // was received, and if so, will ignore the second request. This prevents
  592. // clients from accidentally creating duplicate commitments.
  593. //
  594. // The request ID must be a valid UUID with the exception that zero UUID is
  595. // not supported (00000000-0000-0000-0000-000000000000).
  596. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  597. }
  598. // Message about a single stream input config.
  599. message ApplicationStreamInput {
  600. StreamWithAnnotation stream_with_annotation = 1;
  601. }
  602. // Message for adding stream input to an Application.
  603. message AddApplicationStreamInputRequest {
  604. // Required. the name of the application to retrieve.
  605. // Format:
  606. // "projects/{project}/locations/{location}/applications/{application}"
  607. string name = 1 [
  608. (google.api.field_behavior) = REQUIRED,
  609. (google.api.resource_reference) = {
  610. type: "visionai.googleapis.com/Application"
  611. }
  612. ];
  613. // The stream inputs to add, the stream resource name is the key of each
  614. // StreamInput, and it must be unique within each application.
  615. repeated ApplicationStreamInput application_stream_inputs = 2;
  616. // Optional. An optional request ID to identify requests. Specify a unique request ID
  617. // so that if you must retry your request, the server will know to ignore
  618. // the request if it has already been completed. The server will guarantee
  619. // that for at least 60 minutes since the first request.
  620. //
  621. // For example, consider a situation where you make an initial request and t
  622. // he request times out. If you make the request again with the same request
  623. // ID, the server can check if original operation with the same request ID
  624. // was received, and if so, will ignore the second request. This prevents
  625. // clients from accidentally creating duplicate commitments.
  626. //
  627. // The request ID must be a valid UUID with the exception that zero UUID is
  628. // not supported (00000000-0000-0000-0000-000000000000).
  629. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  630. }
  631. // Message for updating stream input to an Application.
  632. message UpdateApplicationStreamInputRequest {
  633. // Required. the name of the application to retrieve.
  634. // Format:
  635. // "projects/{project}/locations/{location}/applications/{application}"
  636. string name = 1 [
  637. (google.api.field_behavior) = REQUIRED,
  638. (google.api.resource_reference) = {
  639. type: "visionai.googleapis.com/Application"
  640. }
  641. ];
  642. // The stream inputs to update, the stream resource name is the key of each
  643. // StreamInput, and it must be unique within each application.
  644. repeated ApplicationStreamInput application_stream_inputs = 2;
  645. // Optional. An optional request ID to identify requests. Specify a unique request ID
  646. // so that if you must retry your request, the server will know to ignore
  647. // the request if it has already been completed. The server will guarantee
  648. // that for at least 60 minutes since the first request.
  649. //
  650. // For example, consider a situation where you make an initial request and t
  651. // he request times out. If you make the request again with the same request
  652. // ID, the server can check if original operation with the same request ID
  653. // was received, and if so, will ignore the second request. This prevents
  654. // clients from accidentally creating duplicate commitments.
  655. //
  656. // The request ID must be a valid UUID with the exception that zero UUID is
  657. // not supported (00000000-0000-0000-0000-000000000000).
  658. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  659. // If true, UpdateApplicationStreamInput will insert stream input to
  660. // application even if the target stream is not included in the application.
  661. bool allow_missing = 4;
  662. }
  663. // Message for removing stream input from an Application.
  664. message RemoveApplicationStreamInputRequest {
  665. // Message about target streamInput to remove.
  666. message TargetStreamInput {
  667. string stream = 1 [(google.api.resource_reference) = {
  668. type: "visionai.googleapis.com/Stream"
  669. }];
  670. }
  671. // Required. the name of the application to retrieve.
  672. // Format:
  673. // "projects/{project}/locations/{location}/applications/{application}"
  674. string name = 1 [
  675. (google.api.field_behavior) = REQUIRED,
  676. (google.api.resource_reference) = {
  677. type: "visionai.googleapis.com/Application"
  678. }
  679. ];
  680. // The target stream to remove.
  681. repeated TargetStreamInput target_stream_inputs = 2;
  682. // Optional. An optional request ID to identify requests. Specify a unique request ID
  683. // so that if you must retry your request, the server will know to ignore
  684. // the request if it has already been completed. The server will guarantee
  685. // that for at least 60 minutes since the first request.
  686. //
  687. // For example, consider a situation where you make an initial request and t
  688. // he request times out. If you make the request again with the same request
  689. // ID, the server can check if original operation with the same request ID
  690. // was received, and if so, will ignore the second request. This prevents
  691. // clients from accidentally creating duplicate commitments.
  692. //
  693. // The request ID must be a valid UUID with the exception that zero UUID is
  694. // not supported (00000000-0000-0000-0000-000000000000).
  695. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  696. }
  697. // Message for requesting list of Instances.
  698. message ListInstancesRequest {
  699. // Required. Parent value for ListInstancesRequest.
  700. string parent = 1 [
  701. (google.api.field_behavior) = REQUIRED,
  702. (google.api.resource_reference) = {
  703. child_type: "visionai.googleapis.com/Instance"
  704. }
  705. ];
  706. // Requested page size. Server may return fewer items than requested.
  707. // If unspecified, server will pick an appropriate default.
  708. int32 page_size = 2;
  709. // A token identifying a page of results the server should return.
  710. string page_token = 3;
  711. // Filtering results.
  712. string filter = 4;
  713. // Hint for how to order the results.
  714. string order_by = 5;
  715. }
  716. // Message for response to listing Instances.
  717. message ListInstancesResponse {
  718. // The list of Instance.
  719. repeated Instance instances = 1;
  720. // A token identifying a page of results the server should return.
  721. string next_page_token = 2;
  722. // Locations that could not be reached.
  723. repeated string unreachable = 3;
  724. }
  725. // Message for getting a Instance.
  726. message GetInstanceRequest {
  727. // Required. Name of the resource.
  728. string name = 1 [
  729. (google.api.field_behavior) = REQUIRED,
  730. (google.api.resource_reference) = {
  731. type: "visionai.googleapis.com/Instance"
  732. }
  733. ];
  734. }
  735. // Message for requesting list of Drafts.
  736. message ListDraftsRequest {
  737. // Required. Parent value for ListDraftsRequest.
  738. string parent = 1 [
  739. (google.api.field_behavior) = REQUIRED,
  740. (google.api.resource_reference) = {
  741. child_type: "visionai.googleapis.com/Draft"
  742. }
  743. ];
  744. // Requested page size. Server may return fewer items than requested.
  745. // If unspecified, server will pick an appropriate default.
  746. int32 page_size = 2;
  747. // A token identifying a page of results the server should return.
  748. string page_token = 3;
  749. // Filtering results.
  750. string filter = 4;
  751. // Hint for how to order the results.
  752. string order_by = 5;
  753. }
  754. // Message for response to listing Drafts.
  755. message ListDraftsResponse {
  756. // The list of Draft.
  757. repeated Draft drafts = 1;
  758. // A token identifying a page of results the server should return.
  759. string next_page_token = 2;
  760. // Locations that could not be reached.
  761. repeated string unreachable = 3;
  762. }
  763. // Message for getting a Draft.
  764. message GetDraftRequest {
  765. // Required. Name of the resource.
  766. string name = 1 [
  767. (google.api.field_behavior) = REQUIRED,
  768. (google.api.resource_reference) = {
  769. type: "visionai.googleapis.com/Draft"
  770. }
  771. ];
  772. }
  773. // Message for creating a Draft.
  774. message CreateDraftRequest {
  775. // Required. Value for parent.
  776. string parent = 1 [
  777. (google.api.field_behavior) = REQUIRED,
  778. (google.api.resource_reference) = {
  779. child_type: "visionai.googleapis.com/Draft"
  780. }
  781. ];
  782. // Required. Id of the requesting object.
  783. string draft_id = 2 [(google.api.field_behavior) = REQUIRED];
  784. // Required. The resource being created.
  785. Draft draft = 3 [(google.api.field_behavior) = REQUIRED];
  786. // Optional. An optional request ID to identify requests. Specify a unique request ID
  787. // so that if you must retry your request, the server will know to ignore
  788. // the request if it has already been completed. The server will guarantee
  789. // that for at least 60 minutes since the first request.
  790. //
  791. // For example, consider a situation where you make an initial request and t
  792. // he request times out. If you make the request again with the same request
  793. // ID, the server can check if original operation with the same request ID
  794. // was received, and if so, will ignore the second request. This prevents
  795. // clients from accidentally creating duplicate commitments.
  796. //
  797. // The request ID must be a valid UUID with the exception that zero UUID is
  798. // not supported (00000000-0000-0000-0000-000000000000).
  799. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  800. }
  801. // Message for updating an Draft.
  802. message UpdateDraftRequest {
  803. // Optional. Field mask is used to specify the fields to be overwritten in the
  804. // Draft resource by the update.
  805. // The fields specified in the update_mask are relative to the resource, not
  806. // the full request. A field will be overwritten if it is in the mask. If the
  807. // user does not provide a mask then all fields will be overwritten.
  808. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  809. // Required. The resource being updated.
  810. Draft draft = 2 [(google.api.field_behavior) = REQUIRED];
  811. // Optional. An optional request ID to identify requests. Specify a unique request ID
  812. // so that if you must retry your request, the server will know to ignore
  813. // the request if it has already been completed. The server will guarantee
  814. // that for at least 60 minutes since the first request.
  815. //
  816. // For example, consider a situation where you make an initial request and t
  817. // he request times out. If you make the request again with the same request
  818. // ID, the server can check if original operation with the same request ID
  819. // was received, and if so, will ignore the second request. This prevents
  820. // clients from accidentally creating duplicate commitments.
  821. //
  822. // The request ID must be a valid UUID with the exception that zero UUID is
  823. // not supported (00000000-0000-0000-0000-000000000000).
  824. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  825. // If true, UpdateDraftRequest will create one resource if the target resource
  826. // doesn't exist, this time, the field_mask will be ignored.
  827. bool allow_missing = 4;
  828. }
  829. // Message for updating an ApplicationInstance.
  830. message UpdateApplicationInstancesRequest {
  831. message UpdateApplicationInstance {
  832. // Optional. Field mask is used to specify the fields to be overwritten in the
  833. // Draft resource by the update.
  834. // The fields specified in the update_mask are relative to the resource, not
  835. // the full request. A field will be overwritten if it is in the mask. If
  836. // the user does not provide a mask then all fields will be overwritten.
  837. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  838. // Required. The resource being updated.
  839. Instance instance = 2 [(google.api.field_behavior) = REQUIRED];
  840. // Required. The id of the instance.
  841. string instance_id = 3 [(google.api.field_behavior) = REQUIRED];
  842. }
  843. // Required. the name of the application to retrieve.
  844. // Format:
  845. // "projects/{project}/locations/{location}/applications/{application}"
  846. string name = 1 [
  847. (google.api.field_behavior) = REQUIRED,
  848. (google.api.resource_reference) = {
  849. type: "visionai.googleapis.com/Application"
  850. }
  851. ];
  852. repeated UpdateApplicationInstance application_instances = 2;
  853. // Optional. An optional request ID to identify requests. Specify a unique request ID
  854. // so that if you must retry your request, the server will know to ignore
  855. // the request if it has already been completed. The server will guarantee
  856. // that for at least 60 minutes since the first request.
  857. //
  858. // For example, consider a situation where you make an initial request and t
  859. // he request times out. If you make the request again with the same request
  860. // ID, the server can check if original operation with the same request ID
  861. // was received, and if so, will ignore the second request. This prevents
  862. // clients from accidentally creating duplicate commitments.
  863. //
  864. // The request ID must be a valid UUID with the exception that zero UUID is
  865. // not supported (00000000-0000-0000-0000-000000000000).
  866. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  867. // If true, Update Request will create one resource if the target resource
  868. // doesn't exist, this time, the field_mask will be ignored.
  869. bool allow_missing = 4;
  870. }
  871. // Message for deleting an Draft.
  872. message DeleteDraftRequest {
  873. // Required. Name of the resource.
  874. string name = 1 [
  875. (google.api.field_behavior) = REQUIRED,
  876. (google.api.resource_reference) = {
  877. type: "visionai.googleapis.com/Draft"
  878. }
  879. ];
  880. // Optional. An optional request ID to identify requests. Specify a unique request ID
  881. // so that if you must retry your request, the server will know to ignore
  882. // the request if it has already been completed. The server will guarantee
  883. // that for at least 60 minutes after the first request.
  884. //
  885. // For example, consider a situation where you make an initial request and t
  886. // he request times out. If you make the request again with the same request
  887. // ID, the server can check if original operation with the same request ID
  888. // was received, and if so, will ignore the second request. This prevents
  889. // clients from accidentally creating duplicate commitments.
  890. //
  891. // The request ID must be a valid UUID with the exception that zero UUID is
  892. // not supported (00000000-0000-0000-0000-000000000000).
  893. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  894. }
  895. // Message for requesting list of Processors.
  896. message ListProcessorsRequest {
  897. // Required. Parent value for ListProcessorsRequest.
  898. string parent = 1 [
  899. (google.api.field_behavior) = REQUIRED,
  900. (google.api.resource_reference) = {
  901. child_type: "visionai.googleapis.com/Processor"
  902. }
  903. ];
  904. // Requested page size. Server may return fewer items than requested.
  905. // If unspecified, server will pick an appropriate default.
  906. int32 page_size = 2;
  907. // A token identifying a page of results the server should return.
  908. string page_token = 3;
  909. // Filtering results.
  910. string filter = 4;
  911. // Hint for how to order the results.
  912. string order_by = 5;
  913. }
  914. // Message for response to listing Processors.
  915. message ListProcessorsResponse {
  916. // The list of Processor.
  917. repeated Processor processors = 1;
  918. // A token identifying a page of results the server should return.
  919. string next_page_token = 2;
  920. // Locations that could not be reached.
  921. repeated string unreachable = 3;
  922. }
  923. // Request Message for listing Prebuilt Processors.
  924. message ListPrebuiltProcessorsRequest {
  925. // Required. Parent path.
  926. string parent = 1 [
  927. (google.api.field_behavior) = REQUIRED,
  928. (google.api.resource_reference) = {
  929. child_type: "visionai.googleapis.com/Processor"
  930. }
  931. ];
  932. }
  933. // Response Message for listing Prebuilt Processors.
  934. message ListPrebuiltProcessorsResponse {
  935. // The list of Processor.
  936. repeated Processor processors = 1;
  937. }
  938. // Message for getting a Processor.
  939. message GetProcessorRequest {
  940. // Required. Name of the resource.
  941. string name = 1 [
  942. (google.api.field_behavior) = REQUIRED,
  943. (google.api.resource_reference) = {
  944. type: "visionai.googleapis.com/Processor"
  945. }
  946. ];
  947. }
  948. // Message for creating a Processor.
  949. message CreateProcessorRequest {
  950. // Required. Value for parent.
  951. string parent = 1 [
  952. (google.api.field_behavior) = REQUIRED,
  953. (google.api.resource_reference) = {
  954. child_type: "visionai.googleapis.com/Processor"
  955. }
  956. ];
  957. // Required. Id of the requesting object.
  958. string processor_id = 2 [(google.api.field_behavior) = REQUIRED];
  959. // Required. The resource being created.
  960. Processor processor = 3 [(google.api.field_behavior) = REQUIRED];
  961. // Optional. An optional request ID to identify requests. Specify a unique request ID
  962. // so that if you must retry your request, the server will know to ignore
  963. // the request if it has already been completed. The server will guarantee
  964. // that for at least 60 minutes since the first request.
  965. //
  966. // For example, consider a situation where you make an initial request and t
  967. // he request times out. If you make the request again with the same request
  968. // ID, the server can check if original operation with the same request ID
  969. // was received, and if so, will ignore the second request. This prevents
  970. // clients from accidentally creating duplicate commitments.
  971. //
  972. // The request ID must be a valid UUID with the exception that zero UUID is
  973. // not supported (00000000-0000-0000-0000-000000000000).
  974. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  975. }
  976. // Message for updating a Processor.
  977. message UpdateProcessorRequest {
  978. // Optional. Field mask is used to specify the fields to be overwritten in the
  979. // Processor resource by the update.
  980. // The fields specified in the update_mask are relative to the resource, not
  981. // the full request. A field will be overwritten if it is in the mask. If the
  982. // user does not provide a mask then all fields will be overwritten.
  983. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  984. // Required. The resource being updated.
  985. Processor processor = 2 [(google.api.field_behavior) = REQUIRED];
  986. // Optional. An optional request ID to identify requests. Specify a unique request ID
  987. // so that if you must retry your request, the server will know to ignore
  988. // the request if it has already been completed. The server will guarantee
  989. // that for at least 60 minutes since the first request.
  990. //
  991. // For example, consider a situation where you make an initial request and t
  992. // he request times out. If you make the request again with the same request
  993. // ID, the server can check if original operation with the same request ID
  994. // was received, and if so, will ignore the second request. This prevents
  995. // clients from accidentally creating duplicate commitments.
  996. //
  997. // The request ID must be a valid UUID with the exception that zero UUID is
  998. // not supported (00000000-0000-0000-0000-000000000000).
  999. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1000. }
  1001. // Message for deleting a Processor.
  1002. message DeleteProcessorRequest {
  1003. // Required. Name of the resource
  1004. string name = 1 [
  1005. (google.api.field_behavior) = REQUIRED,
  1006. (google.api.resource_reference) = {
  1007. type: "visionai.googleapis.com/Processor"
  1008. }
  1009. ];
  1010. // Optional. An optional request ID to identify requests. Specify a unique request ID
  1011. // so that if you must retry your request, the server will know to ignore
  1012. // the request if it has already been completed. The server will guarantee
  1013. // that for at least 60 minutes after the first request.
  1014. //
  1015. // For example, consider a situation where you make an initial request and t
  1016. // he request times out. If you make the request again with the same request
  1017. // ID, the server can check if original operation with the same request ID
  1018. // was received, and if so, will ignore the second request. This prevents
  1019. // clients from accidentally creating duplicate commitments.
  1020. //
  1021. // The request ID must be a valid UUID with the exception that zero UUID is
  1022. // not supported (00000000-0000-0000-0000-000000000000).
  1023. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  1024. }
  1025. // Message describing Application object
  1026. message Application {
  1027. option (google.api.resource) = {
  1028. type: "visionai.googleapis.com/Application"
  1029. pattern: "projects/{project}/locations/{location}/applications/{application}"
  1030. style: DECLARATIVE_FRIENDLY
  1031. };
  1032. // Message storing the runtime information of the application.
  1033. message ApplicationRuntimeInfo {
  1034. // Message about output resources from application.
  1035. message GlobalOutputResource {
  1036. // The full resource name of the outputted resources.
  1037. string output_resource = 1;
  1038. // The name of graph node who produces the output resource name.
  1039. // For example:
  1040. // output_resource:
  1041. // /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema
  1042. // producer_node: occupancy-count
  1043. string producer_node = 2;
  1044. // The key of the output resource, it has to be unique within the same
  1045. // producer node. One producer node can output several output resources,
  1046. // the key can be used to match corresponding output resources.
  1047. string key = 3;
  1048. }
  1049. // Timestamp when the engine be deployed
  1050. google.protobuf.Timestamp deploy_time = 1;
  1051. // Globally created resources like warehouse dataschemas.
  1052. repeated GlobalOutputResource global_output_resources = 3;
  1053. }
  1054. // State of the Application
  1055. enum State {
  1056. // The default value. This value is used if the state is omitted.
  1057. STATE_UNSPECIFIED = 0;
  1058. // State CREATED.
  1059. CREATED = 1;
  1060. // State DEPLOYING.
  1061. DEPLOYING = 2;
  1062. // State DEPLOYED.
  1063. DEPLOYED = 3;
  1064. // State UNDEPLOYING.
  1065. UNDEPLOYING = 4;
  1066. // State DELETED.
  1067. DELETED = 5;
  1068. // State ERROR.
  1069. ERROR = 6;
  1070. // State CREATING.
  1071. CREATING = 7;
  1072. // State Updating.
  1073. UPDATING = 8;
  1074. // State Deleting.
  1075. DELETING = 9;
  1076. // State Fixing.
  1077. FIXING = 10;
  1078. }
  1079. // name of resource
  1080. string name = 1;
  1081. // Output only. [Output only] Create timestamp
  1082. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1083. // Output only. [Output only] Update timestamp
  1084. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1085. // Labels as key value pairs
  1086. map<string, string> labels = 4;
  1087. // Required. A user friendly display name for the solution.
  1088. string display_name = 5 [(google.api.field_behavior) = REQUIRED];
  1089. // A description for this application.
  1090. string description = 6;
  1091. // Application graph configuration.
  1092. ApplicationConfigs application_configs = 7;
  1093. // Output only. Application graph runtime info. Only exists when application state equals
  1094. // to DEPLOYED.
  1095. ApplicationRuntimeInfo runtime_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  1096. // Output only. State of the application.
  1097. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  1098. }
  1099. // Message storing the graph of the application.
  1100. message ApplicationConfigs {
  1101. // Monitoring-related configuration for an application.
  1102. message MonitoringConfig {
  1103. // Whether this application has monitoring enabled.
  1104. bool enabled = 1;
  1105. }
  1106. // A list of nodes in the application graph.
  1107. repeated Node nodes = 1;
  1108. // Monitoring-related configuration for this application.
  1109. MonitoringConfig monitoring_config = 2;
  1110. }
  1111. // Message describing node object.
  1112. message Node {
  1113. // Message describing one edge pointing into a node.
  1114. message InputEdge {
  1115. // The name of the parent node.
  1116. string parent_node = 1;
  1117. // The connected output artifact of the parent node.
  1118. // It can be omitted if target processor only has 1 output artifact.
  1119. string parent_output_channel = 2;
  1120. // The connected input channel of the current node's processor.
  1121. // It can be omitted if target processor only has 1 input channel.
  1122. string connected_input_channel = 3;
  1123. }
  1124. oneof stream_output_config {
  1125. // By default, the output of the node will only be available to downstream
  1126. // nodes. To consume the direct output from the application node, the output
  1127. // must be sent to Vision AI Streams at first.
  1128. //
  1129. // By setting output_all_output_channels_to_stream to true, App Platform
  1130. // will automatically send all the outputs of the current node to Vision AI
  1131. // Stream resources (one stream per output channel). The output stream
  1132. // resource will be created by App Platform automatically during deployment
  1133. // and deleted after application un-deployment.
  1134. // Note that this config applies to all the Application Instances.
  1135. //
  1136. // The output stream can be override at instance level by
  1137. // configuring the `output_resources` section of Instance resource.
  1138. // `producer_node` should be current node, `output_resource_binding` should
  1139. // be the output channel name (or leave it blank if there is only 1 output
  1140. // channel of the processor) and `output_resource` should be the target
  1141. // output stream.
  1142. bool output_all_output_channels_to_stream = 6;
  1143. }
  1144. // Required. A unique name for the node.
  1145. string name = 1 [(google.api.field_behavior) = REQUIRED];
  1146. // A user friendly display name for the node.
  1147. string display_name = 2;
  1148. // Node config.
  1149. ProcessorConfig node_config = 3;
  1150. // Processor name refer to the chosen processor resource.
  1151. string processor = 4;
  1152. // Parent node. Input node should not have parent node. For V1 Alpha1/Beta
  1153. // only media warehouse node can have multiple parents, other types of nodes
  1154. // will only have one parent.
  1155. repeated InputEdge parents = 5;
  1156. }
  1157. // Message describing Draft object
  1158. message Draft {
  1159. option (google.api.resource) = {
  1160. type: "visionai.googleapis.com/Draft"
  1161. pattern: "projects/{project}/locations/{location}/applications/{application}/drafts/{draft}"
  1162. style: DECLARATIVE_FRIENDLY
  1163. };
  1164. // name of resource
  1165. string name = 1;
  1166. // Output only. [Output only] Create timestamp
  1167. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1168. // Output only. [Output only] Create timestamp
  1169. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  1170. // Labels as key value pairs
  1171. map<string, string> labels = 3;
  1172. // Required. A user friendly display name for the solution.
  1173. string display_name = 4 [(google.api.field_behavior) = REQUIRED];
  1174. // A description for this application.
  1175. string description = 5;
  1176. // The draft application configs which haven't been updated to an application.
  1177. ApplicationConfigs draft_application_configs = 6;
  1178. }
  1179. // Message describing Instance object
  1180. message Instance {
  1181. option (google.api.resource) = {
  1182. type: "visionai.googleapis.com/Instance"
  1183. pattern: "projects/{project}/locations/{location}/applications/{application}/instances/{instance}"
  1184. style: DECLARATIVE_FRIENDLY
  1185. };
  1186. // Message of input resource used in one application instance.
  1187. message InputResource {
  1188. // Required. Specify the input to the application instance.
  1189. oneof input_resource_information {
  1190. // The direct input resource name.
  1191. string input_resource = 1;
  1192. // If the input resource is VisionAI Stream, the associated annotations
  1193. // can be specified using annotated_stream instead.
  1194. StreamWithAnnotation annotated_stream = 4;
  1195. }
  1196. // The name of graph node who receives the input resource.
  1197. // For example:
  1198. // input_resource:
  1199. // visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
  1200. // consumer_node: stream-input
  1201. string consumer_node = 2;
  1202. // The specific input resource binding which will consume the current Input
  1203. // Resource, can be ignored is there is only 1 input binding.
  1204. string input_resource_binding = 3;
  1205. }
  1206. // Message of output resource used in one application instance.
  1207. message OutputResource {
  1208. // The output resource name for the current application instance.
  1209. string output_resource = 1;
  1210. // The name of graph node who produces the output resource name.
  1211. // For example:
  1212. // output_resource:
  1213. // /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
  1214. // producer_node: occupancy-counting
  1215. string producer_node = 2;
  1216. // The specific output resource binding which produces the current
  1217. // OutputResource.
  1218. string output_resource_binding = 4;
  1219. // Output only. Whether the output resource is temporary which means the resource is
  1220. // generated during the deployment of the application.
  1221. // Temporary resource will be deleted during the undeployment of the
  1222. // application.
  1223. bool is_temporary = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1224. // Output only. Whether the output resource is created automatically by the Vision AI App
  1225. // Platform.
  1226. bool autogen = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1227. }
  1228. // State of the Instance
  1229. enum State {
  1230. // The default value. This value is used if the state is omitted.
  1231. STATE_UNSPECIFIED = 0;
  1232. // State CREATING.
  1233. CREATING = 1;
  1234. // State CREATED.
  1235. CREATED = 2;
  1236. // State DEPLOYING.
  1237. DEPLOYING = 3;
  1238. // State DEPLOYED.
  1239. DEPLOYED = 4;
  1240. // State UNDEPLOYING.
  1241. UNDEPLOYING = 5;
  1242. // State DELETED.
  1243. DELETED = 6;
  1244. // State ERROR.
  1245. ERROR = 7;
  1246. // State Updating
  1247. UPDATING = 8;
  1248. // State Deleting.
  1249. DELETING = 9;
  1250. // State Fixing.
  1251. FIXING = 10;
  1252. }
  1253. // Output only. name of resource
  1254. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1255. // Output only. [Output only] Create timestamp
  1256. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1257. // Output only. [Output only] Update timestamp
  1258. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  1259. // Labels as key value pairs
  1260. map<string, string> labels = 3;
  1261. // Required. A user friendly display name for the solution.
  1262. string display_name = 4 [(google.api.field_behavior) = REQUIRED];
  1263. // A description for this application.
  1264. string description = 5;
  1265. // The input resources for the current application instance.
  1266. // For example:
  1267. // input_resources:
  1268. // visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
  1269. repeated InputResource input_resources = 6;
  1270. // All the output resources associated to one application instance.
  1271. repeated OutputResource output_resources = 7;
  1272. // State of the instance.
  1273. State state = 9;
  1274. }
  1275. // Message for creating a Instance.
  1276. message ApplicationInstance {
  1277. // Required. Id of the requesting object.
  1278. string instance_id = 1 [(google.api.field_behavior) = REQUIRED];
  1279. // Required. The resource being created.
  1280. Instance instance = 2 [(google.api.field_behavior) = REQUIRED];
  1281. }
  1282. // Message describing Processor object.
  1283. // Next ID: 16
  1284. message Processor {
  1285. option (google.api.resource) = {
  1286. type: "visionai.googleapis.com/Processor"
  1287. pattern: "projects/{project}/locations/{location}/processors/{processor}"
  1288. style: DECLARATIVE_FRIENDLY
  1289. };
  1290. // Type
  1291. enum ProcessorType {
  1292. // Processor Type UNSPECIFIED.
  1293. PROCESSOR_TYPE_UNSPECIFIED = 0;
  1294. // Processor Type PRETRAINED.
  1295. // Pretrained processor is developed by Vision AI App Platform with
  1296. // state-of-the-art vision data processing functionality, like occupancy
  1297. // counting or person blur. Pretrained processor is usually publicly
  1298. // available.
  1299. PRETRAINED = 1;
  1300. // Processor Type CUSTOM.
  1301. // Custom processors are specialized processors which are either uploaded by
  1302. // customers or imported from other GCP platform (for example Vertex AI).
  1303. // Custom processor is only visible to the creator.
  1304. CUSTOM = 2;
  1305. // Processor Type CONNECTOR.
  1306. // Connector processors are special processors which perform I/O for the
  1307. // application, they do not processing the data but either deliver the data
  1308. // to other processors or receive data from other processors.
  1309. CONNECTOR = 3;
  1310. }
  1311. enum ProcessorState {
  1312. // Unspecified Processor state.
  1313. PROCESSOR_STATE_UNSPECIFIED = 0;
  1314. // Processor is being created (not ready for use).
  1315. CREATING = 1;
  1316. // Processor is and ready for use.
  1317. ACTIVE = 2;
  1318. // Processor is being deleted (not ready for use).
  1319. DELETING = 3;
  1320. // Processor deleted or creation failed .
  1321. FAILED = 4;
  1322. }
  1323. // name of resource.
  1324. string name = 1;
  1325. // Output only. [Output only] Create timestamp.
  1326. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1327. // Output only. [Output only] Update timestamp.
  1328. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1329. // Labels as key value pairs.
  1330. map<string, string> labels = 4;
  1331. // Required. A user friendly display name for the processor.
  1332. string display_name = 5 [(google.api.field_behavior) = REQUIRED];
  1333. // Illustrative sentences for describing the functionality of the processor.
  1334. string description = 10;
  1335. // Output only. Processor Type.
  1336. ProcessorType processor_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1337. // Model Type.
  1338. ModelType model_type = 13;
  1339. // Source info for customer created processor.
  1340. CustomProcessorSourceInfo custom_processor_source_info = 7;
  1341. // Output only. State of the Processor.
  1342. ProcessorState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  1343. // Output only. [Output only] The input / output specifications of a processor, each type
  1344. // of processor has fixed input / output specs which cannot be altered by
  1345. // customer.
  1346. ProcessorIOSpec processor_io_spec = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  1347. // Output only. The corresponding configuration can be used in the Application to customize
  1348. // the behavior of the processor.
  1349. string configuration_typeurl = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  1350. repeated StreamAnnotationType supported_annotation_types = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  1351. }
  1352. // Message describing the input / output specifications of a processor.
  1353. message ProcessorIOSpec {
  1354. // Message for input channel specification.
  1355. message GraphInputChannelSpec {
  1356. // The name of the current input channel.
  1357. string name = 1;
  1358. // The data types of the current input channel.
  1359. // When this field has more than 1 value, it means this input channel can be
  1360. // connected to either of these different data types.
  1361. DataType data_type = 2;
  1362. // If specified, only those detailed data types can be connected to the
  1363. // processor. For example, jpeg stream for MEDIA, or PredictionResult proto
  1364. // for PROTO type. If unspecified, then any proto is accepted.
  1365. repeated string accepted_data_type_uris = 5;
  1366. // Whether the current input channel is required by the processor.
  1367. // For example, for a processor with required video input and optional audio
  1368. // input, if video input is missing, the application will be rejected while
  1369. // the audio input can be missing as long as the video input exists.
  1370. bool required = 3;
  1371. // How many input edges can be connected to this input channel. 0 means
  1372. // unlimited.
  1373. int64 max_connection_allowed = 4;
  1374. }
  1375. // Message for output channel specification.
  1376. message GraphOutputChannelSpec {
  1377. // The name of the current output channel.
  1378. string name = 1;
  1379. // The data type of the current output channel.
  1380. DataType data_type = 2;
  1381. string data_type_uri = 3;
  1382. }
  1383. // Message for instance resource channel specification.
  1384. // External resources are virtual nodes which are not expressed in the
  1385. // application graph. Each processor expresses its out-graph spec, so customer
  1386. // is able to override the external source or destinations to the
  1387. message InstanceResourceInputBindingSpec {
  1388. oneof resource_type {
  1389. // The configuration proto that includes the Googleapis resources. I.e.
  1390. // type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation
  1391. string config_type_uri = 2;
  1392. // The direct type url of Googleapis resource. i.e.
  1393. // type.googleapis.com/google.cloud.vision.v1.Asset
  1394. string resource_type_uri = 3;
  1395. }
  1396. // Name of the input binding, unique within the processor.
  1397. string name = 1;
  1398. }
  1399. message InstanceResourceOutputBindingSpec {
  1400. // Name of the output binding, unique within the processor.
  1401. string name = 1;
  1402. // The resource type uri of the acceptable output resource.
  1403. string resource_type_uri = 2;
  1404. // Whether the output resource needs to be explicitly set in the instance.
  1405. // If it is false, the processor will automatically generate it if required.
  1406. bool explicit = 3;
  1407. }
  1408. // High level data types supported by the processor.
  1409. enum DataType {
  1410. // The default value of DataType.
  1411. DATA_TYPE_UNSPECIFIED = 0;
  1412. // Video data type like H264.
  1413. VIDEO = 1;
  1414. // Protobuf data type, usually used for general data blob.
  1415. PROTO = 2;
  1416. }
  1417. // For processors with input_channel_specs, the processor must be explicitly
  1418. // connected to another processor.
  1419. repeated GraphInputChannelSpec graph_input_channel_specs = 3;
  1420. // The output artifact specifications for the current processor.
  1421. repeated GraphOutputChannelSpec graph_output_channel_specs = 4;
  1422. // The input resource that needs to be fed from the application instance.
  1423. repeated InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5;
  1424. // The output resource that the processor will generate per instance.
  1425. // Other than the explicitly listed output bindings here, all the processors'
  1426. // GraphOutputChannels can be binded to stream resource. The bind name then is
  1427. // the same as the GraphOutputChannel's name.
  1428. repeated InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6;
  1429. }
  1430. // Describes the source info for a custom processor.
  1431. message CustomProcessorSourceInfo {
  1432. // The schema is defined as an OpenAPI 3.0.2 [Schema
  1433. // Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
  1434. message ModelSchema {
  1435. // Cloud Storage location to a YAML file that defines the format of a single
  1436. // instance used in prediction and explanation requests.
  1437. GcsSource instances_schema = 1;
  1438. // Cloud Storage location to a YAML file that defines the prediction and
  1439. // explanation parameters.
  1440. GcsSource parameters_schema = 2;
  1441. // Cloud Storage location to a YAML file that defines the format of a single
  1442. // prediction or explanation.
  1443. GcsSource predictions_schema = 3;
  1444. }
  1445. // Source type of the imported custom processor.
  1446. enum SourceType {
  1447. // Source type unspecified.
  1448. SOURCE_TYPE_UNSPECIFIED = 0;
  1449. // Custom processors coming from Vertex AutoML product.
  1450. VERTEX_AUTOML = 1;
  1451. // Custom processors coming from general custom models from Vertex.
  1452. VERTEX_CUSTOM = 2;
  1453. }
  1454. // The path where App Platform loads the artifacts for the custom processor.
  1455. oneof artifact_path {
  1456. // The resource name original model hosted in the vertex AI platform.
  1457. string vertex_model = 2;
  1458. }
  1459. // The original product which holds the custom processor's functionality.
  1460. SourceType source_type = 1;
  1461. // Output only. Additional info related to the imported custom processor.
  1462. // Data is filled in by app platform during the processor creation.
  1463. map<string, string> additional_info = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1464. // Model schema files which specifies the signature of the model.
  1465. // For VERTEX_CUSTOM models, instances schema is required.
  1466. // If instances schema is not specified during the processor creation,
  1467. // VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
  1468. // creation will fail.
  1469. ModelSchema model_schema = 5;
  1470. }
  1471. // Next ID: 23
  1472. message ProcessorConfig {
  1473. oneof processor_config {
  1474. // Configs of stream input processor.
  1475. VideoStreamInputConfig video_stream_input_config = 9;
  1476. // Config of AI-enabled input devices.
  1477. AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20;
  1478. // Configs of media warehouse processor.
  1479. MediaWarehouseConfig media_warehouse_config = 10;
  1480. // Configs of person blur processor.
  1481. PersonBlurConfig person_blur_config = 11;
  1482. // Configs of occupancy count processor.
  1483. OccupancyCountConfig occupancy_count_config = 12;
  1484. // Configs of Person Vehicle Detection processor.
  1485. PersonVehicleDetectionConfig person_vehicle_detection_config = 15;
  1486. // Configs of Vertex AutoML vision processor.
  1487. VertexAutoMLVisionConfig vertex_automl_vision_config = 13;
  1488. // Configs of Vertex AutoML video processor.
  1489. VertexAutoMLVideoConfig vertex_automl_video_config = 14;
  1490. // Configs of Vertex Custom processor.
  1491. VertexCustomConfig vertex_custom_config = 17;
  1492. // Configs of General Object Detection processor.
  1493. GeneralObjectDetectionConfig general_object_detection_config = 18;
  1494. // Configs of BigQuery processor.
  1495. BigQueryConfig big_query_config = 19;
  1496. // Configs of personal_protective_equipment_detection_config
  1497. PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22;
  1498. }
  1499. }
  1500. // Message describing Vision AI stream with application specific annotations.
  1501. // All the StreamAnnotation object inside this message MUST have unique id.
  1502. message StreamWithAnnotation {
  1503. // Message describing annotations specific to application node.
  1504. message NodeAnnotation {
  1505. // The node name of the application graph.
  1506. string node = 1;
  1507. // The node specific stream annotations.
  1508. repeated StreamAnnotation annotations = 2;
  1509. }
  1510. // Vision AI Stream resource name.
  1511. string stream = 1 [(google.api.resource_reference) = {
  1512. type: "visionai.googleapis.com/Stream"
  1513. }];
  1514. // Annotations that will be applied to the whole application.
  1515. repeated StreamAnnotation application_annotations = 2;
  1516. // Annotations that will be applied to the specific node of the application.
  1517. // If the same type of the annotations is applied to both application and
  1518. // node, the node annotation will be added in addition to the global
  1519. // application one.
  1520. // For example, if there is one active zone annotation for the whole
  1521. // application and one active zone annotation for the Occupancy Analytic
  1522. // processor, then the Occupancy Analytic processor will have two active zones
  1523. // defined.
  1524. repeated NodeAnnotation node_annotations = 3;
  1525. }
  1526. // Message describing Video Stream Input Config.
  1527. // This message should only be used as a placeholder for builtin:stream-input
  1528. // processor, actual stream binding should be specified using corresponding
  1529. // API.
  1530. message VideoStreamInputConfig {
  1531. repeated string streams = 1 [deprecated = true];
  1532. repeated StreamWithAnnotation streams_with_annotation = 2 [deprecated = true];
  1533. }
  1534. // Message describing AI-enabled Devices Input Config.
  1535. message AIEnabledDevicesInputConfig {
  1536. }
  1537. // Message describing MediaWarehouseConfig.
  1538. message MediaWarehouseConfig {
  1539. // Resource name of the Media Warehouse corpus.
  1540. // Format:
  1541. // projects/${project_id}/locations/${location_id}/corpora/${corpus_id}
  1542. string corpus = 1;
  1543. // Deprecated.
  1544. string region = 2 [deprecated = true];
  1545. // The duration for which all media assets, associated metadata, and search
  1546. // documents can exist.
  1547. google.protobuf.Duration ttl = 3;
  1548. }
  1549. // Message describing FaceBlurConfig.
  1550. message PersonBlurConfig {
  1551. // Type of Person Blur
  1552. enum PersonBlurType {
  1553. // PersonBlur Type UNSPECIFIED.
  1554. PERSON_BLUR_TYPE_UNSPECIFIED = 0;
  1555. // FaceBlur Type full occlusion.
  1556. FULL_OCCULUSION = 1;
  1557. // FaceBlur Type blur filter.
  1558. BLUR_FILTER = 2;
  1559. }
  1560. // Person blur type.
  1561. PersonBlurType person_blur_type = 1;
  1562. // Whether only blur faces other than the whole object in the processor.
  1563. bool faces_only = 2;
  1564. }
  1565. // Message describing OccupancyCountConfig.
  1566. message OccupancyCountConfig {
  1567. // Whether to count the appearances of people, output counts have 'people' as
  1568. // the key.
  1569. bool enable_people_counting = 1;
  1570. // Whether to count the appearances of vehicles, output counts will have
  1571. // 'vehicle' as the key.
  1572. bool enable_vehicle_counting = 2;
  1573. // Whether to track each invidual object's loitering time inside the scene or
  1574. // specific zone.
  1575. bool enable_dwelling_time_tracking = 3;
  1576. }
  1577. // Message describing PersonVehicleDetectionConfig.
  1578. message PersonVehicleDetectionConfig {
  1579. // At least one of enable_people_counting and enable_vehicle_counting fields
  1580. // must be set to true.
  1581. // Whether to count the appearances of people, output counts have 'people' as
  1582. // the key.
  1583. bool enable_people_counting = 1;
  1584. // Whether to count the appearances of vehicles, output counts will have
  1585. // 'vehicle' as the key.
  1586. bool enable_vehicle_counting = 2;
  1587. }
  1588. // Message describing PersonalProtectiveEquipmentDetectionConfig.
  1589. message PersonalProtectiveEquipmentDetectionConfig {
  1590. // Whether to enable face coverage detection.
  1591. bool enable_face_coverage_detection = 1;
  1592. // Whether to enable head coverage detection.
  1593. bool enable_head_coverage_detection = 2;
  1594. // Whether to enable hands coverage detection.
  1595. bool enable_hands_coverage_detection = 3;
  1596. }
  1597. // Message of configurations for General Object Detection processor.
  1598. message GeneralObjectDetectionConfig {
  1599. }
  1600. // Message of configurations for BigQuery processor.
  1601. message BigQueryConfig {
  1602. // BigQuery table resource for Vision AI Platform to ingest annotations to.
  1603. string table = 1;
  1604. // Data Schema
  1605. // By default, Vision AI Application will try to write annotations to the
  1606. // target BigQuery table using the following schema:
  1607. //
  1608. // ingestion_time: TIMESTAMP, the ingestion time of the original data.
  1609. //
  1610. // application: STRING, name of the application which produces the annotation.
  1611. //
  1612. // instance: STRING, Id of the instance which produces the annotation.
  1613. //
  1614. // node: STRING, name of the application graph node which produces the
  1615. // annotation.
  1616. //
  1617. // annotation: STRING or JSON, the actual annotation protobuf will be
  1618. // converted to json string with bytes field as 64 encoded string. It can be
  1619. // written to both String or Json type column.
  1620. //
  1621. // To forward annotation data to an existing BigQuery table, customer needs to
  1622. // make sure the compatibility of the schema.
  1623. // The map maps application node name to its corresponding cloud function
  1624. // endpoint to transform the annotations directly to the
  1625. // google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
  1626. // proto_rows should be set). If configured, annotations produced by
  1627. // corresponding application node will sent to the Cloud Function at first
  1628. // before be forwarded to BigQuery.
  1629. //
  1630. // If the default table schema doesn't fit, customer is able to transform the
  1631. // annotation output from Vision AI Application to arbitrary BigQuery table
  1632. // schema with CloudFunction.
  1633. // * The cloud function will receive AppPlatformCloudFunctionRequest where
  1634. // the annotations field will be the json format of Vision AI annotation.
  1635. // * The cloud function should return AppPlatformCloudFunctionResponse with
  1636. // AppendRowsRequest stored in the annotations field.
  1637. // * To drop the annotation, simply clear the annotations field in the
  1638. // returned AppPlatformCloudFunctionResponse.
  1639. map<string, string> cloud_function_mapping = 2;
  1640. // If true, App Platform will create the BigQuery DataSet and the
  1641. // BigQuery Table with default schema if the specified table doesn't exist.
  1642. // This doesn't work if any cloud function customized schema is specified
  1643. // since the system doesn't know your desired schema.
  1644. // JSON column will be used in the default table created by App Platform.
  1645. bool create_default_table_if_not_exists = 3;
  1646. }
  1647. // Message of configurations of Vertex AutoML Vision Processors.
  1648. message VertexAutoMLVisionConfig {
  1649. // Only entities with higher score than the threshold will be returned.
  1650. // Value 0.0 means to return all the detected entities.
  1651. float confidence_threshold = 1;
  1652. // At most this many predictions will be returned per output frame.
  1653. // Value 0 means to return all the detected entities.
  1654. int32 max_predictions = 2;
  1655. }
  1656. // Message describing VertexAutoMLVideoConfig.
  1657. message VertexAutoMLVideoConfig {
  1658. // Only entities with higher score than the threshold will be returned.
  1659. // Value 0.0 means returns all the detected entities.
  1660. float confidence_threshold = 1;
  1661. // Labels specified in this field won't be returned.
  1662. repeated string blocked_labels = 2;
  1663. // At most this many predictions will be returned per output frame.
  1664. // Value 0 means to return all the detected entities.
  1665. int32 max_predictions = 3;
  1666. // Only Bounding Box whose size is larger than this limit will be returned.
  1667. // Object Tracking only.
  1668. // Value 0.0 means to return all the detected entities.
  1669. float bounding_box_size_limit = 4;
  1670. }
  1671. // Message describing VertexCustomConfig.
  1672. message VertexCustomConfig {
  1673. // The max prediction frame per second. This attribute sets how fast the
  1674. // operator sends prediction requests to Vertex AI endpoint. Default value is
  1675. // 0, which means there is no max prediction fps limit. The operator sends
  1676. // prediction requests at input fps.
  1677. int32 max_prediction_fps = 1;
  1678. // A description of resources that are dedicated to the DeployedModel, and
  1679. // that need a higher degree of manual configuration.
  1680. DedicatedResources dedicated_resources = 2;
  1681. // If not empty, the prediction result will be sent to the specified cloud
  1682. // function for post processing.
  1683. // * The cloud function will receive AppPlatformCloudFunctionRequest where
  1684. // the annotations field will be the json format of proto PredictResponse.
  1685. // * The cloud function should return AppPlatformCloudFunctionResponse with
  1686. // PredictResponse stored in the annotations field.
  1687. // * To drop the prediction output, simply clear the payload field in the
  1688. // returned AppPlatformCloudFunctionResponse.
  1689. string post_processing_cloud_function = 3;
  1690. // If true, the prediction request received by custom model will also contain
  1691. // metadata with the following schema:
  1692. // 'appPlatformMetadata': {
  1693. // 'application': STRING;
  1694. // 'instanceId': STRING;
  1695. // 'node': STRING;
  1696. // 'processor': STRING;
  1697. // }
  1698. bool attach_application_metadata = 4;
  1699. }
  1700. // Specification of a single machine.
  1701. message MachineSpec {
  1702. // Immutable. The type of the machine.
  1703. //
  1704. // See the [list of machine types supported for
  1705. // prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types)
  1706. //
  1707. // See the [list of machine types supported for custom
  1708. // training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types).
  1709. //
  1710. // For [DeployedModel][] this field is optional, and the default
  1711. // value is `n1-standard-2`. For [BatchPredictionJob][] or as part of
  1712. // [WorkerPoolSpec][] this field is required.
  1713. string machine_type = 1 [(google.api.field_behavior) = IMMUTABLE];
  1714. // Immutable. The type of accelerator(s) that may be attached to the machine as per
  1715. // [accelerator_count][google.cloud.visionai.v1alpha1.MachineSpec.accelerator_count].
  1716. AcceleratorType accelerator_type = 2 [(google.api.field_behavior) = IMMUTABLE];
  1717. // The number of accelerators to attach to the machine.
  1718. int32 accelerator_count = 3;
  1719. }
  1720. // The metric specification that defines the target resource utilization
  1721. // (CPU utilization, accelerator's duty cycle, and so on) for calculating the
  1722. // desired replica count.
  1723. message AutoscalingMetricSpec {
  1724. // Required. The resource metric name.
  1725. // Supported metrics:
  1726. //
  1727. // * For Online Prediction:
  1728. // * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`
  1729. // * `aiplatform.googleapis.com/prediction/online/cpu/utilization`
  1730. string metric_name = 1 [(google.api.field_behavior) = REQUIRED];
  1731. // The target resource utilization in percentage (1% - 100%) for the given
  1732. // metric; once the real usage deviates from the target by a certain
  1733. // percentage, the machine replicas change. The default value is 60
  1734. // (representing 60%) if not provided.
  1735. int32 target = 2;
  1736. }
  1737. // A description of resources that are dedicated to a DeployedModel, and
  1738. // that need a higher degree of manual configuration.
  1739. message DedicatedResources {
  1740. // Required. Immutable. The specification of a single machine used by the prediction.
  1741. MachineSpec machine_spec = 1 [
  1742. (google.api.field_behavior) = REQUIRED,
  1743. (google.api.field_behavior) = IMMUTABLE
  1744. ];
  1745. // Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
  1746. // deployed on. This value must be greater than or equal to 1.
  1747. //
  1748. // If traffic against the DeployedModel increases, it may dynamically be
  1749. // deployed onto more replicas, and as traffic decreases, some of these extra
  1750. // replicas may be freed.
  1751. int32 min_replica_count = 2 [
  1752. (google.api.field_behavior) = REQUIRED,
  1753. (google.api.field_behavior) = IMMUTABLE
  1754. ];
  1755. // Immutable. The maximum number of replicas this DeployedModel may be deployed on when
  1756. // the traffic against it increases. If the requested value is too large,
  1757. // the deployment will error, but if deployment succeeds then the ability
  1758. // to scale the model to that many replicas is guaranteed (barring service
  1759. // outages). If traffic against the DeployedModel increases beyond what its
  1760. // replicas at maximum may handle, a portion of the traffic will be dropped.
  1761. // If this value is not provided, will use [min_replica_count][google.cloud.visionai.v1alpha1.DedicatedResources.min_replica_count] as the
  1762. // default value.
  1763. //
  1764. // The value of this field impacts the charge against Vertex CPU and GPU
  1765. // quotas. Specifically, you will be charged for max_replica_count *
  1766. // number of cores in the selected machine type) and (max_replica_count *
  1767. // number of GPUs per replica in the selected machine type).
  1768. int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE];
  1769. // Immutable. The metric specifications that overrides a resource
  1770. // utilization metric (CPU utilization, accelerator's duty cycle, and so on)
  1771. // target value (default to 60 if not set). At most one entry is allowed per
  1772. // metric.
  1773. //
  1774. // If [machine_spec.accelerator_count][google.cloud.visionai.v1alpha1.MachineSpec.accelerator_count] is
  1775. // above 0, the autoscaling will be based on both CPU utilization and
  1776. // accelerator's duty cycle metrics and scale up when either metrics exceeds
  1777. // its target value while scale down if both metrics are under their target
  1778. // value. The default target value is 60 for both metrics.
  1779. //
  1780. // If [machine_spec.accelerator_count][google.cloud.visionai.v1alpha1.MachineSpec.accelerator_count] is
  1781. // 0, the autoscaling will be based on CPU utilization metric only with
  1782. // default target value 60 if not explicitly set.
  1783. //
  1784. // For example, in the case of Online Prediction, if you want to override
  1785. // target CPU utilization to 80, you should set
  1786. // [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1alpha1.AutoscalingMetricSpec.metric_name]
  1787. // to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and
  1788. // [autoscaling_metric_specs.target][google.cloud.visionai.v1alpha1.AutoscalingMetricSpec.target] to `80`.
  1789. repeated AutoscalingMetricSpec autoscaling_metric_specs = 4 [(google.api.field_behavior) = IMMUTABLE];
  1790. }
  1791. // RPC Request Messages.
  1792. // Message for DeployApplication Response.
  1793. message DeployApplicationResponse {}
  1794. // Message for UndeployApplication Response.
  1795. message UndeployApplicationResponse {}
  1796. // Message for RemoveApplicationStreamInput Response.
  1797. message RemoveApplicationStreamInputResponse {}
  1798. // Message for AddApplicationStreamInput Response.
  1799. message AddApplicationStreamInputResponse {}
  1800. // Message for AddApplicationStreamInput Response.
  1801. message UpdateApplicationStreamInputResponse {}
  1802. // Message for DeleteApplicationInstance Response.
  1803. message DeleteApplicationInstancesResponse {}
  1804. // Message for CreateApplicationInstance Response.
  1805. message CreateApplicationInstancesResponse {}
  1806. // Message for UpdateApplicationInstances Response.
  1807. message UpdateApplicationInstancesResponse {}