google-cloud-service_control-v1 0.4.2 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ea831c1f63209cbaec472f94a00828fdd085235dd66c76d917c7a9dd1652c97
4
- data.tar.gz: 13833c33ea1b8057babff047d686ddf0709fcdf794029c44ee1fbd7911f465bc
3
+ metadata.gz: c5074a3881bb241ce39220947d9d86c02dd7ff09f962448b2bc7a8496279a968
4
+ data.tar.gz: 2cd6631626c4d34c84bc78bb7555131f66b45ab1b4f0fea26c960c444707613d
5
5
  SHA512:
6
- metadata.gz: f1408630d3d07ac0d39248722f1ecb924991cb2b65bf24425156c7f5c5452af6da1a5d0a322011104f31aee127ef22a118938dc7a7ee47272e4ac40ab97d48c5
7
- data.tar.gz: f2db43851d63c3e313447604b895b7737f053ba9eb37951337f463b2083135537a42240a3157cfaf9c78a15caf45ff3a881744f176421a3e6fa65a3e025bd350
6
+ metadata.gz: 0c2efadf07306fc57f2346eaec5781ddc9c7217113c146b408510aad5c3a72c8996ab12eba9059c2b26b8963a189507c9a4046cfb7e9758bf5b68bd5c3911a17
7
+ data.tar.gz: b8cada7954e725fbed14c4a75414e2671d700adfb85f8848801b28e5c09f3b0bcb30252a003c587a299fedee961e245ab47fe133c4082adcccce14bf932c5bc1
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Service Control API V1 API
2
+ --title="Service Control API V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/check_error.proto
3
3
 
4
+ require 'google/rpc/status_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/rpc/status_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/api/servicecontrol/v1/check_error.proto", :syntax => :proto3) do
9
9
  add_message "google.api.servicecontrol.v1.CheckError" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/distribution.proto
3
3
 
4
+ require 'google/api/distribution_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/distribution_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/api/servicecontrol/v1/distribution.proto", :syntax => :proto3) do
9
9
  add_message "google.api.servicecontrol.v1.Distribution" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/http_request.proto
3
3
 
4
+ require 'google/protobuf/duration_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/protobuf/duration_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/api/servicecontrol/v1/http_request.proto", :syntax => :proto3) do
9
9
  add_message "google.api.servicecontrol.v1.HttpRequest" do
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/log_entry.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/servicecontrol/v1/http_request_pb'
7
5
  require 'google/logging/type/log_severity_pb'
8
6
  require 'google/protobuf/any_pb'
9
7
  require 'google/protobuf/struct_pb'
10
8
  require 'google/protobuf/timestamp_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/api/servicecontrol/v1/log_entry.proto", :syntax => :proto3) do
13
13
  add_message "google.api.servicecontrol.v1.LogEntry" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/metric_value.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/servicecontrol/v1/distribution_pb'
7
5
  require 'google/protobuf/timestamp_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/api/servicecontrol/v1/metric_value.proto", :syntax => :proto3) do
10
10
  add_message "google.api.servicecontrol.v1.MetricValue" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/operation.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/servicecontrol/v1/log_entry_pb'
7
5
  require 'google/api/servicecontrol/v1/metric_value_pb'
8
6
  require 'google/protobuf/any_pb'
9
7
  require 'google/protobuf/timestamp_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/api/servicecontrol/v1/operation.proto", :syntax => :proto3) do
12
12
  add_message "google.api.servicecontrol.v1.Operation" do
@@ -1,12 +1,12 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/quota_controller.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/servicecontrol/v1/metric_value_pb'
8
6
  require 'google/rpc/status_pb'
9
7
  require 'google/api/client_pb'
8
+ require 'google/protobuf'
9
+
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("google/api/servicecontrol/v1/quota_controller.proto", :syntax => :proto3) do
12
12
  add_message "google.api.servicecontrol.v1.AllocateQuotaRequest" do
@@ -30,7 +30,7 @@ module Google
30
30
  # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicecontrol/v1/service_controller.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/servicecontrol/v1/check_error_pb'
9
7
  require 'google/api/servicecontrol/v1/operation_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/rpc/status_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/api/servicecontrol/v1/service_controller.proto", :syntax => :proto3) do
