google-cloud-service_management-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +75 -0
  6. data/lib/google-cloud-service_management-v1.rb +21 -0
  7. data/lib/google/api/servicemanagement/v1/resources_pb.rb +123 -0
  8. data/lib/google/api/servicemanagement/v1/servicemanager_pb.rb +146 -0
  9. data/lib/google/api/servicemanagement/v1/servicemanager_services_pb.rb +148 -0
  10. data/lib/google/cloud/service_management/v1.rb +35 -0
  11. data/lib/google/cloud/service_management/v1/service_manager.rb +49 -0
  12. data/lib/google/cloud/service_management/v1/service_manager/client.rb +1563 -0
  13. data/lib/google/cloud/service_management/v1/service_manager/credentials.rb +54 -0
  14. data/lib/google/cloud/service_management/v1/service_manager/operations.rb +570 -0
  15. data/lib/google/cloud/service_management/v1/version.rb +28 -0
  16. data/proto_docs/README.md +4 -0
  17. data/proto_docs/google/api/auth.rb +192 -0
  18. data/proto_docs/google/api/backend.rb +55 -0
  19. data/proto_docs/google/api/billing.rb +69 -0
  20. data/proto_docs/google/api/config_change.rb +89 -0
  21. data/proto_docs/google/api/context.rb +67 -0
  22. data/proto_docs/google/api/control.rb +34 -0
  23. data/proto_docs/google/api/documentation.rb +164 -0
  24. data/proto_docs/google/api/endpoint.rb +70 -0
  25. data/proto_docs/google/api/field_behavior.rb +59 -0
  26. data/proto_docs/google/api/label.rb +49 -0
  27. data/proto_docs/google/api/log.rb +54 -0
  28. data/proto_docs/google/api/logging.rb +85 -0
  29. data/proto_docs/google/api/metric.rb +203 -0
  30. data/proto_docs/google/api/monitored_resource.rb +137 -0
  31. data/proto_docs/google/api/monitoring.rb +91 -0
  32. data/proto_docs/google/api/quota.rb +281 -0
  33. data/proto_docs/google/api/resource.rb +283 -0
  34. data/proto_docs/google/api/service.rb +151 -0
  35. data/proto_docs/google/api/servicemanagement/v1/resources.rb +326 -0
  36. data/proto_docs/google/api/servicemanagement/v1/servicemanager.rb +370 -0
  37. data/proto_docs/google/api/source_info.rb +31 -0
  38. data/proto_docs/google/api/system_parameter.rb +103 -0
  39. data/proto_docs/google/api/usage.rb +94 -0
  40. data/proto_docs/google/longrunning/operations.rb +150 -0
  41. data/proto_docs/google/protobuf/any.rb +138 -0
  42. data/proto_docs/google/protobuf/api.rb +194 -0
  43. data/proto_docs/google/protobuf/empty.rb +36 -0
  44. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  45. data/proto_docs/google/protobuf/source_context.rb +33 -0
  46. data/proto_docs/google/protobuf/struct.rb +96 -0
  47. data/proto_docs/google/protobuf/timestamp.rb +120 -0
  48. data/proto_docs/google/protobuf/type.rb +223 -0
  49. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  50. data/proto_docs/google/rpc/status.rb +46 -0
  51. metadata +232 -0
