google-cloud-billing-budgets-v1beta1 0.6.0 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: baf6d87986bf613550ec305154b1a3f71dc74f20e957e2e39ae4f369322d5355
4
- data.tar.gz: 06f9c158df77c4f039fac0ce4946c2d3b28b071b575ec006a24966d3c04be944
3
+ metadata.gz: 51738fac34fba568f584c1c5896fd786f647d3f83abfa2684a1f538b1af1f559
4
+ data.tar.gz: f41c5f641222e19c3394bb8ae12e1c3a924062e433b0e09c66cd44ec23a3f126
5
5
  SHA512:
6
- metadata.gz: 3c8ce8a5288befa35c9881bac79901ff685316a2a4f99d5e421855fc56e85872f636151aeaf46701d09620ed27d2c9dd239908b0af312285717a73bcb79e7d6b
7
- data.tar.gz: 3822e124e0cfaacd6e2816817c8d087d54f1a23da43fb8657678d012847c45f97ab2dcbaaf25662dc98c887ca828ed122e99eac050b6c26dd292ba06eb8bc1ae
6
+ metadata.gz: d05cb40402d815f5c2b68146861ee9fd91ecb46f807d358519fc5b9bbc0c289c01ec08996eee25dea00b01faac8444dc2d7212d7f2253bc657c62ee008e3c7b1
7
+ data.tar.gz: 746353a8592e6f81e7dfe9bdab859b4b9a6eff26083778a3e8d9141990b0bb3860a2128668cf6817555694a9d44cd7d2d45d5b3d2be22b4b01dde862e01f5b03
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Billing Budgets V1beta1 API
2
+ --title="Billing Budgets V1beta1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-billing-budgets-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Credentials}):
68
68
 
69
- 1. `BILLING_BUDGETS_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `BILLING_BUDGETS_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `BILLING_BUDGETS_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `BILLING_BUDGETS_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/billing/budgets/v1beta1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/billing/budgets/v1beta1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new d
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/billing/budgets/v1beta1"
@@ -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.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/billing/budgets/v1beta1"
34
34
 
35
35
  client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new # (request fields as keyword arguments...)
37
37
  response = client.create_budget request