14
14
  add_message "google.api.servicecontrol.v1.CheckRequest" do
@@ -30,7 +30,7 @@ module Google
30
30
  # service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::ServiceControl::V1::QuotaController::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all QuotaController clients:
48
- #
49
- # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all QuotaController clients
48
+ # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -95,19 +94,15 @@ module Google
95
94
  ##
96
95
  # Create a new QuotaController client object.
97
96
  #
98
- # ## Examples
99
- #
100
- # To create a new QuotaController client with the default
101
- # configuration:
97
+ # @example
102
98
  #
103
- # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new
99
+ # # Create a client using the default configuration
100
+ # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new
104
101
  #
105
- # To create a new QuotaController client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
102
+ # # Create a client using a custom configuration
103
+ # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config|
104
+ # config.timeout = 10.0
105
+ # end
111
106
  #
112
107
  # @yield [config] Configure the QuotaController client.
113
108
  # @yieldparam config [Client::Configuration]
@@ -127,10 +122,9 @@ module Google
127
122
 
128
123
  # Create credentials
129
124
  credentials = @config.credentials
130
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
125
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
126
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
133
- @config.endpoint == Client.configure.endpoint &&
127
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
134
128
  !@config.endpoint.split(".").first.include?("-")
135
129
  credentials ||= Credentials.default scope: @config.scope,
136
130
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -199,6 +193,21 @@ module Google
199
193
  #
200
194
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
201
195
  #
196
+ # @example Basic example
197
+ # require "google/cloud/service_control/v1"
198
+ #
199
+ # # Create a client object. The client can be reused for multiple calls.
200
+ # client = Google::Cloud::ServiceControl::V1::QuotaController::Client.new
201
+ #
202
+ # # Create a request. To set request fields, pass in keyword arguments.
203
+ # request = Google::Cloud::ServiceControl::V1::AllocateQuotaRequest.new
204
+ #
205
+ # # Call the allocate_quota method.
206
+ # result = client.allocate_quota request
207
+ #
208
+ # # The returned object is of type Google::Cloud::ServiceControl::V1::AllocateQuotaResponse.
209
+ # p result
210
+ #
202
211
  def allocate_quota request, options = nil
203
212
  raise ::ArgumentError, "request must be provided" if request.nil?
204
213
 
@@ -216,16 +225,20 @@ module Google
216
225
  gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION
217
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
218
227
 
219
- header_params = {
220
- "service_name" => request.service_name
221
- }
228
+ header_params = {}
229
+ if request.service_name
230
+ header_params["service_name"] = request.service_name
231
+ end
232
+
222
233
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
223
234
  metadata[:"x-goog-request-params"] ||= request_params_header
224
235
 
225
236
  options.apply_defaults timeout: @config.rpcs.allocate_quota.timeout,
226
237
  metadata: metadata,
227
238
  retry_policy: @config.rpcs.allocate_quota.retry_policy
228
- options.apply_defaults metadata: @config.metadata,
239
+
240
+ options.apply_defaults timeout: @config.timeout,
241
+ metadata: @config.metadata,
229
242
  retry_policy: @config.retry_policy
230
243
 
231
244
  @quota_controller_stub.call_rpc :allocate_quota, request, options: options do |response, operation|
@@ -249,22 +262,21 @@ module Google
249
262
  # Configuration can be applied globally to all clients, or to a single client
250
263
  # on construction.
251
264
  #
252
- # # Examples
253
- #
254
- # To modify the global config, setting the timeout for allocate_quota
255
- # to 20 seconds, and all remaining timeouts to 10 seconds:
256
- #
257
- # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config|
258
- # config.timeout = 10.0
259
- # config.rpcs.allocate_quota.timeout = 20.0
260
- # end
261
- #
262
- # To apply the above configuration only to a new client:
263
- #
264
- # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config|
265
- # config.timeout = 10.0
266
- # config.rpcs.allocate_quota.timeout = 20.0
267
- # end
265
+ # @example
266
+ #
267
+ # # Modify the global config, setting the timeout for
268
+ # # allocate_quota to 20 seconds,
269
+ # # and all remaining timeouts to 10 seconds.
270
+ # ::Google::Cloud::ServiceControl::V1::QuotaController::Client.configure do |config|
271
+ # config.timeout = 10.0
272
+ # config.rpcs.allocate_quota.timeout = 20.0
273
+ # end
274
+ #
275
+ # # Apply the above configuration only to a new client.
276
+ # client = ::Google::Cloud::ServiceControl::V1::QuotaController::Client.new do |config|
277
+ # config.timeout = 10.0
278
+ # config.rpcs.allocate_quota.timeout = 20.0
279
+ # end
268
280
  #
