OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.cloudbilling.v1; | 3 library googleapis.cloudbilling.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client cloudbilling/v1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudbilling/v1'; |
16 | 16 |
17 /** | 17 /// Allows developers to manage billing for their Google Cloud Platform |
18 * Allows developers to manage billing for their Google Cloud Platform projects | 18 /// projects |
19 * programmatically. | 19 /// programmatically. |
20 */ | |
21 class CloudbillingApi { | 20 class CloudbillingApi { |
22 /** View and manage your data across Google Cloud Platform services */ | 21 /// View and manage your data across Google Cloud Platform services |
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 22 static const CloudPlatformScope = |
24 | 23 "https://www.googleapis.com/auth/cloud-platform"; |
25 | 24 |
26 final commons.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
27 | 26 |
28 BillingAccountsResourceApi get billingAccounts => new BillingAccountsResourceA
pi(_requester); | 27 BillingAccountsResourceApi get billingAccounts => |
| 28 new BillingAccountsResourceApi(_requester); |
29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
30 ServicesResourceApi get services => new ServicesResourceApi(_requester); | 30 ServicesResourceApi get services => new ServicesResourceApi(_requester); |
31 | 31 |
32 CloudbillingApi(http.Client client, {core.String rootUrl: "https://cloudbillin
g.googleapis.com/", core.String servicePath: ""}) : | 32 CloudbillingApi(http.Client client, |
33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 33 {core.String rootUrl: "https://cloudbilling.googleapis.com/", |
| 34 core.String servicePath: ""}) |
| 35 : _requester = |
| 36 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
34 } | 37 } |
35 | 38 |
36 | |
37 class BillingAccountsResourceApi { | 39 class BillingAccountsResourceApi { |
38 final commons.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
39 | 41 |
40 BillingAccountsProjectsResourceApi get projects => new BillingAccountsProjects
ResourceApi(_requester); | 42 BillingAccountsProjectsResourceApi get projects => |
| 43 new BillingAccountsProjectsResourceApi(_requester); |
41 | 44 |
42 BillingAccountsResourceApi(commons.ApiRequester client) : | 45 BillingAccountsResourceApi(commons.ApiRequester client) : _requester = client; |
43 _requester = client; | |
44 | 46 |
45 /** | 47 /// Gets information about a billing account. The current authenticated user |
46 * Gets information about a billing account. The current authenticated user | 48 /// must be an [owner of the billing |
47 * must be an [owner of the billing | 49 /// account](https://support.google.com/cloud/answer/4430947). |
48 * account](https://support.google.com/cloud/answer/4430947). | 50 /// |
49 * | 51 /// Request parameters: |
50 * Request parameters: | 52 /// |
51 * | 53 /// [name] - The resource name of the billing account to retrieve. For |
52 * [name] - The resource name of the billing account to retrieve. For example, | 54 /// example, |
53 * `billingAccounts/012345-567890-ABCDEF`. | 55 /// `billingAccounts/012345-567890-ABCDEF`. |
54 * Value must have pattern "^billingAccounts/[^/]+$". | 56 /// Value must have pattern "^billingAccounts/[^/]+$". |
55 * | 57 /// |
56 * Completes with a [BillingAccount]. | 58 /// Completes with a [BillingAccount]. |
57 * | 59 /// |
58 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 60 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
59 * error. | 61 /// an error. |
60 * | 62 /// |
61 * If the used [http.Client] completes with an error when making a REST call, | 63 /// If the used [http.Client] completes with an error when making a REST |
62 * this method will complete with the same error. | 64 /// call, this method will complete with the same error. |
63 */ | |
64 async.Future<BillingAccount> get(core.String name) { | 65 async.Future<BillingAccount> get(core.String name) { |
65 var _url = null; | 66 var _url = null; |
66 var _queryParams = new core.Map(); | 67 var _queryParams = new core.Map(); |
67 var _uploadMedia = null; | 68 var _uploadMedia = null; |
68 var _uploadOptions = null; | 69 var _uploadOptions = null; |
69 var _downloadOptions = commons.DownloadOptions.Metadata; | 70 var _downloadOptions = commons.DownloadOptions.Metadata; |
70 var _body = null; | 71 var _body = null; |
71 | 72 |
72 if (name == null) { | 73 if (name == null) { |
73 throw new core.ArgumentError("Parameter name is required."); | 74 throw new core.ArgumentError("Parameter name is required."); |
74 } | 75 } |
75 | 76 |
76 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 77 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
77 | 78 |
78 var _response = _requester.request(_url, | 79 var _response = _requester.request(_url, "GET", |
79 "GET", | 80 body: _body, |
80 body: _body, | 81 queryParams: _queryParams, |
81 queryParams: _queryParams, | 82 uploadOptions: _uploadOptions, |
82 uploadOptions: _uploadOptions, | 83 uploadMedia: _uploadMedia, |
83 uploadMedia: _uploadMedia, | 84 downloadOptions: _downloadOptions); |
84 downloadOptions: _downloadOptions); | |
85 return _response.then((data) => new BillingAccount.fromJson(data)); | 85 return _response.then((data) => new BillingAccount.fromJson(data)); |
86 } | 86 } |
87 | 87 |
88 /** | 88 /// Lists the billing accounts that the current authenticated user |
89 * Lists the billing accounts that the current authenticated user | 89 /// [owns](https://support.google.com/cloud/answer/4430947). |
90 * [owns](https://support.google.com/cloud/answer/4430947). | 90 /// |
91 * | 91 /// Request parameters: |
92 * Request parameters: | 92 /// |
93 * | 93 /// [pageSize] - Requested page size. The maximum page size is 100; this is |
94 * [pageSize] - Requested page size. The maximum page size is 100; this is | 94 /// also the |
95 * also the | 95 /// default. |
96 * default. | 96 /// |
97 * | 97 /// [pageToken] - A token identifying a page of results to return. This |
98 * [pageToken] - A token identifying a page of results to return. This should | 98 /// should be a |
99 * be a | 99 /// `next_page_token` value returned from a previous `ListBillingAccounts` |
100 * `next_page_token` value returned from a previous `ListBillingAccounts` | 100 /// call. If unspecified, the first page of results is returned. |
101 * call. If unspecified, the first page of results is returned. | 101 /// |
102 * | 102 /// Completes with a [ListBillingAccountsResponse]. |
103 * Completes with a [ListBillingAccountsResponse]. | 103 /// |
104 * | 104 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 105 /// an error. |
106 * error. | 106 /// |
107 * | 107 /// If the used [http.Client] completes with an error when making a REST |
108 * If the used [http.Client] completes with an error when making a REST call, | 108 /// call, this method will complete with the same error. |
109 * this method will complete with the same error. | 109 async.Future<ListBillingAccountsResponse> list( |
110 */ | 110 {core.int pageSize, core.String pageToken}) { |
111 async.Future<ListBillingAccountsResponse> list({core.int pageSize, core.String
pageToken}) { | |
112 var _url = null; | 111 var _url = null; |
113 var _queryParams = new core.Map(); | 112 var _queryParams = new core.Map(); |
114 var _uploadMedia = null; | 113 var _uploadMedia = null; |
115 var _uploadOptions = null; | 114 var _uploadOptions = null; |
116 var _downloadOptions = commons.DownloadOptions.Metadata; | 115 var _downloadOptions = commons.DownloadOptions.Metadata; |
117 var _body = null; | 116 var _body = null; |
118 | 117 |
119 if (pageSize != null) { | 118 if (pageSize != null) { |
120 _queryParams["pageSize"] = ["${pageSize}"]; | 119 _queryParams["pageSize"] = ["${pageSize}"]; |
121 } | 120 } |
122 if (pageToken != null) { | 121 if (pageToken != null) { |
123 _queryParams["pageToken"] = [pageToken]; | 122 _queryParams["pageToken"] = [pageToken]; |
124 } | 123 } |
125 | 124 |
126 _url = 'v1/billingAccounts'; | 125 _url = 'v1/billingAccounts'; |
127 | 126 |
128 var _response = _requester.request(_url, | 127 var _response = _requester.request(_url, "GET", |
129 "GET", | 128 body: _body, |
130 body: _body, | 129 queryParams: _queryParams, |
131 queryParams: _queryParams, | 130 uploadOptions: _uploadOptions, |
132 uploadOptions: _uploadOptions, | 131 uploadMedia: _uploadMedia, |
133 uploadMedia: _uploadMedia, | 132 downloadOptions: _downloadOptions); |
134 downloadOptions: _downloadOptions); | 133 return _response |
135 return _response.then((data) => new ListBillingAccountsResponse.fromJson(dat
a)); | 134 .then((data) => new ListBillingAccountsResponse.fromJson(data)); |
136 } | 135 } |
137 | |
138 } | 136 } |
139 | 137 |
140 | |
141 class BillingAccountsProjectsResourceApi { | 138 class BillingAccountsProjectsResourceApi { |
142 final commons.ApiRequester _requester; | 139 final commons.ApiRequester _requester; |
143 | 140 |
144 BillingAccountsProjectsResourceApi(commons.ApiRequester client) : | 141 BillingAccountsProjectsResourceApi(commons.ApiRequester client) |
145 _requester = client; | 142 : _requester = client; |
146 | 143 |
147 /** | 144 /// Lists the projects associated with a billing account. The current |
148 * Lists the projects associated with a billing account. The current | 145 /// authenticated user must be an [owner of the billing |
149 * authenticated user must be an [owner of the billing | 146 /// account](https://support.google.com/cloud/answer/4430947). |
150 * account](https://support.google.com/cloud/answer/4430947). | 147 /// |
151 * | 148 /// Request parameters: |
152 * Request parameters: | 149 /// |
153 * | 150 /// [name] - The resource name of the billing account associated with the |
154 * [name] - The resource name of the billing account associated with the | 151 /// projects that |
155 * projects that | 152 /// you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. |
156 * you want to list. For example, `billingAccounts/012345-567890-ABCDEF`. | 153 /// Value must have pattern "^billingAccounts/[^/]+$". |
157 * Value must have pattern "^billingAccounts/[^/]+$". | 154 /// |
158 * | 155 /// [pageSize] - Requested page size. The maximum page size is 100; this is |
159 * [pageSize] - Requested page size. The maximum page size is 100; this is | 156 /// also the |
160 * also the | 157 /// default. |
161 * default. | 158 /// |
162 * | 159 /// [pageToken] - A token identifying a page of results to be returned. This |
163 * [pageToken] - A token identifying a page of results to be returned. This | 160 /// should be a |
164 * should be a | 161 /// `next_page_token` value returned from a previous `ListProjectBillingInfo` |
165 * `next_page_token` value returned from a previous `ListProjectBillingInfo` | 162 /// call. If unspecified, the first page of results is returned. |
166 * call. If unspecified, the first page of results is returned. | 163 /// |
167 * | 164 /// Completes with a [ListProjectBillingInfoResponse]. |
168 * Completes with a [ListProjectBillingInfoResponse]. | 165 /// |
169 * | 166 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
170 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 167 /// an error. |
171 * error. | 168 /// |
172 * | 169 /// If the used [http.Client] completes with an error when making a REST |
173 * If the used [http.Client] completes with an error when making a REST call, | 170 /// call, this method will complete with the same error. |
174 * this method will complete with the same error. | 171 async.Future<ListProjectBillingInfoResponse> list(core.String name, |
175 */ | 172 {core.int pageSize, core.String pageToken}) { |
176 async.Future<ListProjectBillingInfoResponse> list(core.String name, {core.int
pageSize, core.String pageToken}) { | |
177 var _url = null; | 173 var _url = null; |
178 var _queryParams = new core.Map(); | 174 var _queryParams = new core.Map(); |
179 var _uploadMedia = null; | 175 var _uploadMedia = null; |
180 var _uploadOptions = null; | 176 var _uploadOptions = null; |
181 var _downloadOptions = commons.DownloadOptions.Metadata; | 177 var _downloadOptions = commons.DownloadOptions.Metadata; |
182 var _body = null; | 178 var _body = null; |
183 | 179 |
184 if (name == null) { | 180 if (name == null) { |
185 throw new core.ArgumentError("Parameter name is required."); | 181 throw new core.ArgumentError("Parameter name is required."); |
186 } | 182 } |
187 if (pageSize != null) { | 183 if (pageSize != null) { |
188 _queryParams["pageSize"] = ["${pageSize}"]; | 184 _queryParams["pageSize"] = ["${pageSize}"]; |
189 } | 185 } |
190 if (pageToken != null) { | 186 if (pageToken != null) { |
191 _queryParams["pageToken"] = [pageToken]; | 187 _queryParams["pageToken"] = [pageToken]; |
192 } | 188 } |
193 | 189 |
194 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/projects'; | 190 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/projects'; |
195 | 191 |
196 var _response = _requester.request(_url, | 192 var _response = _requester.request(_url, "GET", |
197 "GET", | 193 body: _body, |
198 body: _body, | 194 queryParams: _queryParams, |
199 queryParams: _queryParams, | 195 uploadOptions: _uploadOptions, |
200 uploadOptions: _uploadOptions, | 196 uploadMedia: _uploadMedia, |
201 uploadMedia: _uploadMedia, | 197 downloadOptions: _downloadOptions); |
202 downloadOptions: _downloadOptions); | 198 return _response |
203 return _response.then((data) => new ListProjectBillingInfoResponse.fromJson(
data)); | 199 .then((data) => new ListProjectBillingInfoResponse.fromJson(data)); |
204 } | 200 } |
205 | |
206 } | 201 } |
207 | 202 |
208 | |
209 class ProjectsResourceApi { | 203 class ProjectsResourceApi { |
210 final commons.ApiRequester _requester; | 204 final commons.ApiRequester _requester; |
211 | 205 |
212 ProjectsResourceApi(commons.ApiRequester client) : | 206 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
213 _requester = client; | |
214 | 207 |
215 /** | 208 /// Gets the billing information for a project. The current authenticated |
216 * Gets the billing information for a project. The current authenticated user | 209 /// user |
217 * must have [permission to view the | 210 /// must have [permission to view the |
218 * project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo | 211 /// project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo |
219 * ). | 212 /// ). |
220 * | 213 /// |
221 * Request parameters: | 214 /// Request parameters: |
222 * | 215 /// |
223 * [name] - The resource name of the project for which billing information is | 216 /// [name] - The resource name of the project for which billing information |
224 * retrieved. For example, `projects/tokyo-rain-123`. | 217 /// is |
225 * Value must have pattern "^projects/[^/]+$". | 218 /// retrieved. For example, `projects/tokyo-rain-123`. |
226 * | 219 /// Value must have pattern "^projects/[^/]+$". |
227 * Completes with a [ProjectBillingInfo]. | 220 /// |
228 * | 221 /// Completes with a [ProjectBillingInfo]. |
229 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 222 /// |
230 * error. | 223 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
231 * | 224 /// an error. |
232 * If the used [http.Client] completes with an error when making a REST call, | 225 /// |
233 * this method will complete with the same error. | 226 /// If the used [http.Client] completes with an error when making a REST |
234 */ | 227 /// call, this method will complete with the same error. |
235 async.Future<ProjectBillingInfo> getBillingInfo(core.String name) { | 228 async.Future<ProjectBillingInfo> getBillingInfo(core.String name) { |
236 var _url = null; | 229 var _url = null; |
237 var _queryParams = new core.Map(); | 230 var _queryParams = new core.Map(); |
238 var _uploadMedia = null; | 231 var _uploadMedia = null; |
239 var _uploadOptions = null; | 232 var _uploadOptions = null; |
240 var _downloadOptions = commons.DownloadOptions.Metadata; | 233 var _downloadOptions = commons.DownloadOptions.Metadata; |
241 var _body = null; | 234 var _body = null; |
242 | 235 |
243 if (name == null) { | 236 if (name == null) { |
244 throw new core.ArgumentError("Parameter name is required."); | 237 throw new core.ArgumentError("Parameter name is required."); |
245 } | 238 } |
246 | 239 |
247 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/billingInf
o'; | 240 _url = |
| 241 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/billingInfo'; |
248 | 242 |
249 var _response = _requester.request(_url, | 243 var _response = _requester.request(_url, "GET", |
250 "GET", | 244 body: _body, |
251 body: _body, | 245 queryParams: _queryParams, |
252 queryParams: _queryParams, | 246 uploadOptions: _uploadOptions, |
253 uploadOptions: _uploadOptions, | 247 uploadMedia: _uploadMedia, |
254 uploadMedia: _uploadMedia, | 248 downloadOptions: _downloadOptions); |
255 downloadOptions: _downloadOptions); | |
256 return _response.then((data) => new ProjectBillingInfo.fromJson(data)); | 249 return _response.then((data) => new ProjectBillingInfo.fromJson(data)); |
257 } | 250 } |
258 | 251 |
259 /** | 252 /// Sets or updates the billing account associated with a project. You |
260 * Sets or updates the billing account associated with a project. You specify | 253 /// specify |
261 * the new billing account by setting the `billing_account_name` in the | 254 /// the new billing account by setting the `billing_account_name` in the |
262 * `ProjectBillingInfo` resource to the resource name of a billing account. | 255 /// `ProjectBillingInfo` resource to the resource name of a billing account. |
263 * Associating a project with an open billing account enables billing on the | 256 /// Associating a project with an open billing account enables billing on the |
264 * project and allows charges for resource usage. If the project already had a | 257 /// project and allows charges for resource usage. If the project already had |
265 * billing account, this method changes the billing account used for resource | 258 /// a |
266 * usage charges. | 259 /// billing account, this method changes the billing account used for |
267 * | 260 /// resource |
268 * *Note:* Incurred charges that have not yet been reported in the transaction | 261 /// usage charges. |
269 * history of the Google Cloud Console may be billed to the new billing | 262 /// |
270 * account, even if the charge occurred before the new billing account was | 263 /// *Note:* Incurred charges that have not yet been reported in the |
271 * assigned to the project. | 264 /// transaction |
272 * | 265 /// history of the Google Cloud Console may be billed to the new billing |
273 * The current authenticated user must have ownership privileges for both the | 266 /// account, even if the charge occurred before the new billing account was |
274 * [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo | 267 /// assigned to the project. |
275 * ) and the [billing | 268 /// |
276 * account](https://support.google.com/cloud/answer/4430947). | 269 /// The current authenticated user must have ownership privileges for both |
277 * | 270 /// the |
278 * You can disable billing on the project by setting the | 271 /// [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvno
o |
279 * `billing_account_name` field to empty. This action disassociates the | 272 /// ) and the [billing |
280 * current billing account from the project. Any billable activity of your | 273 /// account](https://support.google.com/cloud/answer/4430947). |
281 * in-use services will stop, and your application could stop functioning as | 274 /// |
282 * expected. Any unbilled charges to date will be billed to the previously | 275 /// You can disable billing on the project by setting the |
283 * associated account. The current authenticated user must be either an owner | 276 /// `billing_account_name` field to empty. This action disassociates the |
284 * of the project or an owner of the billing account for the project. | 277 /// current billing account from the project. Any billable activity of your |
285 * | 278 /// in-use services will stop, and your application could stop functioning as |
286 * Note that associating a project with a *closed* billing account will have | 279 /// expected. Any unbilled charges to date will be billed to the previously |
287 * much the same effect as disabling billing on the project: any paid | 280 /// associated account. The current authenticated user must be either an |
288 * resources used by the project will be shut down. Thus, unless you wish to | 281 /// owner |
289 * disable billing, you should always call this method with the name of an | 282 /// of the project or an owner of the billing account for the project. |
290 * *open* billing account. | 283 /// |
291 * | 284 /// Note that associating a project with a *closed* billing account will have |
292 * [request] - The metadata request object. | 285 /// much the same effect as disabling billing on the project: any paid |
293 * | 286 /// resources used by the project will be shut down. Thus, unless you wish to |
294 * Request parameters: | 287 /// disable billing, you should always call this method with the name of an |
295 * | 288 /// *open* billing account. |
296 * [name] - The resource name of the project associated with the billing | 289 /// |
297 * information | 290 /// [request] - The metadata request object. |
298 * that you want to update. For example, `projects/tokyo-rain-123`. | 291 /// |
299 * Value must have pattern "^projects/[^/]+$". | 292 /// Request parameters: |
300 * | 293 /// |
301 * Completes with a [ProjectBillingInfo]. | 294 /// [name] - The resource name of the project associated with the billing |
302 * | 295 /// information |
303 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 296 /// that you want to update. For example, `projects/tokyo-rain-123`. |
304 * error. | 297 /// Value must have pattern "^projects/[^/]+$". |
305 * | 298 /// |
306 * If the used [http.Client] completes with an error when making a REST call, | 299 /// Completes with a [ProjectBillingInfo]. |
307 * this method will complete with the same error. | 300 /// |
308 */ | 301 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
309 async.Future<ProjectBillingInfo> updateBillingInfo(ProjectBillingInfo request,
core.String name) { | 302 /// an error. |
| 303 /// |
| 304 /// If the used [http.Client] completes with an error when making a REST |
| 305 /// call, this method will complete with the same error. |
| 306 async.Future<ProjectBillingInfo> updateBillingInfo( |
| 307 ProjectBillingInfo request, core.String name) { |
310 var _url = null; | 308 var _url = null; |
311 var _queryParams = new core.Map(); | 309 var _queryParams = new core.Map(); |
312 var _uploadMedia = null; | 310 var _uploadMedia = null; |
313 var _uploadOptions = null; | 311 var _uploadOptions = null; |
314 var _downloadOptions = commons.DownloadOptions.Metadata; | 312 var _downloadOptions = commons.DownloadOptions.Metadata; |
315 var _body = null; | 313 var _body = null; |
316 | 314 |
317 if (request != null) { | 315 if (request != null) { |
318 _body = convert.JSON.encode((request).toJson()); | 316 _body = convert.JSON.encode((request).toJson()); |
319 } | 317 } |
320 if (name == null) { | 318 if (name == null) { |
321 throw new core.ArgumentError("Parameter name is required."); | 319 throw new core.ArgumentError("Parameter name is required."); |
322 } | 320 } |
323 | 321 |
324 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/billingInf
o'; | 322 _url = |
| 323 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/billingInfo'; |
325 | 324 |
326 var _response = _requester.request(_url, | 325 var _response = _requester.request(_url, "PUT", |
327 "PUT", | 326 body: _body, |
328 body: _body, | 327 queryParams: _queryParams, |
329 queryParams: _queryParams, | 328 uploadOptions: _uploadOptions, |
330 uploadOptions: _uploadOptions, | 329 uploadMedia: _uploadMedia, |
331 uploadMedia: _uploadMedia, | 330 downloadOptions: _downloadOptions); |
332 downloadOptions: _downloadOptions); | |
333 return _response.then((data) => new ProjectBillingInfo.fromJson(data)); | 331 return _response.then((data) => new ProjectBillingInfo.fromJson(data)); |
334 } | 332 } |
335 | |
336 } | 333 } |
337 | 334 |
338 | |
339 class ServicesResourceApi { | 335 class ServicesResourceApi { |
340 final commons.ApiRequester _requester; | 336 final commons.ApiRequester _requester; |
341 | 337 |
342 ServicesSkusResourceApi get skus => new ServicesSkusResourceApi(_requester); | 338 ServicesSkusResourceApi get skus => new ServicesSkusResourceApi(_requester); |
343 | 339 |
344 ServicesResourceApi(commons.ApiRequester client) : | 340 ServicesResourceApi(commons.ApiRequester client) : _requester = client; |
345 _requester = client; | |
346 | 341 |
347 /** | 342 /// Lists all public cloud services. |
348 * Lists all public cloud services. | 343 /// |
349 * | 344 /// Request parameters: |
350 * Request parameters: | 345 /// |
351 * | 346 /// [pageSize] - Requested page size. Defaults to 5000. |
352 * [pageSize] - Requested page size. Defaults to 5000. | 347 /// |
353 * | 348 /// [pageToken] - A token identifying a page of results to return. This |
354 * [pageToken] - A token identifying a page of results to return. This should | 349 /// should be a |
355 * be a | 350 /// `next_page_token` value returned from a previous `ListServices` |
356 * `next_page_token` value returned from a previous `ListServices` | 351 /// call. If unspecified, the first page of results is returned. |
357 * call. If unspecified, the first page of results is returned. | 352 /// |
358 * | 353 /// Completes with a [ListServicesResponse]. |
359 * Completes with a [ListServicesResponse]. | 354 /// |
360 * | 355 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
361 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 356 /// an error. |
362 * error. | 357 /// |
363 * | 358 /// If the used [http.Client] completes with an error when making a REST |
364 * If the used [http.Client] completes with an error when making a REST call, | 359 /// call, this method will complete with the same error. |
365 * this method will complete with the same error. | 360 async.Future<ListServicesResponse> list( |
366 */ | 361 {core.int pageSize, core.String pageToken}) { |
367 async.Future<ListServicesResponse> list({core.int pageSize, core.String pageTo
ken}) { | |
368 var _url = null; | 362 var _url = null; |
369 var _queryParams = new core.Map(); | 363 var _queryParams = new core.Map(); |
370 var _uploadMedia = null; | 364 var _uploadMedia = null; |
371 var _uploadOptions = null; | 365 var _uploadOptions = null; |
372 var _downloadOptions = commons.DownloadOptions.Metadata; | 366 var _downloadOptions = commons.DownloadOptions.Metadata; |
373 var _body = null; | 367 var _body = null; |
374 | 368 |
375 if (pageSize != null) { | 369 if (pageSize != null) { |
376 _queryParams["pageSize"] = ["${pageSize}"]; | 370 _queryParams["pageSize"] = ["${pageSize}"]; |
377 } | 371 } |
378 if (pageToken != null) { | 372 if (pageToken != null) { |
379 _queryParams["pageToken"] = [pageToken]; | 373 _queryParams["pageToken"] = [pageToken]; |
380 } | 374 } |
381 | 375 |
382 _url = 'v1/services'; | 376 _url = 'v1/services'; |
383 | 377 |
384 var _response = _requester.request(_url, | 378 var _response = _requester.request(_url, "GET", |
385 "GET", | 379 body: _body, |
386 body: _body, | 380 queryParams: _queryParams, |
387 queryParams: _queryParams, | 381 uploadOptions: _uploadOptions, |
388 uploadOptions: _uploadOptions, | 382 uploadMedia: _uploadMedia, |
389 uploadMedia: _uploadMedia, | 383 downloadOptions: _downloadOptions); |
390 downloadOptions: _downloadOptions); | |
391 return _response.then((data) => new ListServicesResponse.fromJson(data)); | 384 return _response.then((data) => new ListServicesResponse.fromJson(data)); |
392 } | 385 } |
393 | |
394 } | 386 } |
395 | 387 |
396 | |
397 class ServicesSkusResourceApi { | 388 class ServicesSkusResourceApi { |
398 final commons.ApiRequester _requester; | 389 final commons.ApiRequester _requester; |
399 | 390 |
400 ServicesSkusResourceApi(commons.ApiRequester client) : | 391 ServicesSkusResourceApi(commons.ApiRequester client) : _requester = client; |
401 _requester = client; | |
402 | 392 |
403 /** | 393 /// Lists all publicly available SKUs for a given cloud service. |
404 * Lists all publicly available SKUs for a given cloud service. | 394 /// |
405 * | 395 /// Request parameters: |
406 * Request parameters: | 396 /// |
407 * | 397 /// [parent] - The name of the service. |
408 * [parent] - The name of the service. | 398 /// Example: "services/DA34-426B-A397" |
409 * Example: "services/DA34-426B-A397" | 399 /// Value must have pattern "^services/[^/]+$". |
410 * Value must have pattern "^services/[^/]+$". | 400 /// |
411 * | 401 /// [currencyCode] - The ISO 4217 currency code for the pricing info in the |
412 * [currencyCode] - The ISO 4217 currency code for the pricing info in the | 402 /// response proto. |
413 * response proto. | 403 /// Will use the conversion rate as of start_time. |
414 * Will use the conversion rate as of start_time. | 404 /// Optional. If not specified USD will be used. |
415 * Optional. If not specified USD will be used. | 405 /// |
416 * | 406 /// [endTime] - Optional exclusive end time of the time range for which the |
417 * [endTime] - Optional exclusive end time of the time range for which the | 407 /// pricing |
418 * pricing | 408 /// versions will be returned. Timestamps in the future are not allowed. |
419 * versions will be returned. Timestamps in the future are not allowed. | 409 /// Maximum allowable time range is 1 month (31 days). Time range as a whole |
420 * Maximum allowable time range is 1 month (31 days). Time range as a whole | 410 /// is optional. If not specified, the latest pricing will be returned (up to |
421 * is optional. If not specified, the latest pricing will be returned (up to | 411 /// 12 hours old at most). |
422 * 12 hours old at most). | 412 /// |
423 * | 413 /// [pageSize] - Requested page size. Defaults to 5000. |
424 * [pageSize] - Requested page size. Defaults to 5000. | 414 /// |
425 * | 415 /// [startTime] - Optional inclusive start time of the time range for which |
426 * [startTime] - Optional inclusive start time of the time range for which the | 416 /// the pricing |
427 * pricing | 417 /// versions will be returned. Timestamps in the future are not allowed. |
428 * versions will be returned. Timestamps in the future are not allowed. | 418 /// Maximum allowable time range is 1 month (31 days). Time range as a whole |
429 * Maximum allowable time range is 1 month (31 days). Time range as a whole | 419 /// is optional. If not specified, the latest pricing will be returned (up to |
430 * is optional. If not specified, the latest pricing will be returned (up to | 420 /// 12 hours old at most). |
431 * 12 hours old at most). | 421 /// |
432 * | 422 /// [pageToken] - A token identifying a page of results to return. This |
433 * [pageToken] - A token identifying a page of results to return. This should | 423 /// should be a |
434 * be a | 424 /// `next_page_token` value returned from a previous `ListSkus` |
435 * `next_page_token` value returned from a previous `ListSkus` | 425 /// call. If unspecified, the first page of results is returned. |
436 * call. If unspecified, the first page of results is returned. | 426 /// |
437 * | 427 /// Completes with a [ListSkusResponse]. |
438 * Completes with a [ListSkusResponse]. | 428 /// |
439 * | 429 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
440 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 430 /// an error. |
441 * error. | 431 /// |
442 * | 432 /// If the used [http.Client] completes with an error when making a REST |
443 * If the used [http.Client] completes with an error when making a REST call, | 433 /// call, this method will complete with the same error. |
444 * this method will complete with the same error. | 434 async.Future<ListSkusResponse> list(core.String parent, |
445 */ | 435 {core.String currencyCode, |
446 async.Future<ListSkusResponse> list(core.String parent, {core.String currencyC
ode, core.String endTime, core.int pageSize, core.String startTime, core.String
pageToken}) { | 436 core.String endTime, |
| 437 core.int pageSize, |
| 438 core.String startTime, |
| 439 core.String pageToken}) { |
447 var _url = null; | 440 var _url = null; |
448 var _queryParams = new core.Map(); | 441 var _queryParams = new core.Map(); |
449 var _uploadMedia = null; | 442 var _uploadMedia = null; |
450 var _uploadOptions = null; | 443 var _uploadOptions = null; |
451 var _downloadOptions = commons.DownloadOptions.Metadata; | 444 var _downloadOptions = commons.DownloadOptions.Metadata; |
452 var _body = null; | 445 var _body = null; |
453 | 446 |
454 if (parent == null) { | 447 if (parent == null) { |
455 throw new core.ArgumentError("Parameter parent is required."); | 448 throw new core.ArgumentError("Parameter parent is required."); |
456 } | 449 } |
457 if (currencyCode != null) { | 450 if (currencyCode != null) { |
458 _queryParams["currencyCode"] = [currencyCode]; | 451 _queryParams["currencyCode"] = [currencyCode]; |
459 } | 452 } |
460 if (endTime != null) { | 453 if (endTime != null) { |
461 _queryParams["endTime"] = [endTime]; | 454 _queryParams["endTime"] = [endTime]; |
462 } | 455 } |
463 if (pageSize != null) { | 456 if (pageSize != null) { |
464 _queryParams["pageSize"] = ["${pageSize}"]; | 457 _queryParams["pageSize"] = ["${pageSize}"]; |
465 } | 458 } |
466 if (startTime != null) { | 459 if (startTime != null) { |
467 _queryParams["startTime"] = [startTime]; | 460 _queryParams["startTime"] = [startTime]; |
468 } | 461 } |
469 if (pageToken != null) { | 462 if (pageToken != null) { |
470 _queryParams["pageToken"] = [pageToken]; | 463 _queryParams["pageToken"] = [pageToken]; |
471 } | 464 } |
472 | 465 |
473 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/skus'; | 466 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/skus'; |
474 | 467 |
475 var _response = _requester.request(_url, | 468 var _response = _requester.request(_url, "GET", |
476 "GET", | 469 body: _body, |
477 body: _body, | 470 queryParams: _queryParams, |
478 queryParams: _queryParams, | 471 uploadOptions: _uploadOptions, |
479 uploadOptions: _uploadOptions, | 472 uploadMedia: _uploadMedia, |
480 uploadMedia: _uploadMedia, | 473 downloadOptions: _downloadOptions); |
481 downloadOptions: _downloadOptions); | |
482 return _response.then((data) => new ListSkusResponse.fromJson(data)); | 474 return _response.then((data) => new ListSkusResponse.fromJson(data)); |
483 } | 475 } |
484 | |
485 } | 476 } |
486 | 477 |
| 478 /// Represents the aggregation level and interval for pricing of a single SKU. |
| 479 class AggregationInfo { |
| 480 /// The number of intervals to aggregate over. |
| 481 /// Example: If aggregation_level is "DAILY" and aggregation_count is 14, |
| 482 /// aggregation will be over 14 days. |
| 483 core.int aggregationCount; |
487 | 484 |
| 485 /// |
| 486 /// Possible string values are: |
| 487 /// - "AGGREGATION_INTERVAL_UNSPECIFIED" |
| 488 /// - "DAILY" |
| 489 /// - "MONTHLY" |
| 490 core.String aggregationInterval; |
488 | 491 |
489 /** | 492 /// |
490 * Represents the aggregation level and interval for pricing of a single SKU. | 493 /// Possible string values are: |
491 */ | 494 /// - "AGGREGATION_LEVEL_UNSPECIFIED" |
492 class AggregationInfo { | 495 /// - "ACCOUNT" |
493 /** | 496 /// - "PROJECT" |
494 * The number of intervals to aggregate over. | |
495 * Example: If aggregation_level is "DAILY" and aggregation_count is 14, | |
496 * aggregation will be over 14 days. | |
497 */ | |
498 core.int aggregationCount; | |
499 /** | |
500 * | |
501 * Possible string values are: | |
502 * - "AGGREGATION_INTERVAL_UNSPECIFIED" | |
503 * - "DAILY" | |
504 * - "MONTHLY" | |
505 */ | |
506 core.String aggregationInterval; | |
507 /** | |
508 * | |
509 * Possible string values are: | |
510 * - "AGGREGATION_LEVEL_UNSPECIFIED" | |
511 * - "ACCOUNT" | |
512 * - "PROJECT" | |
513 */ | |
514 core.String aggregationLevel; | 497 core.String aggregationLevel; |
515 | 498 |
516 AggregationInfo(); | 499 AggregationInfo(); |
517 | 500 |
518 AggregationInfo.fromJson(core.Map _json) { | 501 AggregationInfo.fromJson(core.Map _json) { |
519 if (_json.containsKey("aggregationCount")) { | 502 if (_json.containsKey("aggregationCount")) { |
520 aggregationCount = _json["aggregationCount"]; | 503 aggregationCount = _json["aggregationCount"]; |
521 } | 504 } |
522 if (_json.containsKey("aggregationInterval")) { | 505 if (_json.containsKey("aggregationInterval")) { |
523 aggregationInterval = _json["aggregationInterval"]; | 506 aggregationInterval = _json["aggregationInterval"]; |
524 } | 507 } |
525 if (_json.containsKey("aggregationLevel")) { | 508 if (_json.containsKey("aggregationLevel")) { |
526 aggregationLevel = _json["aggregationLevel"]; | 509 aggregationLevel = _json["aggregationLevel"]; |
527 } | 510 } |
528 } | 511 } |
529 | 512 |
530 core.Map<core.String, core.Object> toJson() { | 513 core.Map<core.String, core.Object> toJson() { |
531 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 514 final core.Map<core.String, core.Object> _json = |
| 515 new core.Map<core.String, core.Object>(); |
532 if (aggregationCount != null) { | 516 if (aggregationCount != null) { |
533 _json["aggregationCount"] = aggregationCount; | 517 _json["aggregationCount"] = aggregationCount; |
534 } | 518 } |
535 if (aggregationInterval != null) { | 519 if (aggregationInterval != null) { |
536 _json["aggregationInterval"] = aggregationInterval; | 520 _json["aggregationInterval"] = aggregationInterval; |
537 } | 521 } |
538 if (aggregationLevel != null) { | 522 if (aggregationLevel != null) { |
539 _json["aggregationLevel"] = aggregationLevel; | 523 _json["aggregationLevel"] = aggregationLevel; |
540 } | 524 } |
541 return _json; | 525 return _json; |
542 } | 526 } |
543 } | 527 } |
544 | 528 |
545 /** | 529 /// A billing account in [Google Cloud |
546 * A billing account in [Google Cloud | 530 /// Console](https://console.cloud.google.com/). You can assign a billing |
547 * Console](https://console.cloud.google.com/). You can assign a billing account | 531 /// account |
548 * to one or more projects. | 532 /// to one or more projects. |
549 */ | |
550 class BillingAccount { | 533 class BillingAccount { |
551 /** | 534 /// The display name given to the billing account, such as `My Billing |
552 * The display name given to the billing account, such as `My Billing | 535 /// Account`. This name is displayed in the Google Cloud Console. |
553 * Account`. This name is displayed in the Google Cloud Console. | |
554 */ | |
555 core.String displayName; | 536 core.String displayName; |
556 /** | 537 |
557 * The resource name of the billing account. The resource name has the form | 538 /// The resource name of the billing account. The resource name has the form |
558 * `billingAccounts/{billing_account_id}`. For example, | 539 /// `billingAccounts/{billing_account_id}`. For example, |
559 * `billingAccounts/012345-567890-ABCDEF` would be the resource name for | 540 /// `billingAccounts/012345-567890-ABCDEF` would be the resource name for |
560 * billing account `012345-567890-ABCDEF`. | 541 /// billing account `012345-567890-ABCDEF`. |
561 */ | |
562 core.String name; | 542 core.String name; |
563 /** | 543 |
564 * True if the billing account is open, and will therefore be charged for any | 544 /// True if the billing account is open, and will therefore be charged for |
565 * usage on associated projects. False if the billing account is closed, and | 545 /// any |
566 * therefore projects associated with it will be unable to use paid services. | 546 /// usage on associated projects. False if the billing account is closed, and |
567 */ | 547 /// therefore projects associated with it will be unable to use paid |
| 548 /// services. |
568 core.bool open; | 549 core.bool open; |
569 | 550 |
570 BillingAccount(); | 551 BillingAccount(); |
571 | 552 |
572 BillingAccount.fromJson(core.Map _json) { | 553 BillingAccount.fromJson(core.Map _json) { |
573 if (_json.containsKey("displayName")) { | 554 if (_json.containsKey("displayName")) { |
574 displayName = _json["displayName"]; | 555 displayName = _json["displayName"]; |
575 } | 556 } |
576 if (_json.containsKey("name")) { | 557 if (_json.containsKey("name")) { |
577 name = _json["name"]; | 558 name = _json["name"]; |
578 } | 559 } |
579 if (_json.containsKey("open")) { | 560 if (_json.containsKey("open")) { |
580 open = _json["open"]; | 561 open = _json["open"]; |
581 } | 562 } |
582 } | 563 } |
583 | 564 |
584 core.Map<core.String, core.Object> toJson() { | 565 core.Map<core.String, core.Object> toJson() { |
585 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 566 final core.Map<core.String, core.Object> _json = |
| 567 new core.Map<core.String, core.Object>(); |
586 if (displayName != null) { | 568 if (displayName != null) { |
587 _json["displayName"] = displayName; | 569 _json["displayName"] = displayName; |
588 } | 570 } |
589 if (name != null) { | 571 if (name != null) { |
590 _json["name"] = name; | 572 _json["name"] = name; |
591 } | 573 } |
592 if (open != null) { | 574 if (open != null) { |
593 _json["open"] = open; | 575 _json["open"] = open; |
594 } | 576 } |
595 return _json; | 577 return _json; |
596 } | 578 } |
597 } | 579 } |
598 | 580 |
599 /** Represents the category hierarchy of a SKU. */ | 581 /// Represents the category hierarchy of a SKU. |
600 class Category { | 582 class Category { |
601 /** | 583 /// The type of product the SKU refers to. |
602 * The type of product the SKU refers to. | 584 /// Example: "Compute", "Storage", "Network", "ApplicationServices" etc. |
603 * Example: "Compute", "Storage", "Network", "ApplicationServices" etc. | |
604 */ | |
605 core.String resourceFamily; | 585 core.String resourceFamily; |
606 /** | 586 |
607 * A group classification for related SKUs. | 587 /// A group classification for related SKUs. |
608 * Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. | 588 /// Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. |
609 */ | |
610 core.String resourceGroup; | 589 core.String resourceGroup; |
611 /** The display name of the service this SKU belongs to. */ | 590 |
| 591 /// The display name of the service this SKU belongs to. |
612 core.String serviceDisplayName; | 592 core.String serviceDisplayName; |
613 /** | 593 |
614 * Represents how the SKU is consumed. | 594 /// Represents how the SKU is consumed. |
615 * Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. | 595 /// Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. |
616 */ | |
617 core.String usageType; | 596 core.String usageType; |
618 | 597 |
619 Category(); | 598 Category(); |
620 | 599 |
621 Category.fromJson(core.Map _json) { | 600 Category.fromJson(core.Map _json) { |
622 if (_json.containsKey("resourceFamily")) { | 601 if (_json.containsKey("resourceFamily")) { |
623 resourceFamily = _json["resourceFamily"]; | 602 resourceFamily = _json["resourceFamily"]; |
624 } | 603 } |
625 if (_json.containsKey("resourceGroup")) { | 604 if (_json.containsKey("resourceGroup")) { |
626 resourceGroup = _json["resourceGroup"]; | 605 resourceGroup = _json["resourceGroup"]; |
627 } | 606 } |
628 if (_json.containsKey("serviceDisplayName")) { | 607 if (_json.containsKey("serviceDisplayName")) { |
629 serviceDisplayName = _json["serviceDisplayName"]; | 608 serviceDisplayName = _json["serviceDisplayName"]; |
630 } | 609 } |
631 if (_json.containsKey("usageType")) { | 610 if (_json.containsKey("usageType")) { |
632 usageType = _json["usageType"]; | 611 usageType = _json["usageType"]; |
633 } | 612 } |
634 } | 613 } |
635 | 614 |
636 core.Map<core.String, core.Object> toJson() { | 615 core.Map<core.String, core.Object> toJson() { |
637 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 616 final core.Map<core.String, core.Object> _json = |
| 617 new core.Map<core.String, core.Object>(); |
638 if (resourceFamily != null) { | 618 if (resourceFamily != null) { |
639 _json["resourceFamily"] = resourceFamily; | 619 _json["resourceFamily"] = resourceFamily; |
640 } | 620 } |
641 if (resourceGroup != null) { | 621 if (resourceGroup != null) { |
642 _json["resourceGroup"] = resourceGroup; | 622 _json["resourceGroup"] = resourceGroup; |
643 } | 623 } |
644 if (serviceDisplayName != null) { | 624 if (serviceDisplayName != null) { |
645 _json["serviceDisplayName"] = serviceDisplayName; | 625 _json["serviceDisplayName"] = serviceDisplayName; |
646 } | 626 } |
647 if (usageType != null) { | 627 if (usageType != null) { |
648 _json["usageType"] = usageType; | 628 _json["usageType"] = usageType; |
649 } | 629 } |
650 return _json; | 630 return _json; |
651 } | 631 } |
652 } | 632 } |
653 | 633 |
654 /** Response message for `ListBillingAccounts`. */ | 634 /// Response message for `ListBillingAccounts`. |
655 class ListBillingAccountsResponse { | 635 class ListBillingAccountsResponse { |
656 /** A list of billing accounts. */ | 636 /// A list of billing accounts. |
657 core.List<BillingAccount> billingAccounts; | 637 core.List<BillingAccount> billingAccounts; |
658 /** | 638 |
659 * A token to retrieve the next page of results. To retrieve the next page, | 639 /// A token to retrieve the next page of results. To retrieve the next page, |
660 * call `ListBillingAccounts` again with the `page_token` field set to this | 640 /// call `ListBillingAccounts` again with the `page_token` field set to this |
661 * value. This field is empty if there are no more results to retrieve. | 641 /// value. This field is empty if there are no more results to retrieve. |
662 */ | |
663 core.String nextPageToken; | 642 core.String nextPageToken; |
664 | 643 |
665 ListBillingAccountsResponse(); | 644 ListBillingAccountsResponse(); |
666 | 645 |
667 ListBillingAccountsResponse.fromJson(core.Map _json) { | 646 ListBillingAccountsResponse.fromJson(core.Map _json) { |
668 if (_json.containsKey("billingAccounts")) { | 647 if (_json.containsKey("billingAccounts")) { |
669 billingAccounts = _json["billingAccounts"].map((value) => new BillingAccou
nt.fromJson(value)).toList(); | 648 billingAccounts = _json["billingAccounts"] |
| 649 .map((value) => new BillingAccount.fromJson(value)) |
| 650 .toList(); |
670 } | 651 } |
671 if (_json.containsKey("nextPageToken")) { | 652 if (_json.containsKey("nextPageToken")) { |
672 nextPageToken = _json["nextPageToken"]; | 653 nextPageToken = _json["nextPageToken"]; |
673 } | 654 } |
674 } | 655 } |
675 | 656 |
676 core.Map<core.String, core.Object> toJson() { | 657 core.Map<core.String, core.Object> toJson() { |
677 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 658 final core.Map<core.String, core.Object> _json = |
| 659 new core.Map<core.String, core.Object>(); |
678 if (billingAccounts != null) { | 660 if (billingAccounts != null) { |
679 _json["billingAccounts"] = billingAccounts.map((value) => (value).toJson()
).toList(); | 661 _json["billingAccounts"] = |
| 662 billingAccounts.map((value) => (value).toJson()).toList(); |
680 } | 663 } |
681 if (nextPageToken != null) { | 664 if (nextPageToken != null) { |
682 _json["nextPageToken"] = nextPageToken; | 665 _json["nextPageToken"] = nextPageToken; |
683 } | 666 } |
684 return _json; | 667 return _json; |
685 } | 668 } |
686 } | 669 } |
687 | 670 |
688 /** Request message for `ListProjectBillingInfoResponse`. */ | 671 /// Request message for `ListProjectBillingInfoResponse`. |
689 class ListProjectBillingInfoResponse { | 672 class ListProjectBillingInfoResponse { |
690 /** | 673 /// A token to retrieve the next page of results. To retrieve the next page, |
691 * A token to retrieve the next page of results. To retrieve the next page, | 674 /// call `ListProjectBillingInfo` again with the `page_token` field set to |
692 * call `ListProjectBillingInfo` again with the `page_token` field set to this | 675 /// this |
693 * value. This field is empty if there are no more results to retrieve. | 676 /// value. This field is empty if there are no more results to retrieve. |
694 */ | |
695 core.String nextPageToken; | 677 core.String nextPageToken; |
696 /** | 678 |
697 * A list of `ProjectBillingInfo` resources representing the projects | 679 /// A list of `ProjectBillingInfo` resources representing the projects |
698 * associated with the billing account. | 680 /// associated with the billing account. |
699 */ | |
700 core.List<ProjectBillingInfo> projectBillingInfo; | 681 core.List<ProjectBillingInfo> projectBillingInfo; |
701 | 682 |
702 ListProjectBillingInfoResponse(); | 683 ListProjectBillingInfoResponse(); |
703 | 684 |
704 ListProjectBillingInfoResponse.fromJson(core.Map _json) { | 685 ListProjectBillingInfoResponse.fromJson(core.Map _json) { |
705 if (_json.containsKey("nextPageToken")) { | 686 if (_json.containsKey("nextPageToken")) { |
706 nextPageToken = _json["nextPageToken"]; | 687 nextPageToken = _json["nextPageToken"]; |
707 } | 688 } |
708 if (_json.containsKey("projectBillingInfo")) { | 689 if (_json.containsKey("projectBillingInfo")) { |
709 projectBillingInfo = _json["projectBillingInfo"].map((value) => new Projec
tBillingInfo.fromJson(value)).toList(); | 690 projectBillingInfo = _json["projectBillingInfo"] |
| 691 .map((value) => new ProjectBillingInfo.fromJson(value)) |
| 692 .toList(); |
710 } | 693 } |
711 } | 694 } |
712 | 695 |
713 core.Map<core.String, core.Object> toJson() { | 696 core.Map<core.String, core.Object> toJson() { |
714 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 697 final core.Map<core.String, core.Object> _json = |
| 698 new core.Map<core.String, core.Object>(); |
715 if (nextPageToken != null) { | 699 if (nextPageToken != null) { |
716 _json["nextPageToken"] = nextPageToken; | 700 _json["nextPageToken"] = nextPageToken; |
717 } | 701 } |
718 if (projectBillingInfo != null) { | 702 if (projectBillingInfo != null) { |
719 _json["projectBillingInfo"] = projectBillingInfo.map((value) => (value).to
Json()).toList(); | 703 _json["projectBillingInfo"] = |
| 704 projectBillingInfo.map((value) => (value).toJson()).toList(); |
720 } | 705 } |
721 return _json; | 706 return _json; |
722 } | 707 } |
723 } | 708 } |
724 | 709 |
725 /** Response message for `ListServices`. */ | 710 /// Response message for `ListServices`. |
726 class ListServicesResponse { | 711 class ListServicesResponse { |
727 /** | 712 /// A token to retrieve the next page of results. To retrieve the next page, |
728 * A token to retrieve the next page of results. To retrieve the next page, | 713 /// call `ListServices` again with the `page_token` field set to this |
729 * call `ListServices` again with the `page_token` field set to this | 714 /// value. This field is empty if there are no more results to retrieve. |
730 * value. This field is empty if there are no more results to retrieve. | |
731 */ | |
732 core.String nextPageToken; | 715 core.String nextPageToken; |
733 /** A list of services. */ | 716 |
| 717 /// A list of services. |
734 core.List<Service> services; | 718 core.List<Service> services; |
735 | 719 |
736 ListServicesResponse(); | 720 ListServicesResponse(); |
737 | 721 |
738 ListServicesResponse.fromJson(core.Map _json) { | 722 ListServicesResponse.fromJson(core.Map _json) { |
739 if (_json.containsKey("nextPageToken")) { | 723 if (_json.containsKey("nextPageToken")) { |
740 nextPageToken = _json["nextPageToken"]; | 724 nextPageToken = _json["nextPageToken"]; |
741 } | 725 } |
742 if (_json.containsKey("services")) { | 726 if (_json.containsKey("services")) { |
743 services = _json["services"].map((value) => new Service.fromJson(value)).t
oList(); | 727 services = _json["services"] |
| 728 .map((value) => new Service.fromJson(value)) |
| 729 .toList(); |
744 } | 730 } |
745 } | 731 } |
746 | 732 |
747 core.Map<core.String, core.Object> toJson() { | 733 core.Map<core.String, core.Object> toJson() { |
748 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 734 final core.Map<core.String, core.Object> _json = |
| 735 new core.Map<core.String, core.Object>(); |
749 if (nextPageToken != null) { | 736 if (nextPageToken != null) { |
750 _json["nextPageToken"] = nextPageToken; | 737 _json["nextPageToken"] = nextPageToken; |
751 } | 738 } |
752 if (services != null) { | 739 if (services != null) { |
753 _json["services"] = services.map((value) => (value).toJson()).toList(); | 740 _json["services"] = services.map((value) => (value).toJson()).toList(); |
754 } | 741 } |
755 return _json; | 742 return _json; |
756 } | 743 } |
757 } | 744 } |
758 | 745 |
759 /** Response message for `ListSkus`. */ | 746 /// Response message for `ListSkus`. |
760 class ListSkusResponse { | 747 class ListSkusResponse { |
761 /** | 748 /// A token to retrieve the next page of results. To retrieve the next page, |
762 * A token to retrieve the next page of results. To retrieve the next page, | 749 /// call `ListSkus` again with the `page_token` field set to this |
763 * call `ListSkus` again with the `page_token` field set to this | 750 /// value. This field is empty if there are no more results to retrieve. |
764 * value. This field is empty if there are no more results to retrieve. | |
765 */ | |
766 core.String nextPageToken; | 751 core.String nextPageToken; |
767 /** The list of public SKUs of the given service. */ | 752 |
| 753 /// The list of public SKUs of the given service. |
768 core.List<Sku> skus; | 754 core.List<Sku> skus; |
769 | 755 |
770 ListSkusResponse(); | 756 ListSkusResponse(); |
771 | 757 |
772 ListSkusResponse.fromJson(core.Map _json) { | 758 ListSkusResponse.fromJson(core.Map _json) { |
773 if (_json.containsKey("nextPageToken")) { | 759 if (_json.containsKey("nextPageToken")) { |
774 nextPageToken = _json["nextPageToken"]; | 760 nextPageToken = _json["nextPageToken"]; |
775 } | 761 } |
776 if (_json.containsKey("skus")) { | 762 if (_json.containsKey("skus")) { |
777 skus = _json["skus"].map((value) => new Sku.fromJson(value)).toList(); | 763 skus = _json["skus"].map((value) => new Sku.fromJson(value)).toList(); |
778 } | 764 } |
779 } | 765 } |
780 | 766 |
781 core.Map<core.String, core.Object> toJson() { | 767 core.Map<core.String, core.Object> toJson() { |
782 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 768 final core.Map<core.String, core.Object> _json = |
| 769 new core.Map<core.String, core.Object>(); |
783 if (nextPageToken != null) { | 770 if (nextPageToken != null) { |
784 _json["nextPageToken"] = nextPageToken; | 771 _json["nextPageToken"] = nextPageToken; |
785 } | 772 } |
786 if (skus != null) { | 773 if (skus != null) { |
787 _json["skus"] = skus.map((value) => (value).toJson()).toList(); | 774 _json["skus"] = skus.map((value) => (value).toJson()).toList(); |
788 } | 775 } |
789 return _json; | 776 return _json; |
790 } | 777 } |
791 } | 778 } |
792 | 779 |
793 /** Represents an amount of money with its currency type. */ | 780 /// Represents an amount of money with its currency type. |
794 class Money { | 781 class Money { |
795 /** The 3-letter currency code defined in ISO 4217. */ | 782 /// The 3-letter currency code defined in ISO 4217. |
796 core.String currencyCode; | 783 core.String currencyCode; |
797 /** | 784 |
798 * Number of nano (10^-9) units of the amount. | 785 /// Number of nano (10^-9) units of the amount. |
799 * The value must be between -999,999,999 and +999,999,999 inclusive. | 786 /// The value must be between -999,999,999 and +999,999,999 inclusive. |
800 * If `units` is positive, `nanos` must be positive or zero. | 787 /// If `units` is positive, `nanos` must be positive or zero. |
801 * If `units` is zero, `nanos` can be positive, zero, or negative. | 788 /// If `units` is zero, `nanos` can be positive, zero, or negative. |
802 * If `units` is negative, `nanos` must be negative or zero. | 789 /// If `units` is negative, `nanos` must be negative or zero. |
803 * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. | 790 /// For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
804 */ | |
805 core.int nanos; | 791 core.int nanos; |
806 /** | 792 |
807 * The whole units of the amount. | 793 /// The whole units of the amount. |
808 * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. | 794 /// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. |
809 */ | |
810 core.String units; | 795 core.String units; |
811 | 796 |
812 Money(); | 797 Money(); |
813 | 798 |
814 Money.fromJson(core.Map _json) { | 799 Money.fromJson(core.Map _json) { |
815 if (_json.containsKey("currencyCode")) { | 800 if (_json.containsKey("currencyCode")) { |
816 currencyCode = _json["currencyCode"]; | 801 currencyCode = _json["currencyCode"]; |
817 } | 802 } |
818 if (_json.containsKey("nanos")) { | 803 if (_json.containsKey("nanos")) { |
819 nanos = _json["nanos"]; | 804 nanos = _json["nanos"]; |
820 } | 805 } |
821 if (_json.containsKey("units")) { | 806 if (_json.containsKey("units")) { |
822 units = _json["units"]; | 807 units = _json["units"]; |
823 } | 808 } |
824 } | 809 } |
825 | 810 |
826 core.Map<core.String, core.Object> toJson() { | 811 core.Map<core.String, core.Object> toJson() { |
827 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 812 final core.Map<core.String, core.Object> _json = |
| 813 new core.Map<core.String, core.Object>(); |
828 if (currencyCode != null) { | 814 if (currencyCode != null) { |
829 _json["currencyCode"] = currencyCode; | 815 _json["currencyCode"] = currencyCode; |
830 } | 816 } |
831 if (nanos != null) { | 817 if (nanos != null) { |
832 _json["nanos"] = nanos; | 818 _json["nanos"] = nanos; |
833 } | 819 } |
834 if (units != null) { | 820 if (units != null) { |
835 _json["units"] = units; | 821 _json["units"] = units; |
836 } | 822 } |
837 return _json; | 823 return _json; |
838 } | 824 } |
839 } | 825 } |
840 | 826 |
841 /** | 827 /// Expresses a mathematical pricing formula. For Example:- |
842 * Expresses a mathematical pricing formula. For Example:- | 828 /// |
843 * | 829 /// `usage_unit: GBy` |
844 * `usage_unit: GBy` | 830 /// `tiered_rates:` |
845 * `tiered_rates:` | 831 /// `[start_usage_amount: 20, unit_price: $10]` |
846 * `[start_usage_amount: 20, unit_price: $10]` | 832 /// `[start_usage_amount: 100, unit_price: $5]` |
847 * `[start_usage_amount: 100, unit_price: $5]` | 833 /// |
848 * | 834 /// The above expresses a pricing formula where the first 20GB is free, the |
849 * The above expresses a pricing formula where the first 20GB is free, the | 835 /// next 80GB is priced at $10 per GB followed by $5 per GB for additional |
850 * next 80GB is priced at $10 per GB followed by $5 per GB for additional | 836 /// usage. |
851 * usage. | |
852 */ | |
853 class PricingExpression { | 837 class PricingExpression { |
854 /** | 838 /// The base unit for the SKU which is the unit used in usage exports. |
855 * The base unit for the SKU which is the unit used in usage exports. | 839 /// Example: "By" |
856 * Example: "By" | |
857 */ | |
858 core.String baseUnit; | 840 core.String baseUnit; |
859 /** | 841 |
860 * Conversion factor for converting from price per usage_unit to price per | 842 /// Conversion factor for converting from price per usage_unit to price per |
861 * base_unit, and start_usage_amount to start_usage_amount in base_unit. | 843 /// base_unit, and start_usage_amount to start_usage_amount in base_unit. |
862 * unit_price / base_unit_conversion_factor = price per base_unit. | 844 /// unit_price / base_unit_conversion_factor = price per base_unit. |
863 * start_usage_amount * base_unit_conversion_factor = start_usage_amount in | 845 /// start_usage_amount * base_unit_conversion_factor = start_usage_amount in |
864 * base_unit. | 846 /// base_unit. |
865 */ | |
866 core.double baseUnitConversionFactor; | 847 core.double baseUnitConversionFactor; |
867 /** | 848 |
868 * The base unit in human readable form. | 849 /// The base unit in human readable form. |
869 * Example: "byte". | 850 /// Example: "byte". |
870 */ | |
871 core.String baseUnitDescription; | 851 core.String baseUnitDescription; |
872 /** | 852 |
873 * The recommended quantity of units for displaying pricing info. When | 853 /// The recommended quantity of units for displaying pricing info. When |
874 * displaying pricing info it is recommended to display: | 854 /// displaying pricing info it is recommended to display: |
875 * (unit_price * display_quantity) per display_quantity usage_unit. | 855 /// (unit_price * display_quantity) per display_quantity usage_unit. |
876 * This field does not affect the pricing formula and is for display purposes | 856 /// This field does not affect the pricing formula and is for display |
877 * only. | 857 /// purposes |
878 * Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and | 858 /// only. |
879 * the display_quantity is "1000" then the recommended way of displaying the | 859 /// Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and |
880 * pricing info is "0.10 USD per 1000 GB" | 860 /// the display_quantity is "1000" then the recommended way of displaying the |
881 */ | 861 /// pricing info is "0.10 USD per 1000 GB" |
882 core.double displayQuantity; | 862 core.double displayQuantity; |
883 /** | 863 |
884 * The list of tiered rates for this pricing. The total cost is computed by | 864 /// The list of tiered rates for this pricing. The total cost is computed by |
885 * applying each of the tiered rates on usage. This repeated list is sorted | 865 /// applying each of the tiered rates on usage. This repeated list is sorted |
886 * by ascending order of start_usage_amount. | 866 /// by ascending order of start_usage_amount. |
887 */ | |
888 core.List<TierRate> tieredRates; | 867 core.List<TierRate> tieredRates; |
889 /** | 868 |
890 * The short hand for unit of usage this pricing is specified in. | 869 /// The short hand for unit of usage this pricing is specified in. |
891 * Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". | 870 /// Example: usage_unit of "GiBy" means that usage is specified in "Gibi |
892 */ | 871 /// Byte". |
893 core.String usageUnit; | 872 core.String usageUnit; |
894 /** | 873 |
895 * The unit of usage in human readable form. | 874 /// The unit of usage in human readable form. |
896 * Example: "gibi byte". | 875 /// Example: "gibi byte". |
897 */ | |
898 core.String usageUnitDescription; | 876 core.String usageUnitDescription; |
899 | 877 |
900 PricingExpression(); | 878 PricingExpression(); |
901 | 879 |
902 PricingExpression.fromJson(core.Map _json) { | 880 PricingExpression.fromJson(core.Map _json) { |
903 if (_json.containsKey("baseUnit")) { | 881 if (_json.containsKey("baseUnit")) { |
904 baseUnit = _json["baseUnit"]; | 882 baseUnit = _json["baseUnit"]; |
905 } | 883 } |
906 if (_json.containsKey("baseUnitConversionFactor")) { | 884 if (_json.containsKey("baseUnitConversionFactor")) { |
907 baseUnitConversionFactor = _json["baseUnitConversionFactor"]; | 885 baseUnitConversionFactor = _json["baseUnitConversionFactor"]; |
908 } | 886 } |
909 if (_json.containsKey("baseUnitDescription")) { | 887 if (_json.containsKey("baseUnitDescription")) { |
910 baseUnitDescription = _json["baseUnitDescription"]; | 888 baseUnitDescription = _json["baseUnitDescription"]; |
911 } | 889 } |
912 if (_json.containsKey("displayQuantity")) { | 890 if (_json.containsKey("displayQuantity")) { |
913 displayQuantity = _json["displayQuantity"]; | 891 displayQuantity = _json["displayQuantity"]; |
914 } | 892 } |
915 if (_json.containsKey("tieredRates")) { | 893 if (_json.containsKey("tieredRates")) { |
916 tieredRates = _json["tieredRates"].map((value) => new TierRate.fromJson(va
lue)).toList(); | 894 tieredRates = _json["tieredRates"] |
| 895 .map((value) => new TierRate.fromJson(value)) |
| 896 .toList(); |
917 } | 897 } |
918 if (_json.containsKey("usageUnit")) { | 898 if (_json.containsKey("usageUnit")) { |
919 usageUnit = _json["usageUnit"]; | 899 usageUnit = _json["usageUnit"]; |
920 } | 900 } |
921 if (_json.containsKey("usageUnitDescription")) { | 901 if (_json.containsKey("usageUnitDescription")) { |
922 usageUnitDescription = _json["usageUnitDescription"]; | 902 usageUnitDescription = _json["usageUnitDescription"]; |
923 } | 903 } |
924 } | 904 } |
925 | 905 |
926 core.Map<core.String, core.Object> toJson() { | 906 core.Map<core.String, core.Object> toJson() { |
927 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 907 final core.Map<core.String, core.Object> _json = |
| 908 new core.Map<core.String, core.Object>(); |
928 if (baseUnit != null) { | 909 if (baseUnit != null) { |
929 _json["baseUnit"] = baseUnit; | 910 _json["baseUnit"] = baseUnit; |
930 } | 911 } |
931 if (baseUnitConversionFactor != null) { | 912 if (baseUnitConversionFactor != null) { |
932 _json["baseUnitConversionFactor"] = baseUnitConversionFactor; | 913 _json["baseUnitConversionFactor"] = baseUnitConversionFactor; |
933 } | 914 } |
934 if (baseUnitDescription != null) { | 915 if (baseUnitDescription != null) { |
935 _json["baseUnitDescription"] = baseUnitDescription; | 916 _json["baseUnitDescription"] = baseUnitDescription; |
936 } | 917 } |
937 if (displayQuantity != null) { | 918 if (displayQuantity != null) { |
938 _json["displayQuantity"] = displayQuantity; | 919 _json["displayQuantity"] = displayQuantity; |
939 } | 920 } |
940 if (tieredRates != null) { | 921 if (tieredRates != null) { |
941 _json["tieredRates"] = tieredRates.map((value) => (value).toJson()).toList
(); | 922 _json["tieredRates"] = |
| 923 tieredRates.map((value) => (value).toJson()).toList(); |
942 } | 924 } |
943 if (usageUnit != null) { | 925 if (usageUnit != null) { |
944 _json["usageUnit"] = usageUnit; | 926 _json["usageUnit"] = usageUnit; |
945 } | 927 } |
946 if (usageUnitDescription != null) { | 928 if (usageUnitDescription != null) { |
947 _json["usageUnitDescription"] = usageUnitDescription; | 929 _json["usageUnitDescription"] = usageUnitDescription; |
948 } | 930 } |
949 return _json; | 931 return _json; |
950 } | 932 } |
951 } | 933 } |
952 | 934 |
953 /** Represents the pricing information for a SKU at a single point of time. */ | 935 /// Represents the pricing information for a SKU at a single point of time. |
954 class PricingInfo { | 936 class PricingInfo { |
955 /** | 937 /// Aggregation Info. This can be left unspecified if the pricing expression |
956 * Aggregation Info. This can be left unspecified if the pricing expression | 938 /// doesn't require aggregation. |
957 * doesn't require aggregation. | |
958 */ | |
959 AggregationInfo aggregationInfo; | 939 AggregationInfo aggregationInfo; |
960 /** | 940 |
961 * Conversion rate for currency conversion, from USD to the currency specified | 941 /// Conversion rate for currency conversion, from USD to the currency |
962 * in the request. If the currency is not specified this defaults to 1.0. | 942 /// specified |
963 * Example: USD * currency_conversion_rate = JPY | 943 /// in the request. If the currency is not specified this defaults to 1.0. |
964 */ | 944 /// Example: USD * currency_conversion_rate = JPY |
965 core.double currencyConversionRate; | 945 core.double currencyConversionRate; |
966 /** The timestamp from which this pricing was effective. */ | 946 |
| 947 /// The timestamp from which this pricing was effective. |
967 core.String effectiveTime; | 948 core.String effectiveTime; |
968 /** Expresses the pricing formula. See `PricingExpression` for an example. */ | 949 |
| 950 /// Expresses the pricing formula. See `PricingExpression` for an example. |
969 PricingExpression pricingExpression; | 951 PricingExpression pricingExpression; |
970 /** | 952 |
971 * An optional human readable summary of the pricing information, has a | 953 /// An optional human readable summary of the pricing information, has a |
972 * maximum length of 256 characters. | 954 /// maximum length of 256 characters. |
973 */ | |
974 core.String summary; | 955 core.String summary; |
975 | 956 |
976 PricingInfo(); | 957 PricingInfo(); |
977 | 958 |
978 PricingInfo.fromJson(core.Map _json) { | 959 PricingInfo.fromJson(core.Map _json) { |
979 if (_json.containsKey("aggregationInfo")) { | 960 if (_json.containsKey("aggregationInfo")) { |
980 aggregationInfo = new AggregationInfo.fromJson(_json["aggregationInfo"]); | 961 aggregationInfo = new AggregationInfo.fromJson(_json["aggregationInfo"]); |
981 } | 962 } |
982 if (_json.containsKey("currencyConversionRate")) { | 963 if (_json.containsKey("currencyConversionRate")) { |
983 currencyConversionRate = _json["currencyConversionRate"]; | 964 currencyConversionRate = _json["currencyConversionRate"]; |
984 } | 965 } |
985 if (_json.containsKey("effectiveTime")) { | 966 if (_json.containsKey("effectiveTime")) { |
986 effectiveTime = _json["effectiveTime"]; | 967 effectiveTime = _json["effectiveTime"]; |
987 } | 968 } |
988 if (_json.containsKey("pricingExpression")) { | 969 if (_json.containsKey("pricingExpression")) { |
989 pricingExpression = new PricingExpression.fromJson(_json["pricingExpressio
n"]); | 970 pricingExpression = |
| 971 new PricingExpression.fromJson(_json["pricingExpression"]); |
990 } | 972 } |
991 if (_json.containsKey("summary")) { | 973 if (_json.containsKey("summary")) { |
992 summary = _json["summary"]; | 974 summary = _json["summary"]; |
993 } | 975 } |
994 } | 976 } |
995 | 977 |
996 core.Map<core.String, core.Object> toJson() { | 978 core.Map<core.String, core.Object> toJson() { |
997 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 979 final core.Map<core.String, core.Object> _json = |
| 980 new core.Map<core.String, core.Object>(); |
998 if (aggregationInfo != null) { | 981 if (aggregationInfo != null) { |
999 _json["aggregationInfo"] = (aggregationInfo).toJson(); | 982 _json["aggregationInfo"] = (aggregationInfo).toJson(); |
1000 } | 983 } |
1001 if (currencyConversionRate != null) { | 984 if (currencyConversionRate != null) { |
1002 _json["currencyConversionRate"] = currencyConversionRate; | 985 _json["currencyConversionRate"] = currencyConversionRate; |
1003 } | 986 } |
1004 if (effectiveTime != null) { | 987 if (effectiveTime != null) { |
1005 _json["effectiveTime"] = effectiveTime; | 988 _json["effectiveTime"] = effectiveTime; |
1006 } | 989 } |
1007 if (pricingExpression != null) { | 990 if (pricingExpression != null) { |
1008 _json["pricingExpression"] = (pricingExpression).toJson(); | 991 _json["pricingExpression"] = (pricingExpression).toJson(); |
1009 } | 992 } |
1010 if (summary != null) { | 993 if (summary != null) { |
1011 _json["summary"] = summary; | 994 _json["summary"] = summary; |
1012 } | 995 } |
1013 return _json; | 996 return _json; |
1014 } | 997 } |
1015 } | 998 } |
1016 | 999 |
1017 /** | 1000 /// Encapsulation of billing information for a Cloud Console project. A project |
1018 * Encapsulation of billing information for a Cloud Console project. A project | 1001 /// has at most one associated billing account at a time (but a billing account |
1019 * has at most one associated billing account at a time (but a billing account | 1002 /// can be assigned to multiple projects). |
1020 * can be assigned to multiple projects). | |
1021 */ | |
1022 class ProjectBillingInfo { | 1003 class ProjectBillingInfo { |
1023 /** | 1004 /// The resource name of the billing account associated with the project, if |
1024 * The resource name of the billing account associated with the project, if | 1005 /// any. For example, `billingAccounts/012345-567890-ABCDEF`. |
1025 * any. For example, `billingAccounts/012345-567890-ABCDEF`. | |
1026 */ | |
1027 core.String billingAccountName; | 1006 core.String billingAccountName; |
1028 /** | 1007 |
1029 * True if the project is associated with an open billing account, to which | 1008 /// True if the project is associated with an open billing account, to which |
1030 * usage on the project is charged. False if the project is associated with a | 1009 /// usage on the project is charged. False if the project is associated with |
1031 * closed billing account, or no billing account at all, and therefore cannot | 1010 /// a |
1032 * use paid services. This field is read-only. | 1011 /// closed billing account, or no billing account at all, and therefore |
1033 */ | 1012 /// cannot |
| 1013 /// use paid services. This field is read-only. |
1034 core.bool billingEnabled; | 1014 core.bool billingEnabled; |
1035 /** | 1015 |
1036 * The resource name for the `ProjectBillingInfo`; has the form | 1016 /// The resource name for the `ProjectBillingInfo`; has the form |
1037 * `projects/{project_id}/billingInfo`. For example, the resource name for the | 1017 /// `projects/{project_id}/billingInfo`. For example, the resource name for |
1038 * billing information for project `tokyo-rain-123` would be | 1018 /// the |
1039 * `projects/tokyo-rain-123/billingInfo`. This field is read-only. | 1019 /// billing information for project `tokyo-rain-123` would be |
1040 */ | 1020 /// `projects/tokyo-rain-123/billingInfo`. This field is read-only. |
1041 core.String name; | 1021 core.String name; |
1042 /** | 1022 |
1043 * The ID of the project that this `ProjectBillingInfo` represents, such as | 1023 /// The ID of the project that this `ProjectBillingInfo` represents, such as |
1044 * `tokyo-rain-123`. This is a convenience field so that you don't need to | 1024 /// `tokyo-rain-123`. This is a convenience field so that you don't need to |
1045 * parse the `name` field to obtain a project ID. This field is read-only. | 1025 /// parse the `name` field to obtain a project ID. This field is read-only. |
1046 */ | |
1047 core.String projectId; | 1026 core.String projectId; |
1048 | 1027 |
1049 ProjectBillingInfo(); | 1028 ProjectBillingInfo(); |
1050 | 1029 |
1051 ProjectBillingInfo.fromJson(core.Map _json) { | 1030 ProjectBillingInfo.fromJson(core.Map _json) { |
1052 if (_json.containsKey("billingAccountName")) { | 1031 if (_json.containsKey("billingAccountName")) { |
1053 billingAccountName = _json["billingAccountName"]; | 1032 billingAccountName = _json["billingAccountName"]; |
1054 } | 1033 } |
1055 if (_json.containsKey("billingEnabled")) { | 1034 if (_json.containsKey("billingEnabled")) { |
1056 billingEnabled = _json["billingEnabled"]; | 1035 billingEnabled = _json["billingEnabled"]; |
1057 } | 1036 } |
1058 if (_json.containsKey("name")) { | 1037 if (_json.containsKey("name")) { |
1059 name = _json["name"]; | 1038 name = _json["name"]; |
1060 } | 1039 } |
1061 if (_json.containsKey("projectId")) { | 1040 if (_json.containsKey("projectId")) { |
1062 projectId = _json["projectId"]; | 1041 projectId = _json["projectId"]; |
1063 } | 1042 } |
1064 } | 1043 } |
1065 | 1044 |
1066 core.Map<core.String, core.Object> toJson() { | 1045 core.Map<core.String, core.Object> toJson() { |
1067 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1046 final core.Map<core.String, core.Object> _json = |
| 1047 new core.Map<core.String, core.Object>(); |
1068 if (billingAccountName != null) { | 1048 if (billingAccountName != null) { |
1069 _json["billingAccountName"] = billingAccountName; | 1049 _json["billingAccountName"] = billingAccountName; |
1070 } | 1050 } |
1071 if (billingEnabled != null) { | 1051 if (billingEnabled != null) { |
1072 _json["billingEnabled"] = billingEnabled; | 1052 _json["billingEnabled"] = billingEnabled; |
1073 } | 1053 } |
1074 if (name != null) { | 1054 if (name != null) { |
1075 _json["name"] = name; | 1055 _json["name"] = name; |
1076 } | 1056 } |
1077 if (projectId != null) { | 1057 if (projectId != null) { |
1078 _json["projectId"] = projectId; | 1058 _json["projectId"] = projectId; |
1079 } | 1059 } |
1080 return _json; | 1060 return _json; |
1081 } | 1061 } |
1082 } | 1062 } |
1083 | 1063 |
1084 /** Encapsulates a single service in Google Cloud Platform. */ | 1064 /// Encapsulates a single service in Google Cloud Platform. |
1085 class Service { | 1065 class Service { |
1086 /** A human readable display name for this service. */ | 1066 /// A human readable display name for this service. |
1087 core.String displayName; | 1067 core.String displayName; |
1088 /** | 1068 |
1089 * The resource name for the service. | 1069 /// The resource name for the service. |
1090 * Example: "services/DA34-426B-A397" | 1070 /// Example: "services/DA34-426B-A397" |
1091 */ | |
1092 core.String name; | 1071 core.String name; |
1093 /** | 1072 |
1094 * The identifier for the service. | 1073 /// The identifier for the service. |
1095 * Example: "DA34-426B-A397" | 1074 /// Example: "DA34-426B-A397" |
1096 */ | |
1097 core.String serviceId; | 1075 core.String serviceId; |
1098 | 1076 |
1099 Service(); | 1077 Service(); |
1100 | 1078 |
1101 Service.fromJson(core.Map _json) { | 1079 Service.fromJson(core.Map _json) { |
1102 if (_json.containsKey("displayName")) { | 1080 if (_json.containsKey("displayName")) { |
1103 displayName = _json["displayName"]; | 1081 displayName = _json["displayName"]; |
1104 } | 1082 } |
1105 if (_json.containsKey("name")) { | 1083 if (_json.containsKey("name")) { |
1106 name = _json["name"]; | 1084 name = _json["name"]; |
1107 } | 1085 } |
1108 if (_json.containsKey("serviceId")) { | 1086 if (_json.containsKey("serviceId")) { |
1109 serviceId = _json["serviceId"]; | 1087 serviceId = _json["serviceId"]; |
1110 } | 1088 } |
1111 } | 1089 } |
1112 | 1090 |
1113 core.Map<core.String, core.Object> toJson() { | 1091 core.Map<core.String, core.Object> toJson() { |
1114 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1092 final core.Map<core.String, core.Object> _json = |
| 1093 new core.Map<core.String, core.Object>(); |
1115 if (displayName != null) { | 1094 if (displayName != null) { |
1116 _json["displayName"] = displayName; | 1095 _json["displayName"] = displayName; |
1117 } | 1096 } |
1118 if (name != null) { | 1097 if (name != null) { |
1119 _json["name"] = name; | 1098 _json["name"] = name; |
1120 } | 1099 } |
1121 if (serviceId != null) { | 1100 if (serviceId != null) { |
1122 _json["serviceId"] = serviceId; | 1101 _json["serviceId"] = serviceId; |
1123 } | 1102 } |
1124 return _json; | 1103 return _json; |
1125 } | 1104 } |
1126 } | 1105 } |
1127 | 1106 |
1128 /** Encapsulates a single SKU in Google Cloud Platform */ | 1107 /// Encapsulates a single SKU in Google Cloud Platform |
1129 class Sku { | 1108 class Sku { |
1130 /** The category hierarchy of this SKU, purely for organizational purpose. */ | 1109 /// The category hierarchy of this SKU, purely for organizational purpose. |
1131 Category category; | 1110 Category category; |
1132 /** | 1111 |
1133 * A human readable description of the SKU, has a maximum length of 256 | 1112 /// A human readable description of the SKU, has a maximum length of 256 |
1134 * characters. | 1113 /// characters. |
1135 */ | |
1136 core.String description; | 1114 core.String description; |
1137 /** | 1115 |
1138 * The resource name for the SKU. | 1116 /// The resource name for the SKU. |
1139 * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" | 1117 /// Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE" |
1140 */ | |
1141 core.String name; | 1118 core.String name; |
1142 /** A timeline of pricing info for this SKU in chronological order. */ | 1119 |
| 1120 /// A timeline of pricing info for this SKU in chronological order. |
1143 core.List<PricingInfo> pricingInfo; | 1121 core.List<PricingInfo> pricingInfo; |
1144 /** | 1122 |
1145 * Identifies the service provider. | 1123 /// Identifies the service provider. |
1146 * This is 'Google' for first party services in Google Cloud Platform. | 1124 /// This is 'Google' for first party services in Google Cloud Platform. |
1147 */ | |
1148 core.String serviceProviderName; | 1125 core.String serviceProviderName; |
1149 /** | 1126 |
1150 * List of service regions this SKU is offered at. | 1127 /// List of service regions this SKU is offered at. |
1151 * Example: "asia-east1" | 1128 /// Example: "asia-east1" |
1152 * Service regions can be found at https://cloud.google.com/about/locations/ | 1129 /// Service regions can be found at https://cloud.google.com/about/locations/ |
1153 */ | |
1154 core.List<core.String> serviceRegions; | 1130 core.List<core.String> serviceRegions; |
1155 /** | 1131 |
1156 * The identifier for the SKU. | 1132 /// The identifier for the SKU. |
1157 * Example: "AA95-CD31-42FE" | 1133 /// Example: "AA95-CD31-42FE" |
1158 */ | |
1159 core.String skuId; | 1134 core.String skuId; |
1160 | 1135 |
1161 Sku(); | 1136 Sku(); |
1162 | 1137 |
1163 Sku.fromJson(core.Map _json) { | 1138 Sku.fromJson(core.Map _json) { |
1164 if (_json.containsKey("category")) { | 1139 if (_json.containsKey("category")) { |
1165 category = new Category.fromJson(_json["category"]); | 1140 category = new Category.fromJson(_json["category"]); |
1166 } | 1141 } |
1167 if (_json.containsKey("description")) { | 1142 if (_json.containsKey("description")) { |
1168 description = _json["description"]; | 1143 description = _json["description"]; |
1169 } | 1144 } |
1170 if (_json.containsKey("name")) { | 1145 if (_json.containsKey("name")) { |
1171 name = _json["name"]; | 1146 name = _json["name"]; |
1172 } | 1147 } |
1173 if (_json.containsKey("pricingInfo")) { | 1148 if (_json.containsKey("pricingInfo")) { |
1174 pricingInfo = _json["pricingInfo"].map((value) => new PricingInfo.fromJson
(value)).toList(); | 1149 pricingInfo = _json["pricingInfo"] |
| 1150 .map((value) => new PricingInfo.fromJson(value)) |
| 1151 .toList(); |
1175 } | 1152 } |
1176 if (_json.containsKey("serviceProviderName")) { | 1153 if (_json.containsKey("serviceProviderName")) { |
1177 serviceProviderName = _json["serviceProviderName"]; | 1154 serviceProviderName = _json["serviceProviderName"]; |
1178 } | 1155 } |
1179 if (_json.containsKey("serviceRegions")) { | 1156 if (_json.containsKey("serviceRegions")) { |
1180 serviceRegions = _json["serviceRegions"]; | 1157 serviceRegions = _json["serviceRegions"]; |
1181 } | 1158 } |
1182 if (_json.containsKey("skuId")) { | 1159 if (_json.containsKey("skuId")) { |
1183 skuId = _json["skuId"]; | 1160 skuId = _json["skuId"]; |
1184 } | 1161 } |
1185 } | 1162 } |
1186 | 1163 |
1187 core.Map<core.String, core.Object> toJson() { | 1164 core.Map<core.String, core.Object> toJson() { |
1188 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1165 final core.Map<core.String, core.Object> _json = |
| 1166 new core.Map<core.String, core.Object>(); |
1189 if (category != null) { | 1167 if (category != null) { |
1190 _json["category"] = (category).toJson(); | 1168 _json["category"] = (category).toJson(); |
1191 } | 1169 } |
1192 if (description != null) { | 1170 if (description != null) { |
1193 _json["description"] = description; | 1171 _json["description"] = description; |
1194 } | 1172 } |
1195 if (name != null) { | 1173 if (name != null) { |
1196 _json["name"] = name; | 1174 _json["name"] = name; |
1197 } | 1175 } |
1198 if (pricingInfo != null) { | 1176 if (pricingInfo != null) { |
1199 _json["pricingInfo"] = pricingInfo.map((value) => (value).toJson()).toList
(); | 1177 _json["pricingInfo"] = |
| 1178 pricingInfo.map((value) => (value).toJson()).toList(); |
1200 } | 1179 } |
1201 if (serviceProviderName != null) { | 1180 if (serviceProviderName != null) { |
1202 _json["serviceProviderName"] = serviceProviderName; | 1181 _json["serviceProviderName"] = serviceProviderName; |
1203 } | 1182 } |
1204 if (serviceRegions != null) { | 1183 if (serviceRegions != null) { |
1205 _json["serviceRegions"] = serviceRegions; | 1184 _json["serviceRegions"] = serviceRegions; |
1206 } | 1185 } |
1207 if (skuId != null) { | 1186 if (skuId != null) { |
1208 _json["skuId"] = skuId; | 1187 _json["skuId"] = skuId; |
1209 } | 1188 } |
1210 return _json; | 1189 return _json; |
1211 } | 1190 } |
1212 } | 1191 } |
1213 | 1192 |
1214 /** The price rate indicating starting usage and its corresponding price. */ | 1193 /// The price rate indicating starting usage and its corresponding price. |
1215 class TierRate { | 1194 class TierRate { |
1216 /** | 1195 /// Usage is priced at this rate only after this amount. |
1217 * Usage is priced at this rate only after this amount. | 1196 /// Example: start_usage_amount of 10 indicates that the usage will be priced |
1218 * Example: start_usage_amount of 10 indicates that the usage will be priced | 1197 /// at the unit_price after the first 10 usage_units. |
1219 * at the unit_price after the first 10 usage_units. | |
1220 */ | |
1221 core.double startUsageAmount; | 1198 core.double startUsageAmount; |
1222 /** | 1199 |
1223 * The price per unit of usage. | 1200 /// The price per unit of usage. |
1224 * Example: unit_price of amount $10 indicates that each unit will cost $10. | 1201 /// Example: unit_price of amount $10 indicates that each unit will cost $10. |
1225 */ | |
1226 Money unitPrice; | 1202 Money unitPrice; |
1227 | 1203 |
1228 TierRate(); | 1204 TierRate(); |
1229 | 1205 |
1230 TierRate.fromJson(core.Map _json) { | 1206 TierRate.fromJson(core.Map _json) { |
1231 if (_json.containsKey("startUsageAmount")) { | 1207 if (_json.containsKey("startUsageAmount")) { |
1232 startUsageAmount = _json["startUsageAmount"]; | 1208 startUsageAmount = _json["startUsageAmount"]; |
1233 } | 1209 } |
1234 if (_json.containsKey("unitPrice")) { | 1210 if (_json.containsKey("unitPrice")) { |
1235 unitPrice = new Money.fromJson(_json["unitPrice"]); | 1211 unitPrice = new Money.fromJson(_json["unitPrice"]); |
1236 } | 1212 } |
1237 } | 1213 } |
1238 | 1214 |
1239 core.Map<core.String, core.Object> toJson() { | 1215 core.Map<core.String, core.Object> toJson() { |
1240 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1216 final core.Map<core.String, core.Object> _json = |
| 1217 new core.Map<core.String, core.Object>(); |
1241 if (startUsageAmount != null) { | 1218 if (startUsageAmount != null) { |
1242 _json["startUsageAmount"] = startUsageAmount; | 1219 _json["startUsageAmount"] = startUsageAmount; |
1243 } | 1220 } |
1244 if (unitPrice != null) { | 1221 if (unitPrice != null) { |
1245 _json["unitPrice"] = (unitPrice).toJson(); | 1222 _json["unitPrice"] = (unitPrice).toJson(); |
1246 } | 1223 } |
1247 return _json; | 1224 return _json; |
1248 } | 1225 } |
1249 } | 1226 } |
OLD | NEW |