google-cloud-billing-budgets-v1 0.3.0 → 0.4.0

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: 20fc05e5e0f9a8054f0e12640e175bce23692ae4cc65781299ef6b313f894e24
4
- data.tar.gz: 3506c113cd08912da748553b3007730f71744d851ac6792cfe6bcec7082f155d
3
+ metadata.gz: 6d24b2d9db95d65bfb26770cfc3dc94753e2bbe4ee3e3910f06cbe8ac78f925c
4
+ data.tar.gz: 7b068aade41ea66977e11cdd11d4211cf8fc4387b8faedf4ec4ce49d241682aa
5
5
  SHA512:
6
- metadata.gz: 982e23a84f6b00be82e5fb444b511ee15915a00e84dbdc86c389211f31e73d5b3018768347967afc85d30ec897df0f867ad342ffae8880a21ed2d459e9c5fcc0
7
- data.tar.gz: 17e90755189ea432ed3e3ea99457925a2c1eabe1a3e41e05415482be48d6baee5227571a520434710ad60c8bb571819797ea653067230e0201d2fd2ff2960510
6
+ metadata.gz: 38364c8a2c5cc3879bd7bb1b8408b36fd9868dcbbbb9134d53abb2efc66464fc9be4731764417e8f4177a47e63af8b38803843639acc3a0e13528c28c2ef3d5f
7
+ data.tar.gz: 317d44dade417a1c089cb9abed8637f5db674d31dd3a2bacfd54e19817a2a177eec7a40ccf045a427f20455b7643a87fbdd549597e1c9926ecb9f1e992044475
data/README.md CHANGED
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/billing/budgets/v1/budget_model.proto
3
4
 
@@ -9,69 +10,34 @@ require 'google/protobuf/struct_pb'
9
10
  require 'google/type/date_pb'
10
11
  require 'google/type/money_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/billing/budgets/v1/budget_model.proto", :syntax => :proto3) do
