google-cloud-billing-budgets-v1beta1 0.4.1 → 0.6.2

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: 77b8bedfd3fa4c104f5db3581fea03879f30f748f6d7134935ed7a09568f1fd1
4
- data.tar.gz: dfef21d3e1d6cb090187a68bfd34a25b23905449b7a6f6531ef360a1ba4fc2fb
3
+ metadata.gz: 1b0d19d63ab0f08964249db89374a812e8d51bfc6d3294062b951230daa8c08e
4
+ data.tar.gz: 5fd478ccc7917ab30cde55265019dbc112cb2ef84dfccac272896f1a26edf432
5
5
  SHA512:
6
- metadata.gz: a41746dddc4b742793570d614b9df5d7eb3a74cfbf7e6590e13647f13609af28ed4ba7a5b36aa5652dc850184fafc4298ba2d7d4f27c6762edcb5ca602cf7fe5
7
- data.tar.gz: 72d2da9f79ab30d88ed59af83070fa34e1b987614a216af4feecec42c88564c8684e3253845fae41c23bb360bf9c7b8f1d2bb81682fca611dc6eb7121f22dddd
6
+ metadata.gz: efe1bf11cc843d2bcffd980e253dfe61e32b77d36cab4dd1d1db0a7176217dad53633d2eb61111be4d337a5290982abb933caf7907c2b7e1ad4f4e4d6855e686
7
+ data.tar.gz: e973753651d4f19660ec882d3b5f9aec72635f5680f2e792fabe3ddc30c1b2347a191f4442fe3f57e87393de3a8ebb07d7e8ae1bb6d81dfc9c826b044101a131
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"
data/LICENSE.md CHANGED
@@ -1,192 +1,190 @@
1
- Apache License
2
- ==============
3
-
4
- * Version 2.0, January 2004
5
- * https://www.apache.org/licenses/
6
-
7
- ### TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. **Definitions.**
10
-
11
- "License" shall mean the terms and conditions for use, reproduction,
12
- and distribution as defined by Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by
15
- the copyright owner that is granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all
18
- other entities that control, are controlled by, or are under common
19
- control with that entity. For the purposes of this definition,
20
- "control" means (i) the power, direct or indirect, to cause the
21
- direction or management of such entity, whether by contract or
22
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
- outstanding shares, or (iii) beneficial ownership of such entity.
24
-
25
- "You" (or "Your") shall mean an individual or Legal Entity
26
- exercising permissions granted by this License.
27
-
28
- "Source" form shall mean the preferred form for making modifications,
29
- including but not limited to software source code, documentation
30
- source, and configuration files.
31
-
32
- "Object" form shall mean any form resulting from mechanical
33
- transformation or translation of a Source form, including but
34
- not limited to compiled object code, generated documentation,
35
- and conversions to other media types.
36
-
37
- "Work" shall mean the work of authorship, whether in Source or
38
- Object form, made available under the License, as indicated by a
39
- copyright notice that is included in or attached to the work
40
- (an example is provided in the Appendix below).
41
-
42
- "Derivative Works" shall mean any work, whether in Source or Object
43
- form, that is based on (or derived from) the Work and for which the
44
- editorial revisions, annotations, elaborations, or other modifications
45
- represent, as a whole, an original work of authorship. For the purposes
46
- of this License, Derivative Works shall not include works that remain
47
- separable from, or merely link (or bind by name) to the interfaces of,
48
- the Work and Derivative Works thereof.
49
-
50
- "Contribution" shall mean any work of authorship, including
51
- the original version of the Work and any modifications or additions
52
- to that Work or Derivative Works thereof, that is intentionally
53
- submitted to Licensor for inclusion in the Work by the copyright owner
54
- or by an individual or Legal Entity authorized to submit on behalf of
55
- the copyright owner. For the purposes of this definition, "submitted"
56
- means any form of electronic, verbal, or written communication sent
57
- to the Licensor or its representatives, including but not limited to
58
- communication on electronic mailing lists, source code control systems,
59
- and issue tracking systems that are managed by, or on behalf of, the
60
- Licensor for the purpose of discussing and improving the Work, but
61
- excluding communication that is conspicuously marked or otherwise
62
- designated in writing by the copyright owner as "Not a Contribution."
63
-
64
- "Contributor" shall mean Licensor and any individual or Legal Entity
65
- on behalf of whom a Contribution has been received by Licensor and
66
- subsequently incorporated within the Work.
67
-
68
- 2. **Grant of Copyright License.** Subject to the terms and conditions of
69
- this License, each Contributor hereby grants to You a perpetual,
70
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
- copyright license to reproduce, prepare Derivative Works of,
72
- publicly display, publicly perform, sublicense, and distribute the
73
- Work and such Derivative Works in Source or Object form.
74
-
75
- 3. **Grant of Patent License.** Subject to the terms and conditions of
76
- this License, each Contributor hereby grants to You a perpetual,
77
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
- (except as stated in this section) patent license to make, have made,
79
- use, offer to sell, sell, import, and otherwise transfer the Work,
80
- where such license applies only to those patent claims licensable
81
- by such Contributor that are necessarily infringed by their
82
- Contribution(s) alone or by combination of their Contribution(s)
83
- with the Work to which such Contribution(s) was submitted. If You
84
- institute patent litigation against any entity (including a
85
- cross-claim or counterclaim in a lawsuit) alleging that the Work
86
- or a Contribution incorporated within the Work constitutes direct
87
- or contributory patent infringement, then any patent licenses
88
- granted to You under this License for that Work shall terminate
89
- as of the date such litigation is filed.
90
-
91
- 4. **Redistribution.** You may reproduce and distribute copies of the
92
- Work or Derivative Works thereof in any medium, with or without
93
- modifications, and in Source or Object form, provided that You
94
- meet the following conditions:
95
-
96
- * **(a)** You must give any other recipients of the Work or
97
- Derivative Works a copy of this License; and
98
-
99
- * **(b)** You must cause any modified files to carry prominent notices
100
- stating that You changed the files; and
101
-
102
- * **(c)** You must retain, in the Source form of any Derivative Works
103
- that You distribute, all copyright, patent, trademark, and
104
- attribution notices from the Source form of the Work,
105
- excluding those notices that do not pertain to any part of
106
- the Derivative Works; and
107
-
108
- * **(d)** If the Work includes a "NOTICE" text file as part of its
109
- distribution, then any Derivative Works that You distribute must
110
- include a readable copy of the attribution notices contained
111
- within such NOTICE file, excluding those notices that do not
112
- pertain to any part of the Derivative Works, in at least one
113
- of the following places: within a NOTICE text file distributed
114
- as part of the Derivative Works; within the Source form or
115
- documentation, if provided along with the Derivative Works; or,
116
- within a display generated by the Derivative Works, if and
117
- wherever such third-party notices normally appear. The contents
118
- of the NOTICE file are for informational purposes only and
119
- do not modify the License. You may add Your own attribution
120
- notices within Derivative Works that You distribute, alongside
121
- or as an addendum to the NOTICE text from the Work, provided
122
- that such additional attribution notices cannot be construed
123
- as modifying the License.
124
-
125
- You may add Your own copyright statement to Your modifications and
126
- may provide additional or different license terms and conditions
127
- for use, reproduction, or distribution of Your modifications, or
128
- for any such Derivative Works as a whole, provided Your use,
129
- reproduction, and distribution of the Work otherwise complies with
130
- the conditions stated in this License.
131
-
132
- 5. **Submission of Contributions.** Unless You explicitly state otherwise,
133
- any Contribution intentionally submitted for inclusion in the Work
134
- by You to the Licensor shall be under the terms and conditions of
135
- this License, without any additional terms or conditions.
136
- Notwithstanding the above, nothing herein shall supersede or modify
137
- the terms of any separate license agreement you may have executed
138
- with Licensor regarding such Contributions.
139
-
140
- 6. **Trademarks.** This License does not grant permission to use the trade
141
- names, trademarks, service marks, or product names of the Licensor,
142
- except as required for reasonable and customary use in describing the
143
- origin of the Work and reproducing the content of the NOTICE file.
144
-
145
- 7. **Disclaimer of Warranty.** Unless required by applicable law or
146
- agreed to in writing, Licensor provides the Work (and each
147
- Contributor provides its Contributions) on an "AS IS" BASIS,
148
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
- implied, including, without limitation, any warranties or conditions
150
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
- PARTICULAR PURPOSE. You are solely responsible for determining the
152
- appropriateness of using or redistributing the Work and assume any
153
- risks associated with Your exercise of permissions under this License.
154
-
155
- 8. **Limitation of Liability.** In no event and under no legal theory,
156
- whether in tort (including negligence), contract, or otherwise,
157
- unless required by applicable law (such as deliberate and grossly
158
- negligent acts) or agreed to in writing, shall any Contributor be
159
- liable to You for damages, including any direct, indirect, special,
160
- incidental, or consequential damages of any character arising as a
161
- result of this License or out of the use or inability to use the
162
- Work (including but not limited to damages for loss of goodwill,
163
- work stoppage, computer failure or malfunction, or any and all
164
- other commercial damages or losses), even if such Contributor
165
- has been advised of the possibility of such damages.
166
-
167
- 9. **Accepting Warranty or Additional Liability.** While redistributing
168
- the Work or Derivative Works thereof, You may choose to offer,
169
- and charge a fee for, acceptance of support, warranty, indemnity,
170
- or other liability obligations and/or rights consistent with this
171
- License. However, in accepting such obligations, You may act only
172
- on Your own behalf and on Your sole responsibility, not on behalf
173
- of any other Contributor, and only if You agree to indemnify,
174
- defend, and hold each Contributor harmless for any liability
175
- incurred by, or claims asserted against, such Contributor by reason
176
- of your accepting any such warranty or additional liability.
177
-
178
- _END OF TERMS AND CONDITIONS_
179
-
180
- ### APPENDIX: How to apply the Apache License to your work.
181
-
182
- To apply the Apache License to your work, attach the following
183
- boilerplate notice, with the fields enclosed by brackets "`[]`"
184
- replaced with your own identifying information. (Don't include
185
- the brackets!) The text should be enclosed in the appropriate
186
- comment syntax for the file format. We also recommend that a
187
- file or class name and description of purpose be included on the
188
- same "printed page" as the copyright notice for easier
189
- identification within third-party archives.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
190
188
 
