1 // Copyright 2017 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.servicecontrol.v1;
19 import "google/api/annotations.proto";
20 import "google/api/servicecontrol/v1/log_entry.proto";
21 import "google/api/servicecontrol/v1/metric_value.proto";
22 import "google/protobuf/timestamp.proto";
24 option cc_enable_arenas = true;
25 option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
26 option java_multiple_files = true;
27 option java_outer_classname = "OperationProto";
28 option java_package = "com.google.api.servicecontrol.v1";
30 // Represents information regarding an operation.
32 // Defines the importance of the data contained in the operation.
34 // The API implementation may cache and aggregate the data.
35 // The data may be lost when rare and unexpected system failures occur.
38 // The API implementation doesn't cache and aggregate the data.
39 // If the method returns successfully, it's guaranteed that the data has
40 // been persisted in durable storage.
44 // Identity of the operation. This must be unique within the scope of the
45 // service that generated the operation. If the service calls
46 // Check() and Report() on the same operation, the two calls should carry
49 // UUID version 4 is recommended, though not required.
50 // In scenarios where an operation is computed from existing information
51 // and an idempotent id is desirable for deduplication purpose, UUID version 5
52 // is recommended. See RFC 4122 for details.
53 string operation_id = 1;
55 // Fully qualified name of the operation. Reserved for future use.
56 string operation_name = 2;
58 // Identity of the consumer who is using the service.
59 // This field should be filled in for the operations initiated by a
60 // consumer, but not for service-initiated operations that are
61 // not related to a specific consumer.
63 // This can be in one of the following formats:
64 // project:<project_id>,
65 // project_number:<project_number>,
67 string consumer_id = 3;
69 // Required. Start time of the operation.
70 google.protobuf.Timestamp start_time = 4;
72 // End time of the operation.
73 // Required when the operation is used in
74 // [ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
75 // but optional when the operation is used in
76 // [ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
77 google.protobuf.Timestamp end_time = 5;
79 // Labels describing the operation. Only the following labels are allowed:
81 // - Labels describing monitored resources as defined in
82 // the service configuration.
83 // - Default labels of metric values. When specified, labels defined in the
84 // metric value override these default.
85 // - The following labels defined by Google Cloud Platform:
86 // - `cloud.googleapis.com/location` describing the location where the
87 // operation happened,
88 // - `servicecontrol.googleapis.com/user_agent` describing the user agent
89 // of the API request,
90 // - `servicecontrol.googleapis.com/service_agent` describing the service
91 // used to handle the API request (e.g. ESP),
92 // - `servicecontrol.googleapis.com/platform` describing the platform
93 // where the API is served (e.g. GAE, GCE, GKE).
94 map<string, string> labels = 6;
96 // Represents information about this operation. Each MetricValueSet
97 // corresponds to a metric defined in the service configuration.
98 // The data type used in the MetricValueSet must agree with
99 // the data type specified in the metric definition.
101 // Within a single operation, it is not allowed to have more than one
102 // MetricValue instances that have the same metric names and identical
103 // label value combinations. If a request has such duplicated MetricValue
104 // instances, the entire request is rejected with
105 // an invalid argument error.
106 repeated MetricValueSet metric_value_sets = 7;
108 // Represents information to be logged.
109 repeated LogEntry log_entries = 8;
111 // DO NOT USE. This is an experimental field.
112 Importance importance = 11;