269
281
  # @!attribute [rw] endpoint
270
282
  # The hostname or hostname:port of the service endpoint.
@@ -42,13 +42,12 @@ module Google
42
42
  # See {::Google::Cloud::ServiceControl::V1::ServiceController::Client::Configuration}
43
43
  # for a description of the configuration fields.
44
44
  #
45
- # ## Example
45
+ # @example
46
46
  #
47
- # To modify the configuration for all ServiceController clients:
48
- #
49
- # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
47
+ # # Modify the configuration for all ServiceController clients
48
+ # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
52
51
  #
53
52
  # @yield [config] Configure the Client client.
54
53
  # @yieldparam config [Client::Configuration]
@@ -102,19 +101,15 @@ module Google
102
101
  ##
103
102
  # Create a new ServiceController client object.
104
103
  #
105
- # ## Examples
106
- #
107
- # To create a new ServiceController client with the default
108
- # configuration:
109
- #
110
- # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new
104
+ # @example
111
105
  #
112
- # To create a new ServiceController client with a custom
113
- # configuration:
106
+ # # Create a client using the default configuration
107
+ # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new
114
108
  #
115
- # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config|
116
- # config.timeout = 10.0
117
- # end
109
+ # # Create a client using a custom configuration
110
+ # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config|
111
+ # config.timeout = 10.0
112
+ # end
118
113
  #
119
114
  # @yield [config] Configure the ServiceController client.
120
115
  # @yieldparam config [Client::Configuration]
@@ -134,10 +129,9 @@ module Google
134
129
 
135
130
  # Create credentials
136
131
  credentials = @config.credentials
137
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
132
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
133
  # but only if the default endpoint does not have a region prefix.
139
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
140
- @config.endpoint == Client.configure.endpoint &&
134
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
135
  !@config.endpoint.split(".").first.include?("-")
142
136
  credentials ||= Credentials.default scope: @config.scope,
143
137
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -216,6 +210,21 @@ module Google
216
210
  #
217
211
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
212
  #
213
+ # @example Basic example
214
+ # require "google/cloud/service_control/v1"
215
+ #
216
+ # # Create a client object. The client can be reused for multiple calls.
217
+ # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new
218
+ #
219
+ # # Create a request. To set request fields, pass in keyword arguments.
220
+ # request = Google::Cloud::ServiceControl::V1::CheckRequest.new
221
+ #
222
+ # # Call the check method.
223
+ # result = client.check request
224
+ #
225
+ # # The returned object is of type Google::Cloud::ServiceControl::V1::CheckResponse.
226
+ # p result
227
+ #
219
228
  def check request, options = nil
220
229
  raise ::ArgumentError, "request must be provided" if request.nil?
221
230
 
@@ -233,16 +242,20 @@ module Google
233
242
  gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION
234
243
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
244
 
236
- header_params = {
237
- "service_name" => request.service_name
238
- }
245
+ header_params = {}
246
+ if request.service_name
247
+ header_params["service_name"] = request.service_name
248
+ end
249
+
239
250
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
251
  metadata[:"x-goog-request-params"] ||= request_params_header
241
252
 
242
253
  options.apply_defaults timeout: @config.rpcs.check.timeout,
243
254
  metadata: metadata,
244
255
  retry_policy: @config.rpcs.check.retry_policy
245
- options.apply_defaults metadata: @config.metadata,
256
+
257
+ options.apply_defaults timeout: @config.timeout,
258
+ metadata: @config.metadata,
246
259
  retry_policy: @config.retry_policy
247
260
 
248
261
  @service_controller_stub.call_rpc :check, request, options: options do |response, operation|
@@ -319,6 +332,21 @@ module Google
319
332
  #
320
333
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
321
334
  #
