google-cloud-billing-budgets-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,111 @@
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 Cloud
22
+ module Billing
23
+ module Budgets
24
+ module V1
25
+ # Request for CreateBudget
26
+ # @!attribute [rw] parent
27
+ # @return [::String]
28
+ # Required. The name of the billing account to create the budget in. Values
29
+ # are of the form `billingAccounts/{billingAccountId}`.
30
+ # @!attribute [rw] budget
31
+ # @return [::Google::Cloud::Billing::Budgets::V1::Budget]
32
+ # Required. Budget to create.
33
+ class CreateBudgetRequest
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+
38
+ # Request for UpdateBudget
39
+ # @!attribute [rw] budget
40
+ # @return [::Google::Cloud::Billing::Budgets::V1::Budget]
41
+ # Required. The updated budget object.
42
+ # The budget to update is specified by the budget name in the budget.
43
+ # @!attribute [rw] update_mask
44
+ # @return [::Google::Protobuf::FieldMask]
45
+ # Optional. Indicates which fields in the provided budget to update.
46
+ # Read-only fields (such as `name`) cannot be changed. If this is not
47
+ # provided, then only fields with non-default values from the request are
48
+ # updated. See
49
+ # https://developers.google.com/protocol-buffers/docs/proto3#default for more
50
+ # details about default values.
51
+ class UpdateBudgetRequest
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+ end
55
+
56
+ # Request for GetBudget
57
+ # @!attribute [rw] name
58
+ # @return [::String]
59
+ # Required. Name of budget to get. Values are of the form
60
+ # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
61
+ class GetBudgetRequest
62
+ include ::Google::Protobuf::MessageExts
63
+ extend ::Google::Protobuf::MessageExts::ClassMethods
64
+ end
65
+
66
+ # Request for ListBudgets
67
+ # @!attribute [rw] parent
68
+ # @return [::String]
69
+ # Required. Name of billing account to list budgets under. Values
70
+ # are of the form `billingAccounts/{billingAccountId}`.
71
+ # @!attribute [rw] page_size
72
+ # @return [::Integer]
73
+ # Optional. The maximum number of budgets to return per page.
74
+ # The default and maximum value are 100.
75
+ # @!attribute [rw] page_token
76
+ # @return [::String]
77
+ # Optional. The value returned by the last `ListBudgetsResponse` which
78
+ # indicates that this is a continuation of a prior `ListBudgets` call,
79
+ # and that the system should return the next page of data.
80
+ class ListBudgetsRequest
81
+ include ::Google::Protobuf::MessageExts
82
+ extend ::Google::Protobuf::MessageExts::ClassMethods
83
+ end
84
+
85
+ # Response for ListBudgets
86
+ # @!attribute [rw] budgets
87
+ # @return [::Array<::Google::Cloud::Billing::Budgets::V1::Budget>]
88
+ # List of the budgets owned by the requested billing account.
89
+ # @!attribute [rw] next_page_token
90
+ # @return [::String]
91
+ # If not empty, indicates that there may be more budgets that match the
92
+ # request; this value should be passed in a new `ListBudgetsRequest`.
93
+ class ListBudgetsResponse
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+
98
+ # Request for DeleteBudget
99
+ # @!attribute [rw] name
100
+ # @return [::String]
101
+ # Required. Name of the budget to delete. Values are of the form
102
+ # `billingAccounts/{billingAccountId}/budgets/{budgetId}`.
103
+ class DeleteBudgetRequest
104
+ include ::Google::Protobuf::MessageExts
105
+ extend ::Google::Protobuf::MessageExts::ClassMethods
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,36 @@
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 Protobuf
22
+ # A generic empty message that you can re-use to avoid defining duplicated
23
+ # empty messages in your APIs. A typical example is to use it as the request
24
+ # or the response type of an API method. For instance:
25
+ #
26
+ # service Foo {
27
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
+ # }
29
+ #
30
+ # The JSON representation for `Empty` is empty JSON object `{}`.
31
+ class Empty
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,229 @@
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 Protobuf
22
+ # `FieldMask` represents a set of symbolic field paths, for example:
23
+ #
24
+ # paths: "f.a"
25
+ # paths: "f.b.d"
26
+ #
27
+ # Here `f` represents a field in some root message, `a` and `b`
28
+ # fields in the message found in `f`, and `d` a field found in the
29
+ # message in `f.b`.
30
+ #
31
+ # Field masks are used to specify a subset of fields that should be
32
+ # returned by a get operation or modified by an update operation.
33
+ # Field masks also have a custom JSON encoding (see below).
34
+ #
35
+ # # Field Masks in Projections
36
+ #
37
+ # When used in the context of a projection, a response message or
38
+ # sub-message is filtered by the API to only contain those fields as
39
+ # specified in the mask. For example, if the mask in the previous
40
+ # example is applied to a response message as follows:
41
+ #
42
+ # f {
43
+ # a : 22
44
+ # b {
45
+ # d : 1
46
+ # x : 2
47
+ # }
48
+ # y : 13
49
+ # }
50
+ # z: 8
51
+ #
52
+ # The result will not contain specific values for fields x,y and z
53
+ # (their value will be set to the default, and omitted in proto text
54
+ # output):
55
+ #
56
+ #
57
+ # f {
58
+ # a : 22
59
+ # b {
60
+ # d : 1
61
+ # }
62
+ # }
63
+ #
64
+ # A repeated field is not allowed except at the last position of a
65
+ # paths string.
66
+ #
67
+ # If a FieldMask object is not present in a get operation, the
68
+ # operation applies to all fields (as if a FieldMask of all fields
69
+ # had been specified).
70
+ #
71
+ # Note that a field mask does not necessarily apply to the
72
+ # top-level response message. In case of a REST get operation, the
73
+ # field mask applies directly to the response, but in case of a REST
74
+ # list operation, the mask instead applies to each individual message
75
+ # in the returned resource list. In case of a REST custom method,
76
+ # other definitions may be used. Where the mask applies will be
77
+ # clearly documented together with its declaration in the API. In
78
+ # any case, the effect on the returned resource/resources is required
79
+ # behavior for APIs.
80
+ #
81
+ # # Field Masks in Update Operations
82
+ #
83
+ # A field mask in update operations specifies which fields of the
84
+ # targeted resource are going to be updated. The API is required
85
+ # to only change the values of the fields as specified in the mask
86
+ # and leave the others untouched. If a resource is passed in to
87
+ # describe the updated values, the API ignores the values of all
88
+ # fields not covered by the mask.
89
+ #
90
+ # If a repeated field is specified for an update operation, new values will
91
+ # be appended to the existing repeated field in the target resource. Note that
92
+ # a repeated field is only allowed in the last position of a `paths` string.
93
+ #
94
+ # If a sub-message is specified in the last position of the field mask for an
95
+ # update operation, then new value will be merged into the existing sub-message
96
+ # in the target resource.
97
+ #
98
+ # For example, given the target message:
99
+ #
100
+ # f {
101
+ # b {
102
+ # d: 1
103
+ # x: 2
104
+ # }
105
+ # c: [1]
106
+ # }
107
+ #
108
+ # And an update message:
109
+ #
110
+ # f {
111
+ # b {
112
+ # d: 10
113
+ # }
114
+ # c: [2]
115
+ # }
116
+ #
117
+ # then if the field mask is:
118
+ #
119
+ # paths: ["f.b", "f.c"]
120
+ #
121
+ # then the result will be:
122
+ #
123
+ # f {
124
+ # b {
125
+ # d: 10
126
+ # x: 2
127
+ # }
128
+ # c: [1, 2]
129
+ # }
130
+ #
131
+ # An implementation may provide options to override this default behavior for
132
+ # repeated and message fields.
133
+ #
134
+ # In order to reset a field's value to the default, the field must
135
+ # be in the mask and set to the default value in the provided resource.
136
+ # Hence, in order to reset all fields of a resource, provide a default
137
+ # instance of the resource and set all fields in the mask, or do
138
+ # not provide a mask as described below.
139
+ #
140
+ # If a field mask is not present on update, the operation applies to
141
+ # all fields (as if a field mask of all fields has been specified).
142
+ # Note that in the presence of schema evolution, this may mean that
143
+ # fields the client does not know and has therefore not filled into
144
+ # the request will be reset to their default. If this is unwanted
145
+ # behavior, a specific service may require a client to always specify
146
+ # a field mask, producing an error if not.
147
+ #
148
+ # As with get operations, the location of the resource which
149
+ # describes the updated values in the request message depends on the
150
+ # operation kind. In any case, the effect of the field mask is
151
+ # required to be honored by the API.
152
+ #
153
+ # ## Considerations for HTTP REST
154
+ #
155
+ # The HTTP kind of an update operation which uses a field mask must
156
+ # be set to PATCH instead of PUT in order to satisfy HTTP semantics
157
+ # (PUT must only be used for full updates).
158
+ #
159
+ # # JSON Encoding of Field Masks
160
+ #
161
+ # In JSON, a field mask is encoded as a single string where paths are
162
+ # separated by a comma. Fields name in each path are converted
163
+ # to/from lower-camel naming conventions.
164
+ #
165
+ # As an example, consider the following message declarations:
166
+ #
167
+ # message Profile {
168
+ # User user = 1;
169
+ # Photo photo = 2;
170
+ # }
171
+ # message User {
172
+ # string display_name = 1;
173
+ # string address = 2;
174
+ # }
175
+ #
176
+ # In proto a field mask for `Profile` may look as such:
177
+ #
178
+ # mask {
179
+ # paths: "user.display_name"
180
+ # paths: "photo"
181
+ # }
182
+ #
183
+ # In JSON, the same mask is represented as below:
184
+ #
185
+ # {
186
+ # mask: "user.displayName,photo"
187
+ # }
188
+ #
189
+ # # Field Masks and Oneof Fields
190
+ #
191
+ # Field masks treat fields in oneofs just as regular fields. Consider the
192
+ # following message:
193
+ #
194
+ # message SampleMessage {
195
+ # oneof test_oneof {
196
+ # string name = 4;
197
+ # SubMessage sub_message = 9;
198
+ # }
199
+ # }
200
+ #
201
+ # The field mask can be:
202
+ #
203
+ # mask {
204
+ # paths: "name"
205
+ # }
206
+ #
207
+ # Or:
208
+ #
209
+ # mask {
210
+ # paths: "sub_message"
211
+ # }
212
+ #
213
+ # Note that oneof type names ("test_oneof" in this case) cannot be used in
214
+ # paths.
215
+ #
216
+ # ## Field Mask Verification
217
+ #
218
+ # The implementation of any API method which has a FieldMask type field in the
219
+ # request should verify the included field paths, and return an
220
+ # `INVALID_ARGUMENT` error if any path is unmappable.
221
+ # @!attribute [rw] paths
222
+ # @return [::Array<::String>]
223
+ # The set of field mask paths.
224
+ class FieldMask
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
228
+ end
229
+ end
@@ -0,0 +1,96 @@
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 Protobuf
22
+ # `Struct` represents a structured data value, consisting of fields
23
+ # which map to dynamically typed values. In some languages, `Struct`
24
+ # might be supported by a native representation. For example, in
25
+ # scripting languages like JS a struct is represented as an
26
+ # object. The details of that representation are described together
27
+ # with the proto support for the language.
28
+ #
29
+ # The JSON representation for `Struct` is JSON object.
30
+ # @!attribute [rw] fields
31
+ # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}]
32
+ # Unordered map of dynamically typed values.
33
+ class Struct
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # @!attribute [rw] key
38
+ # @return [::String]
39
+ # @!attribute [rw] value
40
+ # @return [::Google::Protobuf::Value]
41
+ class FieldsEntry
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+ end
45
+ end
46
+
47
+ # `Value` represents a dynamically typed value which can be either
48
+ # null, a number, a string, a boolean, a recursive struct value, or a
49
+ # list of values. A producer of value is expected to set one of that
50
+ # variants, absence of any variant indicates an error.
51
+ #
52
+ # The JSON representation for `Value` is JSON value.
53
+ # @!attribute [rw] null_value
54
+ # @return [::Google::Protobuf::NullValue]
55
+ # Represents a null value.
56
+ # @!attribute [rw] number_value
57
+ # @return [::Float]
58
+ # Represents a double value.
59
+ # @!attribute [rw] string_value
60
+ # @return [::String]
61
+ # Represents a string value.
62
+ # @!attribute [rw] bool_value
63
+ # @return [::Boolean]
64
+ # Represents a boolean value.
65
+ # @!attribute [rw] struct_value
66
+ # @return [::Google::Protobuf::Struct]
67
+ # Represents a structured value.
68
+ # @!attribute [rw] list_value
69
+ # @return [::Google::Protobuf::ListValue]
70
+ # Represents a repeated `Value`.
71
+ class Value
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # `ListValue` is a wrapper around a repeated field of values.
77
+ #
78
+ # The JSON representation for `ListValue` is JSON array.
79
+ # @!attribute [rw] values
80
+ # @return [::Array<::Google::Protobuf::Value>]
81
+ # Repeated field of dynamically typed values.
82
+ class ListValue
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+ end
86
+
87
+ # `NullValue` is a singleton enumeration to represent the null value for the
88
+ # `Value` type union.
89
+ #
90
+ # The JSON representation for `NullValue` is JSON `null`.
91
+ module NullValue
92
+ # Null value.
93
+ NULL_VALUE = 0
94
+ end
95
+ end
96
+ 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
@@ -0,0 +1,43 @@
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 an amount of money with its currency type.
23
+ # @!attribute [rw] currency_code
24
+ # @return [::String]
25
+ # The three-letter currency code defined in ISO 4217.
26
+ # @!attribute [rw] units
27
+ # @return [::Integer]
28
+ # The whole units of the amount.
29
+ # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
30
+ # @!attribute [rw] nanos
31
+ # @return [::Integer]
32
+ # Number of nano (10^-9) units of the amount.
33
+ # The value must be between -999,999,999 and +999,999,999 inclusive.
34
+ # If `units` is positive, `nanos` must be positive or zero.
35
+ # If `units` is zero, `nanos` can be positive, zero, or negative.
36
+ # If `units` is negative, `nanos` must be negative or zero.
37
+ # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
38
+ class Money
39
+ include ::Google::Protobuf::MessageExts
40
+ extend ::Google::Protobuf::MessageExts::ClassMethods
41
+ end
42
+ end
43
+ end