google-cloud-billing-budgets-v1beta1 0.6.1 → 0.6.5

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: 8da1c6e522919f540f03478792a3fb9db1205782459a58d5943d48905daa1f5e
4
- data.tar.gz: 1471a2a295b72ce71dd908bdda9706dca141cc8c132a55c98e8c9b8e328575fa
3
+ metadata.gz: 2f0a019923807b193b37f5a0e7a94e97f54e2bbc89c9ce752c43e8fbcd6d9160
4
+ data.tar.gz: a8379506fdfb24b54eccf0565d2f99afa0024887335b3d8817fd00936bddf223
5
5
  SHA512:
6
- metadata.gz: a8087e67aad748be0993aff6bcd41da358fc6b814c0a80c7c2f0b8d7266a2c04d940ee6c073753b96c684dcfb57aecca738a4e0a81c793a02361580cc93d67b7
7
- data.tar.gz: 54a15527a75427d488c9ea3fbd774e065c44fd6a545948dbe76a29157cfa72ccabd89ef8932cab0aed836c2a742e9ab8de5bf02c11870a69502bc42694cec8a7
6
+ metadata.gz: 5b9a2259f7f81933a6421e1503bef5e27a2e30067446ec95fd2b880f786e030efd570d09e91c44b0675462026600295d4a36d1b9ddea6f764af9d1a14b3c57e5
7
+ data.tar.gz: 8d5a140112dbd81ed42b2d635345cefb630a711c8eed9317e1988e64684e6a34ed1329aee026d3b651c316bc9030b148ccf3e17323ef96492b37918bec1aeb9b
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
@@ -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
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new #
37
37
  response = client.create_budget request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-billing-budgets-v1beta1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/billing/docs/how-to/budget-api-overview)
@@ -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]
@@ -118,19 +117,15 @@ module Google
118
117
  ##
119
118
  # Create a new BudgetService client object.
120
119
  #
121
- # ## Examples
122
- #
123
- # To create a new BudgetService client with the default
124
- # configuration:
125
- #
126
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
120
+ # @example
127
121
  #
128
- # To create a new BudgetService client with a custom
129
- # configuration:
122
+ # # Create a client using the default configuration
123
+ # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new
130
124
  #
131
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
132
- # config.timeout = 10.0
133
- # 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
134
129
  #
135
130
  # @yield [config] Configure the BudgetService client.
136
131
  # @yieldparam config [Client::Configuration]
@@ -150,10 +145,9 @@ module Google
150
145
 
151
146
  # Create credentials
152
147
  credentials = @config.credentials
153
- # 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,
154
149
  # but only if the default endpoint does not have a region prefix.
155
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
156
- @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
157
151
  !@config.endpoint.split(".").first.include?("-")
158
152
  credentials ||= Credentials.default scope: @config.scope,
159
153
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -176,7 +170,7 @@ module Google
176
170
 
177
171
  ##
178
172
  # Creates a new budget. See
179
- # <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a>
173
+ # [Quotas and limits](https://cloud.google.com/billing/quotas)
180
174
  # for more information on the limits of the number of budgets you can create.
181
175
  #
182
176
  # @overload create_budget(request, options = nil)
@@ -208,6 +202,21 @@ module Google
208
202
  #
209
203
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
210
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
+ #
211
220
  def create_budget request, options = nil
212
221
  raise ::ArgumentError, "request must be provided" if request.nil?
213
222
 
@@ -225,16 +234,20 @@ module Google
225
234
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
226
235
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
227
236
 
228
- header_params = {
229
- "parent" => request.parent
230
- }
237
+ header_params = {}
238
+ if request.parent
239
+ header_params["parent"] = request.parent
240
+ end
241
+
231
242
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
232
243
  metadata[:"x-goog-request-params"] ||= request_params_header
233
244
 
234
245
  options.apply_defaults timeout: @config.rpcs.create_budget.timeout,
235
246
  metadata: metadata,
236
247
  retry_policy: @config.rpcs.create_budget.retry_policy
237
- options.apply_defaults metadata: @config.metadata,
248
+
249
+ options.apply_defaults timeout: @config.timeout,
250
+ metadata: @config.metadata,
238
251
  retry_policy: @config.retry_policy
239
252
 
240
253
  @budget_service_stub.call_rpc :create_budget, request, options: options do |response, operation|