191
189
  Copyright [yyyy] [name of copyright owner]
192
190
 
@@ -194,7 +192,7 @@ identification within third-party archives.
194
192
  you may not use this file except in compliance with the License.
195
193
  You may obtain a copy of the License at
196
194
 
197
- https://www.apache.org/licenses/LICENSE-2.0
195
+ http://www.apache.org/licenses/LICENSE-2.0
198
196
 
199
197
  Unless required by applicable law or agreed to in writing, software
200
198
  distributed under the License is distributed on an "AS IS" BASIS,
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
 
@@ -71,11 +71,11 @@ end
71
71
 
72
72
  ## Supported Ruby Versions
73
73
 
74
- This library is supported on Ruby 2.4+.
74
+ This library is supported on Ruby 2.5+.
75
75
 
76
76
  Google provides official support for Ruby versions that are actively supported
77
77
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.4
78
+ in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
81
  about the Ruby support schedule.
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/protobuf/struct_pb'
9
+ require 'google/type/date_pb'
9
10
  require 'google/type/money_pb'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
12
  add_file("google/cloud/billing/budgets/v1beta1/budget_model.proto", :syntax => :proto3) do
@@ -48,6 +49,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
48
49
  repeated :services, :string, 3
49
50
  repeated :subaccounts, :string, 5
