1*d5c09012SAndroid Build Coastguard Worker// Copyright 2021 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.gkehub.v1beta; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/annotations.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/client.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/gkehub/v1beta/feature.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/longrunning/operations.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/field_mask.proto"; 25*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 26*d5c09012SAndroid Build Coastguard Worker 27*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.GkeHub.V1Beta"; 28*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/gkehub/apiv1beta/gkehubpb;gkehubpb"; 29*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 30*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "ServiceProto"; 31*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.gkehub.v1beta"; 32*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\GkeHub\\V1beta"; 33*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::GkeHub::V1beta"; 34*d5c09012SAndroid Build Coastguard Worker 35*d5c09012SAndroid Build Coastguard Worker// The GKE Hub service handles the registration of many Kubernetes clusters to 36*d5c09012SAndroid Build Coastguard Worker// Google Cloud, and the management of multi-cluster features over those 37*d5c09012SAndroid Build Coastguard Worker// clusters. 38*d5c09012SAndroid Build Coastguard Worker// 39*d5c09012SAndroid Build Coastguard Worker// The GKE Hub service operates on the following resources: 40*d5c09012SAndroid Build Coastguard Worker// 41*d5c09012SAndroid Build Coastguard Worker// * [Membership][google.cloud.gkehub.v1beta.Membership] 42*d5c09012SAndroid Build Coastguard Worker// * [Feature][google.cloud.gkehub.v1beta.Feature] 43*d5c09012SAndroid Build Coastguard Worker// 44*d5c09012SAndroid Build Coastguard Worker// GKE Hub is currently only available in the global region. 45*d5c09012SAndroid Build Coastguard Worker// 46*d5c09012SAndroid Build Coastguard Worker// **Membership management may be non-trivial:** it is recommended to use one 47*d5c09012SAndroid Build Coastguard Worker// of the Google-provided client libraries or tools where possible when working 48*d5c09012SAndroid Build Coastguard Worker// with Membership resources. 49*d5c09012SAndroid Build Coastguard Workerservice GkeHub { 50*d5c09012SAndroid Build Coastguard Worker option (google.api.default_host) = "gkehub.googleapis.com"; 51*d5c09012SAndroid Build Coastguard Worker option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; 52*d5c09012SAndroid Build Coastguard Worker 53*d5c09012SAndroid Build Coastguard Worker // Lists Features in a given project and location. 54*d5c09012SAndroid Build Coastguard Worker rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) { 55*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 56*d5c09012SAndroid Build Coastguard Worker get: "/v1beta/{parent=projects/*/locations/*}/features" 57*d5c09012SAndroid Build Coastguard Worker }; 58*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "parent"; 59*d5c09012SAndroid Build Coastguard Worker } 60*d5c09012SAndroid Build Coastguard Worker 61*d5c09012SAndroid Build Coastguard Worker // Gets details of a single Feature. 62*d5c09012SAndroid Build Coastguard Worker rpc GetFeature(GetFeatureRequest) returns (Feature) { 63*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 64*d5c09012SAndroid Build Coastguard Worker get: "/v1beta/{name=projects/*/locations/*/features/*}" 65*d5c09012SAndroid Build Coastguard Worker }; 66*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 67*d5c09012SAndroid Build Coastguard Worker } 68*d5c09012SAndroid Build Coastguard Worker 69*d5c09012SAndroid Build Coastguard Worker // Adds a new Feature. 70*d5c09012SAndroid Build Coastguard Worker rpc CreateFeature(CreateFeatureRequest) returns (google.longrunning.Operation) { 71*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 72*d5c09012SAndroid Build Coastguard Worker post: "/v1beta/{parent=projects/*/locations/*}/features" 73*d5c09012SAndroid Build Coastguard Worker body: "resource" 74*d5c09012SAndroid Build Coastguard Worker }; 75*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "parent,resource,feature_id"; 76*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 77*d5c09012SAndroid Build Coastguard Worker response_type: "Feature" 78*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadata" 79*d5c09012SAndroid Build Coastguard Worker }; 80*d5c09012SAndroid Build Coastguard Worker } 81*d5c09012SAndroid Build Coastguard Worker 82*d5c09012SAndroid Build Coastguard Worker // Removes a Feature. 83*d5c09012SAndroid Build Coastguard Worker rpc DeleteFeature(DeleteFeatureRequest) returns (google.longrunning.Operation) { 84*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 85*d5c09012SAndroid Build Coastguard Worker delete: "/v1beta/{name=projects/*/locations/*/features/*}" 86*d5c09012SAndroid Build Coastguard Worker }; 87*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name"; 88*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 89*d5c09012SAndroid Build Coastguard Worker response_type: "google.protobuf.Empty" 90*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadata" 91*d5c09012SAndroid Build Coastguard Worker }; 92*d5c09012SAndroid Build Coastguard Worker } 93*d5c09012SAndroid Build Coastguard Worker 94*d5c09012SAndroid Build Coastguard Worker // Updates an existing Feature. 95*d5c09012SAndroid Build Coastguard Worker rpc UpdateFeature(UpdateFeatureRequest) returns (google.longrunning.Operation) { 96*d5c09012SAndroid Build Coastguard Worker option (google.api.http) = { 97*d5c09012SAndroid Build Coastguard Worker patch: "/v1beta/{name=projects/*/locations/*/features/*}" 98*d5c09012SAndroid Build Coastguard Worker body: "resource" 99*d5c09012SAndroid Build Coastguard Worker }; 100*d5c09012SAndroid Build Coastguard Worker option (google.api.method_signature) = "name,resource,update_mask"; 101*d5c09012SAndroid Build Coastguard Worker option (google.longrunning.operation_info) = { 102*d5c09012SAndroid Build Coastguard Worker response_type: "Feature" 103*d5c09012SAndroid Build Coastguard Worker metadata_type: "OperationMetadata" 104*d5c09012SAndroid Build Coastguard Worker }; 105*d5c09012SAndroid Build Coastguard Worker } 106*d5c09012SAndroid Build Coastguard Worker} 107*d5c09012SAndroid Build Coastguard Worker 108*d5c09012SAndroid Build Coastguard Worker// Request message for `GkeHub.ListFeatures` method. 109*d5c09012SAndroid Build Coastguard Workermessage ListFeaturesRequest { 110*d5c09012SAndroid Build Coastguard Worker // The parent (project and location) where the Features will be listed. 111*d5c09012SAndroid Build Coastguard Worker // Specified in the format `projects/*/locations/*`. 112*d5c09012SAndroid Build Coastguard Worker string parent = 1; 113*d5c09012SAndroid Build Coastguard Worker 114*d5c09012SAndroid Build Coastguard Worker // When requesting a 'page' of resources, `page_size` specifies number of 115*d5c09012SAndroid Build Coastguard Worker // resources to return. If unspecified or set to 0, all resources will 116*d5c09012SAndroid Build Coastguard Worker // be returned. 117*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2; 118*d5c09012SAndroid Build Coastguard Worker 119*d5c09012SAndroid Build Coastguard Worker // Token returned by previous call to `ListFeatures` which 120*d5c09012SAndroid Build Coastguard Worker // specifies the position in the list from where to continue listing the 121*d5c09012SAndroid Build Coastguard Worker // resources. 122*d5c09012SAndroid Build Coastguard Worker string page_token = 3; 123*d5c09012SAndroid Build Coastguard Worker 124*d5c09012SAndroid Build Coastguard Worker // Lists Features that match the filter expression, following the syntax 125*d5c09012SAndroid Build Coastguard Worker // outlined in https://google.aip.dev/160. 126*d5c09012SAndroid Build Coastguard Worker // 127*d5c09012SAndroid Build Coastguard Worker // Examples: 128*d5c09012SAndroid Build Coastguard Worker // 129*d5c09012SAndroid Build Coastguard Worker // - Feature with the name "servicemesh" in project "foo-proj": 130*d5c09012SAndroid Build Coastguard Worker // 131*d5c09012SAndroid Build Coastguard Worker // name = "projects/foo-proj/locations/global/features/servicemesh" 132*d5c09012SAndroid Build Coastguard Worker // 133*d5c09012SAndroid Build Coastguard Worker // - Features that have a label called `foo`: 134*d5c09012SAndroid Build Coastguard Worker // 135*d5c09012SAndroid Build Coastguard Worker // labels.foo:* 136*d5c09012SAndroid Build Coastguard Worker // 137*d5c09012SAndroid Build Coastguard Worker // - Features that have a label called `foo` whose value is `bar`: 138*d5c09012SAndroid Build Coastguard Worker // 139*d5c09012SAndroid Build Coastguard Worker // labels.foo = bar 140*d5c09012SAndroid Build Coastguard Worker string filter = 4; 141*d5c09012SAndroid Build Coastguard Worker 142*d5c09012SAndroid Build Coastguard Worker // One or more fields to compare and use to sort the output. 143*d5c09012SAndroid Build Coastguard Worker // See https://google.aip.dev/132#ordering. 144*d5c09012SAndroid Build Coastguard Worker string order_by = 5; 145*d5c09012SAndroid Build Coastguard Worker} 146*d5c09012SAndroid Build Coastguard Worker 147*d5c09012SAndroid Build Coastguard Worker// Response message for the `GkeHub.ListFeatures` method. 148*d5c09012SAndroid Build Coastguard Workermessage ListFeaturesResponse { 149*d5c09012SAndroid Build Coastguard Worker // The list of matching Features 150*d5c09012SAndroid Build Coastguard Worker repeated Feature resources = 1; 151*d5c09012SAndroid Build Coastguard Worker 152*d5c09012SAndroid Build Coastguard Worker // A token to request the next page of resources from the 153*d5c09012SAndroid Build Coastguard Worker // `ListFeatures` method. The value of an empty string means 154*d5c09012SAndroid Build Coastguard Worker // that there are no more resources to return. 155*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 156*d5c09012SAndroid Build Coastguard Worker} 157*d5c09012SAndroid Build Coastguard Worker 158*d5c09012SAndroid Build Coastguard Worker// Request message for `GkeHub.GetFeature` method. 159*d5c09012SAndroid Build Coastguard Workermessage GetFeatureRequest { 160*d5c09012SAndroid Build Coastguard Worker // The Feature resource name in the format 161*d5c09012SAndroid Build Coastguard Worker // `projects/*/locations/*/features/*` 162*d5c09012SAndroid Build Coastguard Worker string name = 1; 163*d5c09012SAndroid Build Coastguard Worker} 164*d5c09012SAndroid Build Coastguard Worker 165*d5c09012SAndroid Build Coastguard Worker// Request message for the `GkeHub.CreateFeature` method. 166*d5c09012SAndroid Build Coastguard Workermessage CreateFeatureRequest { 167*d5c09012SAndroid Build Coastguard Worker // The parent (project and location) where the Feature will be created. 168*d5c09012SAndroid Build Coastguard Worker // Specified in the format `projects/*/locations/*`. 169*d5c09012SAndroid Build Coastguard Worker string parent = 1; 170*d5c09012SAndroid Build Coastguard Worker 171*d5c09012SAndroid Build Coastguard Worker // The ID of the feature to create. 172*d5c09012SAndroid Build Coastguard Worker string feature_id = 2; 173*d5c09012SAndroid Build Coastguard Worker 174*d5c09012SAndroid Build Coastguard Worker // The Feature resource to create. 175*d5c09012SAndroid Build Coastguard Worker Feature resource = 3; 176*d5c09012SAndroid Build Coastguard Worker 177*d5c09012SAndroid Build Coastguard Worker // Optional. A request ID to identify requests. Specify a unique request ID 178*d5c09012SAndroid Build Coastguard Worker // so that if you must retry your request, the server will know to ignore 179*d5c09012SAndroid Build Coastguard Worker // the request if it has already been completed. The server will guarantee 180*d5c09012SAndroid Build Coastguard Worker // that for at least 60 minutes after the first request. 181*d5c09012SAndroid Build Coastguard Worker // 182*d5c09012SAndroid Build Coastguard Worker // For example, consider a situation where you make an initial request and 183*d5c09012SAndroid Build Coastguard Worker // the request times out. If you make the request again with the same request 184*d5c09012SAndroid Build Coastguard Worker // ID, the server can check if original operation with the same request ID 185*d5c09012SAndroid Build Coastguard Worker // was received, and if so, will ignore the second request. This prevents 186*d5c09012SAndroid Build Coastguard Worker // clients from accidentally creating duplicate commitments. 187*d5c09012SAndroid Build Coastguard Worker // 188*d5c09012SAndroid Build Coastguard Worker // The request ID must be a valid UUID with the exception that zero UUID is 189*d5c09012SAndroid Build Coastguard Worker // not supported (00000000-0000-0000-0000-000000000000). 190*d5c09012SAndroid Build Coastguard Worker string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 191*d5c09012SAndroid Build Coastguard Worker} 192*d5c09012SAndroid Build Coastguard Worker 193*d5c09012SAndroid Build Coastguard Worker// Request message for `GkeHub.DeleteFeature` method. 194*d5c09012SAndroid Build Coastguard Workermessage DeleteFeatureRequest { 195*d5c09012SAndroid Build Coastguard Worker // The Feature resource name in the format 196*d5c09012SAndroid Build Coastguard Worker // `projects/*/locations/*/features/*`. 197*d5c09012SAndroid Build Coastguard Worker string name = 1; 198*d5c09012SAndroid Build Coastguard Worker 199*d5c09012SAndroid Build Coastguard Worker // If set to true, the delete will ignore any outstanding resources for 200*d5c09012SAndroid Build Coastguard Worker // this Feature (that is, `FeatureState.has_resources` is set to true). These 201*d5c09012SAndroid Build Coastguard Worker // resources will NOT be cleaned up or modified in any way. 202*d5c09012SAndroid Build Coastguard Worker bool force = 2; 203*d5c09012SAndroid Build Coastguard Worker 204*d5c09012SAndroid Build Coastguard Worker // Optional. A request ID to identify requests. Specify a unique request ID 205*d5c09012SAndroid Build Coastguard Worker // so that if you must retry your request, the server will know to ignore 206*d5c09012SAndroid Build Coastguard Worker // the request if it has already been completed. The server will guarantee 207*d5c09012SAndroid Build Coastguard Worker // that for at least 60 minutes after the first request. 208*d5c09012SAndroid Build Coastguard Worker // 209*d5c09012SAndroid Build Coastguard Worker // For example, consider a situation where you make an initial request and 210*d5c09012SAndroid Build Coastguard Worker // the request times out. If you make the request again with the same request 211*d5c09012SAndroid Build Coastguard Worker // ID, the server can check if original operation with the same request ID 212*d5c09012SAndroid Build Coastguard Worker // was received, and if so, will ignore the second request. This prevents 213*d5c09012SAndroid Build Coastguard Worker // clients from accidentally creating duplicate commitments. 214*d5c09012SAndroid Build Coastguard Worker // 215*d5c09012SAndroid Build Coastguard Worker // The request ID must be a valid UUID with the exception that zero UUID is 216*d5c09012SAndroid Build Coastguard Worker // not supported (00000000-0000-0000-0000-000000000000). 217*d5c09012SAndroid Build Coastguard Worker string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; 218*d5c09012SAndroid Build Coastguard Worker} 219*d5c09012SAndroid Build Coastguard Worker 220*d5c09012SAndroid Build Coastguard Worker// Request message for `GkeHub.UpdateFeature` method. 221*d5c09012SAndroid Build Coastguard Workermessage UpdateFeatureRequest { 222*d5c09012SAndroid Build Coastguard Worker // The Feature resource name in the format 223*d5c09012SAndroid Build Coastguard Worker // `projects/*/locations/*/features/*`. 224*d5c09012SAndroid Build Coastguard Worker string name = 1; 225*d5c09012SAndroid Build Coastguard Worker 226*d5c09012SAndroid Build Coastguard Worker // Mask of fields to update. 227*d5c09012SAndroid Build Coastguard Worker google.protobuf.FieldMask update_mask = 2; 228*d5c09012SAndroid Build Coastguard Worker 229*d5c09012SAndroid Build Coastguard Worker // Only fields specified in update_mask are updated. 230*d5c09012SAndroid Build Coastguard Worker // If you specify a field in the update_mask but don't specify its value here 231*d5c09012SAndroid Build Coastguard Worker // that field will be deleted. 232*d5c09012SAndroid Build Coastguard Worker // If you are updating a map field, set the value of a key to null or empty 233*d5c09012SAndroid Build Coastguard Worker // string to delete the key from the map. It's not possible to update a key's 234*d5c09012SAndroid Build Coastguard Worker // value to the empty string. 235*d5c09012SAndroid Build Coastguard Worker // If you specify the update_mask to be a special path "*", fully replaces all 236*d5c09012SAndroid Build Coastguard Worker // user-modifiable fields to match `resource`. 237*d5c09012SAndroid Build Coastguard Worker Feature resource = 3; 238*d5c09012SAndroid Build Coastguard Worker 239*d5c09012SAndroid Build Coastguard Worker // Optional. A request ID to identify requests. Specify a unique request ID 240*d5c09012SAndroid Build Coastguard Worker // so that if you must retry your request, the server will know to ignore 241*d5c09012SAndroid Build Coastguard Worker // the request if it has already been completed. The server will guarantee 242*d5c09012SAndroid Build Coastguard Worker // that for at least 60 minutes after the first request. 243*d5c09012SAndroid Build Coastguard Worker // 244*d5c09012SAndroid Build Coastguard Worker // For example, consider a situation where you make an initial request and 245*d5c09012SAndroid Build Coastguard Worker // the request times out. If you make the request again with the same request 246*d5c09012SAndroid Build Coastguard Worker // ID, the server can check if original operation with the same request ID 247*d5c09012SAndroid Build Coastguard Worker // was received, and if so, will ignore the second request. This prevents 248*d5c09012SAndroid Build Coastguard Worker // clients from accidentally creating duplicate commitments. 249*d5c09012SAndroid Build Coastguard Worker // 250*d5c09012SAndroid Build Coastguard Worker // The request ID must be a valid UUID with the exception that zero UUID is 251*d5c09012SAndroid Build Coastguard Worker // not supported (00000000-0000-0000-0000-000000000000). 252*d5c09012SAndroid Build Coastguard Worker string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; 253*d5c09012SAndroid Build Coastguard Worker} 254*d5c09012SAndroid Build Coastguard Worker 255*d5c09012SAndroid Build Coastguard Worker// Represents the metadata of the long-running operation. 256*d5c09012SAndroid Build Coastguard Workermessage OperationMetadata { 257*d5c09012SAndroid Build Coastguard Worker // Output only. The time the operation was created. 258*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 259*d5c09012SAndroid Build Coastguard Worker 260*d5c09012SAndroid Build Coastguard Worker // Output only. The time the operation finished running. 261*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 262*d5c09012SAndroid Build Coastguard Worker 263*d5c09012SAndroid Build Coastguard Worker // Output only. Server-defined resource path for the target of the operation. 264*d5c09012SAndroid Build Coastguard Worker string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 265*d5c09012SAndroid Build Coastguard Worker 266*d5c09012SAndroid Build Coastguard Worker // Output only. Name of the verb executed by the operation. 267*d5c09012SAndroid Build Coastguard Worker string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 268*d5c09012SAndroid Build Coastguard Worker 269*d5c09012SAndroid Build Coastguard Worker // Output only. Human-readable status of the operation, if any. 270*d5c09012SAndroid Build Coastguard Worker string status_detail = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 271*d5c09012SAndroid Build Coastguard Worker 272*d5c09012SAndroid Build Coastguard Worker // Output only. Identifies whether the user has requested cancellation 273*d5c09012SAndroid Build Coastguard Worker // of the operation. Operations that have successfully been cancelled 274*d5c09012SAndroid Build Coastguard Worker // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, 275*d5c09012SAndroid Build Coastguard Worker // corresponding to `Code.CANCELLED`. 276*d5c09012SAndroid Build Coastguard Worker bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 277*d5c09012SAndroid Build Coastguard Worker 278*d5c09012SAndroid Build Coastguard Worker // Output only. API version used to start the operation. 279*d5c09012SAndroid Build Coastguard Worker string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 280*d5c09012SAndroid Build Coastguard Worker} 281