Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: generated/googleapis/lib/cloudresourcemanager/v1.dart

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.cloudresourcemanager.v1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:crypto/crypto.dart' as crypto;
11 import 'package:http/http.dart' as http;
12
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 ApiRequestError, DetailedApiRequestError;
15
16 const core.String USER_AGENT = 'dart-api-client cloudresourcemanager/v1';
17
18 /**
19 * The Google Cloud Resource Manager API provides methods for creating, reading,
20 * and updating project metadata.
21 */
22 class CloudresourcemanagerApi {
23 /** View and manage your data across Google Cloud Platform services */
24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
25
26 /** View your data across Google Cloud Platform services */
27 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo ud-platform.read-only";
28
29
30 final commons.ApiRequester _requester;
31
32 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
33
34 CloudresourcemanagerApi(http.Client client, {core.String rootUrl: "https://clo udresourcemanager.googleapis.com/", core.String servicePath: ""}) :
35 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
36 }
37
38
39 class ProjectsResourceApi {
40 final commons.ApiRequester _requester;
41
42 ProjectsResourceApi(commons.ApiRequester client) :
43 _requester = client;
44
45 /**
46 * Marks the Project identified by the specified `project_id` (for example,
47 * `my-project-123`) for deletion. This method will only affect the Project if
48 * the following criteria are met: + The Project does not have a billing
49 * account associated with it. + The Project has a lifecycle state of ACTIVE.
50 * This method changes the Project's lifecycle state from ACTIVE to
51 * DELETE_REQUESTED. The deletion starts at an unspecified time, at which
52 * point the lifecycle state changes to DELETE_IN_PROGRESS. Until the deletion
53 * completes, you can check the lifecycle state checked by retrieving the
54 * Project with GetProject, and the Project remains visible to ListProjects.
55 * However, you cannot update the project. After the deletion completes, the
56 * Project is not retrievable by the GetProject and ListProjects methods. The
57 * caller must have modify permissions for this Project.
58 *
59 * Request parameters:
60 *
61 * [projectId] - The Project ID (for example, `foo-bar-123`). Required.
62 *
63 * Completes with a [Empty].
64 *
65 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
66 * error.
67 *
68 * If the used [http.Client] completes with an error when making a REST call,
69 * this method will complete with the same error.
70 */
71 async.Future<Empty> delete(core.String projectId) {
72 var _url = null;
73 var _queryParams = new core.Map();
74 var _uploadMedia = null;
75 var _uploadOptions = null;
76 var _downloadOptions = commons.DownloadOptions.Metadata;
77 var _body = null;
78
79 if (projectId == null) {
80 throw new core.ArgumentError("Parameter projectId is required.");
81 }
82
83 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId');
84
85 var _response = _requester.request(_url,
86 "DELETE",
87 body: _body,
88 queryParams: _queryParams,
89 uploadOptions: _uploadOptions,
90 uploadMedia: _uploadMedia,
91 downloadOptions: _downloadOptions);
92 return _response.then((data) => new Empty.fromJson(data));
93 }
94
95 /**
96 * Retrieves the Project identified by the specified `project_id` (for
97 * example, `my-project-123`). The caller must have read permissions for this
98 * Project.
99 *
100 * Request parameters:
101 *
102 * [projectId] - The Project ID (for example, `my-project-123`). Required.
103 *
104 * Completes with a [Project].
105 *
106 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
107 * error.
108 *
109 * If the used [http.Client] completes with an error when making a REST call,
110 * this method will complete with the same error.
111 */
112 async.Future<Project> get(core.String projectId) {
113 var _url = null;
114 var _queryParams = new core.Map();
115 var _uploadMedia = null;
116 var _uploadOptions = null;
117 var _downloadOptions = commons.DownloadOptions.Metadata;
118 var _body = null;
119
120 if (projectId == null) {
121 throw new core.ArgumentError("Parameter projectId is required.");
122 }
123
124 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId');
125
126 var _response = _requester.request(_url,
127 "GET",
128 body: _body,
129 queryParams: _queryParams,
130 uploadOptions: _uploadOptions,
131 uploadMedia: _uploadMedia,
132 downloadOptions: _downloadOptions);
133 return _response.then((data) => new Project.fromJson(data));
134 }
135
136 /**
137 * Returns the IAM access control policy for the specified Project. Permission
138 * is denied if the policy or the resource does not exist.
139 *
140 * [request] - The metadata request object.
141 *
142 * Request parameters:
143 *
144 * [resource] - REQUIRED: The resource for which the policy is being
145 * requested. `resource` is usually specified as a path, such as `projects / *
146 * project * / zones / * zone * / disks / * disk*`. The format for the path
147 * specified in this value is resource specific and is specified in the
148 * `getIamPolicy` documentation.
149 *
150 * Completes with a [Policy].
151 *
152 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
153 * error.
154 *
155 * If the used [http.Client] completes with an error when making a REST call,
156 * this method will complete with the same error.
157 */
158 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res ource) {
159 var _url = null;
160 var _queryParams = new core.Map();
161 var _uploadMedia = null;
162 var _uploadOptions = null;
163 var _downloadOptions = commons.DownloadOptions.Metadata;
164 var _body = null;
165
166 if (request != null) {
167 _body = convert.JSON.encode((request).toJson());
168 }
169 if (resource == null) {
170 throw new core.ArgumentError("Parameter resource is required.");
171 }
172
173 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':getIa mPolicy';
174
175 var _response = _requester.request(_url,
176 "POST",
177 body: _body,
178 queryParams: _queryParams,
179 uploadOptions: _uploadOptions,
180 uploadMedia: _uploadMedia,
181 downloadOptions: _downloadOptions);
182 return _response.then((data) => new Policy.fromJson(data));
183 }
184
185 /**
186 * Lists Projects that are visible to the user and satisfy the specified
187 * filter. This method returns Projects in an unspecified order. New Projects
188 * do not necessarily appear at the end of the list.
189 *
190 * Request parameters:
191 *
192 * [pageToken] - A pagination token returned from a previous call to
193 * ListProjects that indicates from where listing should continue. Optional.
194 *
195 * [pageSize] - The maximum number of Projects to return in the response. The
196 * server can return fewer Projects than requested. If unspecified, server
197 * picks an appropriate default. Optional.
198 *
199 * [filter] - An expression for filtering the results of the request. Filter
200 * rules are case insensitive. The fields eligible for filtering are: + `name`
201 * + `id` + labels.key where *key* is the name of a label Some examples of
202 * using labels as filters: |Filter|Description| |------|-----------|
203 * |name:*|The project has a name.| |name:Howl|The project's name is `Howl` or
204 * `howl`.| |name:HOWL|Equivalent to above.| |NAME:howl|Equivalent to above.|
205 * |labels.color:*|The project has the label `color`.| |labels.color:red|The
206 * project's label `color` has the value `red`.|
207 * |labels.color:red label.size:big|The project's label `color` has the value
208 * `red` and its label `size` has the value `big`. Optional.
209 *
210 * Completes with a [ListProjectsResponse].
211 *
212 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
213 * error.
214 *
215 * If the used [http.Client] completes with an error when making a REST call,
216 * this method will complete with the same error.
217 */
218 async.Future<ListProjectsResponse> list({core.String pageToken, core.int pageS ize, core.String filter}) {
219 var _url = null;
220 var _queryParams = new core.Map();
221 var _uploadMedia = null;
222 var _uploadOptions = null;
223 var _downloadOptions = commons.DownloadOptions.Metadata;
224 var _body = null;
225
226 if (pageToken != null) {
227 _queryParams["pageToken"] = [pageToken];
228 }
229 if (pageSize != null) {
230 _queryParams["pageSize"] = ["${pageSize}"];
231 }
232 if (filter != null) {
233 _queryParams["filter"] = [filter];
234 }
235
236 _url = 'v1/projects';
237
238 var _response = _requester.request(_url,
239 "GET",
240 body: _body,
241 queryParams: _queryParams,
242 uploadOptions: _uploadOptions,
243 uploadMedia: _uploadMedia,
244 downloadOptions: _downloadOptions);
245 return _response.then((data) => new ListProjectsResponse.fromJson(data));
246 }
247
248 /**
249 * Sets the IAM access control policy for the specified Project. Replaces any
250 * existing policy. The following constraints apply when using
251 * `setIamPolicy()`: + Project currently supports only `user:{emailid}` and
252 * `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be
253 * added as an `owner`, a user must be invited via Cloud Platform console and
254 * must accept the invitation. + Members cannot be added to more than one role
255 * in the same policy. + There must be at least one owner who has accepted the
256 * Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
257 * to remove the last ToS-accepted owner from the policy will fail. + Calling
258 * this method requires enabling the App Engine Admin API. Note: Removing
259 * service accounts from policies or changing their roles can render services
260 * completely inoperable. It is important to understand how the service
261 * account is being used before removing or updating its roles.
262 *
263 * [request] - The metadata request object.
264 *
265 * Request parameters:
266 *
267 * [resource] - REQUIRED: The resource for which the policy is being
268 * specified. `resource` is usually specified as a path, such as `projects / *
269 * project * / zones / * zone * / disks / * disk*`. The format for the path
270 * specified in this value is resource specific and is specified in the
271 * `setIamPolicy` documentation.
272 *
273 * Completes with a [Policy].
274 *
275 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
276 * error.
277 *
278 * If the used [http.Client] completes with an error when making a REST call,
279 * this method will complete with the same error.
280 */
281 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
282 var _url = null;
283 var _queryParams = new core.Map();
284 var _uploadMedia = null;
285 var _uploadOptions = null;
286 var _downloadOptions = commons.DownloadOptions.Metadata;
287 var _body = null;
288
289 if (request != null) {
290 _body = convert.JSON.encode((request).toJson());
291 }
292 if (resource == null) {
293 throw new core.ArgumentError("Parameter resource is required.");
294 }
295
296 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':setIa mPolicy';
297
298 var _response = _requester.request(_url,
299 "POST",
300 body: _body,
301 queryParams: _queryParams,
302 uploadOptions: _uploadOptions,
303 uploadMedia: _uploadMedia,
304 downloadOptions: _downloadOptions);
305 return _response.then((data) => new Policy.fromJson(data));
306 }
307
308 /**
309 * Returns permissions that a caller has on the specified Project.
310 *
311 * [request] - The metadata request object.
312 *
313 * Request parameters:
314 *
315 * [resource] - REQUIRED: The resource for which the policy detail is being
316 * requested. `resource` is usually specified as a path, such as `projects / *
317 * project * / zones / * zone * / disks / * disk*`. The format for the path
318 * specified in this value is resource specific and is specified in the
319 * `testIamPermissions` documentation.
320 *
321 * Completes with a [TestIamPermissionsResponse].
322 *
323 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
324 * error.
325 *
326 * If the used [http.Client] completes with an error when making a REST call,
327 * this method will complete with the same error.
328 */
329 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) {
330 var _url = null;
331 var _queryParams = new core.Map();
332 var _uploadMedia = null;
333 var _uploadOptions = null;
334 var _downloadOptions = commons.DownloadOptions.Metadata;
335 var _body = null;
336
337 if (request != null) {
338 _body = convert.JSON.encode((request).toJson());
339 }
340 if (resource == null) {
341 throw new core.ArgumentError("Parameter resource is required.");
342 }
343
344 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':testI amPermissions';
345
346 var _response = _requester.request(_url,
347 "POST",
348 body: _body,
349 queryParams: _queryParams,
350 uploadOptions: _uploadOptions,
351 uploadMedia: _uploadMedia,
352 downloadOptions: _downloadOptions);
353 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data ));
354 }
355
356 /**
357 * Restores the Project identified by the specified `project_id` (for example,
358 * `my-project-123`). You can only use this method for a Project that has a
359 * lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by
360 * a lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored.
361 * The caller must have modify permissions for this Project.
362 *
363 * [request] - The metadata request object.
364 *
365 * Request parameters:
366 *
367 * [projectId] - The project ID (for example, `foo-bar-123`). Required.
368 *
369 * Completes with a [Empty].
370 *
371 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
372 * error.
373 *
374 * If the used [http.Client] completes with an error when making a REST call,
375 * this method will complete with the same error.
376 */
377 async.Future<Empty> undelete(UndeleteProjectRequest request, core.String proje ctId) {
378 var _url = null;
379 var _queryParams = new core.Map();
380 var _uploadMedia = null;
381 var _uploadOptions = null;
382 var _downloadOptions = commons.DownloadOptions.Metadata;
383 var _body = null;
384
385 if (request != null) {
386 _body = convert.JSON.encode((request).toJson());
387 }
388 if (projectId == null) {
389 throw new core.ArgumentError("Parameter projectId is required.");
390 }
391
392 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':unde lete';
393
394 var _response = _requester.request(_url,
395 "POST",
396 body: _body,
397 queryParams: _queryParams,
398 uploadOptions: _uploadOptions,
399 uploadMedia: _uploadMedia,
400 downloadOptions: _downloadOptions);
401 return _response.then((data) => new Empty.fromJson(data));
402 }
403
404 /**
405 * Updates the attributes of the Project identified by the specified
406 * `project_id` (for example, `my-project-123`). The caller must have modify
407 * permissions for this Project.
408 *
409 * [request] - The metadata request object.
410 *
411 * Request parameters:
412 *
413 * [projectId] - The project ID (for example, `my-project-123`). Required.
414 *
415 * Completes with a [Project].
416 *
417 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
418 * error.
419 *
420 * If the used [http.Client] completes with an error when making a REST call,
421 * this method will complete with the same error.
422 */
423 async.Future<Project> update(Project request, core.String projectId) {
424 var _url = null;
425 var _queryParams = new core.Map();
426 var _uploadMedia = null;
427 var _uploadOptions = null;
428 var _downloadOptions = commons.DownloadOptions.Metadata;
429 var _body = null;
430
431 if (request != null) {
432 _body = convert.JSON.encode((request).toJson());
433 }
434 if (projectId == null) {
435 throw new core.ArgumentError("Parameter projectId is required.");
436 }
437
438 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId');
439
440 var _response = _requester.request(_url,
441 "PUT",
442 body: _body,
443 queryParams: _queryParams,
444 uploadOptions: _uploadOptions,
445 uploadMedia: _uploadMedia,
446 downloadOptions: _downloadOptions);
447 return _response.then((data) => new Project.fromJson(data));
448 }
449
450 }
451
452
453
454 /** Associates `members` with a `role`. */
455 class Binding {
456 /**
457 * Specifies the identities requesting access for a Cloud Platform resource.
458 * `members` can have the following values: * `allUsers`: A special identifier
459 * that represents anyone who is on the internet; with or without a Google
460 * account. * `allAuthenticatedUsers`: A special identifier that represents
461 * anyone who is authenticated with a Google account or a service account. *
462 * `user:{emailid}`: An email address that represents a specific Google
463 * account. For example, `alice@gmail.com` or `joe@example.com`. *
464 * `serviceAccount:{emailid}`: An email address that represents a service
465 * account. For example, `my-other-app@appspot.gserviceaccount.com`. *
466 * `group:{emailid}`: An email address that represents a Google group. For
467 * example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain
468 * name that represents all the users of that domain. For example,
469 * `google.com` or `example.com`.
470 */
471 core.List<core.String> members;
472 /**
473 * Role that is assigned to `members`. For example, `roles/viewer`,
474 * `roles/editor`, or `roles/owner`. Required
475 */
476 core.String role;
477
478 Binding();
479
480 Binding.fromJson(core.Map _json) {
481 if (_json.containsKey("members")) {
482 members = _json["members"];
483 }
484 if (_json.containsKey("role")) {
485 role = _json["role"];
486 }
487 }
488
489 core.Map toJson() {
490 var _json = new core.Map();
491 if (members != null) {
492 _json["members"] = members;
493 }
494 if (role != null) {
495 _json["role"] = role;
496 }
497 return _json;
498 }
499 }
500
501 /**
502 * A generic empty message that you can re-use to avoid defining duplicated
503 * empty messages in your APIs. A typical example is to use it as the request or
504 * the response type of an API method. For instance: service Foo { rpc
505 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON
506 * representation for `Empty` is empty JSON object `{}`.
507 */
508 class Empty {
509
510 Empty();
511
512 Empty.fromJson(core.Map _json) {
513 }
514
515 core.Map toJson() {
516 var _json = new core.Map();
517 return _json;
518 }
519 }
520
521 /** Request message for `GetIamPolicy` method. */
522 class GetIamPolicyRequest {
523
524 GetIamPolicyRequest();
525
526 GetIamPolicyRequest.fromJson(core.Map _json) {
527 }
528
529 core.Map toJson() {
530 var _json = new core.Map();
531 return _json;
532 }
533 }
534
535 /**
536 * A page of the response received from the ListProjects method. A paginated
537 * response where more pages are available has `next_page_token` set. This token
538 * can be used in a subsequent request to retrieve the next request page.
539 */
540 class ListProjectsResponse {
541 /**
542 * Pagination token. If the result set is too large to fit in a single
543 * response, this token is returned. It encodes the position of the current
544 * result cursor. Feeding this value into a new list request with the
545 * `page_token` parameter gives the next page of the results. When
546 * `next_page_token` is not filled in, there is no next page and the list
547 * returned is the last page in the result set. Pagination tokens have a
548 * limited lifetime.
549 */
550 core.String nextPageToken;
551 /**
552 * The list of Projects that matched the list filter. This list can be
553 * paginated.
554 */
555 core.List<Project> projects;
556
557 ListProjectsResponse();
558
559 ListProjectsResponse.fromJson(core.Map _json) {
560 if (_json.containsKey("nextPageToken")) {
561 nextPageToken = _json["nextPageToken"];
562 }
563 if (_json.containsKey("projects")) {
564 projects = _json["projects"].map((value) => new Project.fromJson(value)).t oList();
565 }
566 }
567
568 core.Map toJson() {
569 var _json = new core.Map();
570 if (nextPageToken != null) {
571 _json["nextPageToken"] = nextPageToken;
572 }
573 if (projects != null) {
574 _json["projects"] = projects.map((value) => (value).toJson()).toList();
575 }
576 return _json;
577 }
578 }
579
580 /**
581 * Defines an Identity and Access Management (IAM) policy. It is used to specify
582 * access control policies for Cloud Platform resources. A `Policy` consists of
583 * a list of `bindings`. A `Binding` binds a list of `members` to a `role`,
584 * where the members can be user accounts, Google groups, Google domains, and
585 * service accounts. A `role` is a named list of permissions defined by IAM.
586 * **Example** { "bindings": [ { "role": "roles/owner", "members": [
587 * "user:mike@example.com", "group:admins@example.com", "domain:google.com",
588 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role":
589 * "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description
590 * of IAM and its features, see the [IAM developer's
591 * guide](https://cloud.google.com/iam).
592 */
593 class Policy {
594 /**
595 * Associates a list of `members` to a `role`. Multiple `bindings` must not be
596 * specified for the same `role`. `bindings` with no members will result in an
597 * error.
598 */
599 core.List<Binding> bindings;
600 /**
601 * `etag` is used for optimistic concurrency control as a way to help prevent
602 * simultaneous updates of a policy from overwriting each other. It is
603 * strongly suggested that systems make use of the `etag` in the
604 * read-modify-write cycle to perform policy updates in order to avoid race
605 * conditions: An `etag` is returned in the response to `getIamPolicy`, and
606 * systems are expected to put that etag in the request to `setIamPolicy` to
607 * ensure that their change will be applied to the same version of the policy.
608 * If no `etag` is provided in the call to `setIamPolicy`, then the existing
609 * policy is overwritten blindly.
610 */
611 core.String etag;
612 core.List<core.int> get etagAsBytes {
613 return crypto.CryptoUtils.base64StringToBytes(etag);
614 }
615
616 void set etagAsBytes(core.List<core.int> _bytes) {
617 etag = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
618 }
619 /** Version of the `Policy`. The default version is 0. */
620 core.int version;
621
622 Policy();
623
624 Policy.fromJson(core.Map _json) {
625 if (_json.containsKey("bindings")) {
626 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList();
627 }
628 if (_json.containsKey("etag")) {
629 etag = _json["etag"];
630 }
631 if (_json.containsKey("version")) {
632 version = _json["version"];
633 }
634 }
635
636 core.Map toJson() {
637 var _json = new core.Map();
638 if (bindings != null) {
639 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
640 }
641 if (etag != null) {
642 _json["etag"] = etag;
643 }
644 if (version != null) {
645 _json["version"] = version;
646 }
647 return _json;
648 }
649 }
650
651 /**
652 * A Project is a high-level Google Cloud Platform entity. It is a container for
653 * ACLs, APIs, AppEngine Apps, VMs, and other Google Cloud Platform resources.
654 */
655 class Project {
656 /** Creation time. Read-only. */
657 core.String createTime;
658 /**
659 * The labels associated with this Project. Label keys must be between 1 and
660 * 63 characters long and must conform to the following regular expression:
661 * \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. Label values must be between 0 and 63
662 * characters long and must conform to the regular expression
663 * (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. No more than 256 labels can be
664 * associated with a given resource. Clients should store labels in a
665 * representation such as JSON that does not depend on specific characters
666 * being disallowed. Example: "environment" : "dev" Read-write.
667 */
668 core.Map<core.String, core.String> labels;
669 /**
670 * The Project lifecycle state. Read-only.
671 * Possible string values are:
672 * - "LIFECYCLE_STATE_UNSPECIFIED" : A LIFECYCLE_STATE_UNSPECIFIED.
673 * - "ACTIVE" : A ACTIVE.
674 * - "DELETE_REQUESTED" : A DELETE_REQUESTED.
675 * - "DELETE_IN_PROGRESS" : A DELETE_IN_PROGRESS.
676 */
677 core.String lifecycleState;
678 /**
679 * The user-assigned name of the Project. It must be 4 to 30 characters.
680 * Allowed characters are: lowercase and uppercase letters, numbers, hyphen,
681 * single-quote, double-quote, space, and exclamation point. Example: My
682 * Project Read-write.
683 */
684 core.String name;
685 /**
686 * An optional reference to a parent Resource. The only supported parent type
687 * is "organization". Once set, the parent cannot be modified. Read-write.
688 */
689 ResourceId parent;
690 /**
691 * The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase
692 * letters, digits, or hyphens. It must start with a letter. Trailing hyphens
693 * are prohibited. Example: tokyo-rain-123 Read-only after creation.
694 */
695 core.String projectId;
696 /**
697 * The number uniquely identifying the project. Example: 415104041262
698 * Read-only.
699 */
700 core.String projectNumber;
701
702 Project();
703
704 Project.fromJson(core.Map _json) {
705 if (_json.containsKey("createTime")) {
706 createTime = _json["createTime"];
707 }
708 if (_json.containsKey("labels")) {
709 labels = _json["labels"];
710 }
711 if (_json.containsKey("lifecycleState")) {
712 lifecycleState = _json["lifecycleState"];
713 }
714 if (_json.containsKey("name")) {
715 name = _json["name"];
716 }
717 if (_json.containsKey("parent")) {
718 parent = new ResourceId.fromJson(_json["parent"]);
719 }
720 if (_json.containsKey("projectId")) {
721 projectId = _json["projectId"];
722 }
723 if (_json.containsKey("projectNumber")) {
724 projectNumber = _json["projectNumber"];
725 }
726 }
727
728 core.Map toJson() {
729 var _json = new core.Map();
730 if (createTime != null) {
731 _json["createTime"] = createTime;
732 }
733 if (labels != null) {
734 _json["labels"] = labels;
735 }
736 if (lifecycleState != null) {
737 _json["lifecycleState"] = lifecycleState;
738 }
739 if (name != null) {
740 _json["name"] = name;
741 }
742 if (parent != null) {
743 _json["parent"] = (parent).toJson();
744 }
745 if (projectId != null) {
746 _json["projectId"] = projectId;
747 }
748 if (projectNumber != null) {
749 _json["projectNumber"] = projectNumber;
750 }
751 return _json;
752 }
753 }
754
755 /**
756 * A container to reference an id for any resource type. A `resource` in Google
757 * Cloud Platform is a generic term for something you (a developer) may want to
758 * interact with through one of our API's. Some examples are an AppEngine app, a
759 * Compute Engine instance, a Cloud SQL database, and so on.
760 */
761 class ResourceId {
762 /**
763 * Required field for the type-specific id. This should correspond to the id
764 * used in the type-specific API's.
765 */
766 core.String id;
767 /**
768 * Required field representing the resource type this id is for. At present,
769 * the only valid type is "organization".
770 */
771 core.String type;
772
773 ResourceId();
774
775 ResourceId.fromJson(core.Map _json) {
776 if (_json.containsKey("id")) {
777 id = _json["id"];
778 }
779 if (_json.containsKey("type")) {
780 type = _json["type"];
781 }
782 }
783
784 core.Map toJson() {
785 var _json = new core.Map();
786 if (id != null) {
787 _json["id"] = id;
788 }
789 if (type != null) {
790 _json["type"] = type;
791 }
792 return _json;
793 }
794 }
795
796 /** Request message for `SetIamPolicy` method. */
797 class SetIamPolicyRequest {
798 /**
799 * REQUIRED: The complete policy to be applied to the `resource`. The size of
800 * the policy is limited to a few 10s of KB. An empty policy is a valid policy
801 * but certain Cloud Platform services (such as Projects) might reject them.
802 */
803 Policy policy;
804
805 SetIamPolicyRequest();
806
807 SetIamPolicyRequest.fromJson(core.Map _json) {
808 if (_json.containsKey("policy")) {
809 policy = new Policy.fromJson(_json["policy"]);
810 }
811 }
812
813 core.Map toJson() {
814 var _json = new core.Map();
815 if (policy != null) {
816 _json["policy"] = (policy).toJson();
817 }
818 return _json;
819 }
820 }
821
822 /** Request message for `TestIamPermissions` method. */
823 class TestIamPermissionsRequest {
824 /**
825 * The set of permissions to check for the `resource`. Permissions with
826 * wildcards (such as '*' or 'storage.*') are not allowed. For more
827 * information see IAM Overview.
828 */
829 core.List<core.String> permissions;
830
831 TestIamPermissionsRequest();
832
833 TestIamPermissionsRequest.fromJson(core.Map _json) {
834 if (_json.containsKey("permissions")) {
835 permissions = _json["permissions"];
836 }
837 }
838
839 core.Map toJson() {
840 var _json = new core.Map();
841 if (permissions != null) {
842 _json["permissions"] = permissions;
843 }
844 return _json;
845 }
846 }
847
848 /** Response message for `TestIamPermissions` method. */
849 class TestIamPermissionsResponse {
850 /**
851 * A subset of `TestPermissionsRequest.permissions` that the caller is
852 * allowed.
853 */
854 core.List<core.String> permissions;
855
856 TestIamPermissionsResponse();
857
858 TestIamPermissionsResponse.fromJson(core.Map _json) {
859 if (_json.containsKey("permissions")) {
860 permissions = _json["permissions"];
861 }
862 }
863
864 core.Map toJson() {
865 var _json = new core.Map();
866 if (permissions != null) {
867 _json["permissions"] = permissions;
868 }
869 return _json;
870 }
871 }
872
873 /** The request sent to the UndeleteProject method. */
874 class UndeleteProjectRequest {
875
876 UndeleteProjectRequest();
877
878 UndeleteProjectRequest.fromJson(core.Map _json) {
879 }
880
881 core.Map toJson() {
882 var _json = new core.Map();
883 return _json;
884 }
885 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/cloudlatencytest/v2.dart ('k') | generated/googleapis/lib/compute/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698