38
38
  ```
39
39
 
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/billing/budgets/v1beta1/budget_model.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/protobuf/struct_pb'
9
7
  require 'google/type/date_pb'
10
8
  require 'google/type/money_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/billing/budgets/v1beta1/budget_model.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.billing.budgets.v1beta1.Budget" do
@@ -43,13 +43,12 @@ module Google
43
43
  # See {::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client::Configuration}
44
44
  # for a description of the configuration fields.
45
45
  #
46
- # ## Example
46
+ # @example
47
47
  #
48
- # To modify the configuration for all BudgetService clients:
49
- #
50
- # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
51
- # config.timeout = 10.0
52
- # end
48
+ # # Modify the configuration for all BudgetService clients
49
+ # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
53
52
  #
54
53
  # @yield [config] Configure the Client client.
55
54
  # @yieldparam config [Client::Configuration]
@@ -71,34 +70,22 @@ module Google
71
70
 
72
71
  default_config.rpcs.update_budget.timeout = 60.0
73
72
  default_config.rpcs.update_budget.retry_policy = {
74
- initial_delay: 0.1,
75
- max_delay: 60.0,
76
- multiplier: 1.3,
77
- retry_codes: [4, 14]
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
78
74
  }
79
75
 
80
76
  default_config.rpcs.get_budget.timeout = 60.0
81
77
  default_config.rpcs.get_budget.retry_policy = {
82
- initial_delay: 0.1,
83
- max_delay: 60.0,
84
- multiplier: 1.3,
85
- retry_codes: [4, 14]
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
79
  }
87
80
 
88
81
  default_config.rpcs.list_budgets.timeout = 60.0
89
82
  default_config.rpcs.list_budgets.retry_policy = {
90
- initial_delay: 0.1,
91
- max_delay: 60.0,
92
- multiplier: 1.3,
93
- retry_codes: [4, 14]
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
94
84
  }
95
85
 
96
86
  default_config.rpcs.delete_budget.timeout = 60.0
97
87
  default_config.rpcs.delete_budget.retry_policy = {
98
- initial_delay: 0.1,
99
- max_delay: 60.0,
100
- multiplier: 1.3,
101
- retry_codes: [4, 14]
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
102
89
  }
103
90
 
104
91
  default_config
@@ -130,19 +117,15 @@ module Google
130
117
  ##
131
118
  # Create a new BudgetService client object.
132
119
  #
133
- # ## Examples
134
- #
135
- # To create a new BudgetService client with the default
136
- # configuration:
137
- #
138
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
120
+ # @example
139
121
  #
140
- # To create a new BudgetService client with a custom
141
- # configuration:
122
+ # # Create a client using the default configuration
123
+ # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
142
124
  #
143
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
144
- # config.timeout = 10.0
145
- # end
125
+ # # Create a client using a custom configuration
126
+ # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
127
+ # config.timeout = 10.0
128
+ # end
146
129
  #
147
130
  # @yield [config] Configure the BudgetService client.
148
131
  # @yieldparam config [Client::Configuration]
@@ -162,14 +145,13 @@ module Google
162
145
 
163
146
  # Create credentials
164
147
  credentials = @config.credentials
165
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
148
+ # Use self-signed JWT if the endpoint is unchanged from default,
166
149
  # but only if the default endpoint does not have a region prefix.
167
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
168
- @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
169
151
  !@config.endpoint.split(".").first.include?("-")
170
152
  credentials ||= Credentials.default scope: @config.scope,
171
153
  enable_self_signed_jwt: enable_self_signed_jwt
172
- if credentials.is_a?(String) || credentials.is_a?(Hash)
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
173
155
  credentials = Credentials.new credentials, scope: @config.scope
174
156
  end
175
157
  @quota_project_id = @config.quota_project
@@ -220,6 +202,21 @@ module Google
220
202
  #
221
203
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
222
204
  #
205
+ # @example Basic example
206
+ # require "google/cloud/billing/budgets/v1beta1"
207
+ #
208
+ # # Create a client object. The client can be reused for multiple calls.
209
+ # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
210
+ #
211
+ # # Create a request. To set request fields, pass in keyword arguments.
212
+ # request = Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new
213
+ #
214
+ # # Call the create_budget method.
215
+ # result = client.create_budget request
216
+ #
217
+ # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget.
218
+ # p result
219
+ #
223
220
  def create_budget request, options = nil
224
221
  raise ::ArgumentError, "request must be provided" if request.nil?
225
222
 
@@ -237,16 +234,20 @@ module Google
237
234
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
238
235
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
239
236
 
240
- header_params = {
241
- "parent" => request.parent
242
- }
237
+ header_params = {}
238
+ if request.parent
239
+ header_params["parent"] = request.parent
240
+ end
241
+
243
242
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
244
243
  metadata[:"x-goog-request-params"] ||= request_params_header
245
244
 
246
245
  options.apply_defaults timeout: @config.rpcs.create_budget.timeout,
247
246
  metadata: metadata,
248
247
  retry_policy: @config.rpcs.create_budget.retry_policy
249
- options.apply_defaults metadata: @config.metadata,
248
+
249
+ options.apply_defaults timeout: @config.timeout,
250
+ metadata: @config.metadata,
250
251
  retry_policy: @config.retry_policy
251
252
 
252
253
  @budget_service_stub.call_rpc :create_budget, request, options: options do |response, operation|
@@ -298,6 +299,21 @@ module Google
298
299
  #
299
300
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
300
301
  #
302
+ # @example Basic example
303
+ # require "google/cloud/billing/budgets/v1beta1"
304
+ #
305
+ # # Create a client object. The client can be reused for multiple calls.
306
+ # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
307
+ #
308
+ # # Create a request. To set request fields, pass in keyword arguments.
309
+ # request = Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new
310
+ #
311
+ # # Call the update_budget method.
312
+ # result = client.update_budget request
313
+ #
314
+ # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget.
315
+ # p result
316
+ #
301
317
  def update_budget request, options = nil
302
318
  raise ::ArgumentError, "request must be provided" if request.nil?
303
319
 
@@ -315,16 +331,20 @@ module Google
315
331
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
316
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
333
 
318
- header_params = {
319
- "budget.name" => request.budget.name
320
- }
334
+ header_params = {}
335
+ if request.budget&.name
336
+ header_params["budget.name"] = request.budget.name
337
+ end
338
+
321
339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
322
340
  metadata[:"x-goog-request-params"] ||= request_params_header
323
341
 
324
342
  options.apply_defaults timeout: @config.rpcs.update_budget.timeout,
325
343
  metadata: metadata,
326
344
  retry_policy: @config.rpcs.update_budget.retry_policy
327
- options.apply_defaults metadata: @config.metadata,
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
328
348
  retry_policy: @config.retry_policy
329
349
 
330
350
  @budget_service_stub.call_rpc :update_budget, request, options: options do |response, operation|
@@ -370,6 +390,21 @@ module Google
370
390
  #
371
391
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
392
  #
393
+ # @example Basic example
394
+ # require "google/cloud/billing/budgets/v1beta1"
395
+ #
396
+ # # Create a client object. The client can be reused for multiple calls.
397
+ # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
398
+ #
399
+ # # Create a request. To set request fields, pass in keyword arguments.
400
+ # request = Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new
401
+ #
402
+ # # Call the get_budget method.
403
+ # result = client.get_budget request
404
+ #
405
+ # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget.
406
+ # p result
407
+ #
373
408
  def get_budget request, options = nil
374
409
  raise ::ArgumentError, "request must be provided" if request.nil?
375
410
 
@@ -387,16 +422,20 @@ module Google
387
422
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
388
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
389
424
 
390
- header_params = {
391
- "name" => request.name
392
- }
425
+ header_params = {}
426
+ if request.name
427
+ header_params["name"] = request.name
428
+ end
429
+
393
430
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
394
431
  metadata[:"x-goog-request-params"] ||= request_params_header
395
432
 
396
433
  options.apply_defaults timeout: @config.rpcs.get_budget.timeout,
397
434
  metadata: metadata,
398
435
  retry_policy: @config.rpcs.get_budget.retry_policy
399
- options.apply_defaults metadata: @config.metadata,
436
+
437
+ options.apply_defaults timeout: @config.timeout,
438
+ metadata: @config.metadata,
400
439
  retry_policy: @config.retry_policy
401
440
 
402
441
  @budget_service_stub.call_rpc :get_budget, request, options: options do |response, operation|
@@ -449,6 +488,27 @@ module Google
449
488
  #
450
489
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
451
490
  #
491
+ # @example Basic example
492
+ # require "google/cloud/billing/budgets/v1beta1"
493
+ #
494
+ # # Create a client object. The client can be reused for multiple calls.
495
+ # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
496
+ #
497
+ # # Create a request. To set request fields, pass in keyword arguments.
498
+ # request = Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new
499
+ #
500
+ # # Call the list_budgets method.
501
+ # result = client.list_budgets request
502
+ #
503
+ # # The returned object is of type Gapic::PagedEnumerable. You can
504
+ # # iterate over all elements by calling #each, and the enumerable
505
+ # # will lazily make API calls to fetch subsequent pages. Other
506
+ # # methods are also available for managing paging directly.
507
+ # result.each do |response|
508
+ # # Each element is of type ::Google::Cloud::Billing::Budgets::V1beta1::Budget.
509
+ # p response
510
+ # end
511
+ #
452
512
  def list_budgets request, options = nil
453
513
  raise ::ArgumentError, "request must be provided" if request.nil?
454
514
 
@@ -466,16 +526,20 @@ module Google
466
526
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
467
527
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
468
528
 
469
- header_params = {
470
- "parent" => request.parent
471
- }
529
+ header_params = {}
530
+ if request.parent
531
+ header_params["parent"] = request.parent
532
+ end
533
+
472
534
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
473
535
  metadata[:"x-goog-request-params"] ||= request_params_header
474
536
 
475
537
  options.apply_defaults timeout: @config.rpcs.list_budgets.timeout,
476
538
  metadata: metadata,
477
539
  retry_policy: @config.rpcs.list_budgets.retry_policy
478
- options.apply_defaults metadata: @config.metadata,
540
+
541
+ options.apply_defaults timeout: @config.timeout,
542
+ metadata: @config.metadata,
479
543
  retry_policy: @config.retry_policy
480
544
 
481
545
  @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation|
@@ -517,6 +581,21 @@ module Google
517
581
  #
518
582
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
519
583
  #
584
+ # @example Basic example
585
+ # require "google/cloud/billing/budgets/v1beta1"
586
+ #
587
+ # # Create a client object. The client can be reused for multiple calls.
588
+ # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
589
+ #
590
+ # # Create a request. To set request fields, pass in keyword arguments.
591
+ # request = Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new
592
+ #
593
+ # # Call the delete_budget method.
594
+ # result = client.delete_budget request
595
+ #
596
+ # # The returned object is of type Google::Protobuf::Empty.
597
+ # p result
598
+ #
520
599
  def delete_budget request, options = nil
521
600
  raise ::ArgumentError, "request must be provided" if request.nil?
522
601
 
@@ -534,16 +613,20 @@ module Google
534
613
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
535
614
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
536
615
 
537
- header_params = {
538
- "name" => request.name
539
- }
616
+ header_params = {}
617
+ if request.name
618
+ header_params["name"] = request.name
619
+ end
620
+
540
621
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
541
622
  metadata[:"x-goog-request-params"] ||= request_params_header
542
623
 
543
624
  options.apply_defaults timeout: @config.rpcs.delete_budget.timeout,
544
625
  metadata: metadata,
545
626
  retry_policy: @config.rpcs.delete_budget.retry_policy
546
- options.apply_defaults metadata: @config.metadata,
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
547
630
  retry_policy: @config.retry_policy
548
631
 
549
632
  @budget_service_stub.call_rpc :delete_budget, request, options: options do |response, operation|
@@ -567,22 +650,21 @@ module Google
567
650
  # Configuration can be applied globally to all clients, or to a single client
568
651
  # on construction.
569
652
  #
570
- # # Examples
571
- #
572
- # To modify the global config, setting the timeout for create_budget
573
- # to 20 seconds, and all remaining timeouts to 10 seconds:
574
- #
575
- # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
576
- # config.timeout = 10.0
577
- # config.rpcs.create_budget.timeout = 20.0
578
- # end
579
- #
580
- # To apply the above configuration only to a new client:
581
- #
582
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
583
- # config.timeout = 10.0
584
- # config.rpcs.create_budget.timeout = 20.0
585
- # end
653
+ # @example
654
+ #
655
+ # # Modify the global config, setting the timeout for
656
+ # # create_budget to 20 seconds,
657
+ # # and all remaining timeouts to 10 seconds.
658
+ # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
659
+ # config.timeout = 10.0
660
+ # config.rpcs.create_budget.timeout = 20.0
661
+ # end
662
+ #
663
+ # # Apply the above configuration only to a new client.
664
+ # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
665
+ # config.timeout = 10.0
666
+ # config.rpcs.create_budget.timeout = 20.0
667
+ # end
586
668
  #
587
669
  # @!attribute [rw] endpoint
588
670
  # The hostname or hostname:port of the service endpoint.
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/billing/budgets/v1beta1/budget_service.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/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/billing/budgets/v1beta1/budget_model_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/billing/budgets/v1beta1/budget_service.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.billing.budgets.v1beta1.CreateBudgetRequest" do
@@ -22,7 +22,7 @@ module Google
22
22
  module Billing
23
23
  module Budgets
24
24
  module V1beta1
25
- VERSION = "0.6.0"
25
+ VERSION = "0.6.4"
26
26
  end
27
27
  end
28
28
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  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
@@ -19,28 +19,31 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents a whole or partial calendar date, e.g. a birthday. The time of day
23
- # and time zone are either specified elsewhere or are not significant. The date
24
- # is relative to the Proleptic Gregorian Calendar. This can represent:
22
+ # Represents a whole or partial calendar date, such as a birthday. The time of
23
+ # day and time zone are either specified elsewhere or are insignificant. The
24
+ # date is relative to the Gregorian Calendar. This can represent one of the
25
+ # following:
25
26
  #
26
- # * A full date, with non-zero year, month and day values
27
- # * A month and day value, with a zero year, e.g. an anniversary
27
+ # * A full date, with non-zero year, month, and day values
28
+ # * A month and day value, with a zero year, such as an anniversary
28
29
  # * A year on its own, with zero month and day values
29
- # * A year and month value, with a zero day, e.g. a credit card expiration date
30
+ # * A year and month value, with a zero day, such as a credit card expiration
31
+ # date
30
32
  #
31
- # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
33
+ # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
34
+ # `google.protobuf.Timestamp`.
32
35
  # @!attribute [rw] year
33
36
  # @return [::Integer]
34
- # Year of date. Must be from 1 to 9999, or 0 if specifying a date without
37
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without
35
38
  # a year.
36
39
  # @!attribute [rw] month
37
40
  # @return [::Integer]
38
- # Month of year. Must be from 1 to 12, or 0 if specifying a year without a
41
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a
39
42
  # month and day.
40
43
  # @!attribute [rw] day
41
44
  # @return [::Integer]
42
- # Day of month. Must be from 1 to 31 and valid for the year and month, or 0
43
- # if specifying a year by itself or a year and month where the day is not
45
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
46
+ # to specify a year by itself or a year and month where the day isn't
44
47
  # significant.
45
48
  class Date
46
49
  include ::Google::Protobuf::MessageExts
@@ -22,7 +22,7 @@ module Google
22
22
  # Represents an amount of money with its currency type.
23
23
  # @!attribute [rw] currency_code
24
24
  # @return [::String]
25
- # The 3-letter currency code defined in ISO 4217.
25
+ # The three-letter currency code defined in ISO 4217.
26
26
  # @!attribute [rw] units
27
27
  # @return [::Integer]
28
28
  # The whole units of the amount.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing-budgets-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.4
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-06-23 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
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  - !ruby/object:Gem::Version
209
209
  version: '0'
210
210
  requirements: []
211
- rubygems_version: 3.2.17
211
+ rubygems_version: 3.3.4
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: API Client library for the Billing Budgets V1beta1 API