@@ -286,6 +299,21 @@ module Google
286
299
  #
287
300
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
288
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
+ #
289
317
  def update_budget request, options = nil
290
318
  raise ::ArgumentError, "request must be provided" if request.nil?
291
319
 
@@ -303,16 +331,20 @@ module Google
303
331
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
304
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
305
333
 
306
- header_params = {
307
- "budget.name" => request.budget.name
308
- }
334
+ header_params = {}
335
+ if request.budget&.name
336
+ header_params["budget.name"] = request.budget.name
337
+ end
338
+
309
339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
310
340
  metadata[:"x-goog-request-params"] ||= request_params_header
311
341
 
312
342
  options.apply_defaults timeout: @config.rpcs.update_budget.timeout,
313
343
  metadata: metadata,
314
344
  retry_policy: @config.rpcs.update_budget.retry_policy
315
- options.apply_defaults metadata: @config.metadata,
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
316
348
  retry_policy: @config.retry_policy
317
349
 
318
350
  @budget_service_stub.call_rpc :update_budget, request, options: options do |response, operation|
@@ -358,6 +390,21 @@ module Google
358
390
  #
359
391
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
360
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
+ #
361
408
  def get_budget request, options = nil
362
409
  raise ::ArgumentError, "request must be provided" if request.nil?
363
410
 
@@ -375,16 +422,20 @@ module Google
375
422
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
376
423
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
377
424
 
378
- header_params = {
379
- "name" => request.name
380
- }
425
+ header_params = {}
426
+ if request.name
427
+ header_params["name"] = request.name
428
+ end
429
+
381
430
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
382
431
  metadata[:"x-goog-request-params"] ||= request_params_header
383
432
 
384
433
  options.apply_defaults timeout: @config.rpcs.get_budget.timeout,
385
434
  metadata: metadata,
386
435
  retry_policy: @config.rpcs.get_budget.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
436
+
437
+ options.apply_defaults timeout: @config.timeout,
438
+ metadata: @config.metadata,
388
439
  retry_policy: @config.retry_policy
389
440
 
390
441
  @budget_service_stub.call_rpc :get_budget, request, options: options do |response, operation|
@@ -437,6 +488,27 @@ module Google
437
488
  #
438
489
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
439
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
+ #
440
512
  def list_budgets request, options = nil
441
513
  raise ::ArgumentError, "request must be provided" if request.nil?
442
514
 
@@ -454,16 +526,20 @@ module Google
454
526
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
455
527
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
456
528
 
457
- header_params = {
458
- "parent" => request.parent
459
- }
529
+ header_params = {}
530
+ if request.parent
531
+ header_params["parent"] = request.parent
532
+ end
533
+
460
534
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
461
535
  metadata[:"x-goog-request-params"] ||= request_params_header
462
536
 
463
537
  options.apply_defaults timeout: @config.rpcs.list_budgets.timeout,
464
538
  metadata: metadata,
465
539
  retry_policy: @config.rpcs.list_budgets.retry_policy
466
- options.apply_defaults metadata: @config.metadata,
540
+
541
+ options.apply_defaults timeout: @config.timeout,
542
+ metadata: @config.metadata,
467
543
  retry_policy: @config.retry_policy
468
544
 
469
545
  @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation|
@@ -505,6 +581,21 @@ module Google
505
581
  #
506
582
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
507
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
+ #
508
599
  def delete_budget request, options = nil
509
600
  raise ::ArgumentError, "request must be provided" if request.nil?
510
601
 
@@ -522,16 +613,20 @@ module Google
522
613
  gapic_version: ::Google::Cloud::Billing::Budgets::V1beta1::VERSION
523
614
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
524
615
 
525
- header_params = {
526
- "name" => request.name
527
- }
616
+ header_params = {}
617
+ if request.name
618
+ header_params["name"] = request.name
619
+ end
620
+
528
621
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
529
622
  metadata[:"x-goog-request-params"] ||= request_params_header
530
623
 
531
624
  options.apply_defaults timeout: @config.rpcs.delete_budget.timeout,
532
625
  metadata: metadata,
533
626
  retry_policy: @config.rpcs.delete_budget.retry_policy
534
- options.apply_defaults metadata: @config.metadata,
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
535
630
  retry_policy: @config.retry_policy
536
631
 
537
632
  @budget_service_stub.call_rpc :delete_budget, request, options: options do |response, operation|
