operation.proto 5.1 KB

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