50
51
  map :labels, :string, :message, 6, "google.protobuf.ListValue"
52
+ oneof :usage_period do
53
+ optional :calendar_period, :enum, 8, "google.cloud.billing.budgets.v1beta1.CalendarPeriod"
54
+ optional :custom_period, :message, 9, "google.cloud.billing.budgets.v1beta1.CustomPeriod"
55
+ end
51
56
  end
52
57
  add_enum "google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment" do
53
58
  value :CREDIT_TYPES_TREATMENT_UNSPECIFIED, 0
@@ -55,6 +60,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
55
60
  value :EXCLUDE_ALL_CREDITS, 2
56
61
  value :INCLUDE_SPECIFIED_CREDITS, 3
57
62
  end
63
+ add_message "google.cloud.billing.budgets.v1beta1.CustomPeriod" do
64
+ optional :start_date, :message, 1, "google.type.Date"
65
+ optional :end_date, :message, 2, "google.type.Date"
66
+ end
67
+ add_enum "google.cloud.billing.budgets.v1beta1.CalendarPeriod" do
68
+ value :CALENDAR_PERIOD_UNSPECIFIED, 0
69
+ value :MONTH, 1
70
+ value :QUARTER, 2
71
+ value :YEAR, 3
72
+ end
58
73
  end