@@ -555,22 +650,21 @@ module Google
555
650
  # Configuration can be applied globally to all clients, or to a single client
556
651
  # on construction.
557
652
  #
558
- # # Examples
559
- #
560
- # To modify the global config, setting the timeout for create_budget
561
- # to 20 seconds, and all remaining timeouts to 10 seconds:
562
- #
563
- # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
564
- # config.timeout = 10.0
565
- # config.rpcs.create_budget.timeout = 20.0
566
- # end
567
- #
568
- # To apply the above configuration only to a new client:
569
- #
570
- # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
571
- # config.timeout = 10.0
572
- # config.rpcs.create_budget.timeout = 20.0
573
- # 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
574
668
  #
575
669
  # @!attribute [rw] endpoint
576
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
@@ -29,14 +29,14 @@ module Google
29
29
  # budget plan and rules to execute as we track spend against that plan.
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
36
36
  self.service_name = 'google.cloud.billing.budgets.v1beta1.BudgetService'
37
37
 
38
38
  # Creates a new budget. See
39
- # <a href="https://cloud.google.com/billing/quotas">Quotas and limits</a>
39
+ # [Quotas and limits](https://cloud.google.com/billing/quotas)
40
40
  # for more information on the limits of the number of budgets you can create.
41
41
  rpc :CreateBudget, ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget
42
42
  # Updates a budget and returns the updated budget.
@@ -22,7 +22,7 @@ module Google
22
22
  module Billing
23
23
  module Budgets
24
24
  module V1beta1
25
- VERSION = "0.6.1"
25
+ VERSION = "0.6.5"
26
26
  end
27
27
  end
28
28
  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
@@ -38,9 +38,9 @@ module Google
38
38
  # Validation: <= 60 chars.
39
39
  # @!attribute [rw] budget_filter
40
40
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter]
41
- # Optional. Filters that define which resources are used to compute the
42
- # actual spend against the budget amount, such as projects, services, and the
43
- # budget's time period, as well as other filters.
41
+ # Optional. Filters that define which resources are used to compute the actual spend
42
+ # against the budget amount, such as projects, services, and the budget's
43
+ # time period, as well as other filters.
44
44
  # @!attribute [rw] amount
45
45
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount]
46
46
  # Required. Budgeted amount.
@@ -48,10 +48,13 @@ module Google
48
48
  # @return [::Array<::Google::Cloud::Billing::Budgets::V1beta1::ThresholdRule>]
49
49
  # Optional. Rules that trigger alerts (notifications of thresholds
50
50
  # being crossed) when spend exceeds the specified percentages of the budget.
51
+ #
52
+ # Optional for `pubsubTopic` notifications.
53
+ #
54
+ # Required if using email notifications.
51
55
  # @!attribute [rw] all_updates_rule
52
56
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule]
53
- # Optional. Rules to apply to notifications sent based on budget spend and
54
- # thresholds.
57
+ # Optional. Rules to apply to notifications sent based on budget spend and thresholds.
55
58
  # @!attribute [rw] etag
56
59
  # @return [::String]
57
60
  # Optional. Etag to validate that the object is unchanged for a
@@ -74,35 +77,47 @@ module Google
74
77
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount]
75
78
  # Use the last period's actual spend as the budget for the present period.
76
79
  # LastPeriodAmount can only be set when the budget's time period is a
77
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}.
78
- # It cannot be set in combination with
80
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. It cannot be set in combination with
79
81
  # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
80
82
  class BudgetAmount
81
83
  include ::Google::Protobuf::MessageExts
82
84
  extend ::Google::Protobuf::MessageExts::ClassMethods
83
85
  end
84
86
 
85
- # Describes a budget amount targeted to the last
86
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}
87
+ # Describes a budget amount targeted to the last {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}
87
88
  # spend. At this time, the amount is automatically 100% of the last calendar
88
89
  # period's spend; that is, there are no other options yet.
89
90
  # Future configuration options will be described here (for example, configuring
90
91
  # a percentage of last period's spend).
91
92
  # LastPeriodAmount cannot be set for a budget configured with
92
- # a
93
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
93
+ # a {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
94
94
  class LastPeriodAmount
95
95
  include ::Google::Protobuf::MessageExts
96
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
97
97
  end
98
98
 
