1 // Copyright 2018 Google Inc.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 package google.api.servicemanagement.v1;
19 import "google/api/annotations.proto";
20 import "google/api/config_change.proto";
21 import "google/api/metric.proto";
22 import "google/api/service.proto";
23 import "google/longrunning/operations.proto";
24 import "google/protobuf/any.proto";
25 import "google/protobuf/field_mask.proto";
26 import "google/protobuf/struct.proto";
27 import "google/protobuf/timestamp.proto";
28 import "google/rpc/status.proto";
30 option csharp_namespace = "Google.Cloud.ServiceManagement.V1";
31 option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement";
32 option java_multiple_files = true;
33 option java_outer_classname = "ResourcesProto";
34 option java_package = "com.google.api.servicemanagement.v1";
35 option objc_class_prefix = "GASM";
36 option php_namespace = "Google\\Cloud\\ServiceManagement\\V1";
38 // The full representation of a Service that is managed by
39 // Google Service Management.
40 message ManagedService {
41 // The name of the service. See the [overview](/service-management/overview)
42 // for naming requirements.
43 string service_name = 2;
45 // ID of the project that produces and owns this service.
46 string producer_project_id = 3;
49 // The metadata associated with a long running operation resource.
50 message OperationMetadata {
51 // Represents the status of one operation step.
53 // The short description of the step.
54 string description = 2;
60 // Code describes the status of the operation (or one of its steps).
63 STATUS_UNSPECIFIED = 0;
65 // The operation or step has completed without errors.
68 // The operation or step has not started yet.
71 // The operation or step is in progress.
74 // The operation or step has completed with errors. If the operation is
75 // rollbackable, the rollback completed with errors too.
78 // The operation or step has completed with cancellation.
82 // The full name of the resources that this operation is directly
84 repeated string resource_names = 1;
86 // Detailed status information for each step. The order is undetermined.
87 repeated Step steps = 2;
89 // Percentage of completion of this operation, ranging from 0 to 100.
90 int32 progress_percentage = 3;
92 // The start time of the operation.
93 google.protobuf.Timestamp start_time = 4;
96 // Represents a diagnostic message (error or warning)
98 // The kind of diagnostic information possible.
100 // Warnings and errors
107 // File name and line number of the error or warning.
110 // The kind of diagnostic information provided.
113 // Message describing the error or warning.
117 // Represents a source file which is used to generate the service configuration
118 // defined by `google.api.Service`.
119 message ConfigSource {
120 // A unique ID for a specific instance of this message, typically assigned
121 // by the client for tracking purpose. If empty, the server may choose to
122 // generate one instead.
125 // Set of source configuration files that are used to generate a service
126 // configuration (`google.api.Service`).
127 repeated ConfigFile files = 2;
130 // Generic specification of a source configuration file
133 // Unknown file type.
134 FILE_TYPE_UNSPECIFIED = 0;
136 // YAML-specification of service.
137 SERVICE_CONFIG_YAML = 1;
139 // OpenAPI specification, serialized in JSON.
142 // OpenAPI specification, serialized in YAML.
145 // FileDescriptorSet, generated by protoc.
147 // To generate, use protoc with imports and source info included.
148 // For an example test.proto file, the following command would put the value
149 // in a new file named out.pb.
151 // $protoc --include_imports --include_source_info test.proto -o out.pb
152 FILE_DESCRIPTOR_SET_PROTO = 4;
154 // Uncompiled Proto file. Used for storage and display purposes only,
155 // currently server-side compilation is not supported. Should match the
156 // inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
157 // file of this type can only be included if at least one file of type
158 // FILE_DESCRIPTOR_SET_PROTO is included.
162 // The file name of the configuration file (full or relative path).
163 string file_path = 1;
165 // The bytes that constitute the file.
166 bytes file_contents = 3;
168 // The type of configuration file this represents.
169 FileType file_type = 4;
172 // Represents a service configuration with its name and id.
174 // Resource name of a service config. It must have the following
175 // format: "services/{service name}/configs/{config id}".
179 // Change report associated with a particular service configuration.
181 // It contains a list of ConfigChanges based on the comparison between
182 // two service configurations.
183 message ChangeReport {
184 // List of changes between two service configurations.
185 // The changes will be alphabetically sorted based on the identifier
187 // A ConfigChange identifier is a dot separated path to the configuration.
188 // Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
189 repeated google.api.ConfigChange config_changes = 1;
192 // A rollout resource that defines how service configuration versions are pushed
193 // to control plane systems. Typically, you create a new version of the
194 // service config, and then create a Rollout to push the service config.
196 // Strategy that specifies how clients of Google Service Controller want to
197 // send traffic to use different config versions. This is generally
198 // used by API proxy to split traffic based on your configured precentage for
199 // each config version.
201 // One example of how to gradually rollout a new service configuration using
207 // id: "example.googleapis.com/rollout_20160206"
208 // traffic_percent_strategy {
210 // "example.googleapis.com/20160201": 70.00
211 // "example.googleapis.com/20160206": 30.00
219 // id: "example.googleapis.com/rollout_20160207"
220 // traffic_percent_strategy: {
222 // "example.googleapis.com/20160206": 100.00
226 message TrafficPercentStrategy {
227 // Maps service configuration IDs to their corresponding traffic percentage.
228 // Key is the service configuration ID, Value is the traffic percentage
229 // which must be greater than 0.0 and the sum must equal to 100.0.
230 map<string, double> percentages = 1;
233 // Strategy used to delete a service. This strategy is a placeholder only
234 // used by the system generated rollout to delete a service.
235 message DeleteServiceStrategy {}
237 // Status of a Rollout.
239 // No status specified.
240 ROLLOUT_STATUS_UNSPECIFIED = 0;
242 // The Rollout is in progress.
245 // The Rollout has completed successfully.
248 // The Rollout has been cancelled. This can happen if you have overlapping
249 // Rollout pushes, and the previous ones will be cancelled.
252 // The Rollout has failed and the rollback attempt has failed too.
255 // The Rollout has not started yet and is pending for execution.
258 // The Rollout has failed and rolled back to the previous successful
260 FAILED_ROLLED_BACK = 6;
263 // Optional unique identifier of this Rollout. Only lower case letters, digits
264 // and '-' are allowed.
266 // If not specified by client, the server will generate one. The generated id
267 // will have the form of <date><revision number>, where "date" is the create
268 // date in ISO 8601 format. "revision number" is a monotonically increasing
269 // positive number that is reset every day for each service.
270 // An example of the generated rollout_id is '2016-02-16r1'
271 string rollout_id = 1;
273 // Creation time of the rollout. Readonly.
274 google.protobuf.Timestamp create_time = 2;
276 // The user who created the Rollout. Readonly.
277 string created_by = 3;
279 // The status of this rollout. Readonly. In case of a failed rollout,
280 // the system will automatically rollback to the current Rollout
281 // version. Readonly.
282 RolloutStatus status = 4;
284 // Strategy that defines which versions of service configurations should be
286 // and how they should be used at runtime.
288 // Google Service Control selects service configurations based on
289 // traffic percentage.
290 TrafficPercentStrategy traffic_percent_strategy = 5;
292 // The strategy associated with a rollout to delete a `ManagedService`.
294 DeleteServiceStrategy delete_service_strategy = 200;
297 // The name of the service associated with this Rollout.
298 string service_name = 8;