59
74
  end
60
75
 
@@ -71,6 +86,8 @@ module Google
71
86
  AllUpdatesRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.AllUpdatesRule").msgclass
72
87
  Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter").msgclass
73
88
  Filter::CreditTypesTreatment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment").enummodule
89
+ CustomPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CustomPeriod").msgclass
90
+ CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CalendarPeriod").enummodule
74
91
  end
75
92
  end
76
93
  end
@@ -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]
@@ -62,7 +61,7 @@ module Google
62
61
  parent_config = while namespace.any?
63
62
  parent_name = namespace.join "::"
64
63
  parent_const = const_get parent_name
65
- break parent_const.configure if parent_const&.respond_to? :configure
64
+ break parent_const.configure if parent_const.respond_to? :configure
66
65
  namespace.pop
67
66
  end
68
67
  default_config = Client::Configuration.new parent_config
@@ -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
- credentials ||= Credentials.default scope: @config.scope,
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
@@ -246,7 +228,9 @@ module Google
246
228
  options.apply_defaults timeout: @config.rpcs.create_budget.timeout,
247
229
  metadata: metadata,
248
230
  retry_policy: @config.rpcs.create_budget.retry_policy
249
- options.apply_defaults metadata: @config.metadata,
231
+
232
+ options.apply_defaults timeout: @config.timeout,
233
+ metadata: @config.metadata,
250
234
  retry_policy: @config.retry_policy
251
235
 
252
236
  @budget_service_stub.call_rpc :create_budget, request, options: options do |response, operation|
@@ -324,7 +308,9 @@ module Google
324
308
  options.apply_defaults timeout: @config.rpcs.update_budget.timeout,
325
309
  metadata: metadata,
326
310
  retry_policy: @config.rpcs.update_budget.retry_policy
327
- options.apply_defaults metadata: @config.metadata,
311
+
312
+ options.apply_defaults timeout: @config.timeout,
313
+ metadata: @config.metadata,
328
314
  retry_policy: @config.retry_policy
329
315
 
330
316
  @budget_service_stub.call_rpc :update_budget, request, options: options do |response, operation|
@@ -396,7 +382,9 @@ module Google
396
382
  options.apply_defaults timeout: @config.rpcs.get_budget.timeout,
397
383
  metadata: metadata,
398
384
  retry_policy: @config.rpcs.get_budget.retry_policy
399
- options.apply_defaults metadata: @config.metadata,
385
+
386
+ options.apply_defaults timeout: @config.timeout,
387
+ metadata: @config.metadata,
400
388
  retry_policy: @config.retry_policy
401
389
 
402
390
  @budget_service_stub.call_rpc :get_budget, request, options: options do |response, operation|
@@ -475,7 +463,9 @@ module Google
475
463
  options.apply_defaults timeout: @config.rpcs.list_budgets.timeout,
476
464
  metadata: metadata,
477
465
  retry_policy: @config.rpcs.list_budgets.retry_policy
478
- options.apply_defaults metadata: @config.metadata,
466
+
467
+ options.apply_defaults timeout: @config.timeout,
468
+ metadata: @config.metadata,
479
469
  retry_policy: @config.retry_policy
480
470
 
481
471
  @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation|
@@ -543,7 +533,9 @@ module Google
543
533
  options.apply_defaults timeout: @config.rpcs.delete_budget.timeout,
544
534
  metadata: metadata,