14
- add_message "google.cloud.billing.budgets.v1.Budget" do
15
- optional :name, :string, 1
16
- optional :display_name, :string, 2
17
- optional :budget_filter, :message, 3, "google.cloud.billing.budgets.v1.Filter"
18
- optional :amount, :message, 4, "google.cloud.billing.budgets.v1.BudgetAmount"
19
- repeated :threshold_rules, :message, 5, "google.cloud.billing.budgets.v1.ThresholdRule"
20
- optional :notifications_rule, :message, 6, "google.cloud.billing.budgets.v1.NotificationsRule"
21
- optional :etag, :string, 7
22
- end
23
- add_message "google.cloud.billing.budgets.v1.BudgetAmount" do
24
- oneof :budget_amount do
25
- optional :specified_amount, :message, 1, "google.type.Money"
26
- optional :last_period_amount, :message, 2, "google.cloud.billing.budgets.v1.LastPeriodAmount"
27
- end
28
- end
29
- add_message "google.cloud.billing.budgets.v1.LastPeriodAmount" do
30
- end
31
- add_message "google.cloud.billing.budgets.v1.ThresholdRule" do
32
- optional :threshold_percent, :double, 1
33
- optional :spend_basis, :enum, 2, "google.cloud.billing.budgets.v1.ThresholdRule.Basis"
34
- end
35
- add_enum "google.cloud.billing.budgets.v1.ThresholdRule.Basis" do
36
- value :BASIS_UNSPECIFIED, 0
37
- value :CURRENT_SPEND, 1
38
- value :FORECASTED_SPEND, 2
39
- end
40
- add_message "google.cloud.billing.budgets.v1.NotificationsRule" do
41
- optional :pubsub_topic, :string, 1
42
- optional :schema_version, :string, 2
43
- repeated :monitoring_notification_channels, :string, 3
44
- optional :disable_default_iam_recipients, :bool, 4
45
- end
46
- add_message "google.cloud.billing.budgets.v1.Filter" do
47
- repeated :projects, :string, 1
48
- repeated :credit_types, :string, 7
49
- optional :credit_types_treatment, :enum, 4, "google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment"
50
- repeated :services, :string, 3
51
- repeated :subaccounts, :string, 5
52
- map :labels, :string, :message, 6, "google.protobuf.ListValue"
53
- oneof :usage_period do
54
- optional :calendar_period, :enum, 8, "google.cloud.billing.budgets.v1.CalendarPeriod"
55
- optional :custom_period, :message, 9, "google.cloud.billing.budgets.v1.CustomPeriod"
56
- end
57
- end
58
- add_enum "google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment" do
59
- value :CREDIT_TYPES_TREATMENT_UNSPECIFIED, 0
60
- value :INCLUDE_ALL_CREDITS, 1
61
- value :EXCLUDE_ALL_CREDITS, 2
62
- value :INCLUDE_SPECIFIED_CREDITS, 3
63
- end
64
- add_message "google.cloud.billing.budgets.v1.CustomPeriod" do
65
- optional :start_date, :message, 1, "google.type.Date"
66
- optional :end_date, :message, 2, "google.type.Date"
67
- end
68
- add_enum "google.cloud.billing.budgets.v1.CalendarPeriod" do
69
- value :CALENDAR_PERIOD_UNSPECIFIED, 0
70
- value :MONTH, 1
71
- value :QUARTER, 2
72
- value :YEAR, 3
13
+
14
+ descriptor_data = "\n2google/cloud/billing/budgets/v1/budget_model.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\x1a\x17google/type/money.proto\"\xcf\x03\n\x06\x42udget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\rbudget_filter\x18\x03 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.FilterB\x03\xe0\x41\x01\x12\x42\n\x06\x61mount\x18\x04 \x01(\x0b\x32-.google.cloud.billing.budgets.v1.BudgetAmountB\x03\xe0\x41\x02\x12L\n\x0fthreshold_rules\x18\x05 \x03(\x0b\x32..google.cloud.billing.budgets.v1.ThresholdRuleB\x03\xe0\x41\x01\x12S\n\x12notifications_rule\x18\x06 \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1.NotificationsRuleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:]\xea\x41Z\n$billingbudgets.googleapis.com/Budget\x12\x32\x62illingAccounts/{billing_account}/budgets/{budget}\"\xa0\x01\n\x0c\x42udgetAmount\x12.\n\x10specified_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12O\n\x12last_period_amount\x18\x02 \x01(\x0b\x32\x31.google.cloud.billing.budgets.v1.LastPeriodAmountH\x00\x42\x0f\n\rbudget_amount\"\x12\n\x10LastPeriodAmount\"\xc8\x01\n\rThresholdRule\x12\x1e\n\x11threshold_percent\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12N\n\x0bspend_basis\x18\x02 \x01(\x0e\x32\x34.google.cloud.billing.budgets.v1.ThresholdRule.BasisB\x03\xe0\x41\x01\"G\n\x05\x42\x61sis\x12\x15\n\x11\x42\x41SIS_UNSPECIFIED\x10\x00\x12\x11\n\rCURRENT_SPEND\x10\x01\x12\x14\n\x10\x46ORECASTED_SPEND\x10\x02\"\xa7\x01\n\x11NotificationsRule\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eschema_version\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12-\n monitoring_notification_channels\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12+\n\x1e\x64isable_default_iam_recipients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc4\x05\n\x06\x46ilter\x12\x15\n\x08projects\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12resource_ancestors\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63redit_types\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x16\x63redit_types_treatment\x18\x04 \x01(\x0e\x32<.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatmentB\x03\xe0\x41\x01\x12\x15\n\x08services\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsubaccounts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.billing.budgets.v1.Filter.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0f\x63\x61lendar_period\x18\x08 \x01(\x0e\x32/.google.cloud.billing.budgets.v1.CalendarPeriodB\x03\xe0\x41\x01H\x00\x12K\n\rcustom_period\x18\t \x01(\x0b\x32-.google.cloud.billing.budgets.v1.CustomPeriodB\x03\xe0\x41\x01H\x00\x1aI\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValue:\x02\x38\x01\"\x8f\x01\n\x14\x43reditTypesTreatment\x12&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13INCLUDE_ALL_CREDITS\x10\x01\x12\x17\n\x13\x45XCLUDE_ALL_CREDITS\x10\x02\x12\x1d\n\x19INCLUDE_SPECIFIED_CREDITS\x10\x03\x42\x0e\n\x0cusage_period\"d\n\x0c\x43ustomPeriod\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01*S\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x0b\n\x07QUARTER\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42x\n#com.google.cloud.billing.budgets.v1B\x10\x42udgetModelProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.type.Money", "google/type/money.proto"],
30
+ ["google.protobuf.ListValue", "google/protobuf/struct.proto"],
31
+ ["google.type.Date", "google/type/date.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
73
37
  end
74
38
  end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
75
41
  end
76
42
 
77
43
  module Google
@@ -147,7 +147,7 @@ module Google
147
147
  credentials = @config.credentials
148
148
  # Use self-signed JWT if the endpoint is unchanged from default,
149
149
  # but only if the default endpoint does not have a region prefix.
150
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
151
151
  !@config.endpoint.split(".").first.include?("-")
152
152
  credentials ||= Credentials.default scope: @config.scope,
153
153
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -673,9 +673,9 @@ module Google
673
673
  # * (`String`) The path to a service account key file in JSON format
674
674
  # * (`Hash`) A service account key as a Hash
675
675
  # * (`Google::Auth::Credentials`) A googleauth credentials object
676
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
676
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
677
677
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
678
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
678
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
679
679
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
680
680
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
681
681
  # * (`nil`) indicating no credentials
@@ -717,7 +717,9 @@ module Google
717
717
  class Configuration
718
718
  extend ::Gapic::Config
719
719
 
720
- config_attr :endpoint, "billingbudgets.googleapis.com", ::String
720
+ DEFAULT_ENDPOINT = "billingbudgets.googleapis.com"
721
+
722
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
721
723
  config_attr :credentials, nil do |value|
722
724
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
723
725
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -143,7 +143,7 @@ module Google
143
143
  credentials = @config.credentials
144
144
  # Use self-signed JWT if the endpoint is unchanged from default,
145
145
  # but only if the default endpoint does not have a region prefix.
146
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
146
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
147
147
  !@config.endpoint.split(".").first.include?("-")
148
148
  credentials ||= Credentials.default scope: @config.scope,
149
149
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -545,9 +545,9 @@ module Google
545
545
  # * (`String`) The path to a service account key file in JSON format
546
546
  # * (`Hash`) A service account key as a Hash
547
547
  # * (`Google::Auth::Credentials`) A googleauth credentials object
548
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
548
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
549
549
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
550
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
550
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
551
551
  # * (`nil`) indicating no credentials
552
552
  # @return [::Object]
553
553
  # @!attribute [rw] scope
@@ -580,7 +580,9 @@ module Google
580
580
  class Configuration
581
581
  extend ::Gapic::Config
582
582
 
583
- config_attr :endpoint, "billingbudgets.googleapis.com", ::String
583
+ DEFAULT_ENDPOINT = "billingbudgets.googleapis.com"
584
+
585
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
584
586
  config_attr :credentials, nil do |value|
585
587
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
586
588
  allowed.any? { |klass| klass === value }
@@ -60,7 +60,7 @@ module Google
60
60
 
61
61
  verb, uri, query_string_params, body = ServiceStub.transcode_create_budget_request request_pb
62
62
  query_string_params = if query_string_params.any?
63
- query_string_params.to_h { |p| p.split("=", 2) }
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
64
  else
65
65
  {}
66
66
  end
@@ -98,7 +98,7 @@ module Google
98
98
 
99
99
  verb, uri, query_string_params, body = ServiceStub.transcode_update_budget_request request_pb
100
100
  query_string_params = if query_string_params.any?
101
- query_string_params.to_h { |p| p.split("=", 2) }
101
+ query_string_params.to_h { |p| p.split "=", 2 }
102
102
  else
103
103
  {}
104
104
  end
@@ -136,7 +136,7 @@ module Google
136
136
 
137
137
  verb, uri, query_string_params, body = ServiceStub.transcode_get_budget_request request_pb
138
138
  query_string_params = if query_string_params.any?
139
- query_string_params.to_h { |p| p.split("=", 2) }
139
+ query_string_params.to_h { |p| p.split "=", 2 }
140
140
  else
141
141
  {}
142
142
  end
@@ -174,7 +174,7 @@ module Google
174
174
 
175
175
  verb, uri, query_string_params, body = ServiceStub.transcode_list_budgets_request request_pb
176
176
  query_string_params = if query_string_params.any?
177
- query_string_params.to_h { |p| p.split("=", 2) }
177
+ query_string_params.to_h { |p| p.split "=", 2 }
178
178
  else
179
179
  {}
180
180
  end
@@ -212,7 +212,7 @@ module Google
212
212
 
213
213
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_budget_request request_pb
214
214
  query_string_params = if query_string_params.any?
215
- query_string_params.to_h { |p| p.split("=", 2) }
215
+ query_string_params.to_h { |p| p.split "=", 2 }
216
216
  else
217
217
  {}
218
218
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/billing/budgets/v1/budget_service.proto
3
4
 
@@ -11,32 +12,33 @@ require 'google/cloud/billing/budgets/v1/budget_model_pb'
11
12
  require 'google/protobuf/empty_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
 
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/cloud/billing/budgets/v1/budget_service.proto", :syntax => :proto3) do
16
- add_message "google.cloud.billing.budgets.v1.CreateBudgetRequest" do
17
- optional :parent, :string, 1
18
- optional :budget, :message, 2, "google.cloud.billing.budgets.v1.Budget"
19
- end
20
- add_message "google.cloud.billing.budgets.v1.UpdateBudgetRequest" do
21
- optional :budget, :message, 1, "google.cloud.billing.budgets.v1.Budget"
22
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
23
- end
24
- add_message "google.cloud.billing.budgets.v1.GetBudgetRequest" do
25
- optional :name, :string, 1
26
- end
27
- add_message "google.cloud.billing.budgets.v1.ListBudgetsRequest" do
28
- optional :parent, :string, 1
29
- optional :page_size, :int32, 2
30
- optional :page_token, :string, 3
31
- end
32
- add_message "google.cloud.billing.budgets.v1.ListBudgetsResponse" do
33
- repeated :budgets, :message, 1, "google.cloud.billing.budgets.v1.Budget"
34
- optional :next_page_token, :string, 2
35
- end
36
- add_message "google.cloud.billing.budgets.v1.DeleteBudgetRequest" do
37
- optional :name, :string, 1
15
+
16
+ descriptor_data = "\n4google/cloud/billing/budgets/v1/budget_service.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/billing/budgets/v1/budget_model.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x91\x01\n\x13\x43reateBudgetRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12<\n\x06\x62udget\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\"\x89\x01\n\x13UpdateBudgetRequest\x12<\n\x06\x62udget\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x10GetBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget\"\x83\x01\n\x12ListBudgetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"h\n\x13ListBudgetsResponse\x12\x38\n\x07\x62udgets\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.budgets.v1.Budget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x13\x44\x65leteBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget2\xf7\x07\n\rBudgetService\x12\xb5\x01\n\x0c\x43reateBudget\x12\x34.google.cloud.billing.budgets.v1.CreateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"F\x82\xd3\xe4\x93\x02\x30\"&/v1/{parent=billingAccounts/*}/budgets:\x06\x62udget\xda\x41\rparent,budget\x12\xc1\x01\n\x0cUpdateBudget\x12\x34.google.cloud.billing.budgets.v1.UpdateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"R\x82\xd3\xe4\x93\x02\x37\x32-/v1/{budget.name=billingAccounts/*/budgets/*}:\x06\x62udget\xda\x41\x12\x62udget,update_mask\x12\x9e\x01\n\tGetBudget\x12\x31.google.cloud.billing.budgets.v1.GetBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"5\x82\xd3\xe4\x93\x02(\x12&/v1/{name=billingAccounts/*/budgets/*}\xda\x41\x04name\x12\xb1\x01\n\x0bListBudgets\x12\x33.google.cloud.billing.budgets.v1.ListBudgetsRequest\x1a\x34.google.cloud.billing.budgets.v1.ListBudgetsResponse\"7\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=billingAccounts/*}/budgets\xda\x41\x06parent\x12\x93\x01\n\x0c\x44\x65leteBudget\x12\x34.google.cloud.billing.budgets.v1.DeleteBudgetRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02(*&/v1/{name=billingAccounts/*/budgets/*}\xda\x41\x04name\x1a\x7f\xca\x41\x1d\x62illingbudgets.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBz\n#com.google.cloud.billing.budgets.v1B\x12\x42udgetServiceProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.cloud.billing.budgets.v1.Budget", "google/cloud/billing/budgets/v1/budget_model.proto"],
32
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
38
38
  end
39
39
  end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
40
42
  end
41
43
 
42
44
  module Google
@@ -22,7 +22,7 @@ module Google
22
22
  module Billing
23
23
  module Budgets
24
24
  module V1
25
- VERSION = "0.3.0"
25
+ VERSION = "0.4.0"
26
26
  end
27
27
  end
28
28
  end
@@ -35,7 +35,9 @@ module Google
35
35
  # Details about how and where to publish client libraries.
36
36
  # @!attribute [rw] version
37
37
  # @return [::String]
38
- # Version of the API to apply these settings to.
38
+ # Version of the API to apply these settings to. This is the full protobuf
39
+ # package for the API, ending in the version element.
40
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
39
41
  # @!attribute [rw] launch_stage
40
42
  # @return [::Google::Api::LaunchStage]
41
43
  # Launch stage of this version of the API.
@@ -81,7 +83,7 @@ module Google
81
83
  # long-running operation pattern.
82
84
  # @!attribute [rw] new_issue_uri
83
85
  # @return [::String]
84
- # Link to a place that API users can report issues. Example:
86
+ # Link to a *public* URI where users can report issues. Example:
85
87
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
88
  # @!attribute [rw] documentation_uri
87
89
  # @return [::String]
@@ -111,6 +113,10 @@ module Google
111
113
  # Client library settings. If the same version string appears multiple
112
114
  # times in this list, then the last one wins. Settings from earlier
113
115
  # settings with the same version string are discarded.
116
+ # @!attribute [rw] proto_reference_documentation_uri
117
+ # @return [::String]
118
+ # Optional link to proto reference documentation. Example:
119
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
114
120
  class Publishing
115
121
  include ::Google::Protobuf::MessageExts
116
122
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -203,9 +209,57 @@ module Google
203
209
  # @!attribute [rw] common
204
210
  # @return [::Google::Api::CommonLanguageSettings]
205
211
  # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
206
242
  class DotnetSettings
207
243
  include ::Google::Protobuf::MessageExts
208
244
  extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
209
263
  end
210
264
 
211
265
  # Settings for Ruby client libraries.
@@ -240,8 +294,8 @@ module Google
240
294
  # Example of a YAML configuration::
241
295
  #
242
296
  # publishing:
243
- # method_behavior:
244
- # - selector: CreateAdDomain
297
+ # method_settings:
298
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
245
299
  # long_running:
246
300
  # initial_poll_delay:
247
301
  # seconds: 60 # 1 minute
@@ -299,6 +353,15 @@ module Google
299
353
 
300
354
  # Street View Org.
301
355
  STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
302
365
  end
303
366
 
304
367
  # To where should client libraries be published?
@@ -48,6 +48,10 @@ module Google
48
48
  # @return [::Array<::Google::Cloud::Billing::Budgets::V1::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] notifications_rule
52
56
  # @return [::Google::Cloud::Billing::Budgets::V1::NotificationsRule]
53
57
  # Optional. Rules to apply to notifications sent based on budget spend and
@@ -56,7 +60,7 @@ module Google
56
60
  # @return [::String]
57
61
  # Optional. Etag to validate that the object is unchanged for a
58
62
  # read-modify-write operation.
59
- # An empty etag will cause an update to overwrite other changes.
63
+ # An empty etag causes an update to overwrite other changes.
60
64
  class Budget
61
65
  include ::Google::Protobuf::MessageExts
62
66
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -86,8 +90,6 @@ module Google
86
90
  # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period}
87
91
  # spend. At this time, the amount is automatically 100% of the last calendar
88
92
  # period's spend; that is, there are no other options yet.
89
- # Future configuration options will be described here (for example, configuring
90
- # a percentage of last period's spend).
91
93
  # LastPeriodAmount cannot be set for a budget configured with
92
94
  # a
93
95
  # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}.
@@ -96,13 +98,28 @@ module Google
96
98
  extend ::Google::Protobuf::MessageExts::ClassMethods
97
99
  end
98
100
 
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`.
101
+ # ThresholdRule contains the definition of a threshold. Threshold rules define
102
+ # the triggering events used to generate a budget notification email. When a
103
+ # threshold is crossed (spend exceeds the specified percentages of the
104
+ # budget), budget alert emails are sent to the email recipients you specify
105
+ # in the
106
+ # [NotificationsRule](#notificationsrule).
107
+ #
108
+ # Threshold rules also affect the fields included in the
109
+ # [JSON data
110
+ # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format)
111
+ # sent to a Pub/Sub topic.
112
+ #
113
+ # Threshold rules are _required_ if using email notifications.
114
+ #
115
+ # Threshold rules are _optional_ if only setting a
116
+ # [`pubsubTopic` NotificationsRule](#NotificationsRule),
117
+ # unless you want your JSON data object to include data about the thresholds
118
+ # you set.
119
+ #
120
+ # For more information, see
121
+ # [set budget threshold rules and
122
+ # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions).
106
123
  # @!attribute [rw] threshold_percent
107
124
  # @return [::Float]
108
125
  # Required. Send an alert when this threshold is exceeded.
@@ -138,17 +155,32 @@ module Google
138
155
  # and thresholds.
139
156
  # @!attribute [rw] pubsub_topic
140
157
  # @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
145
- # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
146
- # for more details.
147
- # Caller is expected to have
148
- # `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
149
- # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
150
- # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
151
- # for more details on Pub/Sub roles and permissions.
158
+ # Optional. The name of the Pub/Sub topic where budget-related messages are
159
+ # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates
160
+ # are sent to the topic at regular intervals; the timing of the updates is
161
+ # not dependent on the [threshold rules](#thresholdrule) you've set.
162
+ #
163
+ # Note that if you want your
164
+ # [Pub/Sub JSON
165
+ # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format)
166
+ # to contain data for `alertThresholdExceeded`, you need at least one
167
+ # [alert threshold rule](#thresholdrule). When you set threshold rules, you
168
+ # must also enable at least one of the email notification options, either
169
+ # using the default IAM recipients or Cloud Monitoring email notification
170
+ # channels.
171
+ #
172
+ # To use Pub/Sub topics with budgets, you must do the following:
173
+ #
174
+ # 1. Create the Pub/Sub topic
175
+ # before connecting it to your budget. For guidance, see
176
+ # [Manage programmatic budget alert
177
+ # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications).
178
+ #
179
+ # 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on
180
+ # the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED.
181
+ # For additional details on Pub/Sub roles and permissions, see
182
+ # [Permissions required for this
183
+ # task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task).
152
184
  # @!attribute [rw] schema_version
153
185
  # @return [::String]
154
186
  # Optional. Required when
@@ -159,14 +191,28 @@ module Google
159
191
  # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
160
192
  # @!attribute [rw] monitoring_notification_channels
161
193
  # @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
166
- # `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5
167
- # channels are allowed. See
168
- # https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients
169
- # for more details.
194
+ # Optional. Email targets to send notifications to when a threshold is
195
+ # exceeded. This is in addition to the `DefaultIamRecipients` who receive
196
+ # alert emails based on their billing account IAM role. The value is the full
197
+ # REST resource name of a Cloud Monitoring email notification channel with
198
+ # the form `projects/{project_id}/notificationChannels/{channel_id}`. A
199
+ # maximum of 5 email notifications are allowed.
200
+ #
201
+ # To customize budget alert email recipients with monitoring notification
202
+ # channels, you _must create the monitoring notification channels before
203
+ # you link them to a budget_. For guidance on setting up notification
204
+ # channels to use with budgets, see
205
+ # [Customize budget alert email
206
+ # recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients).
207
+ #
208
+ # For Cloud Billing budget alerts, you _must use email notification
209
+ # channels_. The other types of notification channels are _not_
210
+ # supported, such as Slack, SMS, or PagerDuty. If you want to
211
+ # [send budget notifications to
212
+ # Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack),
213
+ # use a pubsubTopic and configure
214
+ # [programmatic
215
+ # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications).
170
216
  # @!attribute [rw] disable_default_iam_recipients
171
217
  # @return [::Boolean]
172
218
  # Optional. When set to true, disables default notifications sent when a
@@ -183,9 +229,15 @@ module Google
183
229
  # @return [::Array<::String>]
184
230
  # Optional. A set of projects of the form `projects/{project}`,
185
231
  # specifying that usage from only this set of projects should be
186
- # included in the budget. If omitted, the report will include all usage for
232
+ # included in the budget. If omitted, the report includes all usage for
187
233
  # the billing account, regardless of which project the usage occurred on.
188
- # Only zero or one project can be specified currently.
234
+ # @!attribute [rw] resource_ancestors
235
+ # @return [::Array<::String>]
236
+ # Optional. A set of folder and organization names of the form
237
+ # `folders/{folderId}` or `organizations/{organizationId}`, specifying that
238
+ # usage from only this set of folders and organizations should be included in
239
+ # the budget. If omitted, the report includes all usage for all
240
+ # organizations, regardless of which organization the usage occurred on.
189
241
  # @!attribute [rw] credit_types
190
242
  # @return [::Array<::String>]
191
243
  # Optional. If
@@ -205,7 +257,7 @@ module Google
205
257
  # @return [::Array<::String>]
206
258
  # Optional. A set of services of the form `services/{service_id}`,
207
259
  # specifying that usage from only this set of services should be
208
- # included in the budget. If omitted, the report will include usage for
260
+ # included in the budget. If omitted, the report includes usage for
209
261
  # all the services.
210
262
  # The service names are available through the Catalog API:
211
263
  # https://cloud.google.com/billing/v1/how-tos/catalog-api.
@@ -214,21 +266,26 @@ module Google
214
266
  # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`,
215
267
  # specifying that usage from only this set of subaccounts should be included
216
268
  # in the budget. If a subaccount is set to the name of the parent account,
217
- # usage from the parent account will be included. If the field is omitted,
218
- # the report will include usage from the parent account and all subaccounts,
269
+ # usage from the parent account is included. If the field is omitted,
270
+ # the report includes usage from the parent account and all subaccounts,
219
271
  # if they exist.
220
272
  # @!attribute [rw] labels
221
273
  # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}]
222
274
  # 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.
275
+ # this set of labeled resources should be included in the budget. If omitted,
276
+ # the report includes all labeled and unlabeled usage.
277
+ #
278
+ # An object containing a single `"key": value` pair. Example: `{ "name":
279
+ # "wrench" }`.
280
+ #
281
+ # _Currently, multiple entries or multiple values per entry are not
282
+ # allowed._
226
283
  # @!attribute [rw] calendar_period
227
284
  # @return [::Google::Cloud::Billing::Budgets::V1::CalendarPeriod]
228
285
  # Optional. Specifies to track usage for recurring calendar period.
229
- # For example, assume that CalendarPeriod.QUARTER is set. The budget will
230
- # track usage from April 1 to June 30, when the current calendar month is
231
- # April, May, June. After that, it will track usage from July 1 to
286
+ # For example, assume that CalendarPeriod.QUARTER is set. The budget
287
+ # tracks usage from April 1 to June 30, when the current calendar month is
288
+ # April, May, June. After that, it tracks usage from July 1 to
232
289
  # September 30 when the current calendar month is July, August, September,
233
290
  # so on.
234
291
  # @!attribute [rw] custom_period
@@ -291,6 +348,8 @@ module Google
291
348
  # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian
292
349
  # Pacific Time (UTC-8).
293
350
  module CalendarPeriod
351
+ # Calendar period is unset. This is the default if the budget is for a
352
+ # custom time period (CustomPeriod).
294
353
  CALENDAR_PERIOD_UNSPECIFIED = 0
295
354
 
296
355
  # A month. Month starts on the first day of each month, such as January 1,
@@ -87,7 +87,7 @@ module Google
87
87
  # `NullValue` is a singleton enumeration to represent the null value for the
88
88
  # `Value` type union.
89
89
  #
90
- # The JSON representation for `NullValue` is JSON `null`.
90
+ # The JSON representation for `NullValue` is JSON `null`.
91
91
  module NullValue
92
92
  # Null value.
93
93
  NULL_VALUE = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing-budgets-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-06-06 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.18.0
19
+ version: 0.19.1
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.18.0
29
+ version: 0.19.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a