99
- # ThresholdRule contains a definition of a threshold which triggers
100
- # an alert (a notification of a threshold being crossed) to be sent when
101
- # spend goes above the specified amount.
102
- # Alerts are automatically e-mailed to users with the Billing Account
103
- # Administrator role or the Billing Account User role.
104
- # The thresholds here have no effect on notifications sent to anything
105
- # configured under `Budget.all_updates_rule`.
99
+ # ThresholdRule contains the definition of a threshold. Threshold rules define
100
+ # the triggering events used to generate a budget notification email. When a
101
+ # threshold is crossed (spend exceeds the specified percentages of the
102
+ # budget), budget alert emails are sent to the email recipients you specify
103
+ # in the
104
+ # [NotificationsRule](#notificationsrule).
105
+ #
106
+ # Threshold rules also affect the fields included in the
107
+ # [JSON data
108
+ # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format)
109
+ # sent to a Pub/Sub topic.
110
+ #
111
+ # Threshold rules are _required_ if using email notifications.
112
+ #
113
+ # Threshold rules are _optional_ if only setting a
114
+ # [`pubsubTopic` NotificationsRule](#NotificationsRule),
115
+ # unless you want your JSON data object to include data about the thresholds
116
+ # you set.
117
+ #
118
+ # For more information, see
119
+ # [set budget threshold rules and
120
+ # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
106
121
  # @!attribute [rw] threshold_percent
107
122
  # @return [::Float]
108
123
  # Required. Send an alert when this threshold is exceeded.
@@ -127,8 +142,7 @@ module Google
127
142
  # Use forecasted spend for the period as the basis for comparison against
128
143
  # the threshold.
129
144
  # FORECASTED_SPEND can only be set when the budget's time period is a
130
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}.
131
- # It cannot be set in combination with
145
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. It cannot be set in combination with
132
146
  # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
133
147
  FORECASTED_SPEND = 2
134
148
  end
@@ -138,10 +152,10 @@ module Google
138
152
  # and thresholds.
139
153
  # @!attribute [rw] pubsub_topic
140
154
  # @return [::String]
141
- # Optional. The name of the Pub/Sub topic where budget related messages will
142
- # be published, in the form `projects/{project_id}/topics/{topic_id}`.
143
- # Updates are sent at regular intervals to the topic. The topic needs to be
144
- # created before the budget is created; see
155
+ # Optional. The name of the Pub/Sub topic where budget related messages will be
156
+ # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
157
+ # are sent at regular intervals to the topic.
158
+ # The topic needs to be created before the budget is created; see
145
159
  # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
146
160
  # for more details.
147
161
  # Caller is expected to have
@@ -151,28 +165,25 @@ module Google
151
165
  # for more details on Pub/Sub roles and permissions.
152
166
  # @!attribute [rw] schema_version
153
167
  # @return [::String]
154
- # Optional. Required when
155
- # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic}
156
- # is set. The schema version of the notification sent to
157
- # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic}.
158
- # Only "1.0" is accepted. It represents the JSON schema as defined in
168
+ # Optional. Required when {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic} is set. The schema version of
169
+ # the notification sent to {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic}. Only "1.0" is
170
+ # accepted. It represents the JSON schema as defined in
159
171
  # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
160
172
  # @!attribute [rw] monitoring_notification_channels
161
173
  # @return [::Array<::String>]
162
- # Optional. Targets to send notifications to when a threshold is exceeded.
163
- # This is in addition to default recipients who have billing account IAM
164
- # roles. The value is the full REST resource name of a monitoring
165
- # notification channel with the form
174
+ # Optional. Targets to send notifications to when a threshold is exceeded. This is in
175
+ # addition to default recipients who have billing account IAM roles.
176
+ # The value is the full REST resource name of a monitoring notification
177
+ # channel with the form
166
178
  # `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
167
179
  # channels are allowed. See
168
180
  # https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
169
181
  # for more details.
170
182
  # @!attribute [rw] disable_default_iam_recipients
171
183
  # @return [::Boolean]
172
- # Optional. When set to true, disables default notifications sent when a
173
- # threshold is exceeded. Default notifications are sent to those with Billing
174
- # Account Administrator and Billing Account User IAM roles for the target
175
- # account.
184
+ # Optional. When set to true, disables default notifications sent when a threshold is
185
+ # exceeded. Default notifications are sent to those with Billing Account
186
+ # Administrator and Billing Account User IAM roles for the target account.
176
187
  class AllUpdatesRule