545
535
  retry_policy: @config.rpcs.delete_budget.retry_policy
546
- options.apply_defaults metadata: @config.metadata,
536
+
537
+ options.apply_defaults timeout: @config.timeout,
538
+ metadata: @config.metadata,
547
539
  retry_policy: @config.retry_policy
548
540
 
549
541
  @budget_service_stub.call_rpc :delete_budget, request, options: options do |response, operation|
@@ -567,22 +559,21 @@ module Google
567
559
  # Configuration can be applied globally to all clients, or to a single client
568
560
  # on construction.
569
561
  #
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
562
+ # @example
579
563
  #
580
- # To apply the above configuration only to a new client:
564
+ # # Modify the global config, setting the timeout for
565
+ # # create_budget to 20 seconds,
566
+ # # and all remaining timeouts to 10 seconds.
567
+ # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config|
568
+ # config.timeout = 10.0
569
+ # config.rpcs.create_budget.timeout = 20.0
570
+ # end
581
571
  #
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
572
+ # # Apply the above configuration only to a new client.
573
+ # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config|
574
+ # config.timeout = 10.0
575
+ # config.rpcs.create_budget.timeout = 20.0
576
+ # end
586
577
  #
587
578
  # @!attribute [rw] endpoint
588
579
  # The hostname or hostname:port of the service endpoint.
@@ -646,7 +637,7 @@ module Google
646
637
  config_attr :scope, nil, ::String, ::Array, nil
647
638
  config_attr :lib_name, nil, ::String, nil
648
639
  config_attr :lib_version, nil, ::String, nil
649
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
640
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
650
641
  config_attr :interceptors, nil, ::Array, nil
651
642
  config_attr :timeout, nil, ::Numeric, nil
652
643
  config_attr :metadata, nil, ::Hash, nil
@@ -667,7 +658,7 @@ module Google
667
658
  def rpcs
668
659
  @rpcs ||= begin
669
660
  parent_rpcs = nil
670
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
661
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
671
662
  Rpcs.new parent_rpcs
672
663
  end
673
664
  end
@@ -718,15 +709,15 @@ module Google
718
709
 
719
710
  # @private
720
711
  def initialize parent_rpcs = nil
721
- create_budget_config = parent_rpcs&.create_budget if parent_rpcs&.respond_to? :create_budget
712
+ create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget
722
713
  @create_budget = ::Gapic::Config::Method.new create_budget_config
723
- update_budget_config = parent_rpcs&.update_budget if parent_rpcs&.respond_to? :update_budget
714
+ update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget
724
715
  @update_budget = ::Gapic::Config::Method.new update_budget_config
725
- get_budget_config = parent_rpcs&.get_budget if parent_rpcs&.respond_to? :get_budget
716
+ get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget
726
717
  @get_budget = ::Gapic::Config::Method.new get_budget_config
727
- list_budgets_config = parent_rpcs&.list_budgets if parent_rpcs&.respond_to? :list_budgets
718
+ list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets
728
719
  @list_budgets = ::Gapic::Config::Method.new list_budgets_config
729
- delete_budget_config = parent_rpcs&.delete_budget if parent_rpcs&.respond_to? :delete_budget
720
+ delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget
730
721
  @delete_budget = ::Gapic::Config::Method.new delete_budget_config
731
722
 
732
723
  yield self if block_given?
@@ -22,7 +22,7 @@ module Google
22
22
  module Billing
23
23
  module Budgets
24
24
  module V1beta1
25
- VERSION = "0.4.1"
25
+ VERSION = "0.6.2"
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
@@ -25,8 +25,8 @@ module Google
25
25
  # A budget is a plan that describes what you expect to spend on Cloud
26
26
  # projects, plus the rules to execute as spend is tracked against that plan,
27
27
  # (for example, send an alert when 90% of the target spend is met).
28
- # Currently all plans are monthly budgets so the usage period(s) tracked are
29
- # implied (calendar months of usage back-to-back).
28
+ # The budget time period is configurable, with options such as month (default),
29
+ # quarter, year, or custom time period.
30
30
  # @!attribute [r] name
31
31
  # @return [::String]
