xref: /aosp_15_r20/external/googleapis/google/api/servicecontrol/v1/operation.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.api.servicecontrol.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/servicecontrol/v1/log_entry.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/api/servicecontrol/v1/metric_value.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/any.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
23*d5c09012SAndroid Build Coastguard Worker
24*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
25*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.ServiceControl.V1";
26*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb";
27*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
28*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "OperationProto";
29*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.api.servicecontrol.v1";
30*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\ServiceControl\\V1";
31*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::ServiceControl::V1";
32*d5c09012SAndroid Build Coastguard Worker
33*d5c09012SAndroid Build Coastguard Worker// Represents information regarding an operation.
34*d5c09012SAndroid Build Coastguard Workermessage Operation {
35*d5c09012SAndroid Build Coastguard Worker  // Defines the importance of the data contained in the operation.
36*d5c09012SAndroid Build Coastguard Worker  enum Importance {
37*d5c09012SAndroid Build Coastguard Worker    // Allows data caching, batching, and aggregation. It provides
38*d5c09012SAndroid Build Coastguard Worker    // higher performance with higher data loss risk.
39*d5c09012SAndroid Build Coastguard Worker    LOW = 0;
40*d5c09012SAndroid Build Coastguard Worker
41*d5c09012SAndroid Build Coastguard Worker    // Disables data aggregation to minimize data loss. It is for operations
42*d5c09012SAndroid Build Coastguard Worker    // that contains significant monetary value or audit trail. This feature
43*d5c09012SAndroid Build Coastguard Worker    // only applies to the client libraries.
44*d5c09012SAndroid Build Coastguard Worker    HIGH = 1;
45*d5c09012SAndroid Build Coastguard Worker  }
46*d5c09012SAndroid Build Coastguard Worker
47*d5c09012SAndroid Build Coastguard Worker  // Identity of the operation. This must be unique within the scope of the
48*d5c09012SAndroid Build Coastguard Worker  // service that generated the operation. If the service calls
49*d5c09012SAndroid Build Coastguard Worker  // Check() and Report() on the same operation, the two calls should carry
50*d5c09012SAndroid Build Coastguard Worker  // the same id.
51*d5c09012SAndroid Build Coastguard Worker  //
52*d5c09012SAndroid Build Coastguard Worker  // UUID version 4 is recommended, though not required.
53*d5c09012SAndroid Build Coastguard Worker  // In scenarios where an operation is computed from existing information
54*d5c09012SAndroid Build Coastguard Worker  // and an idempotent id is desirable for deduplication purpose, UUID version 5
55*d5c09012SAndroid Build Coastguard Worker  // is recommended. See RFC 4122 for details.
56*d5c09012SAndroid Build Coastguard Worker  string operation_id = 1;
57*d5c09012SAndroid Build Coastguard Worker
58*d5c09012SAndroid Build Coastguard Worker  // Fully qualified name of the operation. Reserved for future use.
59*d5c09012SAndroid Build Coastguard Worker  string operation_name = 2;
60*d5c09012SAndroid Build Coastguard Worker
61*d5c09012SAndroid Build Coastguard Worker  // Identity of the consumer who is using the service.
62*d5c09012SAndroid Build Coastguard Worker  // This field should be filled in for the operations initiated by a
63*d5c09012SAndroid Build Coastguard Worker  // consumer, but not for service-initiated operations that are
64*d5c09012SAndroid Build Coastguard Worker  // not related to a specific consumer.
65*d5c09012SAndroid Build Coastguard Worker  //
66*d5c09012SAndroid Build Coastguard Worker  // - This can be in one of the following formats:
67*d5c09012SAndroid Build Coastguard Worker  //     - project:PROJECT_ID,
68*d5c09012SAndroid Build Coastguard Worker  //     - project`_`number:PROJECT_NUMBER,
69*d5c09012SAndroid Build Coastguard Worker  //     - projects/PROJECT_ID or PROJECT_NUMBER,
70*d5c09012SAndroid Build Coastguard Worker  //     - folders/FOLDER_NUMBER,
71*d5c09012SAndroid Build Coastguard Worker  //     - organizations/ORGANIZATION_NUMBER,
72*d5c09012SAndroid Build Coastguard Worker  //     - api`_`key:API_KEY.
73*d5c09012SAndroid Build Coastguard Worker  string consumer_id = 3;
74*d5c09012SAndroid Build Coastguard Worker
75*d5c09012SAndroid Build Coastguard Worker  // Required. Start time of the operation.
76*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp start_time = 4;
77*d5c09012SAndroid Build Coastguard Worker
78*d5c09012SAndroid Build Coastguard Worker  // End time of the operation.
79*d5c09012SAndroid Build Coastguard Worker  // Required when the operation is used in
80*d5c09012SAndroid Build Coastguard Worker  // [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
81*d5c09012SAndroid Build Coastguard Worker  // but optional when the operation is used in
82*d5c09012SAndroid Build Coastguard Worker  // [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
83*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp end_time = 5;
84*d5c09012SAndroid Build Coastguard Worker
85*d5c09012SAndroid Build Coastguard Worker  // Labels describing the operation. Only the following labels are allowed:
86*d5c09012SAndroid Build Coastguard Worker  //
87*d5c09012SAndroid Build Coastguard Worker  // - Labels describing monitored resources as defined in
88*d5c09012SAndroid Build Coastguard Worker  //   the service configuration.
89*d5c09012SAndroid Build Coastguard Worker  // - Default labels of metric values. When specified, labels defined in the
90*d5c09012SAndroid Build Coastguard Worker  //   metric value override these default.
91*d5c09012SAndroid Build Coastguard Worker  // - The following labels defined by Google Cloud Platform:
92*d5c09012SAndroid Build Coastguard Worker  //     - `cloud.googleapis.com/location` describing the location where the
93*d5c09012SAndroid Build Coastguard Worker  //        operation happened,
94*d5c09012SAndroid Build Coastguard Worker  //     - `servicecontrol.googleapis.com/user_agent` describing the user agent
95*d5c09012SAndroid Build Coastguard Worker  //        of the API request,
96*d5c09012SAndroid Build Coastguard Worker  //     - `servicecontrol.googleapis.com/service_agent` describing the service
97*d5c09012SAndroid Build Coastguard Worker  //        used to handle the API request (e.g. ESP),
98*d5c09012SAndroid Build Coastguard Worker  //     - `servicecontrol.googleapis.com/platform` describing the platform
99*d5c09012SAndroid Build Coastguard Worker  //        where the API is served, such as App Engine, Compute Engine, or
100*d5c09012SAndroid Build Coastguard Worker  //        Kubernetes Engine.
101*d5c09012SAndroid Build Coastguard Worker  map<string, string> labels = 6;
102*d5c09012SAndroid Build Coastguard Worker
103*d5c09012SAndroid Build Coastguard Worker  // Represents information about this operation. Each MetricValueSet
104*d5c09012SAndroid Build Coastguard Worker  // corresponds to a metric defined in the service configuration.
105*d5c09012SAndroid Build Coastguard Worker  // The data type used in the MetricValueSet must agree with
106*d5c09012SAndroid Build Coastguard Worker  // the data type specified in the metric definition.
107*d5c09012SAndroid Build Coastguard Worker  //
108*d5c09012SAndroid Build Coastguard Worker  // Within a single operation, it is not allowed to have more than one
109*d5c09012SAndroid Build Coastguard Worker  // MetricValue instances that have the same metric names and identical
110*d5c09012SAndroid Build Coastguard Worker  // label value combinations. If a request has such duplicated MetricValue
111*d5c09012SAndroid Build Coastguard Worker  // instances, the entire request is rejected with
112*d5c09012SAndroid Build Coastguard Worker  // an invalid argument error.
113*d5c09012SAndroid Build Coastguard Worker  repeated MetricValueSet metric_value_sets = 7;
114*d5c09012SAndroid Build Coastguard Worker
115*d5c09012SAndroid Build Coastguard Worker  // Represents information to be logged.
116*d5c09012SAndroid Build Coastguard Worker  repeated LogEntry log_entries = 8;
117*d5c09012SAndroid Build Coastguard Worker
118*d5c09012SAndroid Build Coastguard Worker  // DO NOT USE. This is an experimental field.
119*d5c09012SAndroid Build Coastguard Worker  Importance importance = 11;
120*d5c09012SAndroid Build Coastguard Worker
121*d5c09012SAndroid Build Coastguard Worker  // Unimplemented.
122*d5c09012SAndroid Build Coastguard Worker  repeated google.protobuf.Any extensions = 16;
123*d5c09012SAndroid Build Coastguard Worker}
124