aistreams.proto 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. // Copyright 2020 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.partner.aistreams.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/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option cc_enable_arenas = true;
  24. option go_package = "google.golang.org/genproto/googleapis/partner/aistreams/v1alpha1;aistreams";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "AIStreamsProto";
  27. option java_package = "com.google.partner.aistreams.v1alpha1";
  28. option php_namespace = "Google\\Cloud\\Partner\\Aistreams\\V1alpha1";
  29. // AIStreams service.
  30. service AIStreams {
  31. option (google.api.default_host) = "aistreams.googleapis.com";
  32. option (google.api.oauth_scopes) =
  33. "https://www.googleapis.com/auth/cloud-platform";
  34. // Lists Clusters in a given project and location.
  35. rpc ListClusters(ListClustersRequest) returns (ListClustersResponse) {
  36. option (google.api.http) = {
  37. get: "/v1alpha1/{parent=projects/*/locations/*}/clusters"
  38. };
  39. option (google.api.method_signature) = "parent";
  40. }
  41. // Gets details of a single Cluster.
  42. rpc GetCluster(GetClusterRequest) returns (Cluster) {
  43. option (google.api.http) = {
  44. get: "/v1alpha1/{name=projects/*/locations/*/clusters/*}"
  45. };
  46. option (google.api.method_signature) = "name";
  47. }
  48. // Creates a new Cluster in a given project and location.
  49. rpc CreateCluster(CreateClusterRequest)
  50. returns (google.longrunning.Operation) {
  51. option (google.api.http) = {
  52. post: "/v1alpha1/{parent=projects/*/locations/*}/clusters"
  53. body: "cluster"
  54. };
  55. option (google.api.method_signature) = "parent,cluster,cluster_id";
  56. option (google.longrunning.operation_info) = {
  57. response_type: "Cluster"
  58. metadata_type: "OperationMetadata"
  59. };
  60. }
  61. // Updates the parameters of a single Cluster.
  62. rpc UpdateCluster(UpdateClusterRequest)
  63. returns (google.longrunning.Operation) {
  64. option (google.api.http) = {
  65. patch: "/v1alpha1/{cluster.name=projects/*/locations/*/clusters/*}"
  66. body: "cluster"
  67. };
  68. option (google.api.method_signature) = "cluster,update_mask";
  69. option (google.longrunning.operation_info) = {
  70. response_type: "Cluster"
  71. metadata_type: "OperationMetadata"
  72. };
  73. }
  74. // Deletes a single Cluster.
  75. rpc DeleteCluster(DeleteClusterRequest)
  76. returns (google.longrunning.Operation) {
  77. option (google.api.http) = {
  78. delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*}"
  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. // Lists Streams in a given project, location and cluster.
  87. rpc ListStreams(ListStreamsRequest) returns (ListStreamsResponse) {
  88. option (google.api.http) = {
  89. get: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/streams"
  90. };
  91. option (google.api.method_signature) = "parent";
  92. }
  93. // Gets details of a single Stream.
  94. rpc GetStream(GetStreamRequest) returns (Stream) {
  95. option (google.api.http) = {
  96. get: "/v1alpha1/{name=projects/*/locations/*/clusters/*/streams/*}"
  97. };
  98. option (google.api.method_signature) = "name";
  99. }
  100. // Creates a new Stream in a given project and location.
  101. rpc CreateStream(CreateStreamRequest) returns (google.longrunning.Operation) {
  102. option (google.api.http) = {
  103. post: "/v1alpha1/{parent=projects/*/locations/*/clusters/*}/streams"
  104. body: "stream"
  105. };
  106. option (google.api.method_signature) = "parent,stream,stream_id";
  107. option (google.longrunning.operation_info) = {
  108. response_type: "Stream"
  109. metadata_type: "OperationMetadata"
  110. };
  111. }
  112. // Updates the parameters of a single Stream.
  113. rpc UpdateStream(UpdateStreamRequest) returns (google.longrunning.Operation) {
  114. option (google.api.http) = {
  115. patch: "/v1alpha1/{stream.name=projects/*/locations/*/clusters/*/streams/*}"
  116. body: "stream"
  117. };
  118. option (google.api.method_signature) = "stream,update_mask";
  119. option (google.longrunning.operation_info) = {
  120. response_type: "Stream"
  121. metadata_type: "OperationMetadata"
  122. };
  123. }
  124. // Deletes a single Stream.
  125. rpc DeleteStream(DeleteStreamRequest) returns (google.longrunning.Operation) {
  126. option (google.api.http) = {
  127. delete: "/v1alpha1/{name=projects/*/locations/*/clusters/*/streams/*}"
  128. };
  129. option (google.api.method_signature) = "name";
  130. option (google.longrunning.operation_info) = {
  131. response_type: "google.protobuf.Empty"
  132. metadata_type: "OperationMetadata"
  133. };
  134. }
  135. }
  136. // Cluster resource.
  137. message Cluster {
  138. option (google.api.resource) = {
  139. type: "aistreams.googleapis.com/Cluster"
  140. pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
  141. };
  142. // The name of the cluster. The format of cluster is:
  143. // projects/<projectid>/locations/<locationid>/clusters/<clusterid>.
  144. string name = 1;
  145. // Output only. The time at which this cluster was created.
  146. google.protobuf.Timestamp create_time = 2
  147. [(google.api.field_behavior) = OUTPUT_ONLY];
  148. // Output only. The time at which this cluster was updated.
  149. google.protobuf.Timestamp update_time = 3
  150. [(google.api.field_behavior) = OUTPUT_ONLY];
  151. // Labels with user-defined metadata.
  152. map<string, string> labels = 4;
  153. // Output only. The certificate for creating the secure connection between the
  154. // client and the AI Streams data plane.
  155. string certificate = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  156. // Output only. The endpoint of the data plane cluster.
  157. string service_endpoint = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  158. }
  159. // Request message for 'ListClusters'.
  160. message ListClustersRequest {
  161. // Required. The parent that owns the collection of Clusters.
  162. string parent = 1 [
  163. (google.api.field_behavior) = REQUIRED,
  164. (google.api.resource_reference) = {
  165. type: "locations.googleapis.com/Location"
  166. }
  167. ];
  168. // Maximum number of Clusters to return.
  169. int32 page_size = 2;
  170. // Page token received from a previous `ListClusters` call. Provide this to
  171. // retrieve the subsequent page. When paginating, all other parameters
  172. // provided to `ListClusters` must match the call that provided the page
  173. // token.
  174. string page_token = 3;
  175. // Filter request.
  176. string filter = 4;
  177. // Order by fields for the result.
  178. string order_by = 5;
  179. }
  180. // Response message from 'ListClusters'.
  181. message ListClustersResponse {
  182. // List of clusters.
  183. repeated Cluster clusters = 1;
  184. // A token, which can be sent as `page_token` to retrieve the next page.
  185. // If this field is omitted, there are no subsequent pages.
  186. string next_page_token = 2;
  187. // Locations that could not be reached.
  188. repeated string unreachable = 3;
  189. }
  190. // Request message for 'GetCluster'.
  191. message GetClusterRequest {
  192. // Required. The name of the Cluster resource to get.
  193. string name = 1 [
  194. (google.api.field_behavior) = REQUIRED,
  195. (google.api.resource_reference) = {
  196. type: "aistreams.googleapis.com/Cluster"
  197. }
  198. ];
  199. }
  200. // Request message for 'CreateCluster'.
  201. message CreateClusterRequest {
  202. // Required. The parent that owns the collection of Clusters.
  203. string parent = 1 [
  204. (google.api.field_behavior) = REQUIRED,
  205. (google.api.resource_reference) = {
  206. type: "locations.googleapis.com/Location"
  207. }
  208. ];
  209. // Required. The cluster identifier.
  210. string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
  211. // Required. The cluster resource to create.
  212. Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
  213. // Optional. An optional request ID to identify requests. Specify a unique
  214. // request ID so that if you must retry your request, the server will know to
  215. // ignore the request if it has already been completed. The server will
  216. // guarantee that for at least 60 minutes since the first request.
  217. //
  218. // For example, consider a situation where you make an initial request and the
  219. // request times out. If you make the request again with the same request ID,
  220. // the server can check if original operation with the same request ID was
  221. // received, and if so, will ignore the second request. This prevents clients
  222. // from accidentally creating duplicate commitments.
  223. //
  224. // The request ID must be a valid UUID with the exception that zero UUID is
  225. // not supported (00000000-0000-0000-0000-000000000000).
  226. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  227. }
  228. // Request message for 'UpdateCluster'.
  229. message UpdateClusterRequest {
  230. // Required. Field mask is used to specify the fields to be overwritten in the
  231. // Cluster resource by the update.
  232. // The fields specified in the update_mask are relative to the resource, not
  233. // the full request. A field will be overwritten if it is in the mask. If the
  234. // user does not provide a mask then all fields will be overwritten.
  235. google.protobuf.FieldMask update_mask = 1
  236. [(google.api.field_behavior) = REQUIRED];
  237. // Required. The Cluster resource to update.
  238. Cluster cluster = 2 [(google.api.field_behavior) = REQUIRED];
  239. // Optional. An optional request ID to identify requests. Specify a unique
  240. // request ID so that if you must retry your request, the server will know to
  241. // ignore the request if it has already been completed. The server will
  242. // guarantee that for at least 60 minutes since the first request.
  243. //
  244. // For example, consider a situation where you make an initial request and the
  245. // request times out. If you make the request again with the same request ID,
  246. // the server can check if original operation with the same request ID was
  247. // received, and if so, will ignore the second request. This prevents clients
  248. // from accidentally creating duplicate commitments.
  249. //
  250. // The request ID must be a valid UUID with the exception that zero UUID is
  251. // not supported (00000000-0000-0000-0000-000000000000).
  252. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  253. }
  254. // Request message for 'DeleteCluster'.
  255. message DeleteClusterRequest {
  256. // Required. The name of cluster to delete.
  257. string name = 1 [
  258. (google.api.field_behavior) = REQUIRED,
  259. (google.api.resource_reference) = {
  260. type: "aistreams.googleapis.com/Cluster"
  261. }
  262. ];
  263. // Optional. An optional request ID to identify requests. Specify a unique
  264. // request ID so that if you must retry your request, the server will know to
  265. // ignore the request if it has already been completed. The server will
  266. // guarantee that for at least 60 minutes after the first request.
  267. //
  268. // For example, consider a situation where you make an initial request and the
  269. // request times out. If you make the request again with the same request ID,
  270. // the server can check if original operation with the same request ID was
  271. // received, and if so, will ignore the second request. This prevents clients
  272. // from accidentally creating duplicate commitments.
  273. //
  274. // The request ID must be a valid UUID with the exception that zero UUID is
  275. // not supported (00000000-0000-0000-0000-000000000000).
  276. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  277. }
  278. // Stream resource.
  279. message Stream {
  280. option (google.api.resource) = {
  281. type: "aistreams.googleapis.com/Stream"
  282. pattern: "projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}"
  283. };
  284. // The name of the stream. The format for the full name is:
  285. // projects/<projectid>/location/<locationid>/clusters/<clusterid>/streams/<streamid>.
  286. string name = 1;
  287. // Output only. The time at which this Stream was created.
  288. google.protobuf.Timestamp create_time = 2
  289. [(google.api.field_behavior) = OUTPUT_ONLY];
  290. // Output only. The time at which this Stream was updated.
  291. google.protobuf.Timestamp update_time = 3
  292. [(google.api.field_behavior) = OUTPUT_ONLY];
  293. // The labels of the stream.
  294. map<string, string> labels = 4;
  295. }
  296. // Request message for 'ListStreams'.
  297. message ListStreamsRequest {
  298. // Required. The parent that owns the collection of the Streams.
  299. string parent = 1 [
  300. (google.api.field_behavior) = REQUIRED,
  301. (google.api.resource_reference) = {
  302. type: "aistreams.googleapis.com/Cluster"
  303. }
  304. ];
  305. // Maximum number of Streams to return.
  306. int32 page_size = 2;
  307. // Page token received from a previous `ListStreams` call. Provide this to
  308. // retrieve the subsequent page. When paginating, all other parameters
  309. // provided to `ListClusters` must match the call that provided the page
  310. // token.
  311. string page_token = 3;
  312. // Filter request.
  313. string filter = 4;
  314. // Order by fields for the result.
  315. string order_by = 5;
  316. }
  317. // Response message from 'ListStreams'.
  318. message ListStreamsResponse {
  319. // List of the streams.
  320. repeated Stream streams = 1;
  321. // A token, which can be sent as `page_token` to retrieve the next page.
  322. // If this field is omitted, there are no subsequent pages.
  323. string next_page_token = 2;
  324. // Locations that could not be reached.
  325. repeated string unreachable = 3;
  326. }
  327. // Request message for 'GetStream'.
  328. message GetStreamRequest {
  329. // Required. The name of the stream.
  330. string name = 1 [
  331. (google.api.field_behavior) = REQUIRED,
  332. (google.api.resource_reference) = {
  333. type: "aistreams.googleapis.com/Stream"
  334. }
  335. ];
  336. }
  337. // Request message for 'CreateStream'.
  338. message CreateStreamRequest {
  339. // Required. The parent that owns the collection of streams.
  340. string parent = 1 [
  341. (google.api.field_behavior) = REQUIRED,
  342. (google.api.resource_reference) = {
  343. type: "aistreams.googleapis.com/Cluster"
  344. }
  345. ];
  346. // Required. The stream identifier.
  347. string stream_id = 2 [(google.api.field_behavior) = REQUIRED];
  348. // Required. The stream to create.
  349. Stream stream = 3 [(google.api.field_behavior) = REQUIRED];
  350. // Optional. An optional request ID to identify requests. Specify a unique
  351. // request ID so that if you must retry your request, the server will know to
  352. // ignore the request if it has already been completed. The server will
  353. // guarantee that for at least 60 minutes since the first request.
  354. //
  355. // For example, consider a situation where you make an initial request and t
  356. // he request times out. If you make the request again with the same request
  357. // ID, the server can check if original operation with the same request ID
  358. // was received, and if so, will ignore the second request. This prevents
  359. // clients from accidentally creating duplicate commitments.
  360. //
  361. // The request ID must be a valid UUID with the exception that zero UUID is
  362. // not supported (00000000-0000-0000-0000-000000000000).
  363. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  364. }
  365. // Request message for 'UpdateStream'.
  366. message UpdateStreamRequest {
  367. // Required. Field mask is used to specify the fields to be overwritten in the
  368. // Stream resource by the update.
  369. // The fields specified in the update_mask are relative to the resource, not
  370. // the full request. A field will be overwritten if it is in the mask. If the
  371. // user does not provide a mask then all fields will be overwritten.
  372. google.protobuf.FieldMask update_mask = 1
  373. [(google.api.field_behavior) = REQUIRED];
  374. // Required. The stream resource to update.
  375. Stream stream = 2 [(google.api.field_behavior) = REQUIRED];
  376. // Optional. An optional request ID to identify requests. Specify a unique
  377. // request ID so that if you must retry your request, the server will know to
  378. // ignore the request if it has already been completed. The server will
  379. // guarantee that for at least 60 minutes since the first request.
  380. //
  381. // For example, consider a situation where you make an initial request and t
  382. // he request times out. If you make the request again with the same request
  383. // ID, the server can check if original operation with the same request ID
  384. // was received, and if so, will ignore the second request. This prevents
  385. // clients from accidentally creating duplicate commitments.
  386. //
  387. // The request ID must be a valid UUID with the exception that zero UUID is
  388. // not supported (00000000-0000-0000-0000-000000000000).
  389. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  390. }
  391. // Request message for 'DeleteStream'.
  392. message DeleteStreamRequest {
  393. // Required. The name of the stream.
  394. string name = 1 [
  395. (google.api.field_behavior) = REQUIRED,
  396. (google.api.resource_reference) = {
  397. type: "aistreams.googleapis.com/Stream"
  398. }
  399. ];
  400. // Optional. An optional request ID to identify requests. Specify a unique
  401. // request ID so that if you must retry your request, the server will know to
  402. // ignore the request if it has already been completed. The server will
  403. // guarantee that for at least 60 minutes after the first request.
  404. //
  405. // For example, consider a situation where you make an initial request and t
  406. // he request times out. If you make the request again with the same request
  407. // ID, the server can check if original operation with the same request ID
  408. // was received, and if so, will ignore the second request. This prevents
  409. // clients from accidentally creating duplicate commitments.
  410. //
  411. // The request ID must be a valid UUID with the exception that zero UUID is
  412. // not supported (00000000-0000-0000-0000-000000000000).
  413. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  414. }
  415. // Represents the metadata of the long-running operation.
  416. message OperationMetadata {
  417. // Output only. The time the operation was created.
  418. google.protobuf.Timestamp create_time = 1
  419. [(google.api.field_behavior) = OUTPUT_ONLY];
  420. // Output only. The time the operation finished running.
  421. google.protobuf.Timestamp end_time = 2
  422. [(google.api.field_behavior) = OUTPUT_ONLY];
  423. // Output only. Server-defined resource path for the target of the operation.
  424. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  425. // Output only. Name of the verb executed by the operation.
  426. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  427. // Output only. Human-readable status of the operation, if any.
  428. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  429. // Output only. Identifies whether the user has requested cancellation
  430. // of the operation. Operations that have successfully been cancelled
  431. // have [Operation.error][] value with a
  432. // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
  433. // `Code.CANCELLED`.
  434. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  435. // Output only. API version used to start the operation.
  436. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  437. }