32
32
  # Output only. Resource name of the budget.
@@ -38,8 +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
42
- # the actual spend against the budget.
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.
43
44
  # @!attribute [rw] amount
44
45
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount]
45
46
  # Required. Budgeted amount.
@@ -67,21 +68,29 @@ module Google
67
68
  # A specified amount to use as the budget.
68
69
  # `currency_code` is optional. If specified when creating a budget, it must
69
70
  # match the currency of the billing account. If specified when updating a
70
- # budget, it must match the existing budget currency_code.
71
+ # budget, it must match the currency_code of the existing budget.
71
72
  # The `currency_code` is provided on output.
72
73
  # @!attribute [rw] last_period_amount
73
74
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount]
74
75
  # Use the last period's actual spend as the budget for the present period.
76
+ # 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
79
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
75
80
  class BudgetAmount
76
81
  include ::Google::Protobuf::MessageExts
77
82
  extend ::Google::Protobuf::MessageExts::ClassMethods
78
83
  end
79
84
 
80
- # Describes a budget amount targeted to last period's spend.
81
- # At this time, the amount is automatically 100% of last period's spend;
82
- # that is, there are no other options yet.
83
- # Future configuration will be described here (for example, configuring a
84
- # percentage of last period's spend).
85
+ # Describes a budget amount targeted to the last
86
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}
87
+ # spend. At this time, the amount is automatically 100% of the last calendar
88
+ # 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
+ # LastPeriodAmount cannot be set for a budget configured with
92
+ # a
93
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
85
94
  class LastPeriodAmount
86
95
  include ::Google::Protobuf::MessageExts
87
96
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -117,6 +126,10 @@ module Google
117
126
 
118
127
  # Use forecasted spend for the period as the basis for comparison against
119
128
  # the threshold.
129
+ # 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
132
+ # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}.
120
133
  FORECASTED_SPEND = 2
121
134
  end
122
135
  end
@@ -129,12 +142,12 @@ module Google
129
142
  # be published, in the form `projects/{project_id}/topics/{topic_id}`.
130
143
  # Updates are sent at regular intervals to the topic. The topic needs to be
131
144
  # created before the budget is created; see
132
- # https://cloud.google.com/billing/docs/how-to/budgets#manage-notifications
145
+ # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
133
146
  # for more details.
134
147
  # Caller is expected to have
135
148
  # `pubsub.topics.setIamPolicy` permission on the topic when it's set for a
136
149
  # budget, otherwise, the API call will fail with PERMISSION_DENIED. See
137
- # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications
150
+ # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task
138
151
  # for more details on Pub/Sub roles and permissions.
139
152
  # @!attribute [rw] schema_version
140
153
  # @return [::String]
@@ -179,13 +192,12 @@ module Google
179
192
  # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment}
180
193
  # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be
181
194
  # subtracted from gross cost to determine the spend for threshold
182
- # calculations.
195
+ # calculations. See [a list of acceptable credit type
196
+ # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
183
197
  #
184
198
  # If
185
199
  # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment}
186
- # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. See [a list
187
- # of acceptable credit type
188
- # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
200
+ # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty.
189
201
  # @!attribute [rw] credit_types_treatment
190
202
  # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter::CreditTypesTreatment]
191
203
  # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
@@ -211,6 +223,18 @@ module Google
211
223
  # this set of labeled resources should be included in the budget. Currently,
212
224
  # multiple entries or multiple values per entry are not allowed. If omitted,
213
225
  # the report will include all labeled and unlabeled usage.
226
+ # @!attribute [rw] calendar_period
227
+ # @return [::Google::Cloud::Billing::Budgets::V1beta1::CalendarPeriod]
228
+ # 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
232
+ # September 30 when the current calendar month is July, August, September,
233
+ # so on.
234
+ # @!attribute [rw] custom_period
235
+ # @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.
214
238
  class Filter
215
239
  include ::Google::Protobuf::MessageExts
216
240
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -224,8 +248,11 @@ module Google
224
248
  extend ::Google::Protobuf::MessageExts::ClassMethods
225
249
  end
226
250
 