335
+ # @example Basic example
336
+ # require "google/cloud/service_control/v1"
337
+ #
338
+ # # Create a client object. The client can be reused for multiple calls.
339
+ # client = Google::Cloud::ServiceControl::V1::ServiceController::Client.new
340
+ #
341
+ # # Create a request. To set request fields, pass in keyword arguments.
342
+ # request = Google::Cloud::ServiceControl::V1::ReportRequest.new
343
+ #
344
+ # # Call the report method.
345
+ # result = client.report request
346
+ #
347
+ # # The returned object is of type Google::Cloud::ServiceControl::V1::ReportResponse.
348
+ # p result
349
+ #
322
350
  def report request, options = nil
323
351
  raise ::ArgumentError, "request must be provided" if request.nil?
324
352
 
@@ -336,16 +364,20 @@ module Google
336
364
  gapic_version: ::Google::Cloud::ServiceControl::V1::VERSION
337
365
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
338
366
 
339
- header_params = {
340
- "service_name" => request.service_name
341
- }
367
+ header_params = {}
368
+ if request.service_name
369
+ header_params["service_name"] = request.service_name
370
+ end
371
+
342
372
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
343
373
  metadata[:"x-goog-request-params"] ||= request_params_header
344
374
 
345
375
  options.apply_defaults timeout: @config.rpcs.report.timeout,
346
376
  metadata: metadata,
347
377
  retry_policy: @config.rpcs.report.retry_policy
348
- options.apply_defaults metadata: @config.metadata,
378
+
379
+ options.apply_defaults timeout: @config.timeout,
380
+ metadata: @config.metadata,
349
381
  retry_policy: @config.retry_policy
350
382
 
351
383
  @service_controller_stub.call_rpc :report, request, options: options do |response, operation|
@@ -369,22 +401,21 @@ module Google
369
401
  # Configuration can be applied globally to all clients, or to a single client
370
402
  # on construction.
371
403
  #
372
- # # Examples
373
- #
374
- # To modify the global config, setting the timeout for check
375
- # to 20 seconds, and all remaining timeouts to 10 seconds:
376
- #
377
- # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config|
378
- # config.timeout = 10.0
379
- # config.rpcs.check.timeout = 20.0
380
- # end
381
- #
382
- # To apply the above configuration only to a new client:
383
- #
384
- # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config|
385
- # config.timeout = 10.0
386
- # config.rpcs.check.timeout = 20.0
387
- # end
404
+ # @example
405
+ #
406
+ # # Modify the global config, setting the timeout for
407
+ # # check to 20 seconds,
408
+ # # and all remaining timeouts to 10 seconds.
409
+ # ::Google::Cloud::ServiceControl::V1::ServiceController::Client.configure do |config|
410
+ # config.timeout = 10.0
411
+ # config.rpcs.check.timeout = 20.0
412
+ # end
413
+ #
414
+ # # Apply the above configuration only to a new client.
415
+ # client = ::Google::Cloud::ServiceControl::V1::ServiceController::Client.new do |config|
416
+ # config.timeout = 10.0
417
+ # config.rpcs.check.timeout = 20.0
418
+ # end
388
419
  #
389
420
  # @!attribute [rw] endpoint
390
421
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ServiceControl
23
23
  module V1
24
- VERSION = "0.4.2"
24
+ VERSION = "0.4.6"
25
25
  end
26
26
  end
27
27
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -25,10 +25,10 @@ module Google
25
25
  # points. It contains the size of the population of sample points plus
26
26
  # additional optional information:
27
27
  #
28
- # - the arithmetic mean of the samples
29
- # - the minimum and maximum of the samples
30
- # - the sum-squared-deviation of the samples, used to compute variance
31
- # - a histogram of the values of the sample points
28
+ # * the arithmetic mean of the samples
29
+ # * the minimum and maximum of the samples
30
+ # * the sum-squared-deviation of the samples, used to compute variance
31
+ # * a histogram of the values of the sample points
32
32
  # @!attribute [rw] count
33
33
  # @return [::Integer]
34
34
  # The total number of samples in the distribution. Must be >= 0.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-service_control-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubygems_version: 3.2.17
228
+ rubygems_version: 3.3.4
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: API Client library for the Service Control API V1 API