@@ -0,0 +1,203 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Defines a metric type and its schema. Once a metric descriptor is created,
23
+ # deleting or altering it stops data collection and makes the metric type's
24
+ # existing data unusable.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # The resource name of the metric descriptor.
28
+ # @!attribute [rw] type
29
+ # @return [::String]
30
+ # The metric type, including its DNS name prefix. The type is not
31
+ # URL-encoded. All user-defined custom metric types have the DNS name
32
+ # `custom.googleapis.com`. Metric types should use a natural hierarchical
33
+ # grouping. For example:
34
+ #
35
+ # "custom.googleapis.com/invoice/paid/amount"
36
+ # "appengine.googleapis.com/http/server/response_latencies"
37
+ # @!attribute [rw] labels
38
+ # @return [::Array<::Google::Api::LabelDescriptor>]
39
+ # The set of labels that can be used to describe a specific
40
+ # instance of this metric type. For example, the
41
+ # `appengine.googleapis.com/http/server/response_latencies` metric
42
+ # type has a label for the HTTP response code, `response_code`, so
43
+ # you can look at latencies for successful responses or just
44
+ # for responses that failed.
45
+ # @!attribute [rw] metric_kind
46
+ # @return [::Google::Api::MetricDescriptor::MetricKind]
47
+ # Whether the metric records instantaneous values, changes to a value, etc.
48
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
49
+ # @!attribute [rw] value_type
50
+ # @return [::Google::Api::MetricDescriptor::ValueType]
51
+ # Whether the measurement is an integer, a floating-point number, etc.
52
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
53
+ # @!attribute [rw] unit
54
+ # @return [::String]
55
+ # The unit in which the metric value is reported. It is only applicable
56
+ # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
57
+ # supported units are a subset of [The Unified Code for Units of
58
+ # Measure](http://unitsofmeasure.org/ucum.html) standard:
59
+ #
60
+ # **Basic units (UNIT)**
61
+ #
62
+ # * `bit` bit
63
+ # * `By` byte
64
+ # * `s` second
65
+ # * `min` minute
66
+ # * `h` hour
67
+ # * `d` day
68
+ #
69
+ # **Prefixes (PREFIX)**
70
+ #
71
+ # * `k` kilo (10**3)
72
+ # * `M` mega (10**6)
73
+ # * `G` giga (10**9)
74
+ # * `T` tera (10**12)
75
+ # * `P` peta (10**15)
76
+ # * `E` exa (10**18)
77
+ # * `Z` zetta (10**21)
78
+ # * `Y` yotta (10**24)
79
+ # * `m` milli (10**-3)
80
+ # * `u` micro (10**-6)
81
+ # * `n` nano (10**-9)
82
+ # * `p` pico (10**-12)
83
+ # * `f` femto (10**-15)
84
+ # * `a` atto (10**-18)
85
+ # * `z` zepto (10**-21)
86
+ # * `y` yocto (10**-24)
87
+ # * `Ki` kibi (2**10)
88
+ # * `Mi` mebi (2**20)
89
+ # * `Gi` gibi (2**30)
90
+ # * `Ti` tebi (2**40)
91
+ #
92
+ # **Grammar**
93
+ #
94
+ # The grammar also includes these connectors:
95
+ #
96
+ # * `/` division (as an infix operator, e.g. `1/s`).
97
+ # * `.` multiplication (as an infix operator, e.g. `GBy.d`)
98
+ #
99
+ # The grammar for a unit is as follows:
100
+ #
101
+ # Expression = Component { "." Component } { "/" Component } ;
102
+ #
103
+ # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
104
+ # | Annotation
105
+ # | "1"
106
+ # ;
107
+ #
108
+ # Annotation = "{" NAME "}" ;
109
+ #
110
+ # Notes:
111
+ #
112
+ # * `Annotation` is just a comment if it follows a `UNIT` and is
113
+ # equivalent to `1` if it is used alone. For examples,
114
+ # `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.
115
+ # * `NAME` is a sequence of non-blank printable ASCII characters not
116
+ # containing '\\{' or '}'.
117
+ # * `1` represents dimensionless value 1, such as in `1/s`.
118
+ # * `%` represents dimensionless value 1/100, and annotates values giving
119
+ # a percentage.
120
+ # @!attribute [rw] description
121
+ # @return [::String]
122
+ # A detailed description of the metric, which can be used in documentation.
123
+ # @!attribute [rw] display_name
124
+ # @return [::String]
125
+ # A concise name for the metric, which can be displayed in user interfaces.
126
+ # Use sentence case without an ending period, for example "Request count".
127
+ # This field is optional but it is recommended to be set for any metrics
128
+ # associated with user-visible concepts, such as Quota.
129
+ class MetricDescriptor
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+
133
+ # The kind of measurement. It describes how the data is reported.
134
+ module MetricKind
135
+ # Do not use this default value.
136
+ METRIC_KIND_UNSPECIFIED = 0
137
+
138
+ # An instantaneous measurement of a value.
139
+ GAUGE = 1
140
+
141
+ # The change in a value during a time interval.
142
+ DELTA = 2
143
+
144
+ # A value accumulated over a time interval. Cumulative
145
+ # measurements in a time series should have the same start time
146
+ # and increasing end times, until an event resets the cumulative
147
+ # value to zero and sets a new start time for the following
148
+ # points.
149
+ CUMULATIVE = 3
150
+ end
151
+
152
+ # The value type of a metric.
153
+ module ValueType
154
+ # Do not use this default value.
155
+ VALUE_TYPE_UNSPECIFIED = 0
156
+
157
+ # The value is a boolean.
158
+ # This value type can be used only if the metric kind is `GAUGE`.
159
+ BOOL = 1
160
+
161
+ # The value is a signed 64-bit integer.
162
+ INT64 = 2
163
+
164
+ # The value is a double precision floating point number.
165
+ DOUBLE = 3
166
+
167
+ # The value is a text string.
168
+ # This value type can be used only if the metric kind is `GAUGE`.
169
+ STRING = 4
170
+
171
+ # The value is a [`Distribution`][google.api.Distribution].
172
+ DISTRIBUTION = 5
173
+
174
+ # The value is money.
175
+ MONEY = 6
176
+ end
177
+ end
178
+
179
+ # A specific metric, identified by specifying values for all of the
180
+ # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}.
181
+ # @!attribute [rw] type
182
+ # @return [::String]
183
+ # An existing metric type, see {::Google::Api::MetricDescriptor google.api.MetricDescriptor}.
184
+ # For example, `custom.googleapis.com/invoice/paid/amount`.
185
+ # @!attribute [rw] labels
186
+ # @return [::Google::Protobuf::Map{::String => ::String}]
187
+ # The set of label values that uniquely identify this metric. All
188
+ # labels listed in the `MetricDescriptor` must be assigned values.
189
+ class Metric
190
+ include ::Google::Protobuf::MessageExts
191
+ extend ::Google::Protobuf::MessageExts::ClassMethods
192
+
193
+ # @!attribute [rw] key
194
+ # @return [::String]
195
+ # @!attribute [rw] value
196
+ # @return [::String]
197
+ class LabelsEntry
198
+ include ::Google::Protobuf::MessageExts
199
+ extend ::Google::Protobuf::MessageExts::ClassMethods
200
+ end
201
+ end
202
+ end
203
+ end
@@ -0,0 +1,137 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # An object that describes the schema of a {::Google::Api::MonitoredResource MonitoredResource} object using a
23
+ # type name and a set of labels. For example, the monitored resource
24
+ # descriptor for Google Compute Engine VM instances has a type of
25
+ # `"gce_instance"` and specifies the use of the labels `"instance_id"` and
26
+ # `"zone"` to identify particular VM instances.
27
+ #
28
+ # Different APIs can support different monitored resource types. APIs generally
29
+ # provide a `list` method that returns the monitored resource descriptors used
30
+ # by the API.
31
+ # @!attribute [rw] name
32
+ # @return [::String]
33
+ # Optional. The resource name of the monitored resource descriptor:
34
+ # `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
35
+ # \\{type} is the value of the `type` field in this object and
36
+ # \\{project_id} is a project ID that provides API-specific context for
37
+ # accessing the type. APIs that do not use project information can use the
38
+ # resource name format `"monitoredResourceDescriptors/{type}"`.
39
+ # @!attribute [rw] type
40
+ # @return [::String]
41
+ # Required. The monitored resource type. For example, the type
42
+ # `"cloudsql_database"` represents databases in Google Cloud SQL.
43
+ # The maximum length of this value is 256 characters.
44
+ # @!attribute [rw] display_name
45
+ # @return [::String]
46
+ # Optional. A concise name for the monitored resource type that might be
47
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase,
48
+ # without any article or other determiners. For example,
49
+ # `"Google Cloud SQL Database"`.
50
+ # @!attribute [rw] description
51
+ # @return [::String]
52
+ # Optional. A detailed description of the monitored resource type that might
53
+ # be used in documentation.
54
+ # @!attribute [rw] labels
55
+ # @return [::Array<::Google::Api::LabelDescriptor>]
56
+ # Required. A set of labels used to describe instances of this monitored
57
+ # resource type. For example, an individual Google Cloud SQL database is
58
+ # identified by values for the labels `"database_id"` and `"zone"`.
59
+ class MonitoredResourceDescriptor
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+ end
63
+
64
+ # An object representing a resource that can be used for monitoring, logging,
65
+ # billing, or other purposes. Examples include virtual machine instances,
66
+ # databases, and storage devices such as disks. The `type` field identifies a
67
+ # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object that describes the resource's
68
+ # schema. Information in the `labels` field identifies the actual resource and
69
+ # its attributes according to the schema. For example, a particular Compute
70
+ # Engine VM instance could be represented by the following object, because the
71
+ # {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} for `"gce_instance"` has labels
72
+ # `"instance_id"` and `"zone"`:
73
+ #
74
+ # { "type": "gce_instance",
75
+ # "labels": { "instance_id": "12345678901234",
76
+ # "zone": "us-central1-a" }}
77
+ # @!attribute [rw] type
78
+ # @return [::String]
79
+ # Required. The monitored resource type. This field must match
80
+ # the `type` field of a {::Google::Api::MonitoredResourceDescriptor MonitoredResourceDescriptor} object. For
81
+ # example, the type of a Compute Engine VM instance is `gce_instance`.
82
+ # @!attribute [rw] labels
83
+ # @return [::Google::Protobuf::Map{::String => ::String}]
84
+ # Required. Values for all of the labels listed in the associated monitored
85
+ # resource descriptor. For example, Compute Engine VM instances use the
86
+ # labels `"project_id"`, `"instance_id"`, and `"zone"`.
87
+ class MonitoredResource
88
+ include ::Google::Protobuf::MessageExts
89
+ extend ::Google::Protobuf::MessageExts::ClassMethods
90
+
91
+ # @!attribute [rw] key
92
+ # @return [::String]
93
+ # @!attribute [rw] value
94
+ # @return [::String]
95
+ class LabelsEntry
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+ end
99
+ end
100
+
101
+ # Auxiliary metadata for a {::Google::Api::MonitoredResource MonitoredResource} object.
102
+ # {::Google::Api::MonitoredResource MonitoredResource} objects contain the minimum set of information to
103
+ # uniquely identify a monitored resource instance. There is some other useful
104
+ # auxiliary metadata. Google Stackdriver Monitoring & Logging uses an ingestion
105
+ # pipeline to extract metadata for cloud resources of all types , and stores
106
+ # the metadata in this message.
107
+ # @!attribute [rw] system_labels
108
+ # @return [::Google::Protobuf::Struct]
109
+ # Output only. Values for predefined system metadata labels.
110
+ # System labels are a kind of metadata extracted by Google Stackdriver.
111
+ # Stackdriver determines what system labels are useful and how to obtain
112
+ # their values. Some examples: "machine_image", "vpc", "subnet_id",
113
+ # "security_group", "name", etc.
114
+ # System label values can be only strings, Boolean values, or a list of
115
+ # strings. For example:
116
+ #
117
+ # { "name": "my-test-instance",
118
+ # "security_group": ["a", "b", "c"],
119
+ # "spot_instance": false }
120
+ # @!attribute [rw] user_labels
121
+ # @return [::Google::Protobuf::Map{::String => ::String}]
122
+ # Output only. A map of user-defined metadata labels.
123
+ class MonitoredResourceMetadata
124
+ include ::Google::Protobuf::MessageExts
125
+ extend ::Google::Protobuf::MessageExts::ClassMethods
126
+
127
+ # @!attribute [rw] key
128
+ # @return [::String]
129
+ # @!attribute [rw] value
130
+ # @return [::String]
131
+ class UserLabelsEntry
132
+ include ::Google::Protobuf::MessageExts
133
+ extend ::Google::Protobuf::MessageExts::ClassMethods
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,91 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Monitoring configuration of the service.
23
+ #
24
+ # The example below shows how to configure monitored resources and metrics
25
+ # for monitoring. In the example, a monitored resource and two metrics are
26
+ # defined. The `library.googleapis.com/book/returned_count` metric is sent
27
+ # to both producer and consumer projects, whereas the
28
+ # `library.googleapis.com/book/overdue_count` metric is only sent to the
29
+ # consumer project.
30
+ #
31
+ # monitored_resources:
32
+ # - type: library.googleapis.com/branch
33
+ # labels:
34
+ # - key: /city
35
+ # description: The city where the library branch is located in.
36
+ # - key: /name
37
+ # description: The name of the branch.
38
+ # metrics:
39
+ # - name: library.googleapis.com/book/returned_count
40
+ # metric_kind: DELTA
41
+ # value_type: INT64
42
+ # labels:
43
+ # - key: /customer_id
44
+ # - name: library.googleapis.com/book/overdue_count
45
+ # metric_kind: GAUGE
46
+ # value_type: INT64
47
+ # labels:
48
+ # - key: /customer_id
49
+ # monitoring:
50
+ # producer_destinations:
51
+ # - monitored_resource: library.googleapis.com/branch
52
+ # metrics:
53
+ # - library.googleapis.com/book/returned_count
54
+ # consumer_destinations:
55
+ # - monitored_resource: library.googleapis.com/branch
56
+ # metrics:
57
+ # - library.googleapis.com/book/returned_count
58
+ # - library.googleapis.com/book/overdue_count
59
+ # @!attribute [rw] producer_destinations
60
+ # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>]
61
+ # Monitoring configurations for sending metrics to the producer project.
62
+ # There can be multiple producer destinations, each one must have a
63
+ # different monitored resource type. A metric can be used in at most
64
+ # one producer destination.
65
+ # @!attribute [rw] consumer_destinations
66
+ # @return [::Array<::Google::Api::Monitoring::MonitoringDestination>]
67
+ # Monitoring configurations for sending metrics to the consumer project.
68
+ # There can be multiple consumer destinations, each one must have a
69
+ # different monitored resource type. A metric can be used in at most
70
+ # one consumer destination.
71
+ class Monitoring
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+
75
+ # Configuration of a specific monitoring destination (the producer project
76
+ # or the consumer project).
77
+ # @!attribute [rw] monitored_resource
78
+ # @return [::String]
79
+ # The monitored resource type. The type must be defined in
80
+ # {::Google::Api::Service#monitored_resources Service.monitored_resources} section.
81
+ # @!attribute [rw] metrics
82
+ # @return [::Array<::String>]
83
+ # Names of the metrics to report to this monitoring destination.
84
+ # Each name must be defined in {::Google::Api::Service#metrics Service.metrics} section.
85
+ class MonitoringDestination
86
+ include ::Google::Protobuf::MessageExts
87
+ extend ::Google::Protobuf::MessageExts::ClassMethods
88
+ end
89
+ end
90
+ end
91
+ end
@@ -0,0 +1,281 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Quota configuration helps to achieve fairness and budgeting in service
23
+ # usage.
24
+ #
25
+ # The quota configuration works this way:
26
+ # - The service configuration defines a set of metrics.
27
+ # - For API calls, the quota.metric_rules maps methods to metrics with
28
+ # corresponding costs.
29
+ # - The quota.limits defines limits on the metrics, which will be used for
30
+ # quota checks at runtime.
31
+ #
32
+ # An example quota configuration in yaml format:
33
+ #
34
+ # quota:
35
+ # limits:
36
+ #
37
+ # - name: apiWriteQpsPerProject
38
+ # metric: library.googleapis.com/write_calls
39
+ # unit: "1/min/\\{project}" # rate limit for consumer projects
40
+ # values:
41
+ # STANDARD: 10000
42
+ #
43
+ # # The metric rules bind all methods to the read_calls metric,
44
+ # # except for the UpdateBook and DeleteBook methods. These two methods
45
+ # # are mapped to the write_calls metric, with the UpdateBook method
46
+ # # consuming at twice rate as the DeleteBook method.
47
+ # metric_rules:
48
+ # - selector: "*"
49
+ # metric_costs:
50
+ # library.googleapis.com/read_calls: 1
51
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
52
+ # metric_costs:
53
+ # library.googleapis.com/write_calls: 2
54
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
55
+ # metric_costs:
56
+ # library.googleapis.com/write_calls: 1
57
+ #
58
+ # Corresponding Metric definition:
59
+ #
60
+ # metrics:
61
+ # - name: library.googleapis.com/read_calls
62
+ # display_name: Read requests
63
+ # metric_kind: DELTA
64
+ # value_type: INT64
65
+ #
66
+ # - name: library.googleapis.com/write_calls
67
+ # display_name: Write requests
68
+ # metric_kind: DELTA
69
+ # value_type: INT64
70
+ # @!attribute [rw] limits
71
+ # @return [::Array<::Google::Api::QuotaLimit>]
72
+ # List of `QuotaLimit` definitions for the service.
73
+ #
74
+ # Used by metric-based quotas only.
75
+ # @!attribute [rw] metric_rules
76
+ # @return [::Array<::Google::Api::MetricRule>]
77
+ # List of `MetricRule` definitions, each one mapping a selected method to one
78
+ # or more metrics.
79
+ #
80
+ # Used by metric-based quotas only.
81
+ class Quota
82
+ include ::Google::Protobuf::MessageExts
83
+ extend ::Google::Protobuf::MessageExts::ClassMethods
84
+ end
85
+
86
+ # Bind API methods to metrics. Binding a method to a metric causes that
87
+ # metric's configured quota, billing, and monitoring behaviors to apply to the
88
+ # method call.
89
+ #
90
+ # Used by metric-based quotas only.
91
+ # @!attribute [rw] selector
92
+ # @return [::String]
93
+ # Selects the methods to which this rule applies.
94
+ #
95
+ # Refer to {::Google::Api::DocumentationRule#selector selector} for syntax details.
96
+ # @!attribute [rw] metric_costs
97
+ # @return [::Google::Protobuf::Map{::String => ::Integer}]
98
+ # Metrics to update when the selected methods are called, and the associated
99
+ # cost applied to each metric.
100
+ #
101
+ # The key of the map is the metric name, and the values are the amount
102
+ # increased for the metric against which the quota limits are defined.
103
+ # The value must not be negative.
104
+ class MetricRule
105
+ include ::Google::Protobuf::MessageExts
106
+ extend ::Google::Protobuf::MessageExts::ClassMethods
107
+
108
+ # @!attribute [rw] key
109
+ # @return [::String]
110
+ # @!attribute [rw] value
111
+ # @return [::Integer]
112
+ class MetricCostsEntry
113
+ include ::Google::Protobuf::MessageExts
114
+ extend ::Google::Protobuf::MessageExts::ClassMethods
115
+ end
116
+ end
117
+
118
+ # `QuotaLimit` defines a specific limit that applies over a specified duration
119
+ # for a limit type. There can be at most one limit for a duration and limit
120
+ # type combination defined within a `QuotaGroup`.
121
+ # @!attribute [rw] name
122
+ # @return [::String]
123
+ # Name of the quota limit. The name is used to refer to the limit when
124
+ # overriding the default limit on per-consumer basis.
125
+ #
126
+ # For group-based quota limits, the name must be unique within the quota
127
+ # group. If a name is not provided, it will be generated from the limit_by
128
+ # and duration fields.
129
+ #
130
+ # For metric-based quota limits, the name must be provided, and it must be
131
+ # unique within the service. The name can only include alphanumeric
132
+ # characters as well as '-'.
133
+ #
134
+ # The maximum length of the limit name is 64 characters.
135
+ #
136
+ # The name of a limit is used as a unique identifier for this limit.
137
+ # Therefore, once a limit has been put into use, its name should be
138
+ # immutable. You can use the display_name field to provide a user-friendly
139
+ # name for the limit. The display name can be evolved over time without
140
+ # affecting the identity of the limit.
141
+ # @!attribute [rw] description
142
+ # @return [::String]
143
+ # Optional. User-visible, extended description for this quota limit.
144
+ # Should be used only when more context is needed to understand this limit
145
+ # than provided by the limit's display name (see: `display_name`).
146
+ # @!attribute [rw] default_limit
147
+ # @return [::Integer]
148
+ # Default number of tokens that can be consumed during the specified
149
+ # duration. This is the number of tokens assigned when a client
150
+ # application developer activates the service for his/her project.
151
+ #
152
+ # Specifying a value of 0 will block all requests. This can be used if you
153
+ # are provisioning quota to selected consumers and blocking others.
154
+ # Similarly, a value of -1 will indicate an unlimited quota. No other
155
+ # negative values are allowed.
156
+ #
157
+ # Used by group-based quotas only.
158
+ # @!attribute [rw] max_limit
159
+ # @return [::Integer]
160
+ # Maximum number of tokens that can be consumed during the specified
161
+ # duration. Client application developers can override the default limit up
162
+ # to this maximum. If specified, this value cannot be set to a value less
163
+ # than the default limit. If not specified, it is set to the default limit.
164
+ #
165
+ # To allow clients to apply overrides with no upper bound, set this to -1,
166
+ # indicating unlimited maximum quota.
167
+ #
168
+ # Used by group-based quotas only.
169
+ # @!attribute [rw] free_tier
170
+ # @return [::Integer]
171
+ # Free tier value displayed in the Developers Console for this limit.
172
+ # The free tier is the number of tokens that will be subtracted from the
173
+ # billed amount when billing is enabled.
174
+ # This field can only be set on a limit with duration "1d", in a billable
175
+ # group; it is invalid on any other limit. If this field is not set, it
176
+ # defaults to 0, indicating that there is no free tier for this service.
177
+ #
178
+ # Used by group-based quotas only.
179
+ # @!attribute [rw] duration
180
+ # @return [::String]
181
+ # Duration of this limit in textual notation. Example: "100s", "24h", "1d".
182
+ # For duration longer than a day, only multiple of days is supported. We
183
+ # support only "100s" and "1d" for now. Additional support will be added in
184
+ # the future. "0" indicates indefinite duration.
185
+ #
186
+ # Used by group-based quotas only.
187
+ # @!attribute [rw] metric
188
+ # @return [::String]
189
+ # The name of the metric this quota limit applies to. The quota limits with
190
+ # the same metric will be checked together during runtime. The metric must be
191
+ # defined within the service config.
192
+ #
193
+ # Used by metric-based quotas only.
194
+ # @!attribute [rw] unit
195
+ # @return [::String]
196
+ # Specify the unit of the quota limit. It uses the same syntax as
197
+ # [Metric.unit][]. The supported unit kinds are determined by the quota
198
+ # backend system.
199
+ #
200
+ # The [Google Service Control](https://cloud.google.com/service-control)
201
+ # supports the following unit components:
202
+ # * One of the time intevals:
203
+ # * "/min" for quota every minute.
204
+ # * "/d" for quota every 24 hours, starting 00:00 US Pacific Time.
205
+ # * Otherwise the quota won't be reset by time, such as storage limit.
206
+ # * One and only one of the granted containers:
207
+ # * "/\\{organization}" quota for an organization.
208
+ # * "/\\{project}" quota for a project.
209
+ # * "/\\{folder}" quota for a folder.
210
+ # * "/\\{resource}" quota for a universal resource.
211
+ # * Zero or more quota segmentation dimension. Not all combos are valid.
212
+ # * "/\\{region}" quota for every region. Not to be used with time intervals.
213
+ # * Otherwise the resources granted on the target is not segmented.
214
+ # * "/\\{zone}" quota for every zone. Not to be used with time intervals.
215
+ # * Otherwise the resources granted on the target is not segmented.
216
+ # * "/\\{resource}" quota for a resource associated with a project or org.
217
+ #
218
+ # Here are some examples:
219
+ # * "1/min/\\{project}" for quota per minute per project.
220
+ # * "1/min/\\{user}" for quota per minute per user.
221
+ # * "1/min/\\{organization}" for quota per minute per organization.
222
+ #
223
+ # Note: the order of unit components is insignificant.
224
+ # The "1" at the beginning is required to follow the metric unit syntax.
225
+ #
226
+ # Used by metric-based quotas only.
227
+ # @!attribute [rw] values
228
+ # @return [::Google::Protobuf::Map{::String => ::Integer}]
229
+ # Tiered limit values. Also allows for regional or zone overrides for these
230
+ # values if "/\\{region}" or "/\\{zone}" is specified in the unit field.
231
+ #
232
+ # Currently supported tiers from low to high:
233
+ # VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH
234
+ #
235
+ # To apply different limit values for users according to their tiers, specify
236
+ # the values for the tiers you want to differentiate. For example:
237
+ # \\{LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000}
238
+ #
239
+ # The limit value for each tier is optional except for the tier STANDARD.
240
+ # The limit value for an unspecified tier falls to the value of its next
241
+ # tier towards tier STANDARD. For the above example, the limit value for tier
242
+ # STANDARD is 500.
243
+ #
244
+ # To apply the same limit value for all users, just specify limit value for
245
+ # tier STANDARD. For example: \\{STANDARD:500}.
246
+ #
247
+ # To apply a regional overide for a tier, add a map entry with key
248
+ # "<TIER>/<region>", where <region> is a region name. Similarly, for a zone
249
+ # override, add a map entry with key "<TIER>/\\{zone}".
250
+ # Further, a wildcard can be used at the end of a zone name in order to
251
+ # specify zone level overrides. For example:
252
+ # LOW: 10, STANDARD: 50, HIGH: 100,
253
+ # LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200,
254
+ # LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80
255
+ #
256
+ # The regional overrides tier set for each region must be the same as
257
+ # the tier set for default limit values. Same rule applies for zone overrides
258
+ # tier as well.
259
+ #
260
+ # Used by metric-based quotas only.
261
+ # @!attribute [rw] display_name
262
+ # @return [::String]
263
+ # User-visible display name for this limit.
264
+ # Optional. If not set, the UI will provide a default display name based on
265
+ # the quota configuration. This field can be used to override the default
266
+ # display name generated from the configuration.
267
+ class QuotaLimit
268
+ include ::Google::Protobuf::MessageExts
269
+ extend ::Google::Protobuf::MessageExts::ClassMethods
270
+
271
+ # @!attribute [rw] key
272
+ # @return [::String]
273
+ # @!attribute [rw] value
274
+ # @return [::Integer]
275
+ class ValuesEntry
276
+ include ::Google::Protobuf::MessageExts
277
+ extend ::Google::Protobuf::MessageExts::ClassMethods
278
+ end
279
+ end
280
+ end
281
+ end