227
- # Specifies how credits should be treated when determining spend for
228
- # threshold calculations.
251
+ # Specifies how credits are applied when determining the spend for
252
+ # threshold calculations. Budgets track the total cost minus any applicable
253
+ # selected credits.
254
+ # [See the documentation for a list of credit
255
+ # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type).
229
256
  module CreditTypesTreatment
230
257
  CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0
231
258
 
@@ -237,11 +264,46 @@ module Google
237
264
  # threshold calculations.
238
265
  EXCLUDE_ALL_CREDITS = 2
239
266
 
240
- # Credit types specified in the credit_types field are subtracted from the
267
+ # [Credit
268
+ # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type)
269
+ # specified in the credit_types field are subtracted from the
241
270
  # gross cost to determine the spend for threshold calculations.
242
271
  INCLUDE_SPECIFIED_CREDITS = 3
243
272
  end
244
273
  end
274
+
275
+ # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8).
276
+ # @!attribute [rw] start_date
277
+ # @return [::Google::Type::Date]
278
+ # Required. The start date must be after January 1, 2017.
279
+ # @!attribute [rw] end_date
280
+ # @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.
284
+ class CustomPeriod
285
+ include ::Google::Protobuf::MessageExts
286
+ extend ::Google::Protobuf::MessageExts::ClassMethods
287
+ end
288
+
289
+ # A `CalendarPeriod` represents the abstract concept of a time period that
290
+ # has a canonical start. Grammatically, "the start of the current
291
+ # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian
292
+ # Pacific Time (UTC-8).
293
+ module CalendarPeriod
294
+ CALENDAR_PERIOD_UNSPECIFIED = 0
295
+
296
+ # A month. Month starts on the first day of each month, such as January 1,
297
+ # February 1, March 1, and so on.
298
+ MONTH = 1
299
+
300
+ # A quarter. Quarters start on dates January 1, April 1, July 1, and October
301
+ # 1 of each year.
302
+ QUARTER = 2
303
+
304
+ # A year. Year starts on January 1.
305
+ YEAR = 3
306
+ end
245
307
  end
246
308
  end
247
309
  end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Type
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:
26
+ #
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
29
+ # * A year on its own, with zero month and day values
30
+ # * A year and month value, with a zero day, such as a credit card expiration
31
+ # date
32
+ #
33
+ # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
34
+ # `google.protobuf.Timestamp`.
35
+ # @!attribute [rw] year
36
+ # @return [::Integer]
37
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without
38
+ # a year.
39
+ # @!attribute [rw] month
40
+ # @return [::Integer]
41
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a
42
+ # month and day.
43
+ # @!attribute [rw] day
44
+ # @return [::Integer]
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
47
+ # significant.
48
+ class Date
49
+ include ::Google::Protobuf::MessageExts
50
+ extend ::Google::Protobuf::MessageExts::ClassMethods
51
+ end
52
+ end
53
+ end
@@ -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,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing-budgets-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.6.2
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-02-23 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.24.0
53
+ version: 1.25.1
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 1.24.0
60
+ version: 1.25.1
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -181,6 +187,7 @@ files:
181
187
  - proto_docs/google/protobuf/empty.rb
182
188
  - proto_docs/google/protobuf/field_mask.rb
183
189
  - proto_docs/google/protobuf/struct.rb
190
+ - proto_docs/google/type/date.rb
184
191
  - proto_docs/google/type/money.rb
185
192
  homepage: https://github.com/googleapis/google-cloud-ruby
186
193
  licenses:
@@ -194,14 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
201
  requirements:
195
202
  - - ">="
196
203
  - !ruby/object:Gem::Version
197
- version: '2.4'
204
+ version: '2.5'
198
205
  required_rubygems_version: !ruby/object:Gem::Requirement
199
206
  requirements:
200
207
  - - ">="
201
208
  - !ruby/object:Gem::Version
202
209
  version: '0'
203
210
  requirements: []
204
- rubygems_version: 3.2.6
211
+ rubygems_version: 3.2.17
205
212
  signing_key:
206
213
  specification_version: 4
207
214
  summary: API Client library for the Billing Budgets V1beta1 API