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