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