google-cloud-billing-budgets-v1beta1 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb +17 -0
- data/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb +1 -1
- data/lib/google/cloud/billing/budgets/v1beta1/version.rb +1 -1
- data/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb +81 -19
- data/proto_docs/google/type/date.rb +50 -0
- metadata +14 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf6d87986bf613550ec305154b1a3f71dc74f20e957e2e39ae4f369322d5355
|
4
|
+
data.tar.gz: 06f9c158df77c4f039fac0ce4946c2d3b28b071b575ec006a24966d3c04be944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8ce8a5288befa35c9881bac79901ff685316a2a4f99d5e421855fc56e85872f636151aeaf46701d09620ed27d2c9dd239908b0af312285717a73bcb79e7d6b
|
7
|
+
data.tar.gz: 3822e124e0cfaacd6e2816817c8d087d54f1a23da43fb8657678d012847c45f97ab2dcbaaf25662dc98c887ca828ed122e99eac050b6c26dd292ba06eb8bc1ae
|
@@ -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
|
@@ -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
|
-
#
|
29
|
-
#
|
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
|
-
#
|
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
|
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
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
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
|
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.
|
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
|
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
|
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,50 @@
|
|
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, e.g. a birthday. The time of day
|
23
|
+
# and time zone are either specified elsewhere or are not significant. The date
|
24
|
+
# is relative to the Proleptic Gregorian Calendar. This can represent:
|
25
|
+
#
|
26
|
+
# * A full date, with non-zero year, month and day values
|
27
|
+
# * A month and day value, with a zero year, e.g. an anniversary
|
28
|
+
# * A year on its own, with zero month and day values
|
29
|
+
# * A year and month value, with a zero day, e.g. a credit card expiration date
|
30
|
+
#
|
31
|
+
# Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and `google.protobuf.Timestamp`.
|
32
|
+
# @!attribute [rw] year
|
33
|
+
# @return [::Integer]
|
34
|
+
# Year of date. Must be from 1 to 9999, or 0 if specifying a date without
|
35
|
+
# a year.
|
36
|
+
# @!attribute [rw] month
|
37
|
+
# @return [::Integer]
|
38
|
+
# Month of year. Must be from 1 to 12, or 0 if specifying a year without a
|
39
|
+
# month and day.
|
40
|
+
# @!attribute [rw] day
|
41
|
+
# @return [::Integer]
|
42
|
+
# Day of month. Must be from 1 to 31 and valid for the year and month, or 0
|
43
|
+
# if specifying a year by itself or a year and month where the day is not
|
44
|
+
# significant.
|
45
|
+
class Date
|
46
|
+
include ::Google::Protobuf::MessageExts
|
47
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
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
|
+
version: 0.6.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: 2021-
|
11
|
+
date: 2021-06-23 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.5'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
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.5'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
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:
|
@@ -201,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
208
|
- !ruby/object:Gem::Version
|
202
209
|
version: '0'
|
203
210
|
requirements: []
|
204
|
-
rubygems_version: 3.2.
|
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
|