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/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/gkehub/v1beta/configmanagement/configmanagement.proto"; 22*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/gkehub/v1beta/metering/metering.proto"; 23*d5c09012SAndroid Build Coastguard Workerimport "google/cloud/gkehub/v1beta/multiclusteringress/multiclusteringress.proto"; 24*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 25*d5c09012SAndroid Build Coastguard Worker 26*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.GkeHub.V1Beta"; 27*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/gkehub/apiv1beta/gkehubpb;gkehubpb"; 28*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 29*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "FeatureProto"; 30*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.gkehub.v1beta"; 31*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\GkeHub\\V1beta"; 32*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::GkeHub::V1beta"; 33*d5c09012SAndroid Build Coastguard Worker 34*d5c09012SAndroid Build Coastguard Worker// Feature represents the settings and status of any Hub Feature. 35*d5c09012SAndroid Build Coastguard Workermessage Feature { 36*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 37*d5c09012SAndroid Build Coastguard Worker type: "gkehub.googleapis.com/Feature" 38*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/features/{feature}" 39*d5c09012SAndroid Build Coastguard Worker }; 40*d5c09012SAndroid Build Coastguard Worker 41*d5c09012SAndroid Build Coastguard Worker // Output only. The full, unique name of this Feature resource in the format 42*d5c09012SAndroid Build Coastguard Worker // `projects/*/locations/*/features/*`. 43*d5c09012SAndroid Build Coastguard Worker string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 44*d5c09012SAndroid Build Coastguard Worker 45*d5c09012SAndroid Build Coastguard Worker // GCP labels for this Feature. 46*d5c09012SAndroid Build Coastguard Worker map<string, string> labels = 2; 47*d5c09012SAndroid Build Coastguard Worker 48*d5c09012SAndroid Build Coastguard Worker // Output only. State of the Feature resource itself. 49*d5c09012SAndroid Build Coastguard Worker FeatureResourceState resource_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 50*d5c09012SAndroid Build Coastguard Worker 51*d5c09012SAndroid Build Coastguard Worker // Optional. Hub-wide Feature configuration. If this Feature does not support any 52*d5c09012SAndroid Build Coastguard Worker // Hub-wide configuration, this field may be unused. 53*d5c09012SAndroid Build Coastguard Worker CommonFeatureSpec spec = 4 [(google.api.field_behavior) = OPTIONAL]; 54*d5c09012SAndroid Build Coastguard Worker 55*d5c09012SAndroid Build Coastguard Worker // Optional. Membership-specific configuration for this Feature. If this Feature does 56*d5c09012SAndroid Build Coastguard Worker // not support any per-Membership configuration, this field may be unused. 57*d5c09012SAndroid Build Coastguard Worker // 58*d5c09012SAndroid Build Coastguard Worker // The keys indicate which Membership the configuration is for, in the form: 59*d5c09012SAndroid Build Coastguard Worker // 60*d5c09012SAndroid Build Coastguard Worker // projects/{p}/locations/{l}/memberships/{m} 61*d5c09012SAndroid Build Coastguard Worker // 62*d5c09012SAndroid Build Coastguard Worker // Where {p} is the project, {l} is a valid location and {m} is a valid 63*d5c09012SAndroid Build Coastguard Worker // Membership in this project at that location. {p} WILL match the Feature's 64*d5c09012SAndroid Build Coastguard Worker // project. 65*d5c09012SAndroid Build Coastguard Worker // 66*d5c09012SAndroid Build Coastguard Worker // {p} will always be returned as the project number, but the project ID is 67*d5c09012SAndroid Build Coastguard Worker // also accepted during input. If the same Membership is specified in the map 68*d5c09012SAndroid Build Coastguard Worker // twice (using the project ID form, and the project number form), exactly 69*d5c09012SAndroid Build Coastguard Worker // ONE of the entries will be saved, with no guarantees as to which. For this 70*d5c09012SAndroid Build Coastguard Worker // reason, it is recommended the same format be used for all entries when 71*d5c09012SAndroid Build Coastguard Worker // mutating a Feature. 72*d5c09012SAndroid Build Coastguard Worker map<string, MembershipFeatureSpec> membership_specs = 5 [(google.api.field_behavior) = OPTIONAL]; 73*d5c09012SAndroid Build Coastguard Worker 74*d5c09012SAndroid Build Coastguard Worker // Output only. The Hub-wide Feature state. 75*d5c09012SAndroid Build Coastguard Worker CommonFeatureState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 76*d5c09012SAndroid Build Coastguard Worker 77*d5c09012SAndroid Build Coastguard Worker // Output only. Membership-specific Feature status. If this Feature does 78*d5c09012SAndroid Build Coastguard Worker // report any per-Membership status, this field may be unused. 79*d5c09012SAndroid Build Coastguard Worker // 80*d5c09012SAndroid Build Coastguard Worker // The keys indicate which Membership the state is for, in the form: 81*d5c09012SAndroid Build Coastguard Worker // 82*d5c09012SAndroid Build Coastguard Worker // projects/{p}/locations/{l}/memberships/{m} 83*d5c09012SAndroid Build Coastguard Worker // 84*d5c09012SAndroid Build Coastguard Worker // Where {p} is the project number, {l} is a valid location and {m} is a valid 85*d5c09012SAndroid Build Coastguard Worker // Membership in this project at that location. {p} MUST match the Feature's 86*d5c09012SAndroid Build Coastguard Worker // project number. 87*d5c09012SAndroid Build Coastguard Worker map<string, MembershipFeatureState> membership_states = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 88*d5c09012SAndroid Build Coastguard Worker 89*d5c09012SAndroid Build Coastguard Worker // Output only. When the Feature resource was created. 90*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 91*d5c09012SAndroid Build Coastguard Worker 92*d5c09012SAndroid Build Coastguard Worker // Output only. When the Feature resource was last updated. 93*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 94*d5c09012SAndroid Build Coastguard Worker 95*d5c09012SAndroid Build Coastguard Worker // Output only. When the Feature resource was deleted. 96*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp delete_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 97*d5c09012SAndroid Build Coastguard Worker} 98*d5c09012SAndroid Build Coastguard Worker 99*d5c09012SAndroid Build Coastguard Worker// FeatureResourceState describes the state of a Feature *resource* in the 100*d5c09012SAndroid Build Coastguard Worker// GkeHub API. See `FeatureState` for the "running state" of the Feature in the 101*d5c09012SAndroid Build Coastguard Worker// Hub and across Memberships. 102*d5c09012SAndroid Build Coastguard Workermessage FeatureResourceState { 103*d5c09012SAndroid Build Coastguard Worker // State describes the lifecycle status of a Feature. 104*d5c09012SAndroid Build Coastguard Worker enum State { 105*d5c09012SAndroid Build Coastguard Worker // State is unknown or not set. 106*d5c09012SAndroid Build Coastguard Worker STATE_UNSPECIFIED = 0; 107*d5c09012SAndroid Build Coastguard Worker 108*d5c09012SAndroid Build Coastguard Worker // The Feature is being enabled, and the Feature resource is being created. 109*d5c09012SAndroid Build Coastguard Worker // Once complete, the corresponding Feature will be enabled in this Hub. 110*d5c09012SAndroid Build Coastguard Worker ENABLING = 1; 111*d5c09012SAndroid Build Coastguard Worker 112*d5c09012SAndroid Build Coastguard Worker // The Feature is enabled in this Hub, and the Feature resource is fully 113*d5c09012SAndroid Build Coastguard Worker // available. 114*d5c09012SAndroid Build Coastguard Worker ACTIVE = 2; 115*d5c09012SAndroid Build Coastguard Worker 116*d5c09012SAndroid Build Coastguard Worker // The Feature is being disabled in this Hub, and the Feature resource 117*d5c09012SAndroid Build Coastguard Worker // is being deleted. 118*d5c09012SAndroid Build Coastguard Worker DISABLING = 3; 119*d5c09012SAndroid Build Coastguard Worker 120*d5c09012SAndroid Build Coastguard Worker // The Feature resource is being updated. 121*d5c09012SAndroid Build Coastguard Worker UPDATING = 4; 122*d5c09012SAndroid Build Coastguard Worker 123*d5c09012SAndroid Build Coastguard Worker // The Feature resource is being updated by the Hub Service. 124*d5c09012SAndroid Build Coastguard Worker SERVICE_UPDATING = 5; 125*d5c09012SAndroid Build Coastguard Worker } 126*d5c09012SAndroid Build Coastguard Worker 127*d5c09012SAndroid Build Coastguard Worker // The current state of the Feature resource in the Hub API. 128*d5c09012SAndroid Build Coastguard Worker State state = 1; 129*d5c09012SAndroid Build Coastguard Worker} 130*d5c09012SAndroid Build Coastguard Worker 131*d5c09012SAndroid Build Coastguard Worker// FeatureState describes the high-level state of a Feature. It may be used to 132*d5c09012SAndroid Build Coastguard Worker// describe a Feature's state at the environ-level, or per-membershop, depending 133*d5c09012SAndroid Build Coastguard Worker// on the context. 134*d5c09012SAndroid Build Coastguard Workermessage FeatureState { 135*d5c09012SAndroid Build Coastguard Worker // Code represents a machine-readable, high-level status of the Feature. 136*d5c09012SAndroid Build Coastguard Worker enum Code { 137*d5c09012SAndroid Build Coastguard Worker // Unknown or not set. 138*d5c09012SAndroid Build Coastguard Worker CODE_UNSPECIFIED = 0; 139*d5c09012SAndroid Build Coastguard Worker 140*d5c09012SAndroid Build Coastguard Worker // The Feature is operating normally. 141*d5c09012SAndroid Build Coastguard Worker OK = 1; 142*d5c09012SAndroid Build Coastguard Worker 143*d5c09012SAndroid Build Coastguard Worker // The Feature has encountered an issue, and is operating in a degraded 144*d5c09012SAndroid Build Coastguard Worker // state. The Feature may need intervention to return to normal operation. 145*d5c09012SAndroid Build Coastguard Worker // See the description and any associated Feature-specific details for more 146*d5c09012SAndroid Build Coastguard Worker // information. 147*d5c09012SAndroid Build Coastguard Worker WARNING = 2; 148*d5c09012SAndroid Build Coastguard Worker 149*d5c09012SAndroid Build Coastguard Worker // The Feature is not operating or is in a severely degraded state. 150*d5c09012SAndroid Build Coastguard Worker // The Feature may need intervention to return to normal operation. 151*d5c09012SAndroid Build Coastguard Worker // See the description and any associated Feature-specific details for more 152*d5c09012SAndroid Build Coastguard Worker // information. 153*d5c09012SAndroid Build Coastguard Worker ERROR = 3; 154*d5c09012SAndroid Build Coastguard Worker } 155*d5c09012SAndroid Build Coastguard Worker 156*d5c09012SAndroid Build Coastguard Worker // The high-level, machine-readable status of this Feature. 157*d5c09012SAndroid Build Coastguard Worker Code code = 1; 158*d5c09012SAndroid Build Coastguard Worker 159*d5c09012SAndroid Build Coastguard Worker // A human-readable description of the current status. 160*d5c09012SAndroid Build Coastguard Worker string description = 2; 161*d5c09012SAndroid Build Coastguard Worker 162*d5c09012SAndroid Build Coastguard Worker // The time this status and any related Feature-specific details were updated. 163*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 3; 164*d5c09012SAndroid Build Coastguard Worker} 165*d5c09012SAndroid Build Coastguard Worker 166*d5c09012SAndroid Build Coastguard Worker// CommonFeatureSpec contains Hub-wide configuration information 167*d5c09012SAndroid Build Coastguard Workermessage CommonFeatureSpec { 168*d5c09012SAndroid Build Coastguard Worker oneof feature_spec { 169*d5c09012SAndroid Build Coastguard Worker // Multicluster Ingress-specific spec. 170*d5c09012SAndroid Build Coastguard Worker google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec multiclusteringress = 102; 171*d5c09012SAndroid Build Coastguard Worker } 172*d5c09012SAndroid Build Coastguard Worker} 173*d5c09012SAndroid Build Coastguard Worker 174*d5c09012SAndroid Build Coastguard Worker// CommonFeatureState contains Hub-wide Feature status information. 175*d5c09012SAndroid Build Coastguard Workermessage CommonFeatureState { 176*d5c09012SAndroid Build Coastguard Worker // Output only. The "running state" of the Feature in this Hub. 177*d5c09012SAndroid Build Coastguard Worker FeatureState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 178*d5c09012SAndroid Build Coastguard Worker} 179*d5c09012SAndroid Build Coastguard Worker 180*d5c09012SAndroid Build Coastguard Worker// MembershipFeatureSpec contains configuration information for a single 181*d5c09012SAndroid Build Coastguard Worker// Membership. 182*d5c09012SAndroid Build Coastguard Workermessage MembershipFeatureSpec { 183*d5c09012SAndroid Build Coastguard Worker oneof feature_spec { 184*d5c09012SAndroid Build Coastguard Worker // Config Management-specific spec. 185*d5c09012SAndroid Build Coastguard Worker google.cloud.gkehub.configmanagement.v1beta.MembershipSpec configmanagement = 106; 186*d5c09012SAndroid Build Coastguard Worker } 187*d5c09012SAndroid Build Coastguard Worker} 188*d5c09012SAndroid Build Coastguard Worker 189*d5c09012SAndroid Build Coastguard Worker// MembershipFeatureState contains Feature status information for a single 190*d5c09012SAndroid Build Coastguard Worker// Membership. 191*d5c09012SAndroid Build Coastguard Workermessage MembershipFeatureState { 192*d5c09012SAndroid Build Coastguard Worker oneof feature_state { 193*d5c09012SAndroid Build Coastguard Worker // Metering-specific spec. 194*d5c09012SAndroid Build Coastguard Worker google.cloud.gkehub.metering.v1beta.MembershipState metering = 104; 195*d5c09012SAndroid Build Coastguard Worker 196*d5c09012SAndroid Build Coastguard Worker // Config Management-specific state. 197*d5c09012SAndroid Build Coastguard Worker google.cloud.gkehub.configmanagement.v1beta.MembershipState configmanagement = 106; 198*d5c09012SAndroid Build Coastguard Worker } 199*d5c09012SAndroid Build Coastguard Worker 200*d5c09012SAndroid Build Coastguard Worker // The high-level state of this Feature for a single membership. 201*d5c09012SAndroid Build Coastguard Worker FeatureState state = 1; 202*d5c09012SAndroid Build Coastguard Worker} 203