177
188
  include ::Google::Protobuf::MessageExts
178
189
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -188,16 +199,14 @@ module Google
188
199
  # Only zero or one project can be specified currently.
189
200
  # @!attribute [rw] credit_types
190
201
  # @return [::Array<::String>]
191
- # Optional. If
192
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment}
193
- # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be
194
- # subtracted from gross cost to determine the spend for threshold
195
- # calculations. See [a list of acceptable credit type
202
+ # Optional. If {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} is INCLUDE_SPECIFIED_CREDITS, this is
203
+ # a list of credit types to be subtracted from gross cost to determine the
204
+ # spend for threshold calculations. See
205
+ # [a list of acceptable credit type
196
206
  # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
197
207
  #
198
- # If
199
- # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment}
200
- # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
208
+ # If {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} is **not** INCLUDE_SPECIFIED_CREDITS,
209
+ # this field must be empty.
201
210
  # @!attribute [rw] credit_types_treatment
202
211
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter::CreditTypesTreatment]
203
212
  # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
@@ -211,18 +220,23 @@ module Google
211
220
  # https://cloud.google.com/billing/v1/how-tos/catalog-api.
212
221
  # @!attribute [rw] subaccounts
213
222
  # @return [::Array<::String>]
214
- # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
215
- # specifying that usage from only this set of subaccounts should be included
216
- # in the budget. If a subaccount is set to the name of the parent account,
223
+ # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, specifying
224
+ # that usage from only this set of subaccounts should be included in the
225
+ # budget. If a subaccount is set to the name of the parent account,
217
226
  # usage from the parent account will be included. If omitted, the
218
227
  # report will include usage from the parent account and all
219
228
  # subaccounts, if they exist.
220
229
  # @!attribute [rw] labels
221
230
  # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}]
222
- # Optional. A single label and value pair specifying that usage from only
223
- # this set of labeled resources should be included in the budget. Currently,
224
- # multiple entries or multiple values per entry are not allowed. If omitted,
225
- # the report will include all labeled and unlabeled usage.
231
+ # Optional. A single label and value pair specifying that usage from only this set of
232
+ # labeled resources should be included in the budget. If omitted, the
233
+ # report will include all labeled and unlabeled usage.
234
+ #
235
+ # An object containing a single `"key": value` pair. Example: `{ "name":
236
+ # "wrench" }`.
237
+ #
238
+ # _Currently, multiple entries or multiple values per entry are not
239
+ # allowed._
226
240
  # @!attribute [rw] calendar_period
227
241
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::CalendarPeriod]
228
242
  # Optional. Specifies to track usage for recurring calendar period.
@@ -233,8 +247,8 @@ module Google
233
247
  # so on.
234
248
  # @!attribute [rw] custom_period
235
249
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::CustomPeriod]
236
- # Optional. Specifies to track usage from any start date (required) to any
237
- # end date (optional). This time period is static, it does not recur.
250
+ # Optional. Specifies to track usage from any start date (required) to any end date
251
+ # (optional). This time period is static, it does not recur.
238
252
  class Filter
239
253
  include ::Google::Protobuf::MessageExts
240
254
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -278,9 +292,9 @@ module Google
278
292
  # Required. The start date must be after January 1, 2017.
279
293
  # @!attribute [rw] end_date
280
294
  # @return [::Google::Type::Date]
281
- # Optional. The end date of the time period. Budgets with elapsed end date
282
- # won't be processed. If unset, specifies to track all usage incurred since
283
- # the start_date.
295
+ # Optional. The end date of the time period. Budgets with elapsed end date won't be
296
+ # processed. If unset, specifies to track all usage
297
+ # incurred since the start_date.
284
298
  class CustomPeriod
285
299
  include ::Google::Protobuf::MessageExts
286
300
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -291,6 +305,8 @@ module Google
291
305
  # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian
292
306
  # Pacific Time (UTC-8).
293
307
  module CalendarPeriod
308
+ # Calendar period is unset. This is the default if the budget is for a
309
+ # custom time period (CustomPeriod).
294
310
  CALENDAR_PERIOD_UNSPECIFIED = 0
295
311
 
296
312
  # A month. Month starts on the first day of each month, such as January 1,
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.1
4
+ version: 0.6.5
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-02-16 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.5
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: API Client library for the Billing Budgets V1beta1 API