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

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

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 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
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.iam.v1; 3 library googleapis.iam.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 iam/v1'; 15 const core.String USER_AGENT = 'dart-api-client iam/v1';
16 16
17 /** 17 /// Manages identity and access control for Google Cloud Platform resources,
18 * Manages identity and access control for Google Cloud Platform resources, 18 /// including the creation of service accounts, which you can use to
19 * including the creation of service accounts, which you can use to authenticate 19 /// authenticate to Google and make API calls.
20 * to Google and make API calls.
21 */
22 class IamApi { 20 class IamApi {
23 /** View and manage your data across Google Cloud Platform services */ 21 /// View and manage your data across Google Cloud Platform services
24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 22 static const CloudPlatformScope =
25 23 "https://www.googleapis.com/auth/cloud-platform";
26 24
27 final commons.ApiRequester _requester; 25 final commons.ApiRequester _requester;
28 26
29 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re quester); 27 OrganizationsResourceApi get organizations =>
30 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r); 28 new OrganizationsResourceApi(_requester);
29 PermissionsResourceApi get permissions =>
30 new PermissionsResourceApi(_requester);
31 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 31 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
32 RolesResourceApi get roles => new RolesResourceApi(_requester); 32 RolesResourceApi get roles => new RolesResourceApi(_requester);
33 33
34 IamApi(http.Client client, {core.String rootUrl: "https://iam.googleapis.com/" , core.String servicePath: ""}) : 34 IamApi(http.Client client,
35 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 35 {core.String rootUrl: "https://iam.googleapis.com/",
36 core.String servicePath: ""})
37 : _requester =
38 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
36 } 39 }
37 40
38
39 class OrganizationsResourceApi { 41 class OrganizationsResourceApi {
40 final commons.ApiRequester _requester; 42 final commons.ApiRequester _requester;
41 43
42 OrganizationsRolesResourceApi get roles => new OrganizationsRolesResourceApi(_ requester); 44 OrganizationsRolesResourceApi get roles =>
45 new OrganizationsRolesResourceApi(_requester);
43 46
44 OrganizationsResourceApi(commons.ApiRequester client) : 47 OrganizationsResourceApi(commons.ApiRequester client) : _requester = client;
45 _requester = client;
46 } 48 }
47 49
48
49 class OrganizationsRolesResourceApi { 50 class OrganizationsRolesResourceApi {
50 final commons.ApiRequester _requester; 51 final commons.ApiRequester _requester;
51 52
52 OrganizationsRolesResourceApi(commons.ApiRequester client) : 53 OrganizationsRolesResourceApi(commons.ApiRequester client)
53 _requester = client; 54 : _requester = client;
54 55
55 /** 56 /// Creates a new Role.
56 * Creates a new Role. 57 ///
57 * 58 /// [request] - The metadata request object.
58 * [request] - The metadata request object. 59 ///
59 * 60 /// Request parameters:
60 * Request parameters: 61 ///
61 * 62 /// [parent] - The resource name of the parent resource in one of the
62 * [parent] - The resource name of the parent resource in one of the following 63 /// following formats:
63 * formats: 64 /// `organizations/{ORGANIZATION_ID}`
64 * `organizations/{ORGANIZATION_ID}` 65 /// `projects/{PROJECT_ID}`
65 * `projects/{PROJECT_ID}` 66 /// Value must have pattern "^organizations/[^/]+$".
66 * Value must have pattern "^organizations/[^/]+$". 67 ///
67 * 68 /// Completes with a [Role].
68 * Completes with a [Role]. 69 ///
69 * 70 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
70 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 71 /// an error.
71 * error. 72 ///
72 * 73 /// If the used [http.Client] completes with an error when making a REST
73 * If the used [http.Client] completes with an error when making a REST call, 74 /// call, this method will complete with the same error.
74 * this method will complete with the same error.
75 */
76 async.Future<Role> create(CreateRoleRequest request, core.String parent) { 75 async.Future<Role> create(CreateRoleRequest request, core.String parent) {
77 var _url = null; 76 var _url = null;
78 var _queryParams = new core.Map(); 77 var _queryParams = new core.Map();
79 var _uploadMedia = null; 78 var _uploadMedia = null;
80 var _uploadOptions = null; 79 var _uploadOptions = null;
81 var _downloadOptions = commons.DownloadOptions.Metadata; 80 var _downloadOptions = commons.DownloadOptions.Metadata;
82 var _body = null; 81 var _body = null;
83 82
84 if (request != null) { 83 if (request != null) {
85 _body = convert.JSON.encode((request).toJson()); 84 _body = convert.JSON.encode((request).toJson());
86 } 85 }
87 if (parent == null) { 86 if (parent == null) {
88 throw new core.ArgumentError("Parameter parent is required."); 87 throw new core.ArgumentError("Parameter parent is required.");
89 } 88 }
90 89
91 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; 90 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
92 91
93 var _response = _requester.request(_url, 92 var _response = _requester.request(_url, "POST",
94 "POST", 93 body: _body,
95 body: _body, 94 queryParams: _queryParams,
96 queryParams: _queryParams, 95 uploadOptions: _uploadOptions,
97 uploadOptions: _uploadOptions, 96 uploadMedia: _uploadMedia,
98 uploadMedia: _uploadMedia, 97 downloadOptions: _downloadOptions);
99 downloadOptions: _downloadOptions);
100 return _response.then((data) => new Role.fromJson(data)); 98 return _response.then((data) => new Role.fromJson(data));
101 } 99 }
102 100
103 /** 101 /// Soft deletes a role. The role is suspended and cannot be used to create
104 * Soft deletes a role. The role is suspended and cannot be used to create new 102 /// new
105 * IAM Policy Bindings. 103 /// IAM Policy Bindings.
106 * The Role will not be included in `ListRoles()` unless `show_deleted` is set 104 /// The Role will not be included in `ListRoles()` unless `show_deleted` is
107 * in the `ListRolesRequest`. The Role contains the deleted boolean set. 105 /// set
108 * Existing Bindings remains, but are inactive. The Role can be undeleted 106 /// in the `ListRolesRequest`. The Role contains the deleted boolean set.
109 * within 7 days. After 7 days the Role is deleted and all Bindings associated 107 /// Existing Bindings remains, but are inactive. The Role can be undeleted
110 * with the role are removed. 108 /// within 7 days. After 7 days the Role is deleted and all Bindings
111 * 109 /// associated
112 * Request parameters: 110 /// with the role are removed.
113 * 111 ///
114 * [name] - The resource name of the role in one of the following formats: 112 /// Request parameters:
115 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 113 ///
116 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 114 /// [name] - The resource name of the role in one of the following formats:
117 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$". 115 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
118 * 116 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
119 * [etag] - Used to perform a consistent read-modify-write. 117 /// Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
120 * 118 ///
121 * Completes with a [Role]. 119 /// [etag] - Used to perform a consistent read-modify-write.
122 * 120 ///
123 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 121 /// Completes with a [Role].
124 * error. 122 ///
125 * 123 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
126 * If the used [http.Client] completes with an error when making a REST call, 124 /// an error.
127 * this method will complete with the same error. 125 ///
128 */ 126 /// If the used [http.Client] completes with an error when making a REST
127 /// call, this method will complete with the same error.
129 async.Future<Role> delete(core.String name, {core.String etag}) { 128 async.Future<Role> delete(core.String name, {core.String etag}) {
130 var _url = null; 129 var _url = null;
131 var _queryParams = new core.Map(); 130 var _queryParams = new core.Map();
132 var _uploadMedia = null; 131 var _uploadMedia = null;
133 var _uploadOptions = null; 132 var _uploadOptions = null;
134 var _downloadOptions = commons.DownloadOptions.Metadata; 133 var _downloadOptions = commons.DownloadOptions.Metadata;
135 var _body = null; 134 var _body = null;
136 135
137 if (name == null) { 136 if (name == null) {
138 throw new core.ArgumentError("Parameter name is required."); 137 throw new core.ArgumentError("Parameter name is required.");
139 } 138 }
140 if (etag != null) { 139 if (etag != null) {
141 _queryParams["etag"] = [etag]; 140 _queryParams["etag"] = [etag];
142 } 141 }
143 142
144 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 143 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
145 144
146 var _response = _requester.request(_url, 145 var _response = _requester.request(_url, "DELETE",
147 "DELETE", 146 body: _body,
148 body: _body, 147 queryParams: _queryParams,
149 queryParams: _queryParams, 148 uploadOptions: _uploadOptions,
150 uploadOptions: _uploadOptions, 149 uploadMedia: _uploadMedia,
151 uploadMedia: _uploadMedia, 150 downloadOptions: _downloadOptions);
152 downloadOptions: _downloadOptions);
153 return _response.then((data) => new Role.fromJson(data)); 151 return _response.then((data) => new Role.fromJson(data));
154 } 152 }
155 153
156 /** 154 /// Gets a Role definition.
157 * Gets a Role definition. 155 ///
158 * 156 /// Request parameters:
159 * Request parameters: 157 ///
160 * 158 /// [name] - The resource name of the role in one of the following formats:
161 * [name] - The resource name of the role in one of the following formats: 159 /// `roles/{ROLE_NAME}`
162 * `roles/{ROLE_NAME}` 160 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
163 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 161 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
164 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 162 /// Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
165 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$". 163 ///
166 * 164 /// Completes with a [Role].
167 * Completes with a [Role]. 165 ///
168 * 166 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 167 /// an error.
170 * error. 168 ///
171 * 169 /// If the used [http.Client] completes with an error when making a REST
172 * If the used [http.Client] completes with an error when making a REST call, 170 /// call, this method will complete with the same error.
173 * this method will complete with the same error.
174 */
175 async.Future<Role> get(core.String name) { 171 async.Future<Role> get(core.String name) {
176 var _url = null; 172 var _url = null;
177 var _queryParams = new core.Map(); 173 var _queryParams = new core.Map();
178 var _uploadMedia = null; 174 var _uploadMedia = null;
179 var _uploadOptions = null; 175 var _uploadOptions = null;
180 var _downloadOptions = commons.DownloadOptions.Metadata; 176 var _downloadOptions = commons.DownloadOptions.Metadata;
181 var _body = null; 177 var _body = null;
182 178
183 if (name == null) { 179 if (name == null) {
184 throw new core.ArgumentError("Parameter name is required."); 180 throw new core.ArgumentError("Parameter name is required.");
185 } 181 }
186 182
187 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 183 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
188 184
189 var _response = _requester.request(_url, 185 var _response = _requester.request(_url, "GET",
190 "GET", 186 body: _body,
191 body: _body, 187 queryParams: _queryParams,
192 queryParams: _queryParams, 188 uploadOptions: _uploadOptions,
193 uploadOptions: _uploadOptions, 189 uploadMedia: _uploadMedia,
194 uploadMedia: _uploadMedia, 190 downloadOptions: _downloadOptions);
195 downloadOptions: _downloadOptions);
196 return _response.then((data) => new Role.fromJson(data)); 191 return _response.then((data) => new Role.fromJson(data));
197 } 192 }
198 193
199 /** 194 /// Lists the Roles defined on a resource.
200 * Lists the Roles defined on a resource. 195 ///
201 * 196 /// Request parameters:
202 * Request parameters: 197 ///
203 * 198 /// [parent] - The resource name of the parent resource in one of the
204 * [parent] - The resource name of the parent resource in one of the following 199 /// following formats:
205 * formats: 200 /// `` (empty string) -- this refers to curated roles.
206 * `` (empty string) -- this refers to curated roles. 201 /// `organizations/{ORGANIZATION_ID}`
207 * `organizations/{ORGANIZATION_ID}` 202 /// `projects/{PROJECT_ID}`
208 * `projects/{PROJECT_ID}` 203 /// Value must have pattern "^organizations/[^/]+$".
209 * Value must have pattern "^organizations/[^/]+$". 204 ///
210 * 205 /// [showDeleted] - Include Roles that have been deleted.
211 * [showDeleted] - Include Roles that have been deleted. 206 ///
212 * 207 /// [pageToken] - Optional pagination token returned in an earlier
213 * [pageToken] - Optional pagination token returned in an earlier 208 /// ListRolesResponse.
214 * ListRolesResponse. 209 ///
215 * 210 /// [pageSize] - Optional limit on the number of roles to include in the
216 * [pageSize] - Optional limit on the number of roles to include in the 211 /// response.
217 * response. 212 ///
218 * 213 /// [view] - Optional view for the returned Role objects.
219 * [view] - Optional view for the returned Role objects. 214 /// Possible string values are:
220 * Possible string values are: 215 /// - "BASIC" : A BASIC.
221 * - "BASIC" : A BASIC. 216 /// - "FULL" : A FULL.
222 * - "FULL" : A FULL. 217 ///
223 * 218 /// Completes with a [ListRolesResponse].
224 * Completes with a [ListRolesResponse]. 219 ///
225 * 220 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 221 /// an error.
227 * error. 222 ///
228 * 223 /// If the used [http.Client] completes with an error when making a REST
229 * If the used [http.Client] completes with an error when making a REST call, 224 /// call, this method will complete with the same error.
230 * this method will complete with the same error. 225 async.Future<ListRolesResponse> list(core.String parent,
231 */ 226 {core.bool showDeleted,
232 async.Future<ListRolesResponse> list(core.String parent, {core.bool showDelete d, core.String pageToken, core.int pageSize, core.String view}) { 227 core.String pageToken,
228 core.int pageSize,
229 core.String view}) {
233 var _url = null; 230 var _url = null;
234 var _queryParams = new core.Map(); 231 var _queryParams = new core.Map();
235 var _uploadMedia = null; 232 var _uploadMedia = null;
236 var _uploadOptions = null; 233 var _uploadOptions = null;
237 var _downloadOptions = commons.DownloadOptions.Metadata; 234 var _downloadOptions = commons.DownloadOptions.Metadata;
238 var _body = null; 235 var _body = null;
239 236
240 if (parent == null) { 237 if (parent == null) {
241 throw new core.ArgumentError("Parameter parent is required."); 238 throw new core.ArgumentError("Parameter parent is required.");
242 } 239 }
243 if (showDeleted != null) { 240 if (showDeleted != null) {
244 _queryParams["showDeleted"] = ["${showDeleted}"]; 241 _queryParams["showDeleted"] = ["${showDeleted}"];
245 } 242 }
246 if (pageToken != null) { 243 if (pageToken != null) {
247 _queryParams["pageToken"] = [pageToken]; 244 _queryParams["pageToken"] = [pageToken];
248 } 245 }
249 if (pageSize != null) { 246 if (pageSize != null) {
250 _queryParams["pageSize"] = ["${pageSize}"]; 247 _queryParams["pageSize"] = ["${pageSize}"];
251 } 248 }
252 if (view != null) { 249 if (view != null) {
253 _queryParams["view"] = [view]; 250 _queryParams["view"] = [view];
254 } 251 }
255 252
256 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; 253 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
257 254
258 var _response = _requester.request(_url, 255 var _response = _requester.request(_url, "GET",
259 "GET", 256 body: _body,
260 body: _body, 257 queryParams: _queryParams,
261 queryParams: _queryParams, 258 uploadOptions: _uploadOptions,
262 uploadOptions: _uploadOptions, 259 uploadMedia: _uploadMedia,
263 uploadMedia: _uploadMedia, 260 downloadOptions: _downloadOptions);
264 downloadOptions: _downloadOptions);
265 return _response.then((data) => new ListRolesResponse.fromJson(data)); 261 return _response.then((data) => new ListRolesResponse.fromJson(data));
266 } 262 }
267 263
268 /** 264 /// Updates a Role definition.
269 * Updates a Role definition. 265 ///
270 * 266 /// [request] - The metadata request object.
271 * [request] - The metadata request object. 267 ///
272 * 268 /// Request parameters:
273 * Request parameters: 269 ///
274 * 270 /// [name] - The resource name of the role in one of the following formats:
275 * [name] - The resource name of the role in one of the following formats: 271 /// `roles/{ROLE_NAME}`
276 * `roles/{ROLE_NAME}` 272 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
277 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 273 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
278 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 274 /// Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
279 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$". 275 ///
280 * 276 /// [updateMask] - A mask describing which fields in the Role have changed.
281 * [updateMask] - A mask describing which fields in the Role have changed. 277 ///
282 * 278 /// Completes with a [Role].
283 * Completes with a [Role]. 279 ///
284 * 280 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
285 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 281 /// an error.
286 * error. 282 ///
287 * 283 /// If the used [http.Client] completes with an error when making a REST
288 * If the used [http.Client] completes with an error when making a REST call, 284 /// call, this method will complete with the same error.
289 * this method will complete with the same error. 285 async.Future<Role> patch(Role request, core.String name,
290 */ 286 {core.String updateMask}) {
291 async.Future<Role> patch(Role request, core.String name, {core.String updateMa sk}) {
292 var _url = null; 287 var _url = null;
293 var _queryParams = new core.Map(); 288 var _queryParams = new core.Map();
294 var _uploadMedia = null; 289 var _uploadMedia = null;
295 var _uploadOptions = null; 290 var _uploadOptions = null;
296 var _downloadOptions = commons.DownloadOptions.Metadata; 291 var _downloadOptions = commons.DownloadOptions.Metadata;
297 var _body = null; 292 var _body = null;
298 293
299 if (request != null) { 294 if (request != null) {
300 _body = convert.JSON.encode((request).toJson()); 295 _body = convert.JSON.encode((request).toJson());
301 } 296 }
302 if (name == null) { 297 if (name == null) {
303 throw new core.ArgumentError("Parameter name is required."); 298 throw new core.ArgumentError("Parameter name is required.");
304 } 299 }
305 if (updateMask != null) { 300 if (updateMask != null) {
306 _queryParams["updateMask"] = [updateMask]; 301 _queryParams["updateMask"] = [updateMask];
307 } 302 }
308 303
309 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 304 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
310 305
311 var _response = _requester.request(_url, 306 var _response = _requester.request(_url, "PATCH",
312 "PATCH", 307 body: _body,
313 body: _body, 308 queryParams: _queryParams,
314 queryParams: _queryParams, 309 uploadOptions: _uploadOptions,
315 uploadOptions: _uploadOptions, 310 uploadMedia: _uploadMedia,
316 uploadMedia: _uploadMedia, 311 downloadOptions: _downloadOptions);
317 downloadOptions: _downloadOptions);
318 return _response.then((data) => new Role.fromJson(data)); 312 return _response.then((data) => new Role.fromJson(data));
319 } 313 }
320 314
321 /** 315 /// Undelete a Role, bringing it back in its previous state.
322 * Undelete a Role, bringing it back in its previous state. 316 ///
323 * 317 /// [request] - The metadata request object.
324 * [request] - The metadata request object. 318 ///
325 * 319 /// Request parameters:
326 * Request parameters: 320 ///
327 * 321 /// [name] - The resource name of the role in one of the following formats:
328 * [name] - The resource name of the role in one of the following formats: 322 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
329 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 323 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
330 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 324 /// Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
331 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$". 325 ///
332 * 326 /// Completes with a [Role].
333 * Completes with a [Role]. 327 ///
334 * 328 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 329 /// an error.
336 * error. 330 ///
337 * 331 /// If the used [http.Client] completes with an error when making a REST
338 * If the used [http.Client] completes with an error when making a REST call, 332 /// call, this method will complete with the same error.
339 * this method will complete with the same error.
340 */
341 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) { 333 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) {
342 var _url = null; 334 var _url = null;
343 var _queryParams = new core.Map(); 335 var _queryParams = new core.Map();
344 var _uploadMedia = null; 336 var _uploadMedia = null;
345 var _uploadOptions = null; 337 var _uploadOptions = null;
346 var _downloadOptions = commons.DownloadOptions.Metadata; 338 var _downloadOptions = commons.DownloadOptions.Metadata;
347 var _body = null; 339 var _body = null;
348 340
349 if (request != null) { 341 if (request != null) {
350 _body = convert.JSON.encode((request).toJson()); 342 _body = convert.JSON.encode((request).toJson());
351 } 343 }
352 if (name == null) { 344 if (name == null) {
353 throw new core.ArgumentError("Parameter name is required."); 345 throw new core.ArgumentError("Parameter name is required.");
354 } 346 }
355 347
356 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete'; 348 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete';
357 349
358 var _response = _requester.request(_url, 350 var _response = _requester.request(_url, "POST",
359 "POST", 351 body: _body,
360 body: _body, 352 queryParams: _queryParams,
361 queryParams: _queryParams, 353 uploadOptions: _uploadOptions,
362 uploadOptions: _uploadOptions, 354 uploadMedia: _uploadMedia,
363 uploadMedia: _uploadMedia, 355 downloadOptions: _downloadOptions);
364 downloadOptions: _downloadOptions);
365 return _response.then((data) => new Role.fromJson(data)); 356 return _response.then((data) => new Role.fromJson(data));
366 } 357 }
367
368 } 358 }
369 359
370
371 class PermissionsResourceApi { 360 class PermissionsResourceApi {
372 final commons.ApiRequester _requester; 361 final commons.ApiRequester _requester;
373 362
374 PermissionsResourceApi(commons.ApiRequester client) : 363 PermissionsResourceApi(commons.ApiRequester client) : _requester = client;
375 _requester = client;
376 364
377 /** 365 /// Lists the permissions testable on a resource.
378 * Lists the permissions testable on a resource. 366 /// A permission is testable if it can be tested for an identity on a
379 * A permission is testable if it can be tested for an identity on a resource. 367 /// resource.
380 * 368 ///
381 * [request] - The metadata request object. 369 /// [request] - The metadata request object.
382 * 370 ///
383 * Request parameters: 371 /// Request parameters:
384 * 372 ///
385 * Completes with a [QueryTestablePermissionsResponse]. 373 /// Completes with a [QueryTestablePermissionsResponse].
386 * 374 ///
387 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 375 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
388 * error. 376 /// an error.
389 * 377 ///
390 * If the used [http.Client] completes with an error when making a REST call, 378 /// If the used [http.Client] completes with an error when making a REST
391 * this method will complete with the same error. 379 /// call, this method will complete with the same error.
392 */ 380 async.Future<QueryTestablePermissionsResponse> queryTestablePermissions(
393 async.Future<QueryTestablePermissionsResponse> queryTestablePermissions(QueryT establePermissionsRequest request) { 381 QueryTestablePermissionsRequest request) {
394 var _url = null; 382 var _url = null;
395 var _queryParams = new core.Map(); 383 var _queryParams = new core.Map();
396 var _uploadMedia = null; 384 var _uploadMedia = null;
397 var _uploadOptions = null; 385 var _uploadOptions = null;
398 var _downloadOptions = commons.DownloadOptions.Metadata; 386 var _downloadOptions = commons.DownloadOptions.Metadata;
399 var _body = null; 387 var _body = null;
400 388
401 if (request != null) { 389 if (request != null) {
402 _body = convert.JSON.encode((request).toJson()); 390 _body = convert.JSON.encode((request).toJson());
403 } 391 }
404 392
405 _url = 'v1/permissions:queryTestablePermissions'; 393 _url = 'v1/permissions:queryTestablePermissions';
406 394
407 var _response = _requester.request(_url, 395 var _response = _requester.request(_url, "POST",
408 "POST", 396 body: _body,
409 body: _body, 397 queryParams: _queryParams,
410 queryParams: _queryParams, 398 uploadOptions: _uploadOptions,
411 uploadOptions: _uploadOptions, 399 uploadMedia: _uploadMedia,
412 uploadMedia: _uploadMedia, 400 downloadOptions: _downloadOptions);
413 downloadOptions: _downloadOptions); 401 return _response
414 return _response.then((data) => new QueryTestablePermissionsResponse.fromJso n(data)); 402 .then((data) => new QueryTestablePermissionsResponse.fromJson(data));
415 } 403 }
416
417 } 404 }
418 405
419
420 class ProjectsResourceApi { 406 class ProjectsResourceApi {
421 final commons.ApiRequester _requester; 407 final commons.ApiRequester _requester;
422 408
423 ProjectsRolesResourceApi get roles => new ProjectsRolesResourceApi(_requester) ; 409 ProjectsRolesResourceApi get roles =>
424 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA ccountsResourceApi(_requester); 410 new ProjectsRolesResourceApi(_requester);
411 ProjectsServiceAccountsResourceApi get serviceAccounts =>
412 new ProjectsServiceAccountsResourceApi(_requester);
425 413
426 ProjectsResourceApi(commons.ApiRequester client) : 414 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
427 _requester = client;
428 } 415 }
429 416
430
431 class ProjectsRolesResourceApi { 417 class ProjectsRolesResourceApi {
432 final commons.ApiRequester _requester; 418 final commons.ApiRequester _requester;
433 419
434 ProjectsRolesResourceApi(commons.ApiRequester client) : 420 ProjectsRolesResourceApi(commons.ApiRequester client) : _requester = client;
435 _requester = client;
436 421
437 /** 422 /// Creates a new Role.
438 * Creates a new Role. 423 ///
439 * 424 /// [request] - The metadata request object.
440 * [request] - The metadata request object. 425 ///
441 * 426 /// Request parameters:
442 * Request parameters: 427 ///
443 * 428 /// [parent] - The resource name of the parent resource in one of the
444 * [parent] - The resource name of the parent resource in one of the following 429 /// following formats:
445 * formats: 430 /// `organizations/{ORGANIZATION_ID}`
446 * `organizations/{ORGANIZATION_ID}` 431 /// `projects/{PROJECT_ID}`
447 * `projects/{PROJECT_ID}` 432 /// Value must have pattern "^projects/[^/]+$".
448 * Value must have pattern "^projects/[^/]+$". 433 ///
449 * 434 /// Completes with a [Role].
450 * Completes with a [Role]. 435 ///
451 * 436 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
452 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 437 /// an error.
453 * error. 438 ///
454 * 439 /// If the used [http.Client] completes with an error when making a REST
455 * If the used [http.Client] completes with an error when making a REST call, 440 /// call, this method will complete with the same error.
456 * this method will complete with the same error.
457 */
458 async.Future<Role> create(CreateRoleRequest request, core.String parent) { 441 async.Future<Role> create(CreateRoleRequest request, core.String parent) {
459 var _url = null; 442 var _url = null;
460 var _queryParams = new core.Map(); 443 var _queryParams = new core.Map();
461 var _uploadMedia = null; 444 var _uploadMedia = null;
462 var _uploadOptions = null; 445 var _uploadOptions = null;
463 var _downloadOptions = commons.DownloadOptions.Metadata; 446 var _downloadOptions = commons.DownloadOptions.Metadata;
464 var _body = null; 447 var _body = null;
465 448
466 if (request != null) { 449 if (request != null) {
467 _body = convert.JSON.encode((request).toJson()); 450 _body = convert.JSON.encode((request).toJson());
468 } 451 }
469 if (parent == null) { 452 if (parent == null) {
470 throw new core.ArgumentError("Parameter parent is required."); 453 throw new core.ArgumentError("Parameter parent is required.");
471 } 454 }
472 455
473 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; 456 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
474 457
475 var _response = _requester.request(_url, 458 var _response = _requester.request(_url, "POST",
476 "POST", 459 body: _body,
477 body: _body, 460 queryParams: _queryParams,
478 queryParams: _queryParams, 461 uploadOptions: _uploadOptions,
479 uploadOptions: _uploadOptions, 462 uploadMedia: _uploadMedia,
480 uploadMedia: _uploadMedia, 463 downloadOptions: _downloadOptions);
481 downloadOptions: _downloadOptions);
482 return _response.then((data) => new Role.fromJson(data)); 464 return _response.then((data) => new Role.fromJson(data));
483 } 465 }
484 466
485 /** 467 /// Soft deletes a role. The role is suspended and cannot be used to create
486 * Soft deletes a role. The role is suspended and cannot be used to create new 468 /// new
487 * IAM Policy Bindings. 469 /// IAM Policy Bindings.
488 * The Role will not be included in `ListRoles()` unless `show_deleted` is set 470 /// The Role will not be included in `ListRoles()` unless `show_deleted` is
489 * in the `ListRolesRequest`. The Role contains the deleted boolean set. 471 /// set
490 * Existing Bindings remains, but are inactive. The Role can be undeleted 472 /// in the `ListRolesRequest`. The Role contains the deleted boolean set.
491 * within 7 days. After 7 days the Role is deleted and all Bindings associated 473 /// Existing Bindings remains, but are inactive. The Role can be undeleted
492 * with the role are removed. 474 /// within 7 days. After 7 days the Role is deleted and all Bindings
493 * 475 /// associated
494 * Request parameters: 476 /// with the role are removed.
495 * 477 ///
496 * [name] - The resource name of the role in one of the following formats: 478 /// Request parameters:
497 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 479 ///
498 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 480 /// [name] - The resource name of the role in one of the following formats:
499 * Value must have pattern "^projects/[^/]+/roles/[^/]+$". 481 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
500 * 482 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
501 * [etag] - Used to perform a consistent read-modify-write. 483 /// Value must have pattern "^projects/[^/]+/roles/[^/]+$".
502 * 484 ///
503 * Completes with a [Role]. 485 /// [etag] - Used to perform a consistent read-modify-write.
504 * 486 ///
505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 487 /// Completes with a [Role].
506 * error. 488 ///
507 * 489 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
508 * If the used [http.Client] completes with an error when making a REST call, 490 /// an error.
509 * this method will complete with the same error. 491 ///
510 */ 492 /// If the used [http.Client] completes with an error when making a REST
493 /// call, this method will complete with the same error.
511 async.Future<Role> delete(core.String name, {core.String etag}) { 494 async.Future<Role> delete(core.String name, {core.String etag}) {
512 var _url = null; 495 var _url = null;
513 var _queryParams = new core.Map(); 496 var _queryParams = new core.Map();
514 var _uploadMedia = null; 497 var _uploadMedia = null;
515 var _uploadOptions = null; 498 var _uploadOptions = null;
516 var _downloadOptions = commons.DownloadOptions.Metadata; 499 var _downloadOptions = commons.DownloadOptions.Metadata;
517 var _body = null; 500 var _body = null;
518 501
519 if (name == null) { 502 if (name == null) {
520 throw new core.ArgumentError("Parameter name is required."); 503 throw new core.ArgumentError("Parameter name is required.");
521 } 504 }
522 if (etag != null) { 505 if (etag != null) {
523 _queryParams["etag"] = [etag]; 506 _queryParams["etag"] = [etag];
524 } 507 }
525 508
526 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 509 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
527 510
528 var _response = _requester.request(_url, 511 var _response = _requester.request(_url, "DELETE",
529 "DELETE", 512 body: _body,
530 body: _body, 513 queryParams: _queryParams,
531 queryParams: _queryParams, 514 uploadOptions: _uploadOptions,
532 uploadOptions: _uploadOptions, 515 uploadMedia: _uploadMedia,
533 uploadMedia: _uploadMedia, 516 downloadOptions: _downloadOptions);
534 downloadOptions: _downloadOptions);
535 return _response.then((data) => new Role.fromJson(data)); 517 return _response.then((data) => new Role.fromJson(data));
536 } 518 }
537 519
538 /** 520 /// Gets a Role definition.
539 * Gets a Role definition. 521 ///
540 * 522 /// Request parameters:
541 * Request parameters: 523 ///
542 * 524 /// [name] - The resource name of the role in one of the following formats:
543 * [name] - The resource name of the role in one of the following formats: 525 /// `roles/{ROLE_NAME}`
544 * `roles/{ROLE_NAME}` 526 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
545 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 527 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
546 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 528 /// Value must have pattern "^projects/[^/]+/roles/[^/]+$".
547 * Value must have pattern "^projects/[^/]+/roles/[^/]+$". 529 ///
548 * 530 /// Completes with a [Role].
549 * Completes with a [Role]. 531 ///
550 * 532 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
551 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 533 /// an error.
552 * error. 534 ///
553 * 535 /// If the used [http.Client] completes with an error when making a REST
554 * If the used [http.Client] completes with an error when making a REST call, 536 /// call, this method will complete with the same error.
555 * this method will complete with the same error.
556 */
557 async.Future<Role> get(core.String name) { 537 async.Future<Role> get(core.String name) {
558 var _url = null; 538 var _url = null;
559 var _queryParams = new core.Map(); 539 var _queryParams = new core.Map();
560 var _uploadMedia = null; 540 var _uploadMedia = null;
561 var _uploadOptions = null; 541 var _uploadOptions = null;
562 var _downloadOptions = commons.DownloadOptions.Metadata; 542 var _downloadOptions = commons.DownloadOptions.Metadata;
563 var _body = null; 543 var _body = null;
564 544
565 if (name == null) { 545 if (name == null) {
566 throw new core.ArgumentError("Parameter name is required."); 546 throw new core.ArgumentError("Parameter name is required.");
567 } 547 }
568 548
569 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 549 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
570 550
571 var _response = _requester.request(_url, 551 var _response = _requester.request(_url, "GET",
572 "GET", 552 body: _body,
573 body: _body, 553 queryParams: _queryParams,
574 queryParams: _queryParams, 554 uploadOptions: _uploadOptions,
575 uploadOptions: _uploadOptions, 555 uploadMedia: _uploadMedia,
576 uploadMedia: _uploadMedia, 556 downloadOptions: _downloadOptions);
577 downloadOptions: _downloadOptions);
578 return _response.then((data) => new Role.fromJson(data)); 557 return _response.then((data) => new Role.fromJson(data));
579 } 558 }
580 559
581 /** 560 /// Lists the Roles defined on a resource.
582 * Lists the Roles defined on a resource. 561 ///
583 * 562 /// Request parameters:
584 * Request parameters: 563 ///
585 * 564 /// [parent] - The resource name of the parent resource in one of the
586 * [parent] - The resource name of the parent resource in one of the following 565 /// following formats:
587 * formats: 566 /// `` (empty string) -- this refers to curated roles.
588 * `` (empty string) -- this refers to curated roles. 567 /// `organizations/{ORGANIZATION_ID}`
589 * `organizations/{ORGANIZATION_ID}` 568 /// `projects/{PROJECT_ID}`
590 * `projects/{PROJECT_ID}` 569 /// Value must have pattern "^projects/[^/]+$".
591 * Value must have pattern "^projects/[^/]+$". 570 ///
592 * 571 /// [pageToken] - Optional pagination token returned in an earlier
593 * [showDeleted] - Include Roles that have been deleted. 572 /// ListRolesResponse.
594 * 573 ///
595 * [pageToken] - Optional pagination token returned in an earlier 574 /// [pageSize] - Optional limit on the number of roles to include in the
596 * ListRolesResponse. 575 /// response.
597 * 576 ///
598 * [pageSize] - Optional limit on the number of roles to include in the 577 /// [view] - Optional view for the returned Role objects.
599 * response. 578 /// Possible string values are:
600 * 579 /// - "BASIC" : A BASIC.
601 * [view] - Optional view for the returned Role objects. 580 /// - "FULL" : A FULL.
602 * Possible string values are: 581 ///
603 * - "BASIC" : A BASIC. 582 /// [showDeleted] - Include Roles that have been deleted.
604 * - "FULL" : A FULL. 583 ///
605 * 584 /// Completes with a [ListRolesResponse].
606 * Completes with a [ListRolesResponse]. 585 ///
607 * 586 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
608 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 587 /// an error.
609 * error. 588 ///
610 * 589 /// If the used [http.Client] completes with an error when making a REST
611 * If the used [http.Client] completes with an error when making a REST call, 590 /// call, this method will complete with the same error.
612 * this method will complete with the same error. 591 async.Future<ListRolesResponse> list(core.String parent,
613 */ 592 {core.String pageToken,
614 async.Future<ListRolesResponse> list(core.String parent, {core.bool showDelete d, core.String pageToken, core.int pageSize, core.String view}) { 593 core.int pageSize,
594 core.String view,
595 core.bool showDeleted}) {
615 var _url = null; 596 var _url = null;
616 var _queryParams = new core.Map(); 597 var _queryParams = new core.Map();
617 var _uploadMedia = null; 598 var _uploadMedia = null;
618 var _uploadOptions = null; 599 var _uploadOptions = null;
619 var _downloadOptions = commons.DownloadOptions.Metadata; 600 var _downloadOptions = commons.DownloadOptions.Metadata;
620 var _body = null; 601 var _body = null;
621 602
622 if (parent == null) { 603 if (parent == null) {
623 throw new core.ArgumentError("Parameter parent is required."); 604 throw new core.ArgumentError("Parameter parent is required.");
624 } 605 }
625 if (showDeleted != null) {
626 _queryParams["showDeleted"] = ["${showDeleted}"];
627 }
628 if (pageToken != null) { 606 if (pageToken != null) {
629 _queryParams["pageToken"] = [pageToken]; 607 _queryParams["pageToken"] = [pageToken];
630 } 608 }
631 if (pageSize != null) { 609 if (pageSize != null) {
632 _queryParams["pageSize"] = ["${pageSize}"]; 610 _queryParams["pageSize"] = ["${pageSize}"];
633 } 611 }
634 if (view != null) { 612 if (view != null) {
635 _queryParams["view"] = [view]; 613 _queryParams["view"] = [view];
636 } 614 }
615 if (showDeleted != null) {
616 _queryParams["showDeleted"] = ["${showDeleted}"];
617 }
637 618
638 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles'; 619 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
639 620
640 var _response = _requester.request(_url, 621 var _response = _requester.request(_url, "GET",
641 "GET", 622 body: _body,
642 body: _body, 623 queryParams: _queryParams,
643 queryParams: _queryParams, 624 uploadOptions: _uploadOptions,
644 uploadOptions: _uploadOptions, 625 uploadMedia: _uploadMedia,
645 uploadMedia: _uploadMedia, 626 downloadOptions: _downloadOptions);
646 downloadOptions: _downloadOptions);
647 return _response.then((data) => new ListRolesResponse.fromJson(data)); 627 return _response.then((data) => new ListRolesResponse.fromJson(data));
648 } 628 }
649 629
650 /** 630 /// Updates a Role definition.
651 * Updates a Role definition. 631 ///
652 * 632 /// [request] - The metadata request object.
653 * [request] - The metadata request object. 633 ///
654 * 634 /// Request parameters:
655 * Request parameters: 635 ///
656 * 636 /// [name] - The resource name of the role in one of the following formats:
657 * [name] - The resource name of the role in one of the following formats: 637 /// `roles/{ROLE_NAME}`
658 * `roles/{ROLE_NAME}` 638 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
659 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 639 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
660 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 640 /// Value must have pattern "^projects/[^/]+/roles/[^/]+$".
661 * Value must have pattern "^projects/[^/]+/roles/[^/]+$". 641 ///
662 * 642 /// [updateMask] - A mask describing which fields in the Role have changed.
663 * [updateMask] - A mask describing which fields in the Role have changed. 643 ///
664 * 644 /// Completes with a [Role].
665 * Completes with a [Role]. 645 ///
666 * 646 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 647 /// an error.
668 * error. 648 ///
669 * 649 /// If the used [http.Client] completes with an error when making a REST
670 * If the used [http.Client] completes with an error when making a REST call, 650 /// call, this method will complete with the same error.
671 * this method will complete with the same error. 651 async.Future<Role> patch(Role request, core.String name,
672 */ 652 {core.String updateMask}) {
673 async.Future<Role> patch(Role request, core.String name, {core.String updateMa sk}) {
674 var _url = null; 653 var _url = null;
675 var _queryParams = new core.Map(); 654 var _queryParams = new core.Map();
676 var _uploadMedia = null; 655 var _uploadMedia = null;
677 var _uploadOptions = null; 656 var _uploadOptions = null;
678 var _downloadOptions = commons.DownloadOptions.Metadata; 657 var _downloadOptions = commons.DownloadOptions.Metadata;
679 var _body = null; 658 var _body = null;
680 659
681 if (request != null) { 660 if (request != null) {
682 _body = convert.JSON.encode((request).toJson()); 661 _body = convert.JSON.encode((request).toJson());
683 } 662 }
684 if (name == null) { 663 if (name == null) {
685 throw new core.ArgumentError("Parameter name is required."); 664 throw new core.ArgumentError("Parameter name is required.");
686 } 665 }
687 if (updateMask != null) { 666 if (updateMask != null) {
688 _queryParams["updateMask"] = [updateMask]; 667 _queryParams["updateMask"] = [updateMask];
689 } 668 }
690 669
691 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 670 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
692 671
693 var _response = _requester.request(_url, 672 var _response = _requester.request(_url, "PATCH",
694 "PATCH", 673 body: _body,
695 body: _body, 674 queryParams: _queryParams,
696 queryParams: _queryParams, 675 uploadOptions: _uploadOptions,
697 uploadOptions: _uploadOptions, 676 uploadMedia: _uploadMedia,
698 uploadMedia: _uploadMedia, 677 downloadOptions: _downloadOptions);
699 downloadOptions: _downloadOptions);
700 return _response.then((data) => new Role.fromJson(data)); 678 return _response.then((data) => new Role.fromJson(data));
701 } 679 }
702 680
703 /** 681 /// Undelete a Role, bringing it back in its previous state.
704 * Undelete a Role, bringing it back in its previous state. 682 ///
705 * 683 /// [request] - The metadata request object.
706 * [request] - The metadata request object. 684 ///
707 * 685 /// Request parameters:
708 * Request parameters: 686 ///
709 * 687 /// [name] - The resource name of the role in one of the following formats:
710 * [name] - The resource name of the role in one of the following formats: 688 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
711 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 689 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
712 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 690 /// Value must have pattern "^projects/[^/]+/roles/[^/]+$".
713 * Value must have pattern "^projects/[^/]+/roles/[^/]+$". 691 ///
714 * 692 /// Completes with a [Role].
715 * Completes with a [Role]. 693 ///
716 * 694 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
717 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 695 /// an error.
718 * error. 696 ///
719 * 697 /// If the used [http.Client] completes with an error when making a REST
720 * If the used [http.Client] completes with an error when making a REST call, 698 /// call, this method will complete with the same error.
721 * this method will complete with the same error.
722 */
723 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) { 699 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) {
724 var _url = null; 700 var _url = null;
725 var _queryParams = new core.Map(); 701 var _queryParams = new core.Map();
726 var _uploadMedia = null; 702 var _uploadMedia = null;
727 var _uploadOptions = null; 703 var _uploadOptions = null;
728 var _downloadOptions = commons.DownloadOptions.Metadata; 704 var _downloadOptions = commons.DownloadOptions.Metadata;
729 var _body = null; 705 var _body = null;
730 706
731 if (request != null) { 707 if (request != null) {
732 _body = convert.JSON.encode((request).toJson()); 708 _body = convert.JSON.encode((request).toJson());
733 } 709 }
734 if (name == null) { 710 if (name == null) {
735 throw new core.ArgumentError("Parameter name is required."); 711 throw new core.ArgumentError("Parameter name is required.");
736 } 712 }
737 713
738 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete'; 714 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete';
739 715
740 var _response = _requester.request(_url, 716 var _response = _requester.request(_url, "POST",
741 "POST", 717 body: _body,
742 body: _body, 718 queryParams: _queryParams,
743 queryParams: _queryParams, 719 uploadOptions: _uploadOptions,
744 uploadOptions: _uploadOptions, 720 uploadMedia: _uploadMedia,
745 uploadMedia: _uploadMedia, 721 downloadOptions: _downloadOptions);
746 downloadOptions: _downloadOptions);
747 return _response.then((data) => new Role.fromJson(data)); 722 return _response.then((data) => new Role.fromJson(data));
748 } 723 }
749
750 } 724 }
751 725
752
753 class ProjectsServiceAccountsResourceApi { 726 class ProjectsServiceAccountsResourceApi {
754 final commons.ApiRequester _requester; 727 final commons.ApiRequester _requester;
755 728
756 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts KeysResourceApi(_requester); 729 ProjectsServiceAccountsKeysResourceApi get keys =>
730 new ProjectsServiceAccountsKeysResourceApi(_requester);
757 731
758 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) : 732 ProjectsServiceAccountsResourceApi(commons.ApiRequester client)
759 _requester = client; 733 : _requester = client;
760 734
761 /** 735 /// Creates a ServiceAccount
762 * Creates a ServiceAccount 736 /// and returns it.
763 * and returns it. 737 ///
764 * 738 /// [request] - The metadata request object.
765 * [request] - The metadata request object. 739 ///
766 * 740 /// Request parameters:
767 * Request parameters: 741 ///
768 * 742 /// [name] - Required. The resource name of the project associated with the
769 * [name] - Required. The resource name of the project associated with the 743 /// service
770 * service 744 /// accounts, such as `projects/my-project-123`.
771 * accounts, such as `projects/my-project-123`. 745 /// Value must have pattern "^projects/[^/]+$".
772 * Value must have pattern "^projects/[^/]+$". 746 ///
773 * 747 /// Completes with a [ServiceAccount].
774 * Completes with a [ServiceAccount]. 748 ///
775 * 749 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
776 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 750 /// an error.
777 * error. 751 ///
778 * 752 /// If the used [http.Client] completes with an error when making a REST
779 * If the used [http.Client] completes with an error when making a REST call, 753 /// call, this method will complete with the same error.
780 * this method will complete with the same error. 754 async.Future<ServiceAccount> create(
781 */ 755 CreateServiceAccountRequest request, core.String name) {
782 async.Future<ServiceAccount> create(CreateServiceAccountRequest request, core. String name) {
783 var _url = null; 756 var _url = null;
784 var _queryParams = new core.Map(); 757 var _queryParams = new core.Map();
785 var _uploadMedia = null; 758 var _uploadMedia = null;
786 var _uploadOptions = null; 759 var _uploadOptions = null;
787 var _downloadOptions = commons.DownloadOptions.Metadata; 760 var _downloadOptions = commons.DownloadOptions.Metadata;
788 var _body = null; 761 var _body = null;
789 762
790 if (request != null) { 763 if (request != null) {
791 _body = convert.JSON.encode((request).toJson()); 764 _body = convert.JSON.encode((request).toJson());
792 } 765 }
793 if (name == null) { 766 if (name == null) {
794 throw new core.ArgumentError("Parameter name is required."); 767 throw new core.ArgumentError("Parameter name is required.");
795 } 768 }
796 769
797 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/serviceAcc ounts'; 770 _url = 'v1/' +
771 commons.Escaper.ecapeVariableReserved('$name') +
772 '/serviceAccounts';
798 773
799 var _response = _requester.request(_url, 774 var _response = _requester.request(_url, "POST",
800 "POST", 775 body: _body,
801 body: _body, 776 queryParams: _queryParams,
802 queryParams: _queryParams, 777 uploadOptions: _uploadOptions,
803 uploadOptions: _uploadOptions, 778 uploadMedia: _uploadMedia,
804 uploadMedia: _uploadMedia, 779 downloadOptions: _downloadOptions);
805 downloadOptions: _downloadOptions);
806 return _response.then((data) => new ServiceAccount.fromJson(data)); 780 return _response.then((data) => new ServiceAccount.fromJson(data));
807 } 781 }
808 782
809 /** 783 /// Deletes a ServiceAccount.
810 * Deletes a ServiceAccount. 784 ///
811 * 785 /// Request parameters:
812 * Request parameters: 786 ///
813 * 787 /// [name] - The resource name of the service account in the following
814 * [name] - The resource name of the service account in the following format: 788 /// format:
815 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 789 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
816 * Using `-` as a wildcard for the project will infer the project from 790 /// Using `-` as a wildcard for the project will infer the project from
817 * the account. The `account` value can be the `email` address or the 791 /// the account. The `account` value can be the `email` address or the
818 * `unique_id` of the service account. 792 /// `unique_id` of the service account.
819 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 793 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
820 * 794 ///
821 * Completes with a [Empty]. 795 /// Completes with a [Empty].
822 * 796 ///
823 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 797 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
824 * error. 798 /// an error.
825 * 799 ///
826 * If the used [http.Client] completes with an error when making a REST call, 800 /// If the used [http.Client] completes with an error when making a REST
827 * this method will complete with the same error. 801 /// call, this method will complete with the same error.
828 */
829 async.Future<Empty> delete(core.String name) { 802 async.Future<Empty> delete(core.String name) {
830 var _url = null; 803 var _url = null;
831 var _queryParams = new core.Map(); 804 var _queryParams = new core.Map();
832 var _uploadMedia = null; 805 var _uploadMedia = null;
833 var _uploadOptions = null; 806 var _uploadOptions = null;
834 var _downloadOptions = commons.DownloadOptions.Metadata; 807 var _downloadOptions = commons.DownloadOptions.Metadata;
835 var _body = null; 808 var _body = null;
836 809
837 if (name == null) { 810 if (name == null) {
838 throw new core.ArgumentError("Parameter name is required."); 811 throw new core.ArgumentError("Parameter name is required.");
839 } 812 }
840 813
841 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 814 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
842 815
843 var _response = _requester.request(_url, 816 var _response = _requester.request(_url, "DELETE",
844 "DELETE", 817 body: _body,
845 body: _body, 818 queryParams: _queryParams,
846 queryParams: _queryParams, 819 uploadOptions: _uploadOptions,
847 uploadOptions: _uploadOptions, 820 uploadMedia: _uploadMedia,
848 uploadMedia: _uploadMedia, 821 downloadOptions: _downloadOptions);
849 downloadOptions: _downloadOptions);
850 return _response.then((data) => new Empty.fromJson(data)); 822 return _response.then((data) => new Empty.fromJson(data));
851 } 823 }
852 824
853 /** 825 /// Gets a ServiceAccount.
854 * Gets a ServiceAccount. 826 ///
855 * 827 /// Request parameters:
856 * Request parameters: 828 ///
857 * 829 /// [name] - The resource name of the service account in the following
858 * [name] - The resource name of the service account in the following format: 830 /// format:
859 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 831 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
860 * Using `-` as a wildcard for the project will infer the project from 832 /// Using `-` as a wildcard for the project will infer the project from
861 * the account. The `account` value can be the `email` address or the 833 /// the account. The `account` value can be the `email` address or the
862 * `unique_id` of the service account. 834 /// `unique_id` of the service account.
863 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 835 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
864 * 836 ///
865 * Completes with a [ServiceAccount]. 837 /// Completes with a [ServiceAccount].
866 * 838 ///
867 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 839 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
868 * error. 840 /// an error.
869 * 841 ///
870 * If the used [http.Client] completes with an error when making a REST call, 842 /// If the used [http.Client] completes with an error when making a REST
871 * this method will complete with the same error. 843 /// call, this method will complete with the same error.
872 */
873 async.Future<ServiceAccount> get(core.String name) { 844 async.Future<ServiceAccount> get(core.String name) {
874 var _url = null; 845 var _url = null;
875 var _queryParams = new core.Map(); 846 var _queryParams = new core.Map();
876 var _uploadMedia = null; 847 var _uploadMedia = null;
877 var _uploadOptions = null; 848 var _uploadOptions = null;
878 var _downloadOptions = commons.DownloadOptions.Metadata; 849 var _downloadOptions = commons.DownloadOptions.Metadata;
879 var _body = null; 850 var _body = null;
880 851
881 if (name == null) { 852 if (name == null) {
882 throw new core.ArgumentError("Parameter name is required."); 853 throw new core.ArgumentError("Parameter name is required.");
883 } 854 }
884 855
885 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 856 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
886 857
887 var _response = _requester.request(_url, 858 var _response = _requester.request(_url, "GET",
888 "GET", 859 body: _body,
889 body: _body, 860 queryParams: _queryParams,
890 queryParams: _queryParams, 861 uploadOptions: _uploadOptions,
891 uploadOptions: _uploadOptions, 862 uploadMedia: _uploadMedia,
892 uploadMedia: _uploadMedia, 863 downloadOptions: _downloadOptions);
893 downloadOptions: _downloadOptions);
894 return _response.then((data) => new ServiceAccount.fromJson(data)); 864 return _response.then((data) => new ServiceAccount.fromJson(data));
895 } 865 }
896 866
897 /** 867 /// Returns the IAM access control policy for a
898 * Returns the IAM access control policy for a 868 /// ServiceAccount.
899 * ServiceAccount. 869 ///
900 * 870 /// Request parameters:
901 * Request parameters: 871 ///
902 * 872 /// [resource] - REQUIRED: The resource for which the policy is being
903 * [resource] - REQUIRED: The resource for which the policy is being 873 /// requested.
904 * requested. 874 /// See the operation documentation for the appropriate value for this field.
905 * See the operation documentation for the appropriate value for this field. 875 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
906 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 876 ///
907 * 877 /// Completes with a [Policy].
908 * Completes with a [Policy]. 878 ///
909 * 879 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
910 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 880 /// an error.
911 * error. 881 ///
912 * 882 /// If the used [http.Client] completes with an error when making a REST
913 * If the used [http.Client] completes with an error when making a REST call, 883 /// call, this method will complete with the same error.
914 * this method will complete with the same error.
915 */
916 async.Future<Policy> getIamPolicy(core.String resource) { 884 async.Future<Policy> getIamPolicy(core.String resource) {
917 var _url = null; 885 var _url = null;
918 var _queryParams = new core.Map(); 886 var _queryParams = new core.Map();
919 var _uploadMedia = null; 887 var _uploadMedia = null;
920 var _uploadOptions = null; 888 var _uploadOptions = null;
921 var _downloadOptions = commons.DownloadOptions.Metadata; 889 var _downloadOptions = commons.DownloadOptions.Metadata;
922 var _body = null; 890 var _body = null;
923 891
924 if (resource == null) { 892 if (resource == null) {
925 throw new core.ArgumentError("Parameter resource is required."); 893 throw new core.ArgumentError("Parameter resource is required.");
926 } 894 }
927 895
928 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam Policy'; 896 _url = 'v1/' +
897 commons.Escaper.ecapeVariableReserved('$resource') +
898 ':getIamPolicy';
929 899
930 var _response = _requester.request(_url, 900 var _response = _requester.request(_url, "POST",
931 "POST", 901 body: _body,
932 body: _body, 902 queryParams: _queryParams,
933 queryParams: _queryParams, 903 uploadOptions: _uploadOptions,
934 uploadOptions: _uploadOptions, 904 uploadMedia: _uploadMedia,
935 uploadMedia: _uploadMedia, 905 downloadOptions: _downloadOptions);
936 downloadOptions: _downloadOptions);
937 return _response.then((data) => new Policy.fromJson(data)); 906 return _response.then((data) => new Policy.fromJson(data));
938 } 907 }
939 908
940 /** 909 /// Lists ServiceAccounts for a project.
941 * Lists ServiceAccounts for a project. 910 ///
942 * 911 /// Request parameters:
943 * Request parameters: 912 ///
944 * 913 /// [name] - Required. The resource name of the project associated with the
945 * [name] - Required. The resource name of the project associated with the 914 /// service
946 * service 915 /// accounts, such as `projects/my-project-123`.
947 * accounts, such as `projects/my-project-123`. 916 /// Value must have pattern "^projects/[^/]+$".
948 * Value must have pattern "^projects/[^/]+$". 917 ///
949 * 918 /// [pageToken] - Optional pagination token returned in an earlier
950 * [pageToken] - Optional pagination token returned in an earlier 919 /// ListServiceAccountsResponse.next_page_token.
951 * ListServiceAccountsResponse.next_page_token. 920 ///
952 * 921 /// [pageSize] - Optional limit on the number of service accounts to include
953 * [pageSize] - Optional limit on the number of service accounts to include in 922 /// in the
954 * the 923 /// response. Further accounts can subsequently be obtained by including the
955 * response. Further accounts can subsequently be obtained by including the 924 /// ListServiceAccountsResponse.next_page_token
956 * ListServiceAccountsResponse.next_page_token 925 /// in a subsequent request.
957 * in a subsequent request. 926 ///
958 * 927 /// Completes with a [ListServiceAccountsResponse].
959 * Completes with a [ListServiceAccountsResponse]. 928 ///
960 * 929 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
961 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 930 /// an error.
962 * error. 931 ///
963 * 932 /// If the used [http.Client] completes with an error when making a REST
964 * If the used [http.Client] completes with an error when making a REST call, 933 /// call, this method will complete with the same error.
965 * this method will complete with the same error. 934 async.Future<ListServiceAccountsResponse> list(core.String name,
966 */ 935 {core.String pageToken, core.int pageSize}) {
967 async.Future<ListServiceAccountsResponse> list(core.String name, {core.String pageToken, core.int pageSize}) {
968 var _url = null; 936 var _url = null;
969 var _queryParams = new core.Map(); 937 var _queryParams = new core.Map();
970 var _uploadMedia = null; 938 var _uploadMedia = null;
971 var _uploadOptions = null; 939 var _uploadOptions = null;
972 var _downloadOptions = commons.DownloadOptions.Metadata; 940 var _downloadOptions = commons.DownloadOptions.Metadata;
973 var _body = null; 941 var _body = null;
974 942
975 if (name == null) { 943 if (name == null) {
976 throw new core.ArgumentError("Parameter name is required."); 944 throw new core.ArgumentError("Parameter name is required.");
977 } 945 }
978 if (pageToken != null) { 946 if (pageToken != null) {
979 _queryParams["pageToken"] = [pageToken]; 947 _queryParams["pageToken"] = [pageToken];
980 } 948 }
981 if (pageSize != null) { 949 if (pageSize != null) {
982 _queryParams["pageSize"] = ["${pageSize}"]; 950 _queryParams["pageSize"] = ["${pageSize}"];
983 } 951 }
984 952
985 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/serviceAcc ounts'; 953 _url = 'v1/' +
954 commons.Escaper.ecapeVariableReserved('$name') +
955 '/serviceAccounts';
986 956
987 var _response = _requester.request(_url, 957 var _response = _requester.request(_url, "GET",
988 "GET", 958 body: _body,
989 body: _body, 959 queryParams: _queryParams,
990 queryParams: _queryParams, 960 uploadOptions: _uploadOptions,
991 uploadOptions: _uploadOptions, 961 uploadMedia: _uploadMedia,
992 uploadMedia: _uploadMedia, 962 downloadOptions: _downloadOptions);
993 downloadOptions: _downloadOptions); 963 return _response
994 return _response.then((data) => new ListServiceAccountsResponse.fromJson(dat a)); 964 .then((data) => new ListServiceAccountsResponse.fromJson(data));
995 } 965 }
996 966
997 /** 967 /// Sets the IAM access control policy for a
998 * Sets the IAM access control policy for a 968 /// ServiceAccount.
999 * ServiceAccount. 969 ///
1000 * 970 /// [request] - The metadata request object.
1001 * [request] - The metadata request object. 971 ///
1002 * 972 /// Request parameters:
1003 * Request parameters: 973 ///
1004 * 974 /// [resource] - REQUIRED: The resource for which the policy is being
1005 * [resource] - REQUIRED: The resource for which the policy is being 975 /// specified.
1006 * specified. 976 /// See the operation documentation for the appropriate value for this field.
1007 * See the operation documentation for the appropriate value for this field. 977 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1008 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 978 ///
1009 * 979 /// Completes with a [Policy].
1010 * Completes with a [Policy]. 980 ///
1011 * 981 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1012 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 982 /// an error.
1013 * error. 983 ///
1014 * 984 /// If the used [http.Client] completes with an error when making a REST
1015 * If the used [http.Client] completes with an error when making a REST call, 985 /// call, this method will complete with the same error.
1016 * this method will complete with the same error. 986 async.Future<Policy> setIamPolicy(
1017 */ 987 SetIamPolicyRequest request, core.String resource) {
1018 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
1019 var _url = null; 988 var _url = null;
1020 var _queryParams = new core.Map(); 989 var _queryParams = new core.Map();
1021 var _uploadMedia = null; 990 var _uploadMedia = null;
1022 var _uploadOptions = null; 991 var _uploadOptions = null;
1023 var _downloadOptions = commons.DownloadOptions.Metadata; 992 var _downloadOptions = commons.DownloadOptions.Metadata;
1024 var _body = null; 993 var _body = null;
1025 994
1026 if (request != null) { 995 if (request != null) {
1027 _body = convert.JSON.encode((request).toJson()); 996 _body = convert.JSON.encode((request).toJson());
1028 } 997 }
1029 if (resource == null) { 998 if (resource == null) {
1030 throw new core.ArgumentError("Parameter resource is required."); 999 throw new core.ArgumentError("Parameter resource is required.");
1031 } 1000 }
1032 1001
1033 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam Policy'; 1002 _url = 'v1/' +
1003 commons.Escaper.ecapeVariableReserved('$resource') +
1004 ':setIamPolicy';
1034 1005
1035 var _response = _requester.request(_url, 1006 var _response = _requester.request(_url, "POST",
1036 "POST", 1007 body: _body,
1037 body: _body, 1008 queryParams: _queryParams,
1038 queryParams: _queryParams, 1009 uploadOptions: _uploadOptions,
1039 uploadOptions: _uploadOptions, 1010 uploadMedia: _uploadMedia,
1040 uploadMedia: _uploadMedia, 1011 downloadOptions: _downloadOptions);
1041 downloadOptions: _downloadOptions);
1042 return _response.then((data) => new Policy.fromJson(data)); 1012 return _response.then((data) => new Policy.fromJson(data));
1043 } 1013 }
1044 1014
1045 /** 1015 /// Signs a blob using a service account's system-managed private key.
1046 * Signs a blob using a service account's system-managed private key. 1016 ///
1047 * 1017 /// [request] - The metadata request object.
1048 * [request] - The metadata request object. 1018 ///
1049 * 1019 /// Request parameters:
1050 * Request parameters: 1020 ///
1051 * 1021 /// [name] - The resource name of the service account in the following
1052 * [name] - The resource name of the service account in the following format: 1022 /// format:
1053 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1023 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1054 * Using `-` as a wildcard for the project will infer the project from 1024 /// Using `-` as a wildcard for the project will infer the project from
1055 * the account. The `account` value can be the `email` address or the 1025 /// the account. The `account` value can be the `email` address or the
1056 * `unique_id` of the service account. 1026 /// `unique_id` of the service account.
1057 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1027 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1058 * 1028 ///
1059 * Completes with a [SignBlobResponse]. 1029 /// Completes with a [SignBlobResponse].
1060 * 1030 ///
1061 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1031 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1062 * error. 1032 /// an error.
1063 * 1033 ///
1064 * If the used [http.Client] completes with an error when making a REST call, 1034 /// If the used [http.Client] completes with an error when making a REST
1065 * this method will complete with the same error. 1035 /// call, this method will complete with the same error.
1066 */ 1036 async.Future<SignBlobResponse> signBlob(
1067 async.Future<SignBlobResponse> signBlob(SignBlobRequest request, core.String n ame) { 1037 SignBlobRequest request, core.String name) {
1068 var _url = null; 1038 var _url = null;
1069 var _queryParams = new core.Map(); 1039 var _queryParams = new core.Map();
1070 var _uploadMedia = null; 1040 var _uploadMedia = null;
1071 var _uploadOptions = null; 1041 var _uploadOptions = null;
1072 var _downloadOptions = commons.DownloadOptions.Metadata; 1042 var _downloadOptions = commons.DownloadOptions.Metadata;
1073 var _body = null; 1043 var _body = null;
1074 1044
1075 if (request != null) { 1045 if (request != null) {
1076 _body = convert.JSON.encode((request).toJson()); 1046 _body = convert.JSON.encode((request).toJson());
1077 } 1047 }
1078 if (name == null) { 1048 if (name == null) {
1079 throw new core.ArgumentError("Parameter name is required."); 1049 throw new core.ArgumentError("Parameter name is required.");
1080 } 1050 }
1081 1051
1082 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':signBlob'; 1052 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':signBlob';
1083 1053
1084 var _response = _requester.request(_url, 1054 var _response = _requester.request(_url, "POST",
1085 "POST", 1055 body: _body,
1086 body: _body, 1056 queryParams: _queryParams,
1087 queryParams: _queryParams, 1057 uploadOptions: _uploadOptions,
1088 uploadOptions: _uploadOptions, 1058 uploadMedia: _uploadMedia,
1089 uploadMedia: _uploadMedia, 1059 downloadOptions: _downloadOptions);
1090 downloadOptions: _downloadOptions);
1091 return _response.then((data) => new SignBlobResponse.fromJson(data)); 1060 return _response.then((data) => new SignBlobResponse.fromJson(data));
1092 } 1061 }
1093 1062
1094 /** 1063 /// Signs a JWT using a service account's system-managed private key.
1095 * Signs a JWT using a service account's system-managed private key. 1064 ///
1096 * 1065 /// If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets
1097 * If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an 1066 /// an
1098 * an expiry time of one hour by default. If you request an expiry time of 1067 /// an expiry time of one hour by default. If you request an expiry time of
1099 * more than one hour, the request will fail. 1068 /// more than one hour, the request will fail.
1100 * 1069 ///
1101 * [request] - The metadata request object. 1070 /// [request] - The metadata request object.
1102 * 1071 ///
1103 * Request parameters: 1072 /// Request parameters:
1104 * 1073 ///
1105 * [name] - The resource name of the service account in the following format: 1074 /// [name] - The resource name of the service account in the following
1106 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1075 /// format:
1107 * Using `-` as a wildcard for the project will infer the project from 1076 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1108 * the account. The `account` value can be the `email` address or the 1077 /// Using `-` as a wildcard for the project will infer the project from
1109 * `unique_id` of the service account. 1078 /// the account. The `account` value can be the `email` address or the
1110 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1079 /// `unique_id` of the service account.
1111 * 1080 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1112 * Completes with a [SignJwtResponse]. 1081 ///
1113 * 1082 /// Completes with a [SignJwtResponse].
1114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1083 ///
1115 * error. 1084 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1116 * 1085 /// an error.
1117 * If the used [http.Client] completes with an error when making a REST call, 1086 ///
1118 * this method will complete with the same error. 1087 /// If the used [http.Client] completes with an error when making a REST
1119 */ 1088 /// call, this method will complete with the same error.
1120 async.Future<SignJwtResponse> signJwt(SignJwtRequest request, core.String name ) { 1089 async.Future<SignJwtResponse> signJwt(
1090 SignJwtRequest request, core.String name) {
1121 var _url = null; 1091 var _url = null;
1122 var _queryParams = new core.Map(); 1092 var _queryParams = new core.Map();
1123 var _uploadMedia = null; 1093 var _uploadMedia = null;
1124 var _uploadOptions = null; 1094 var _uploadOptions = null;
1125 var _downloadOptions = commons.DownloadOptions.Metadata; 1095 var _downloadOptions = commons.DownloadOptions.Metadata;
1126 var _body = null; 1096 var _body = null;
1127 1097
1128 if (request != null) { 1098 if (request != null) {
1129 _body = convert.JSON.encode((request).toJson()); 1099 _body = convert.JSON.encode((request).toJson());
1130 } 1100 }
1131 if (name == null) { 1101 if (name == null) {
1132 throw new core.ArgumentError("Parameter name is required."); 1102 throw new core.ArgumentError("Parameter name is required.");
1133 } 1103 }
1134 1104
1135 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':signJwt'; 1105 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':signJwt';
1136 1106
1137 var _response = _requester.request(_url, 1107 var _response = _requester.request(_url, "POST",
1138 "POST", 1108 body: _body,
1139 body: _body, 1109 queryParams: _queryParams,
1140 queryParams: _queryParams, 1110 uploadOptions: _uploadOptions,
1141 uploadOptions: _uploadOptions, 1111 uploadMedia: _uploadMedia,
1142 uploadMedia: _uploadMedia, 1112 downloadOptions: _downloadOptions);
1143 downloadOptions: _downloadOptions);
1144 return _response.then((data) => new SignJwtResponse.fromJson(data)); 1113 return _response.then((data) => new SignJwtResponse.fromJson(data));
1145 } 1114 }
1146 1115
1147 /** 1116 /// Tests the specified permissions against the IAM access control policy
1148 * Tests the specified permissions against the IAM access control policy 1117 /// for a ServiceAccount.
1149 * for a ServiceAccount. 1118 ///
1150 * 1119 /// [request] - The metadata request object.
1151 * [request] - The metadata request object. 1120 ///
1152 * 1121 /// Request parameters:
1153 * Request parameters: 1122 ///
1154 * 1123 /// [resource] - REQUIRED: The resource for which the policy detail is being
1155 * [resource] - REQUIRED: The resource for which the policy detail is being 1124 /// requested.
1156 * requested. 1125 /// See the operation documentation for the appropriate value for this field.
1157 * See the operation documentation for the appropriate value for this field. 1126 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1158 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1127 ///
1159 * 1128 /// Completes with a [TestIamPermissionsResponse].
1160 * Completes with a [TestIamPermissionsResponse]. 1129 ///
1161 * 1130 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1162 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1131 /// an error.
1163 * error. 1132 ///
1164 * 1133 /// If the used [http.Client] completes with an error when making a REST
1165 * If the used [http.Client] completes with an error when making a REST call, 1134 /// call, this method will complete with the same error.
1166 * this method will complete with the same error. 1135 async.Future<TestIamPermissionsResponse> testIamPermissions(
1167 */ 1136 TestIamPermissionsRequest request, core.String resource) {
1168 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) {
1169 var _url = null; 1137 var _url = null;
1170 var _queryParams = new core.Map(); 1138 var _queryParams = new core.Map();
1171 var _uploadMedia = null; 1139 var _uploadMedia = null;
1172 var _uploadOptions = null; 1140 var _uploadOptions = null;
1173 var _downloadOptions = commons.DownloadOptions.Metadata; 1141 var _downloadOptions = commons.DownloadOptions.Metadata;
1174 var _body = null; 1142 var _body = null;
1175 1143
1176 if (request != null) { 1144 if (request != null) {
1177 _body = convert.JSON.encode((request).toJson()); 1145 _body = convert.JSON.encode((request).toJson());
1178 } 1146 }
1179 if (resource == null) { 1147 if (resource == null) {
1180 throw new core.ArgumentError("Parameter resource is required."); 1148 throw new core.ArgumentError("Parameter resource is required.");
1181 } 1149 }
1182 1150
1183 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa mPermissions'; 1151 _url = 'v1/' +
1152 commons.Escaper.ecapeVariableReserved('$resource') +
1153 ':testIamPermissions';
1184 1154
1185 var _response = _requester.request(_url, 1155 var _response = _requester.request(_url, "POST",
1186 "POST", 1156 body: _body,
1187 body: _body, 1157 queryParams: _queryParams,
1188 queryParams: _queryParams, 1158 uploadOptions: _uploadOptions,
1189 uploadOptions: _uploadOptions, 1159 uploadMedia: _uploadMedia,
1190 uploadMedia: _uploadMedia, 1160 downloadOptions: _downloadOptions);
1191 downloadOptions: _downloadOptions); 1161 return _response
1192 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 1162 .then((data) => new TestIamPermissionsResponse.fromJson(data));
1193 } 1163 }
1194 1164
1195 /** 1165 /// Updates a ServiceAccount.
1196 * Updates a ServiceAccount. 1166 ///
1197 * 1167 /// Currently, only the following fields are updatable:
1198 * Currently, only the following fields are updatable: 1168 /// `display_name` .
1199 * `display_name` . 1169 /// The `etag` is mandatory.
1200 * The `etag` is mandatory. 1170 ///
1201 * 1171 /// [request] - The metadata request object.
1202 * [request] - The metadata request object. 1172 ///
1203 * 1173 /// Request parameters:
1204 * Request parameters: 1174 ///
1205 * 1175 /// [name] - The resource name of the service account in the following
1206 * [name] - The resource name of the service account in the following format: 1176 /// format:
1207 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1177 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1208 * 1178 ///
1209 * Requests using `-` as a wildcard for the project will infer the project 1179 /// Requests using `-` as a wildcard for the project will infer the project
1210 * from the `account` and the `account` value can be the `email` address or 1180 /// from the `account` and the `account` value can be the `email` address or
1211 * the `unique_id` of the service account. 1181 /// the `unique_id` of the service account.
1212 * 1182 ///
1213 * In responses the resource name will always be in the format 1183 /// In responses the resource name will always be in the format
1214 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1184 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1215 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1185 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1216 * 1186 ///
1217 * Completes with a [ServiceAccount]. 1187 /// Completes with a [ServiceAccount].
1218 * 1188 ///
1219 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1189 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1220 * error. 1190 /// an error.
1221 * 1191 ///
1222 * If the used [http.Client] completes with an error when making a REST call, 1192 /// If the used [http.Client] completes with an error when making a REST
1223 * this method will complete with the same error. 1193 /// call, this method will complete with the same error.
1224 */ 1194 async.Future<ServiceAccount> update(
1225 async.Future<ServiceAccount> update(ServiceAccount request, core.String name) { 1195 ServiceAccount request, core.String name) {
1226 var _url = null; 1196 var _url = null;
1227 var _queryParams = new core.Map(); 1197 var _queryParams = new core.Map();
1228 var _uploadMedia = null; 1198 var _uploadMedia = null;
1229 var _uploadOptions = null; 1199 var _uploadOptions = null;
1230 var _downloadOptions = commons.DownloadOptions.Metadata; 1200 var _downloadOptions = commons.DownloadOptions.Metadata;
1231 var _body = null; 1201 var _body = null;
1232 1202
1233 if (request != null) { 1203 if (request != null) {
1234 _body = convert.JSON.encode((request).toJson()); 1204 _body = convert.JSON.encode((request).toJson());
1235 } 1205 }
1236 if (name == null) { 1206 if (name == null) {
1237 throw new core.ArgumentError("Parameter name is required."); 1207 throw new core.ArgumentError("Parameter name is required.");
1238 } 1208 }
1239 1209
1240 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1210 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1241 1211
1242 var _response = _requester.request(_url, 1212 var _response = _requester.request(_url, "PUT",
1243 "PUT", 1213 body: _body,
1244 body: _body, 1214 queryParams: _queryParams,
1245 queryParams: _queryParams, 1215 uploadOptions: _uploadOptions,
1246 uploadOptions: _uploadOptions, 1216 uploadMedia: _uploadMedia,
1247 uploadMedia: _uploadMedia, 1217 downloadOptions: _downloadOptions);
1248 downloadOptions: _downloadOptions);
1249 return _response.then((data) => new ServiceAccount.fromJson(data)); 1218 return _response.then((data) => new ServiceAccount.fromJson(data));
1250 } 1219 }
1251
1252 } 1220 }
1253 1221
1254
1255 class ProjectsServiceAccountsKeysResourceApi { 1222 class ProjectsServiceAccountsKeysResourceApi {
1256 final commons.ApiRequester _requester; 1223 final commons.ApiRequester _requester;
1257 1224
1258 ProjectsServiceAccountsKeysResourceApi(commons.ApiRequester client) : 1225 ProjectsServiceAccountsKeysResourceApi(commons.ApiRequester client)
1259 _requester = client; 1226 : _requester = client;
1260 1227
1261 /** 1228 /// Creates a ServiceAccountKey
1262 * Creates a ServiceAccountKey 1229 /// and returns it.
1263 * and returns it. 1230 ///
1264 * 1231 /// [request] - The metadata request object.
1265 * [request] - The metadata request object. 1232 ///
1266 * 1233 /// Request parameters:
1267 * Request parameters: 1234 ///
1268 * 1235 /// [name] - The resource name of the service account in the following
1269 * [name] - The resource name of the service account in the following format: 1236 /// format:
1270 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1237 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1271 * Using `-` as a wildcard for the project will infer the project from 1238 /// Using `-` as a wildcard for the project will infer the project from
1272 * the account. The `account` value can be the `email` address or the 1239 /// the account. The `account` value can be the `email` address or the
1273 * `unique_id` of the service account. 1240 /// `unique_id` of the service account.
1274 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1241 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1275 * 1242 ///
1276 * Completes with a [ServiceAccountKey]. 1243 /// Completes with a [ServiceAccountKey].
1277 * 1244 ///
1278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1245 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1279 * error. 1246 /// an error.
1280 * 1247 ///
1281 * If the used [http.Client] completes with an error when making a REST call, 1248 /// If the used [http.Client] completes with an error when making a REST
1282 * this method will complete with the same error. 1249 /// call, this method will complete with the same error.
1283 */ 1250 async.Future<ServiceAccountKey> create(
1284 async.Future<ServiceAccountKey> create(CreateServiceAccountKeyRequest request, core.String name) { 1251 CreateServiceAccountKeyRequest request, core.String name) {
1285 var _url = null; 1252 var _url = null;
1286 var _queryParams = new core.Map(); 1253 var _queryParams = new core.Map();
1287 var _uploadMedia = null; 1254 var _uploadMedia = null;
1288 var _uploadOptions = null; 1255 var _uploadOptions = null;
1289 var _downloadOptions = commons.DownloadOptions.Metadata; 1256 var _downloadOptions = commons.DownloadOptions.Metadata;
1290 var _body = null; 1257 var _body = null;
1291 1258
1292 if (request != null) { 1259 if (request != null) {
1293 _body = convert.JSON.encode((request).toJson()); 1260 _body = convert.JSON.encode((request).toJson());
1294 } 1261 }
1295 if (name == null) { 1262 if (name == null) {
1296 throw new core.ArgumentError("Parameter name is required."); 1263 throw new core.ArgumentError("Parameter name is required.");
1297 } 1264 }
1298 1265
1299 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys'; 1266 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys';
1300 1267
1301 var _response = _requester.request(_url, 1268 var _response = _requester.request(_url, "POST",
1302 "POST", 1269 body: _body,
1303 body: _body, 1270 queryParams: _queryParams,
1304 queryParams: _queryParams, 1271 uploadOptions: _uploadOptions,
1305 uploadOptions: _uploadOptions, 1272 uploadMedia: _uploadMedia,
1306 uploadMedia: _uploadMedia, 1273 downloadOptions: _downloadOptions);
1307 downloadOptions: _downloadOptions);
1308 return _response.then((data) => new ServiceAccountKey.fromJson(data)); 1274 return _response.then((data) => new ServiceAccountKey.fromJson(data));
1309 } 1275 }
1310 1276
1311 /** 1277 /// Deletes a ServiceAccountKey.
1312 * Deletes a ServiceAccountKey. 1278 ///
1313 * 1279 /// Request parameters:
1314 * Request parameters: 1280 ///
1315 * 1281 /// [name] - The resource name of the service account key in the following
1316 * [name] - The resource name of the service account key in the following 1282 /// format:
1317 * format: 1283 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}` .
1318 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. 1284 /// Using `-` as a wildcard for the project will infer the project from
1319 * Using `-` as a wildcard for the project will infer the project from 1285 /// the account. The `account` value can be the `email` address or the
1320 * the account. The `account` value can be the `email` address or the 1286 /// `unique_id` of the service account.
1321 * `unique_id` of the service account. 1287 /// Value must have pattern
1322 * Value must have pattern 1288 /// "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$".
1323 * "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$". 1289 ///
1324 * 1290 /// Completes with a [Empty].
1325 * Completes with a [Empty]. 1291 ///
1326 * 1292 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1327 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1293 /// an error.
1328 * error. 1294 ///
1329 * 1295 /// If the used [http.Client] completes with an error when making a REST
1330 * If the used [http.Client] completes with an error when making a REST call, 1296 /// call, this method will complete with the same error.
1331 * this method will complete with the same error.
1332 */
1333 async.Future<Empty> delete(core.String name) { 1297 async.Future<Empty> delete(core.String name) {
1334 var _url = null; 1298 var _url = null;
1335 var _queryParams = new core.Map(); 1299 var _queryParams = new core.Map();
1336 var _uploadMedia = null; 1300 var _uploadMedia = null;
1337 var _uploadOptions = null; 1301 var _uploadOptions = null;
1338 var _downloadOptions = commons.DownloadOptions.Metadata; 1302 var _downloadOptions = commons.DownloadOptions.Metadata;
1339 var _body = null; 1303 var _body = null;
1340 1304
1341 if (name == null) { 1305 if (name == null) {
1342 throw new core.ArgumentError("Parameter name is required."); 1306 throw new core.ArgumentError("Parameter name is required.");
1343 } 1307 }
1344 1308
1345 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1309 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1346 1310
1347 var _response = _requester.request(_url, 1311 var _response = _requester.request(_url, "DELETE",
1348 "DELETE", 1312 body: _body,
1349 body: _body, 1313 queryParams: _queryParams,
1350 queryParams: _queryParams, 1314 uploadOptions: _uploadOptions,
1351 uploadOptions: _uploadOptions, 1315 uploadMedia: _uploadMedia,
1352 uploadMedia: _uploadMedia, 1316 downloadOptions: _downloadOptions);
1353 downloadOptions: _downloadOptions);
1354 return _response.then((data) => new Empty.fromJson(data)); 1317 return _response.then((data) => new Empty.fromJson(data));
1355 } 1318 }
1356 1319
1357 /** 1320 /// Gets the ServiceAccountKey
1358 * Gets the ServiceAccountKey 1321 /// by key id.
1359 * by key id. 1322 ///
1360 * 1323 /// Request parameters:
1361 * Request parameters: 1324 ///
1362 * 1325 /// [name] - The resource name of the service account key in the following
1363 * [name] - The resource name of the service account key in the following 1326 /// format:
1364 * format: 1327 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}` .
1365 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. 1328 ///
1366 * 1329 /// Using `-` as a wildcard for the project will infer the project from
1367 * Using `-` as a wildcard for the project will infer the project from 1330 /// the account. The `account` value can be the `email` address or the
1368 * the account. The `account` value can be the `email` address or the 1331 /// `unique_id` of the service account.
1369 * `unique_id` of the service account. 1332 /// Value must have pattern
1370 * Value must have pattern 1333 /// "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$".
1371 * "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$". 1334 ///
1372 * 1335 /// [publicKeyType] - The output format of the public key requested.
1373 * [publicKeyType] - The output format of the public key requested. 1336 /// X509_PEM is the default output format.
1374 * X509_PEM is the default output format. 1337 /// Possible string values are:
1375 * Possible string values are: 1338 /// - "TYPE_NONE" : A TYPE_NONE.
1376 * - "TYPE_NONE" : A TYPE_NONE. 1339 /// - "TYPE_X509_PEM_FILE" : A TYPE_X509_PEM_FILE.
1377 * - "TYPE_X509_PEM_FILE" : A TYPE_X509_PEM_FILE. 1340 /// - "TYPE_RAW_PUBLIC_KEY" : A TYPE_RAW_PUBLIC_KEY.
1378 * - "TYPE_RAW_PUBLIC_KEY" : A TYPE_RAW_PUBLIC_KEY. 1341 ///
1379 * 1342 /// Completes with a [ServiceAccountKey].
1380 * Completes with a [ServiceAccountKey]. 1343 ///
1381 * 1344 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1382 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1345 /// an error.
1383 * error. 1346 ///
1384 * 1347 /// If the used [http.Client] completes with an error when making a REST
1385 * If the used [http.Client] completes with an error when making a REST call, 1348 /// call, this method will complete with the same error.
1386 * this method will complete with the same error. 1349 async.Future<ServiceAccountKey> get(core.String name,
1387 */ 1350 {core.String publicKeyType}) {
1388 async.Future<ServiceAccountKey> get(core.String name, {core.String publicKeyTy pe}) {
1389 var _url = null; 1351 var _url = null;
1390 var _queryParams = new core.Map(); 1352 var _queryParams = new core.Map();
1391 var _uploadMedia = null; 1353 var _uploadMedia = null;
1392 var _uploadOptions = null; 1354 var _uploadOptions = null;
1393 var _downloadOptions = commons.DownloadOptions.Metadata; 1355 var _downloadOptions = commons.DownloadOptions.Metadata;
1394 var _body = null; 1356 var _body = null;
1395 1357
1396 if (name == null) { 1358 if (name == null) {
1397 throw new core.ArgumentError("Parameter name is required."); 1359 throw new core.ArgumentError("Parameter name is required.");
1398 } 1360 }
1399 if (publicKeyType != null) { 1361 if (publicKeyType != null) {
1400 _queryParams["publicKeyType"] = [publicKeyType]; 1362 _queryParams["publicKeyType"] = [publicKeyType];
1401 } 1363 }
1402 1364
1403 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1365 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1404 1366
1405 var _response = _requester.request(_url, 1367 var _response = _requester.request(_url, "GET",
1406 "GET", 1368 body: _body,
1407 body: _body, 1369 queryParams: _queryParams,
1408 queryParams: _queryParams, 1370 uploadOptions: _uploadOptions,
1409 uploadOptions: _uploadOptions, 1371 uploadMedia: _uploadMedia,
1410 uploadMedia: _uploadMedia, 1372 downloadOptions: _downloadOptions);
1411 downloadOptions: _downloadOptions);
1412 return _response.then((data) => new ServiceAccountKey.fromJson(data)); 1373 return _response.then((data) => new ServiceAccountKey.fromJson(data));
1413 } 1374 }
1414 1375
1415 /** 1376 /// Lists ServiceAccountKeys.
1416 * Lists ServiceAccountKeys. 1377 ///
1417 * 1378 /// Request parameters:
1418 * Request parameters: 1379 ///
1419 * 1380 /// [name] - The resource name of the service account in the following
1420 * [name] - The resource name of the service account in the following format: 1381 /// format:
1421 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 1382 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
1422 * 1383 ///
1423 * Using `-` as a wildcard for the project, will infer the project from 1384 /// Using `-` as a wildcard for the project, will infer the project from
1424 * the account. The `account` value can be the `email` address or the 1385 /// the account. The `account` value can be the `email` address or the
1425 * `unique_id` of the service account. 1386 /// `unique_id` of the service account.
1426 * Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$". 1387 /// Value must have pattern "^projects/[^/]+/serviceAccounts/[^/]+$".
1427 * 1388 ///
1428 * [keyTypes] - Filters the types of keys the user wants to include in the 1389 /// [keyTypes] - Filters the types of keys the user wants to include in the
1429 * list 1390 /// list
1430 * response. Duplicate key types are not allowed. If no key type 1391 /// response. Duplicate key types are not allowed. If no key type
1431 * is provided, all keys are returned. 1392 /// is provided, all keys are returned.
1432 * 1393 ///
1433 * Completes with a [ListServiceAccountKeysResponse]. 1394 /// Completes with a [ListServiceAccountKeysResponse].
1434 * 1395 ///
1435 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1396 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1436 * error. 1397 /// an error.
1437 * 1398 ///
1438 * If the used [http.Client] completes with an error when making a REST call, 1399 /// If the used [http.Client] completes with an error when making a REST
1439 * this method will complete with the same error. 1400 /// call, this method will complete with the same error.
1440 */ 1401 async.Future<ListServiceAccountKeysResponse> list(core.String name,
1441 async.Future<ListServiceAccountKeysResponse> list(core.String name, {core.List <core.String> keyTypes}) { 1402 {core.List<core.String> keyTypes}) {
1442 var _url = null; 1403 var _url = null;
1443 var _queryParams = new core.Map(); 1404 var _queryParams = new core.Map();
1444 var _uploadMedia = null; 1405 var _uploadMedia = null;
1445 var _uploadOptions = null; 1406 var _uploadOptions = null;
1446 var _downloadOptions = commons.DownloadOptions.Metadata; 1407 var _downloadOptions = commons.DownloadOptions.Metadata;
1447 var _body = null; 1408 var _body = null;
1448 1409
1449 if (name == null) { 1410 if (name == null) {
1450 throw new core.ArgumentError("Parameter name is required."); 1411 throw new core.ArgumentError("Parameter name is required.");
1451 } 1412 }
1452 if (keyTypes != null) { 1413 if (keyTypes != null) {
1453 _queryParams["keyTypes"] = keyTypes; 1414 _queryParams["keyTypes"] = keyTypes;
1454 } 1415 }
1455 1416
1456 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys'; 1417 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys';
1457 1418
1458 var _response = _requester.request(_url, 1419 var _response = _requester.request(_url, "GET",
1459 "GET", 1420 body: _body,
1460 body: _body, 1421 queryParams: _queryParams,
1461 queryParams: _queryParams, 1422 uploadOptions: _uploadOptions,
1462 uploadOptions: _uploadOptions, 1423 uploadMedia: _uploadMedia,
1463 uploadMedia: _uploadMedia, 1424 downloadOptions: _downloadOptions);
1464 downloadOptions: _downloadOptions); 1425 return _response
1465 return _response.then((data) => new ListServiceAccountKeysResponse.fromJson( data)); 1426 .then((data) => new ListServiceAccountKeysResponse.fromJson(data));
1466 } 1427 }
1467
1468 } 1428 }
1469 1429
1470
1471 class RolesResourceApi { 1430 class RolesResourceApi {
1472 final commons.ApiRequester _requester; 1431 final commons.ApiRequester _requester;
1473 1432
1474 RolesResourceApi(commons.ApiRequester client) : 1433 RolesResourceApi(commons.ApiRequester client) : _requester = client;
1475 _requester = client;
1476 1434
1477 /** 1435 /// Gets a Role definition.
1478 * Gets a Role definition. 1436 ///
1479 * 1437 /// Request parameters:
1480 * Request parameters: 1438 ///
1481 * 1439 /// [name] - The resource name of the role in one of the following formats:
1482 * [name] - The resource name of the role in one of the following formats: 1440 /// `roles/{ROLE_NAME}`
1483 * `roles/{ROLE_NAME}` 1441 /// `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
1484 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}` 1442 /// `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
1485 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}` 1443 /// Value must have pattern "^roles/[^/]+$".
1486 * Value must have pattern "^roles/[^/]+$". 1444 ///
1487 * 1445 /// Completes with a [Role].
1488 * Completes with a [Role]. 1446 ///
1489 * 1447 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1490 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1448 /// an error.
1491 * error. 1449 ///
1492 * 1450 /// If the used [http.Client] completes with an error when making a REST
1493 * If the used [http.Client] completes with an error when making a REST call, 1451 /// call, this method will complete with the same error.
1494 * this method will complete with the same error.
1495 */
1496 async.Future<Role> get(core.String name) { 1452 async.Future<Role> get(core.String name) {
1497 var _url = null; 1453 var _url = null;
1498 var _queryParams = new core.Map(); 1454 var _queryParams = new core.Map();
1499 var _uploadMedia = null; 1455 var _uploadMedia = null;
1500 var _uploadOptions = null; 1456 var _uploadOptions = null;
1501 var _downloadOptions = commons.DownloadOptions.Metadata; 1457 var _downloadOptions = commons.DownloadOptions.Metadata;
1502 var _body = null; 1458 var _body = null;
1503 1459
1504 if (name == null) { 1460 if (name == null) {
1505 throw new core.ArgumentError("Parameter name is required."); 1461 throw new core.ArgumentError("Parameter name is required.");
1506 } 1462 }
1507 1463
1508 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1464 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1509 1465
1510 var _response = _requester.request(_url, 1466 var _response = _requester.request(_url, "GET",
1511 "GET", 1467 body: _body,
1512 body: _body, 1468 queryParams: _queryParams,
1513 queryParams: _queryParams, 1469 uploadOptions: _uploadOptions,
1514 uploadOptions: _uploadOptions, 1470 uploadMedia: _uploadMedia,
1515 uploadMedia: _uploadMedia, 1471 downloadOptions: _downloadOptions);
1516 downloadOptions: _downloadOptions);
1517 return _response.then((data) => new Role.fromJson(data)); 1472 return _response.then((data) => new Role.fromJson(data));
1518 } 1473 }
1519 1474
1520 /** 1475 /// Lists the Roles defined on a resource.
1521 * Lists the Roles defined on a resource. 1476 ///
1522 * 1477 /// Request parameters:
1523 * Request parameters: 1478 ///
1524 * 1479 /// [pageToken] - Optional pagination token returned in an earlier
1525 * [view] - Optional view for the returned Role objects. 1480 /// ListRolesResponse.
1526 * Possible string values are: 1481 ///
1527 * - "BASIC" : A BASIC. 1482 /// [pageSize] - Optional limit on the number of roles to include in the
1528 * - "FULL" : A FULL. 1483 /// response.
1529 * 1484 ///
1530 * [parent] - The resource name of the parent resource in one of the following 1485 /// [view] - Optional view for the returned Role objects.
1531 * formats: 1486 /// Possible string values are:
1532 * `` (empty string) -- this refers to curated roles. 1487 /// - "BASIC" : A BASIC.
1533 * `organizations/{ORGANIZATION_ID}` 1488 /// - "FULL" : A FULL.
1534 * `projects/{PROJECT_ID}` 1489 ///
1535 * 1490 /// [parent] - The resource name of the parent resource in one of the
1536 * [showDeleted] - Include Roles that have been deleted. 1491 /// following formats:
1537 * 1492 /// `` (empty string) -- this refers to curated roles.
1538 * [pageToken] - Optional pagination token returned in an earlier 1493 /// `organizations/{ORGANIZATION_ID}`
1539 * ListRolesResponse. 1494 /// `projects/{PROJECT_ID}`
1540 * 1495 ///
1541 * [pageSize] - Optional limit on the number of roles to include in the 1496 /// [showDeleted] - Include Roles that have been deleted.
1542 * response. 1497 ///
1543 * 1498 /// Completes with a [ListRolesResponse].
1544 * Completes with a [ListRolesResponse]. 1499 ///
1545 * 1500 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1501 /// an error.
1547 * error. 1502 ///
1548 * 1503 /// If the used [http.Client] completes with an error when making a REST
1549 * If the used [http.Client] completes with an error when making a REST call, 1504 /// call, this method will complete with the same error.
1550 * this method will complete with the same error. 1505 async.Future<ListRolesResponse> list(
1551 */ 1506 {core.String pageToken,
1552 async.Future<ListRolesResponse> list({core.String view, core.String parent, co re.bool showDeleted, core.String pageToken, core.int pageSize}) { 1507 core.int pageSize,
1508 core.String view,
1509 core.String parent,
1510 core.bool showDeleted}) {
1553 var _url = null; 1511 var _url = null;
1554 var _queryParams = new core.Map(); 1512 var _queryParams = new core.Map();
1555 var _uploadMedia = null; 1513 var _uploadMedia = null;
1556 var _uploadOptions = null; 1514 var _uploadOptions = null;
1557 var _downloadOptions = commons.DownloadOptions.Metadata; 1515 var _downloadOptions = commons.DownloadOptions.Metadata;
1558 var _body = null; 1516 var _body = null;
1559 1517
1518 if (pageToken != null) {
1519 _queryParams["pageToken"] = [pageToken];
1520 }
1521 if (pageSize != null) {
1522 _queryParams["pageSize"] = ["${pageSize}"];
1523 }
1560 if (view != null) { 1524 if (view != null) {
1561 _queryParams["view"] = [view]; 1525 _queryParams["view"] = [view];
1562 } 1526 }
1563 if (parent != null) { 1527 if (parent != null) {
1564 _queryParams["parent"] = [parent]; 1528 _queryParams["parent"] = [parent];
1565 } 1529 }
1566 if (showDeleted != null) { 1530 if (showDeleted != null) {
1567 _queryParams["showDeleted"] = ["${showDeleted}"]; 1531 _queryParams["showDeleted"] = ["${showDeleted}"];
1568 } 1532 }
1569 if (pageToken != null) {
1570 _queryParams["pageToken"] = [pageToken];
1571 }
1572 if (pageSize != null) {
1573 _queryParams["pageSize"] = ["${pageSize}"];
1574 }
1575 1533
1576 _url = 'v1/roles'; 1534 _url = 'v1/roles';
1577 1535
1578 var _response = _requester.request(_url, 1536 var _response = _requester.request(_url, "GET",
1579 "GET", 1537 body: _body,
1580 body: _body, 1538 queryParams: _queryParams,
1581 queryParams: _queryParams, 1539 uploadOptions: _uploadOptions,
1582 uploadOptions: _uploadOptions, 1540 uploadMedia: _uploadMedia,
1583 uploadMedia: _uploadMedia, 1541 downloadOptions: _downloadOptions);
1584 downloadOptions: _downloadOptions);
1585 return _response.then((data) => new ListRolesResponse.fromJson(data)); 1542 return _response.then((data) => new ListRolesResponse.fromJson(data));
1586 } 1543 }
1587 1544
1588 /** 1545 /// Queries roles that can be granted on a particular resource.
1589 * Queries roles that can be granted on a particular resource. 1546 /// A role is grantable if it can be used as the role in a binding for a
1590 * A role is grantable if it can be used as the role in a binding for a policy 1547 /// policy
1591 * for that resource. 1548 /// for that resource.
1592 * 1549 ///
1593 * [request] - The metadata request object. 1550 /// [request] - The metadata request object.
1594 * 1551 ///
1595 * Request parameters: 1552 /// Request parameters:
1596 * 1553 ///
1597 * Completes with a [QueryGrantableRolesResponse]. 1554 /// Completes with a [QueryGrantableRolesResponse].
1598 * 1555 ///
1599 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1556 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1600 * error. 1557 /// an error.
1601 * 1558 ///
1602 * If the used [http.Client] completes with an error when making a REST call, 1559 /// If the used [http.Client] completes with an error when making a REST
1603 * this method will complete with the same error. 1560 /// call, this method will complete with the same error.
1604 */ 1561 async.Future<QueryGrantableRolesResponse> queryGrantableRoles(
1605 async.Future<QueryGrantableRolesResponse> queryGrantableRoles(QueryGrantableRo lesRequest request) { 1562 QueryGrantableRolesRequest request) {
1606 var _url = null; 1563 var _url = null;
1607 var _queryParams = new core.Map(); 1564 var _queryParams = new core.Map();
1608 var _uploadMedia = null; 1565 var _uploadMedia = null;
1609 var _uploadOptions = null; 1566 var _uploadOptions = null;
1610 var _downloadOptions = commons.DownloadOptions.Metadata; 1567 var _downloadOptions = commons.DownloadOptions.Metadata;
1611 var _body = null; 1568 var _body = null;
1612 1569
1613 if (request != null) { 1570 if (request != null) {
1614 _body = convert.JSON.encode((request).toJson()); 1571 _body = convert.JSON.encode((request).toJson());
1615 } 1572 }
1616 1573
1617 _url = 'v1/roles:queryGrantableRoles'; 1574 _url = 'v1/roles:queryGrantableRoles';
1618 1575
1619 var _response = _requester.request(_url, 1576 var _response = _requester.request(_url, "POST",
1620 "POST", 1577 body: _body,
1621 body: _body, 1578 queryParams: _queryParams,
1622 queryParams: _queryParams, 1579 uploadOptions: _uploadOptions,
1623 uploadOptions: _uploadOptions, 1580 uploadMedia: _uploadMedia,
1624 uploadMedia: _uploadMedia, 1581 downloadOptions: _downloadOptions);
1625 downloadOptions: _downloadOptions); 1582 return _response
1626 return _response.then((data) => new QueryGrantableRolesResponse.fromJson(dat a)); 1583 .then((data) => new QueryGrantableRolesResponse.fromJson(data));
1627 } 1584 }
1628
1629 } 1585 }
1630 1586
1631 1587 /// Audit log information specific to Cloud IAM. This message is serialized
1632 1588 /// as an `Any` type in the `ServiceData` message of an
1633 /** 1589 /// `AuditLog` message.
1634 * Audit log information specific to Cloud IAM. This message is serialized
1635 * as an `Any` type in the `ServiceData` message of an
1636 * `AuditLog` message.
1637 */
1638 class AuditData { 1590 class AuditData {
1639 /** Policy delta between the original policy and the newly set policy. */ 1591 /// Policy delta between the original policy and the newly set policy.
1640 PolicyDelta policyDelta; 1592 PolicyDelta policyDelta;
1641 1593
1642 AuditData(); 1594 AuditData();
1643 1595
1644 AuditData.fromJson(core.Map _json) { 1596 AuditData.fromJson(core.Map _json) {
1645 if (_json.containsKey("policyDelta")) { 1597 if (_json.containsKey("policyDelta")) {
1646 policyDelta = new PolicyDelta.fromJson(_json["policyDelta"]); 1598 policyDelta = new PolicyDelta.fromJson(_json["policyDelta"]);
1647 } 1599 }
1648 } 1600 }
1649 1601
1650 core.Map<core.String, core.Object> toJson() { 1602 core.Map<core.String, core.Object> toJson() {
1651 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1603 final core.Map<core.String, core.Object> _json =
1604 new core.Map<core.String, core.Object>();
1652 if (policyDelta != null) { 1605 if (policyDelta != null) {
1653 _json["policyDelta"] = (policyDelta).toJson(); 1606 _json["policyDelta"] = (policyDelta).toJson();
1654 } 1607 }
1655 return _json; 1608 return _json;
1656 } 1609 }
1657 } 1610 }
1658 1611
1659 /** Associates `members` with a `role`. */ 1612 /// Associates `members` with a `role`.
1660 class Binding { 1613 class Binding {
1661 /** 1614 /// Specifies the identities requesting access for a Cloud Platform resource.
1662 * Specifies the identities requesting access for a Cloud Platform resource. 1615 /// `members` can have the following values:
1663 * `members` can have the following values: 1616 ///
1664 * 1617 /// * `allUsers`: A special identifier that represents anyone who is
1665 * * `allUsers`: A special identifier that represents anyone who is 1618 /// on the internet; with or without a Google account.
1666 * on the internet; with or without a Google account. 1619 ///
1667 * 1620 /// * `allAuthenticatedUsers`: A special identifier that represents anyone
1668 * * `allAuthenticatedUsers`: A special identifier that represents anyone 1621 /// who is authenticated with a Google account or a service account.
1669 * who is authenticated with a Google account or a service account. 1622 ///
1670 * 1623 /// * `user:{emailid}`: An email address that represents a specific Google
1671 * * `user:{emailid}`: An email address that represents a specific Google 1624 /// account. For example, `alice@gmail.com` or `joe@example.com`.
1672 * account. For example, `alice@gmail.com` or `joe@example.com`. 1625 ///
1673 * 1626 ///
1674 * 1627 /// * `serviceAccount:{emailid}`: An email address that represents a service
1675 * * `serviceAccount:{emailid}`: An email address that represents a service 1628 /// account. For example, `my-other-app@appspot.gserviceaccount.com`.
1676 * account. For example, `my-other-app@appspot.gserviceaccount.com`. 1629 ///
1677 * 1630 /// * `group:{emailid}`: An email address that represents a Google group.
1678 * * `group:{emailid}`: An email address that represents a Google group. 1631 /// For example, `admins@example.com`.
1679 * For example, `admins@example.com`. 1632 ///
1680 * 1633 ///
1681 * 1634 /// * `domain:{domain}`: A Google Apps domain name that represents all the
1682 * * `domain:{domain}`: A Google Apps domain name that represents all the 1635 /// users of that domain. For example, `google.com` or `example.com`.
1683 * users of that domain. For example, `google.com` or `example.com`.
1684 */
1685 core.List<core.String> members; 1636 core.List<core.String> members;
1686 /** 1637
1687 * Role that is assigned to `members`. 1638 /// Role that is assigned to `members`.
1688 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1639 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1689 * Required 1640 /// Required
1690 */
1691 core.String role; 1641 core.String role;
1692 1642
1693 Binding(); 1643 Binding();
1694 1644
1695 Binding.fromJson(core.Map _json) { 1645 Binding.fromJson(core.Map _json) {
1696 if (_json.containsKey("members")) { 1646 if (_json.containsKey("members")) {
1697 members = _json["members"]; 1647 members = _json["members"];
1698 } 1648 }
1699 if (_json.containsKey("role")) { 1649 if (_json.containsKey("role")) {
1700 role = _json["role"]; 1650 role = _json["role"];
1701 } 1651 }
1702 } 1652 }
1703 1653
1704 core.Map<core.String, core.Object> toJson() { 1654 core.Map<core.String, core.Object> toJson() {
1705 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1655 final core.Map<core.String, core.Object> _json =
1656 new core.Map<core.String, core.Object>();
1706 if (members != null) { 1657 if (members != null) {
1707 _json["members"] = members; 1658 _json["members"] = members;
1708 } 1659 }
1709 if (role != null) { 1660 if (role != null) {
1710 _json["role"] = role; 1661 _json["role"] = role;
1711 } 1662 }
1712 return _json; 1663 return _json;
1713 } 1664 }
1714 } 1665 }
1715 1666
1716 /** 1667 /// One delta entry for Binding. Each individual change (only one member in
1717 * One delta entry for Binding. Each individual change (only one member in each 1668 /// each
1718 * entry) to a binding will be a separate entry. 1669 /// entry) to a binding will be a separate entry.
1719 */
1720 class BindingDelta { 1670 class BindingDelta {
1721 /** 1671 /// The action that was performed on a Binding.
1722 * The action that was performed on a Binding. 1672 /// Required
1723 * Required 1673 /// Possible string values are:
1724 * Possible string values are: 1674 /// - "ACTION_UNSPECIFIED" : Unspecified.
1725 * - "ACTION_UNSPECIFIED" : Unspecified. 1675 /// - "ADD" : Addition of a Binding.
1726 * - "ADD" : Addition of a Binding. 1676 /// - "REMOVE" : Removal of a Binding.
1727 * - "REMOVE" : Removal of a Binding.
1728 */
1729 core.String action; 1677 core.String action;
1730 /** 1678
1731 * The condition that is associated with this binding. 1679 /// The condition that is associated with this binding.
1732 * This field is GOOGLE_INTERNAL. 1680 /// This field is GOOGLE_INTERNAL.
1733 * This field is not logged in IAM side because it's only for audit logging. 1681 /// This field is not logged in IAM side because it's only for audit logging.
1734 * Optional 1682 /// Optional
1735 */
1736 Expr condition; 1683 Expr condition;
1737 /** 1684
1738 * A single identity requesting access for a Cloud Platform resource. 1685 /// A single identity requesting access for a Cloud Platform resource.
1739 * Follows the same format of Binding.members. 1686 /// Follows the same format of Binding.members.
1740 * Required 1687 /// Required
1741 */
1742 core.String member; 1688 core.String member;
1743 /** 1689
1744 * Role that is assigned to `members`. 1690 /// Role that is assigned to `members`.
1745 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1691 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1746 * Required 1692 /// Required
1747 */
1748 core.String role; 1693 core.String role;
1749 1694
1750 BindingDelta(); 1695 BindingDelta();
1751 1696
1752 BindingDelta.fromJson(core.Map _json) { 1697 BindingDelta.fromJson(core.Map _json) {
1753 if (_json.containsKey("action")) { 1698 if (_json.containsKey("action")) {
1754 action = _json["action"]; 1699 action = _json["action"];
1755 } 1700 }
1756 if (_json.containsKey("condition")) { 1701 if (_json.containsKey("condition")) {
1757 condition = new Expr.fromJson(_json["condition"]); 1702 condition = new Expr.fromJson(_json["condition"]);
1758 } 1703 }
1759 if (_json.containsKey("member")) { 1704 if (_json.containsKey("member")) {
1760 member = _json["member"]; 1705 member = _json["member"];
1761 } 1706 }
1762 if (_json.containsKey("role")) { 1707 if (_json.containsKey("role")) {
1763 role = _json["role"]; 1708 role = _json["role"];
1764 } 1709 }
1765 } 1710 }
1766 1711
1767 core.Map<core.String, core.Object> toJson() { 1712 core.Map<core.String, core.Object> toJson() {
1768 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1713 final core.Map<core.String, core.Object> _json =
1714 new core.Map<core.String, core.Object>();
1769 if (action != null) { 1715 if (action != null) {
1770 _json["action"] = action; 1716 _json["action"] = action;
1771 } 1717 }
1772 if (condition != null) { 1718 if (condition != null) {
1773 _json["condition"] = (condition).toJson(); 1719 _json["condition"] = (condition).toJson();
1774 } 1720 }
1775 if (member != null) { 1721 if (member != null) {
1776 _json["member"] = member; 1722 _json["member"] = member;
1777 } 1723 }
1778 if (role != null) { 1724 if (role != null) {
1779 _json["role"] = role; 1725 _json["role"] = role;
1780 } 1726 }
1781 return _json; 1727 return _json;
1782 } 1728 }
1783 } 1729 }
1784 1730
1785 /** The request to create a new role. */ 1731 /// The request to create a new role.
1786 class CreateRoleRequest { 1732 class CreateRoleRequest {
1787 /** The Role resource to create. */ 1733 /// The Role resource to create.
1788 Role role; 1734 Role role;
1789 /** The role id to use for this role. */ 1735
1736 /// The role id to use for this role.
1790 core.String roleId; 1737 core.String roleId;
1791 1738
1792 CreateRoleRequest(); 1739 CreateRoleRequest();
1793 1740
1794 CreateRoleRequest.fromJson(core.Map _json) { 1741 CreateRoleRequest.fromJson(core.Map _json) {
1795 if (_json.containsKey("role")) { 1742 if (_json.containsKey("role")) {
1796 role = new Role.fromJson(_json["role"]); 1743 role = new Role.fromJson(_json["role"]);
1797 } 1744 }
1798 if (_json.containsKey("roleId")) { 1745 if (_json.containsKey("roleId")) {
1799 roleId = _json["roleId"]; 1746 roleId = _json["roleId"];
1800 } 1747 }
1801 } 1748 }
1802 1749
1803 core.Map<core.String, core.Object> toJson() { 1750 core.Map<core.String, core.Object> toJson() {
1804 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1751 final core.Map<core.String, core.Object> _json =
1752 new core.Map<core.String, core.Object>();
1805 if (role != null) { 1753 if (role != null) {
1806 _json["role"] = (role).toJson(); 1754 _json["role"] = (role).toJson();
1807 } 1755 }
1808 if (roleId != null) { 1756 if (roleId != null) {
1809 _json["roleId"] = roleId; 1757 _json["roleId"] = roleId;
1810 } 1758 }
1811 return _json; 1759 return _json;
1812 } 1760 }
1813 } 1761 }
1814 1762
1815 /** The service account key create request. */ 1763 /// The service account key create request.
1816 class CreateServiceAccountKeyRequest { 1764 class CreateServiceAccountKeyRequest {
1817 /** 1765 /// Which type of key and algorithm to use for the key.
1818 * Which type of key and algorithm to use for the key. 1766 /// The default is currently a 2K RSA key. However this may change in the
1819 * The default is currently a 2K RSA key. However this may change in the 1767 /// future.
1820 * future. 1768 /// Possible string values are:
1821 * Possible string values are: 1769 /// - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm.
1822 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm. 1770 /// - "KEY_ALG_RSA_1024" : 1k RSA Key.
1823 * - "KEY_ALG_RSA_1024" : 1k RSA Key. 1771 /// - "KEY_ALG_RSA_2048" : 2k RSA Key.
1824 * - "KEY_ALG_RSA_2048" : 2k RSA Key.
1825 */
1826 core.String keyAlgorithm; 1772 core.String keyAlgorithm;
1827 /** 1773
1828 * The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the 1774 /// The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the
1829 * default output format. 1775 /// default output format.
1830 * Possible string values are: 1776 /// Possible string values are:
1831 * - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to 1777 /// - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to
1832 * `TYPE_GOOGLE_CREDENTIALS_FILE`. 1778 /// `TYPE_GOOGLE_CREDENTIALS_FILE`.
1833 * - "TYPE_PKCS12_FILE" : PKCS12 format. 1779 /// - "TYPE_PKCS12_FILE" : PKCS12 format.
1834 * The password for the PKCS12 file is `notasecret`. 1780 /// The password for the PKCS12 file is `notasecret`.
1835 * For more information, see https://tools.ietf.org/html/rfc7292. 1781 /// For more information, see https://tools.ietf.org/html/rfc7292.
1836 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format. 1782 /// - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format.
1837 */
1838 core.String privateKeyType; 1783 core.String privateKeyType;
1839 1784
1840 CreateServiceAccountKeyRequest(); 1785 CreateServiceAccountKeyRequest();
1841 1786
1842 CreateServiceAccountKeyRequest.fromJson(core.Map _json) { 1787 CreateServiceAccountKeyRequest.fromJson(core.Map _json) {
1843 if (_json.containsKey("keyAlgorithm")) { 1788 if (_json.containsKey("keyAlgorithm")) {
1844 keyAlgorithm = _json["keyAlgorithm"]; 1789 keyAlgorithm = _json["keyAlgorithm"];
1845 } 1790 }
1846 if (_json.containsKey("privateKeyType")) { 1791 if (_json.containsKey("privateKeyType")) {
1847 privateKeyType = _json["privateKeyType"]; 1792 privateKeyType = _json["privateKeyType"];
1848 } 1793 }
1849 } 1794 }
1850 1795
1851 core.Map<core.String, core.Object> toJson() { 1796 core.Map<core.String, core.Object> toJson() {
1852 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1797 final core.Map<core.String, core.Object> _json =
1798 new core.Map<core.String, core.Object>();
1853 if (keyAlgorithm != null) { 1799 if (keyAlgorithm != null) {
1854 _json["keyAlgorithm"] = keyAlgorithm; 1800 _json["keyAlgorithm"] = keyAlgorithm;
1855 } 1801 }
1856 if (privateKeyType != null) { 1802 if (privateKeyType != null) {
1857 _json["privateKeyType"] = privateKeyType; 1803 _json["privateKeyType"] = privateKeyType;
1858 } 1804 }
1859 return _json; 1805 return _json;
1860 } 1806 }
1861 } 1807 }
1862 1808
1863 /** The service account create request. */ 1809 /// The service account create request.
1864 class CreateServiceAccountRequest { 1810 class CreateServiceAccountRequest {
1865 /** 1811 /// Required. The account id that is used to generate the service account
1866 * Required. The account id that is used to generate the service account 1812 /// email address and a stable unique id. It is unique within a project,
1867 * email address and a stable unique id. It is unique within a project, 1813 /// must be 6-30 characters long, and match the regular expression
1868 * must be 6-30 characters long, and match the regular expression 1814 /// `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
1869 * `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
1870 */
1871 core.String accountId; 1815 core.String accountId;
1872 /** 1816
1873 * The ServiceAccount resource to create. 1817 /// The ServiceAccount resource to create.
1874 * Currently, only the following values are user assignable: 1818 /// Currently, only the following values are user assignable:
1875 * `display_name` . 1819 /// `display_name` .
1876 */
1877 ServiceAccount serviceAccount; 1820 ServiceAccount serviceAccount;
1878 1821
1879 CreateServiceAccountRequest(); 1822 CreateServiceAccountRequest();
1880 1823
1881 CreateServiceAccountRequest.fromJson(core.Map _json) { 1824 CreateServiceAccountRequest.fromJson(core.Map _json) {
1882 if (_json.containsKey("accountId")) { 1825 if (_json.containsKey("accountId")) {
1883 accountId = _json["accountId"]; 1826 accountId = _json["accountId"];
1884 } 1827 }
1885 if (_json.containsKey("serviceAccount")) { 1828 if (_json.containsKey("serviceAccount")) {
1886 serviceAccount = new ServiceAccount.fromJson(_json["serviceAccount"]); 1829 serviceAccount = new ServiceAccount.fromJson(_json["serviceAccount"]);
1887 } 1830 }
1888 } 1831 }
1889 1832
1890 core.Map<core.String, core.Object> toJson() { 1833 core.Map<core.String, core.Object> toJson() {
1891 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1834 final core.Map<core.String, core.Object> _json =
1835 new core.Map<core.String, core.Object>();
1892 if (accountId != null) { 1836 if (accountId != null) {
1893 _json["accountId"] = accountId; 1837 _json["accountId"] = accountId;
1894 } 1838 }
1895 if (serviceAccount != null) { 1839 if (serviceAccount != null) {
1896 _json["serviceAccount"] = (serviceAccount).toJson(); 1840 _json["serviceAccount"] = (serviceAccount).toJson();
1897 } 1841 }
1898 return _json; 1842 return _json;
1899 } 1843 }
1900 } 1844 }
1901 1845
1902 /** 1846 /// A generic empty message that you can re-use to avoid defining duplicated
1903 * A generic empty message that you can re-use to avoid defining duplicated 1847 /// empty messages in your APIs. A typical example is to use it as the request
1904 * empty messages in your APIs. A typical example is to use it as the request 1848 /// or the response type of an API method. For instance:
1905 * or the response type of an API method. For instance: 1849 ///
1906 * 1850 /// service Foo {
1907 * service Foo { 1851 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1908 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1852 /// }
1909 * } 1853 ///
1910 * 1854 /// The JSON representation for `Empty` is empty JSON object `{}`.
1911 * The JSON representation for `Empty` is empty JSON object `{}`.
1912 */
1913 class Empty { 1855 class Empty {
1914
1915 Empty(); 1856 Empty();
1916 1857
1917 Empty.fromJson(core.Map _json) { 1858 Empty.fromJson(core.Map _json) {}
1918 }
1919 1859
1920 core.Map<core.String, core.Object> toJson() { 1860 core.Map<core.String, core.Object> toJson() {
1921 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1861 final core.Map<core.String, core.Object> _json =
1862 new core.Map<core.String, core.Object>();
1922 return _json; 1863 return _json;
1923 } 1864 }
1924 } 1865 }
1925 1866
1926 /** 1867 /// Represents an expression text. Example:
1927 * Represents an expression text. Example: 1868 ///
1928 * 1869 /// title: "User account presence"
1929 * title: "User account presence" 1870 /// description: "Determines whether the request has a user account"
1930 * description: "Determines whether the request has a user account" 1871 /// expression: "size(request.user) > 0"
1931 * expression: "size(request.user) > 0"
1932 */
1933 class Expr { 1872 class Expr {
1934 /** 1873 /// An optional description of the expression. This is a longer text which
1935 * An optional description of the expression. This is a longer text which 1874 /// describes the expression, e.g. when hovered over it in a UI.
1936 * describes the expression, e.g. when hovered over it in a UI.
1937 */
1938 core.String description; 1875 core.String description;
1939 /** 1876
1940 * Textual representation of an expression in 1877 /// Textual representation of an expression in
1941 * Common Expression Language syntax. 1878 /// Common Expression Language syntax.
1942 * 1879 ///
1943 * The application context of the containing message determines which 1880 /// The application context of the containing message determines which
1944 * well-known feature set of CEL is supported. 1881 /// well-known feature set of CEL is supported.
1945 */
1946 core.String expression; 1882 core.String expression;
1947 /** 1883
1948 * An optional string indicating the location of the expression for error 1884 /// An optional string indicating the location of the expression for error
1949 * reporting, e.g. a file name and a position in the file. 1885 /// reporting, e.g. a file name and a position in the file.
1950 */
1951 core.String location; 1886 core.String location;
1952 /** 1887
1953 * An optional title for the expression, i.e. a short string describing 1888 /// An optional title for the expression, i.e. a short string describing
1954 * its purpose. This can be used e.g. in UIs which allow to enter the 1889 /// its purpose. This can be used e.g. in UIs which allow to enter the
1955 * expression. 1890 /// expression.
1956 */
1957 core.String title; 1891 core.String title;
1958 1892
1959 Expr(); 1893 Expr();
1960 1894
1961 Expr.fromJson(core.Map _json) { 1895 Expr.fromJson(core.Map _json) {
1962 if (_json.containsKey("description")) { 1896 if (_json.containsKey("description")) {
1963 description = _json["description"]; 1897 description = _json["description"];
1964 } 1898 }
1965 if (_json.containsKey("expression")) { 1899 if (_json.containsKey("expression")) {
1966 expression = _json["expression"]; 1900 expression = _json["expression"];
1967 } 1901 }
1968 if (_json.containsKey("location")) { 1902 if (_json.containsKey("location")) {
1969 location = _json["location"]; 1903 location = _json["location"];
1970 } 1904 }
1971 if (_json.containsKey("title")) { 1905 if (_json.containsKey("title")) {
1972 title = _json["title"]; 1906 title = _json["title"];
1973 } 1907 }
1974 } 1908 }
1975 1909
1976 core.Map<core.String, core.Object> toJson() { 1910 core.Map<core.String, core.Object> toJson() {
1977 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1911 final core.Map<core.String, core.Object> _json =
1912 new core.Map<core.String, core.Object>();
1978 if (description != null) { 1913 if (description != null) {
1979 _json["description"] = description; 1914 _json["description"] = description;
1980 } 1915 }
1981 if (expression != null) { 1916 if (expression != null) {
1982 _json["expression"] = expression; 1917 _json["expression"] = expression;
1983 } 1918 }
1984 if (location != null) { 1919 if (location != null) {
1985 _json["location"] = location; 1920 _json["location"] = location;
1986 } 1921 }
1987 if (title != null) { 1922 if (title != null) {
1988 _json["title"] = title; 1923 _json["title"] = title;
1989 } 1924 }
1990 return _json; 1925 return _json;
1991 } 1926 }
1992 } 1927 }
1993 1928
1994 /** The response containing the roles defined under a resource. */ 1929 /// The response containing the roles defined under a resource.
1995 class ListRolesResponse { 1930 class ListRolesResponse {
1996 /** 1931 /// To retrieve the next page of results, set
1997 * To retrieve the next page of results, set 1932 /// `ListRolesRequest.page_token` to this value.
1998 * `ListRolesRequest.page_token` to this value.
1999 */
2000 core.String nextPageToken; 1933 core.String nextPageToken;
2001 /** The Roles defined on this resource. */ 1934
1935 /// The Roles defined on this resource.
2002 core.List<Role> roles; 1936 core.List<Role> roles;
2003 1937
2004 ListRolesResponse(); 1938 ListRolesResponse();
2005 1939
2006 ListRolesResponse.fromJson(core.Map _json) { 1940 ListRolesResponse.fromJson(core.Map _json) {
2007 if (_json.containsKey("nextPageToken")) { 1941 if (_json.containsKey("nextPageToken")) {
2008 nextPageToken = _json["nextPageToken"]; 1942 nextPageToken = _json["nextPageToken"];
2009 } 1943 }
2010 if (_json.containsKey("roles")) { 1944 if (_json.containsKey("roles")) {
2011 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList(); 1945 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList();
2012 } 1946 }
2013 } 1947 }
2014 1948
2015 core.Map<core.String, core.Object> toJson() { 1949 core.Map<core.String, core.Object> toJson() {
2016 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1950 final core.Map<core.String, core.Object> _json =
1951 new core.Map<core.String, core.Object>();
2017 if (nextPageToken != null) { 1952 if (nextPageToken != null) {
2018 _json["nextPageToken"] = nextPageToken; 1953 _json["nextPageToken"] = nextPageToken;
2019 } 1954 }
2020 if (roles != null) { 1955 if (roles != null) {
2021 _json["roles"] = roles.map((value) => (value).toJson()).toList(); 1956 _json["roles"] = roles.map((value) => (value).toJson()).toList();
2022 } 1957 }
2023 return _json; 1958 return _json;
2024 } 1959 }
2025 } 1960 }
2026 1961
2027 /** The service account keys list response. */ 1962 /// The service account keys list response.
2028 class ListServiceAccountKeysResponse { 1963 class ListServiceAccountKeysResponse {
2029 /** The public keys for the service account. */ 1964 /// The public keys for the service account.
2030 core.List<ServiceAccountKey> keys; 1965 core.List<ServiceAccountKey> keys;
2031 1966
2032 ListServiceAccountKeysResponse(); 1967 ListServiceAccountKeysResponse();
2033 1968
2034 ListServiceAccountKeysResponse.fromJson(core.Map _json) { 1969 ListServiceAccountKeysResponse.fromJson(core.Map _json) {
2035 if (_json.containsKey("keys")) { 1970 if (_json.containsKey("keys")) {
2036 keys = _json["keys"].map((value) => new ServiceAccountKey.fromJson(value)) .toList(); 1971 keys = _json["keys"]
1972 .map((value) => new ServiceAccountKey.fromJson(value))
1973 .toList();
2037 } 1974 }
2038 } 1975 }
2039 1976
2040 core.Map<core.String, core.Object> toJson() { 1977 core.Map<core.String, core.Object> toJson() {
2041 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1978 final core.Map<core.String, core.Object> _json =
1979 new core.Map<core.String, core.Object>();
2042 if (keys != null) { 1980 if (keys != null) {
2043 _json["keys"] = keys.map((value) => (value).toJson()).toList(); 1981 _json["keys"] = keys.map((value) => (value).toJson()).toList();
2044 } 1982 }
2045 return _json; 1983 return _json;
2046 } 1984 }
2047 } 1985 }
2048 1986
2049 /** The service account list response. */ 1987 /// The service account list response.
2050 class ListServiceAccountsResponse { 1988 class ListServiceAccountsResponse {
2051 /** The list of matching service accounts. */ 1989 /// The list of matching service accounts.
2052 core.List<ServiceAccount> accounts; 1990 core.List<ServiceAccount> accounts;
2053 /** 1991
2054 * To retrieve the next page of results, set 1992 /// To retrieve the next page of results, set
2055 * ListServiceAccountsRequest.page_token 1993 /// ListServiceAccountsRequest.page_token
2056 * to this value. 1994 /// to this value.
2057 */
2058 core.String nextPageToken; 1995 core.String nextPageToken;
2059 1996
2060 ListServiceAccountsResponse(); 1997 ListServiceAccountsResponse();
2061 1998
2062 ListServiceAccountsResponse.fromJson(core.Map _json) { 1999 ListServiceAccountsResponse.fromJson(core.Map _json) {
2063 if (_json.containsKey("accounts")) { 2000 if (_json.containsKey("accounts")) {
2064 accounts = _json["accounts"].map((value) => new ServiceAccount.fromJson(va lue)).toList(); 2001 accounts = _json["accounts"]
2002 .map((value) => new ServiceAccount.fromJson(value))
2003 .toList();
2065 } 2004 }
2066 if (_json.containsKey("nextPageToken")) { 2005 if (_json.containsKey("nextPageToken")) {
2067 nextPageToken = _json["nextPageToken"]; 2006 nextPageToken = _json["nextPageToken"];
2068 } 2007 }
2069 } 2008 }
2070 2009
2071 core.Map<core.String, core.Object> toJson() { 2010 core.Map<core.String, core.Object> toJson() {
2072 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2011 final core.Map<core.String, core.Object> _json =
2012 new core.Map<core.String, core.Object>();
2073 if (accounts != null) { 2013 if (accounts != null) {
2074 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); 2014 _json["accounts"] = accounts.map((value) => (value).toJson()).toList();
2075 } 2015 }
2076 if (nextPageToken != null) { 2016 if (nextPageToken != null) {
2077 _json["nextPageToken"] = nextPageToken; 2017 _json["nextPageToken"] = nextPageToken;
2078 } 2018 }
2079 return _json; 2019 return _json;
2080 } 2020 }
2081 } 2021 }
2082 2022
2083 /** A permission which can be included by a role. */ 2023 /// A permission which can be included by a role.
2084 class Permission { 2024 class Permission {
2085 /** 2025 /// The current custom role support level.
2086 * The current custom role support level. 2026 /// Possible string values are:
2087 * Possible string values are: 2027 /// - "SUPPORTED" : Permission is fully supported for custom role use.
2088 * - "SUPPORTED" : Permission is fully supported for custom role use. 2028 /// - "TESTING" : Permission is being tested to check custom role
2089 * - "TESTING" : Permission is being tested to check custom role 2029 /// compatibility.
2090 * compatibility. 2030 /// - "NOT_SUPPORTED" : Permission is not supported for custom role use.
2091 * - "NOT_SUPPORTED" : Permission is not supported for custom role use.
2092 */
2093 core.String customRolesSupportLevel; 2031 core.String customRolesSupportLevel;
2094 /** A brief description of what this Permission is used for. */ 2032
2033 /// A brief description of what this Permission is used for.
2095 core.String description; 2034 core.String description;
2096 /** The name of this Permission. */ 2035
2036 /// The name of this Permission.
2097 core.String name; 2037 core.String name;
2098 /** This permission can ONLY be used in predefined roles. */ 2038
2039 /// This permission can ONLY be used in predefined roles.
2099 core.bool onlyInPredefinedRoles; 2040 core.bool onlyInPredefinedRoles;
2100 /** 2041
2101 * The current launch stage of the permission. 2042 /// The current launch stage of the permission.
2102 * Possible string values are: 2043 /// Possible string values are:
2103 * - "ALPHA" : The permission is currently in an alpha phase. 2044 /// - "ALPHA" : The permission is currently in an alpha phase.
2104 * - "BETA" : The permission is currently in a beta phase. 2045 /// - "BETA" : The permission is currently in a beta phase.
2105 * - "GA" : The permission is generally available. 2046 /// - "GA" : The permission is generally available.
2106 * - "DEPRECATED" : The permission is being deprecated. 2047 /// - "DEPRECATED" : The permission is being deprecated.
2107 */
2108 core.String stage; 2048 core.String stage;
2109 /** The title of this Permission. */ 2049
2050 /// The title of this Permission.
2110 core.String title; 2051 core.String title;
2111 2052
2112 Permission(); 2053 Permission();
2113 2054
2114 Permission.fromJson(core.Map _json) { 2055 Permission.fromJson(core.Map _json) {
2115 if (_json.containsKey("customRolesSupportLevel")) { 2056 if (_json.containsKey("customRolesSupportLevel")) {
2116 customRolesSupportLevel = _json["customRolesSupportLevel"]; 2057 customRolesSupportLevel = _json["customRolesSupportLevel"];
2117 } 2058 }
2118 if (_json.containsKey("description")) { 2059 if (_json.containsKey("description")) {
2119 description = _json["description"]; 2060 description = _json["description"];
2120 } 2061 }
2121 if (_json.containsKey("name")) { 2062 if (_json.containsKey("name")) {
2122 name = _json["name"]; 2063 name = _json["name"];
2123 } 2064 }
2124 if (_json.containsKey("onlyInPredefinedRoles")) { 2065 if (_json.containsKey("onlyInPredefinedRoles")) {
2125 onlyInPredefinedRoles = _json["onlyInPredefinedRoles"]; 2066 onlyInPredefinedRoles = _json["onlyInPredefinedRoles"];
2126 } 2067 }
2127 if (_json.containsKey("stage")) { 2068 if (_json.containsKey("stage")) {
2128 stage = _json["stage"]; 2069 stage = _json["stage"];
2129 } 2070 }
2130 if (_json.containsKey("title")) { 2071 if (_json.containsKey("title")) {
2131 title = _json["title"]; 2072 title = _json["title"];
2132 } 2073 }
2133 } 2074 }
2134 2075
2135 core.Map<core.String, core.Object> toJson() { 2076 core.Map<core.String, core.Object> toJson() {
2136 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2077 final core.Map<core.String, core.Object> _json =
2078 new core.Map<core.String, core.Object>();
2137 if (customRolesSupportLevel != null) { 2079 if (customRolesSupportLevel != null) {
2138 _json["customRolesSupportLevel"] = customRolesSupportLevel; 2080 _json["customRolesSupportLevel"] = customRolesSupportLevel;
2139 } 2081 }
2140 if (description != null) { 2082 if (description != null) {
2141 _json["description"] = description; 2083 _json["description"] = description;
2142 } 2084 }
2143 if (name != null) { 2085 if (name != null) {
2144 _json["name"] = name; 2086 _json["name"] = name;
2145 } 2087 }
2146 if (onlyInPredefinedRoles != null) { 2088 if (onlyInPredefinedRoles != null) {
2147 _json["onlyInPredefinedRoles"] = onlyInPredefinedRoles; 2089 _json["onlyInPredefinedRoles"] = onlyInPredefinedRoles;
2148 } 2090 }
2149 if (stage != null) { 2091 if (stage != null) {
2150 _json["stage"] = stage; 2092 _json["stage"] = stage;
2151 } 2093 }
2152 if (title != null) { 2094 if (title != null) {
2153 _json["title"] = title; 2095 _json["title"] = title;
2154 } 2096 }
2155 return _json; 2097 return _json;
2156 } 2098 }
2157 } 2099 }
2158 2100
2159 /** 2101 /// Defines an Identity and Access Management (IAM) policy. It is used to
2160 * Defines an Identity and Access Management (IAM) policy. It is used to 2102 /// specify access control policies for Cloud Platform resources.
2161 * specify access control policies for Cloud Platform resources. 2103 ///
2162 * 2104 ///
2163 * 2105 /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
2164 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of 2106 /// `members` to a `role`, where the members can be user accounts, Google
2165 * `members` to a `role`, where the members can be user accounts, Google groups, 2107 /// groups,
2166 * Google domains, and service accounts. A `role` is a named list of permissions 2108 /// Google domains, and service accounts. A `role` is a named list of
2167 * defined by IAM. 2109 /// permissions
2168 * 2110 /// defined by IAM.
2169 * **Example** 2111 ///
2170 * 2112 /// **Example**
2171 * { 2113 ///
2172 * "bindings": [ 2114 /// {
2173 * { 2115 /// "bindings": [
2174 * "role": "roles/owner", 2116 /// {
2175 * "members": [ 2117 /// "role": "roles/owner",
2176 * "user:mike@example.com", 2118 /// "members": [
2177 * "group:admins@example.com", 2119 /// "user:mike@example.com",
2178 * "domain:google.com", 2120 /// "group:admins@example.com",
2179 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", 2121 /// "domain:google.com",
2180 * ] 2122 /// "serviceAccount:my-other-app@appspot.gserviceaccount.com",
2181 * }, 2123 /// ]
2182 * { 2124 /// },
2183 * "role": "roles/viewer", 2125 /// {
2184 * "members": ["user:sean@example.com"] 2126 /// "role": "roles/viewer",
2185 * } 2127 /// "members": ["user:sean@example.com"]
2186 * ] 2128 /// }
2187 * } 2129 /// ]
2188 * 2130 /// }
2189 * For a description of IAM and its features, see the 2131 ///
2190 * [IAM developer's guide](https://cloud.google.com/iam). 2132 /// For a description of IAM and its features, see the
2191 */ 2133 /// [IAM developer's guide](https://cloud.google.com/iam).
2192 class Policy { 2134 class Policy {
2193 /** 2135 /// Associates a list of `members` to a `role`.
2194 * Associates a list of `members` to a `role`. 2136 /// `bindings` with no members will result in an error.
2195 * `bindings` with no members will result in an error.
2196 */
2197 core.List<Binding> bindings; 2137 core.List<Binding> bindings;
2198 /** 2138
2199 * `etag` is used for optimistic concurrency control as a way to help 2139 /// `etag` is used for optimistic concurrency control as a way to help
2200 * prevent simultaneous updates of a policy from overwriting each other. 2140 /// prevent simultaneous updates of a policy from overwriting each other.
2201 * It is strongly suggested that systems make use of the `etag` in the 2141 /// It is strongly suggested that systems make use of the `etag` in the
2202 * read-modify-write cycle to perform policy updates in order to avoid race 2142 /// read-modify-write cycle to perform policy updates in order to avoid race
2203 * conditions: An `etag` is returned in the response to `getIamPolicy`, and 2143 /// conditions: An `etag` is returned in the response to `getIamPolicy`, and
2204 * systems are expected to put that etag in the request to `setIamPolicy` to 2144 /// systems are expected to put that etag in the request to `setIamPolicy` to
2205 * ensure that their change will be applied to the same version of the policy. 2145 /// ensure that their change will be applied to the same version of the
2206 * 2146 /// policy.
2207 * If no `etag` is provided in the call to `setIamPolicy`, then the existing 2147 ///
2208 * policy is overwritten blindly. 2148 /// If no `etag` is provided in the call to `setIamPolicy`, then the existing
2209 */ 2149 /// policy is overwritten blindly.
2210 core.String etag; 2150 core.String etag;
2211 core.List<core.int> get etagAsBytes { 2151 core.List<core.int> get etagAsBytes {
2212 return convert.BASE64.decode(etag); 2152 return convert.BASE64.decode(etag);
2213 } 2153 }
2214 2154
2215 void set etagAsBytes(core.List<core.int> _bytes) { 2155 void set etagAsBytes(core.List<core.int> _bytes) {
2216 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2156 etag =
2157 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2217 } 2158 }
2218 /** Version of the `Policy`. The default version is 0. */ 2159
2160 /// Version of the `Policy`. The default version is 0.
2219 core.int version; 2161 core.int version;
2220 2162
2221 Policy(); 2163 Policy();
2222 2164
2223 Policy.fromJson(core.Map _json) { 2165 Policy.fromJson(core.Map _json) {
2224 if (_json.containsKey("bindings")) { 2166 if (_json.containsKey("bindings")) {
2225 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList(); 2167 bindings = _json["bindings"]
2168 .map((value) => new Binding.fromJson(value))
2169 .toList();
2226 } 2170 }
2227 if (_json.containsKey("etag")) { 2171 if (_json.containsKey("etag")) {
2228 etag = _json["etag"]; 2172 etag = _json["etag"];
2229 } 2173 }
2230 if (_json.containsKey("version")) { 2174 if (_json.containsKey("version")) {
2231 version = _json["version"]; 2175 version = _json["version"];
2232 } 2176 }
2233 } 2177 }
2234 2178
2235 core.Map<core.String, core.Object> toJson() { 2179 core.Map<core.String, core.Object> toJson() {
2236 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2180 final core.Map<core.String, core.Object> _json =
2181 new core.Map<core.String, core.Object>();
2237 if (bindings != null) { 2182 if (bindings != null) {
2238 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); 2183 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
2239 } 2184 }
2240 if (etag != null) { 2185 if (etag != null) {
2241 _json["etag"] = etag; 2186 _json["etag"] = etag;
2242 } 2187 }
2243 if (version != null) { 2188 if (version != null) {
2244 _json["version"] = version; 2189 _json["version"] = version;
2245 } 2190 }
2246 return _json; 2191 return _json;
2247 } 2192 }
2248 } 2193 }
2249 2194
2250 /** The difference delta between two policies. */ 2195 /// The difference delta between two policies.
2251 class PolicyDelta { 2196 class PolicyDelta {
2252 /** The delta for Bindings between two policies. */ 2197 /// The delta for Bindings between two policies.
2253 core.List<BindingDelta> bindingDeltas; 2198 core.List<BindingDelta> bindingDeltas;
2254 2199
2255 PolicyDelta(); 2200 PolicyDelta();
2256 2201
2257 PolicyDelta.fromJson(core.Map _json) { 2202 PolicyDelta.fromJson(core.Map _json) {
2258 if (_json.containsKey("bindingDeltas")) { 2203 if (_json.containsKey("bindingDeltas")) {
2259 bindingDeltas = _json["bindingDeltas"].map((value) => new BindingDelta.fro mJson(value)).toList(); 2204 bindingDeltas = _json["bindingDeltas"]
2205 .map((value) => new BindingDelta.fromJson(value))
2206 .toList();
2260 } 2207 }
2261 } 2208 }
2262 2209
2263 core.Map<core.String, core.Object> toJson() { 2210 core.Map<core.String, core.Object> toJson() {
2264 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2211 final core.Map<core.String, core.Object> _json =
2212 new core.Map<core.String, core.Object>();
2265 if (bindingDeltas != null) { 2213 if (bindingDeltas != null) {
2266 _json["bindingDeltas"] = bindingDeltas.map((value) => (value).toJson()).to List(); 2214 _json["bindingDeltas"] =
2215 bindingDeltas.map((value) => (value).toJson()).toList();
2267 } 2216 }
2268 return _json; 2217 return _json;
2269 } 2218 }
2270 } 2219 }
2271 2220
2272 /** The grantable role query request. */ 2221 /// The grantable role query request.
2273 class QueryGrantableRolesRequest { 2222 class QueryGrantableRolesRequest {
2274 /** 2223 /// Required. The full resource name to query from the list of grantable
2275 * Required. The full resource name to query from the list of grantable roles. 2224 /// roles.
2276 * 2225 ///
2277 * The name follows the Google Cloud Platform resource format. 2226 /// The name follows the Google Cloud Platform resource format.
2278 * For example, a Cloud Platform project with id `my-project` will be named 2227 /// For example, a Cloud Platform project with id `my-project` will be named
2279 * `//cloudresourcemanager.googleapis.com/projects/my-project`. 2228 /// `//cloudresourcemanager.googleapis.com/projects/my-project`.
2280 */
2281 core.String fullResourceName; 2229 core.String fullResourceName;
2282 /** Optional limit on the number of roles to include in the response. */ 2230
2231 /// Optional limit on the number of roles to include in the response.
2283 core.int pageSize; 2232 core.int pageSize;
2284 /** 2233
2285 * Optional pagination token returned in an earlier 2234 /// Optional pagination token returned in an earlier
2286 * QueryGrantableRolesResponse. 2235 /// QueryGrantableRolesResponse.
2287 */
2288 core.String pageToken; 2236 core.String pageToken;
2289 /** 2237
2290 * 2238 ///
2291 * Possible string values are: 2239 /// Possible string values are:
2292 * - "BASIC" : Omits the `included_permissions` field. 2240 /// - "BASIC" : Omits the `included_permissions` field.
2293 * This is the default value. 2241 /// This is the default value.
2294 * - "FULL" : Returns all fields. 2242 /// - "FULL" : Returns all fields.
2295 */
2296 core.String view; 2243 core.String view;
2297 2244
2298 QueryGrantableRolesRequest(); 2245 QueryGrantableRolesRequest();
2299 2246
2300 QueryGrantableRolesRequest.fromJson(core.Map _json) { 2247 QueryGrantableRolesRequest.fromJson(core.Map _json) {
2301 if (_json.containsKey("fullResourceName")) { 2248 if (_json.containsKey("fullResourceName")) {
2302 fullResourceName = _json["fullResourceName"]; 2249 fullResourceName = _json["fullResourceName"];
2303 } 2250 }
2304 if (_json.containsKey("pageSize")) { 2251 if (_json.containsKey("pageSize")) {
2305 pageSize = _json["pageSize"]; 2252 pageSize = _json["pageSize"];
2306 } 2253 }
2307 if (_json.containsKey("pageToken")) { 2254 if (_json.containsKey("pageToken")) {
2308 pageToken = _json["pageToken"]; 2255 pageToken = _json["pageToken"];
2309 } 2256 }
2310 if (_json.containsKey("view")) { 2257 if (_json.containsKey("view")) {
2311 view = _json["view"]; 2258 view = _json["view"];
2312 } 2259 }
2313 } 2260 }
2314 2261
2315 core.Map<core.String, core.Object> toJson() { 2262 core.Map<core.String, core.Object> toJson() {
2316 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2263 final core.Map<core.String, core.Object> _json =
2264 new core.Map<core.String, core.Object>();
2317 if (fullResourceName != null) { 2265 if (fullResourceName != null) {
2318 _json["fullResourceName"] = fullResourceName; 2266 _json["fullResourceName"] = fullResourceName;
2319 } 2267 }
2320 if (pageSize != null) { 2268 if (pageSize != null) {
2321 _json["pageSize"] = pageSize; 2269 _json["pageSize"] = pageSize;
2322 } 2270 }
2323 if (pageToken != null) { 2271 if (pageToken != null) {
2324 _json["pageToken"] = pageToken; 2272 _json["pageToken"] = pageToken;
2325 } 2273 }
2326 if (view != null) { 2274 if (view != null) {
2327 _json["view"] = view; 2275 _json["view"] = view;
2328 } 2276 }
2329 return _json; 2277 return _json;
2330 } 2278 }
2331 } 2279 }
2332 2280
2333 /** The grantable role query response. */ 2281 /// The grantable role query response.
2334 class QueryGrantableRolesResponse { 2282 class QueryGrantableRolesResponse {
2335 /** 2283 /// To retrieve the next page of results, set
2336 * To retrieve the next page of results, set 2284 /// `QueryGrantableRolesRequest.page_token` to this value.
2337 * `QueryGrantableRolesRequest.page_token` to this value.
2338 */
2339 core.String nextPageToken; 2285 core.String nextPageToken;
2340 /** The list of matching roles. */ 2286
2287 /// The list of matching roles.
2341 core.List<Role> roles; 2288 core.List<Role> roles;
2342 2289
2343 QueryGrantableRolesResponse(); 2290 QueryGrantableRolesResponse();
2344 2291
2345 QueryGrantableRolesResponse.fromJson(core.Map _json) { 2292 QueryGrantableRolesResponse.fromJson(core.Map _json) {
2346 if (_json.containsKey("nextPageToken")) { 2293 if (_json.containsKey("nextPageToken")) {
2347 nextPageToken = _json["nextPageToken"]; 2294 nextPageToken = _json["nextPageToken"];
2348 } 2295 }
2349 if (_json.containsKey("roles")) { 2296 if (_json.containsKey("roles")) {
2350 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList(); 2297 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList();
2351 } 2298 }
2352 } 2299 }
2353 2300
2354 core.Map<core.String, core.Object> toJson() { 2301 core.Map<core.String, core.Object> toJson() {
2355 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2302 final core.Map<core.String, core.Object> _json =
2303 new core.Map<core.String, core.Object>();
2356 if (nextPageToken != null) { 2304 if (nextPageToken != null) {
2357 _json["nextPageToken"] = nextPageToken; 2305 _json["nextPageToken"] = nextPageToken;
2358 } 2306 }
2359 if (roles != null) { 2307 if (roles != null) {
2360 _json["roles"] = roles.map((value) => (value).toJson()).toList(); 2308 _json["roles"] = roles.map((value) => (value).toJson()).toList();
2361 } 2309 }
2362 return _json; 2310 return _json;
2363 } 2311 }
2364 } 2312 }
2365 2313
2366 /** A request to get permissions which can be tested on a resource. */ 2314 /// A request to get permissions which can be tested on a resource.
2367 class QueryTestablePermissionsRequest { 2315 class QueryTestablePermissionsRequest {
2368 /** 2316 /// Required. The full resource name to query from the list of testable
2369 * Required. The full resource name to query from the list of testable 2317 /// permissions.
2370 * permissions. 2318 ///
2371 * 2319 /// The name follows the Google Cloud Platform resource format.
2372 * The name follows the Google Cloud Platform resource format. 2320 /// For example, a Cloud Platform project with id `my-project` will be named
2373 * For example, a Cloud Platform project with id `my-project` will be named 2321 /// `//cloudresourcemanager.googleapis.com/projects/my-project`.
2374 * `//cloudresourcemanager.googleapis.com/projects/my-project`.
2375 */
2376 core.String fullResourceName; 2322 core.String fullResourceName;
2377 /** 2323
2378 * Optional limit on the number of permissions to include in the response. 2324 /// Optional limit on the number of permissions to include in the response.
2379 */
2380 core.int pageSize; 2325 core.int pageSize;
2381 /** 2326
2382 * Optional pagination token returned in an earlier 2327 /// Optional pagination token returned in an earlier
2383 * QueryTestablePermissionsRequest. 2328 /// QueryTestablePermissionsRequest.
2384 */
2385 core.String pageToken; 2329 core.String pageToken;
2386 2330
2387 QueryTestablePermissionsRequest(); 2331 QueryTestablePermissionsRequest();
2388 2332
2389 QueryTestablePermissionsRequest.fromJson(core.Map _json) { 2333 QueryTestablePermissionsRequest.fromJson(core.Map _json) {
2390 if (_json.containsKey("fullResourceName")) { 2334 if (_json.containsKey("fullResourceName")) {
2391 fullResourceName = _json["fullResourceName"]; 2335 fullResourceName = _json["fullResourceName"];
2392 } 2336 }
2393 if (_json.containsKey("pageSize")) { 2337 if (_json.containsKey("pageSize")) {
2394 pageSize = _json["pageSize"]; 2338 pageSize = _json["pageSize"];
2395 } 2339 }
2396 if (_json.containsKey("pageToken")) { 2340 if (_json.containsKey("pageToken")) {
2397 pageToken = _json["pageToken"]; 2341 pageToken = _json["pageToken"];
2398 } 2342 }
2399 } 2343 }
2400 2344
2401 core.Map<core.String, core.Object> toJson() { 2345 core.Map<core.String, core.Object> toJson() {
2402 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2346 final core.Map<core.String, core.Object> _json =
2347 new core.Map<core.String, core.Object>();
2403 if (fullResourceName != null) { 2348 if (fullResourceName != null) {
2404 _json["fullResourceName"] = fullResourceName; 2349 _json["fullResourceName"] = fullResourceName;
2405 } 2350 }
2406 if (pageSize != null) { 2351 if (pageSize != null) {
2407 _json["pageSize"] = pageSize; 2352 _json["pageSize"] = pageSize;
2408 } 2353 }
2409 if (pageToken != null) { 2354 if (pageToken != null) {
2410 _json["pageToken"] = pageToken; 2355 _json["pageToken"] = pageToken;
2411 } 2356 }
2412 return _json; 2357 return _json;
2413 } 2358 }
2414 } 2359 }
2415 2360
2416 /** The response containing permissions which can be tested on a resource. */ 2361 /// The response containing permissions which can be tested on a resource.
2417 class QueryTestablePermissionsResponse { 2362 class QueryTestablePermissionsResponse {
2418 /** 2363 /// To retrieve the next page of results, set
2419 * To retrieve the next page of results, set 2364 /// `QueryTestableRolesRequest.page_token` to this value.
2420 * `QueryTestableRolesRequest.page_token` to this value.
2421 */
2422 core.String nextPageToken; 2365 core.String nextPageToken;
2423 /** The Permissions testable on the requested resource. */ 2366
2367 /// The Permissions testable on the requested resource.
2424 core.List<Permission> permissions; 2368 core.List<Permission> permissions;
2425 2369
2426 QueryTestablePermissionsResponse(); 2370 QueryTestablePermissionsResponse();
2427 2371
2428 QueryTestablePermissionsResponse.fromJson(core.Map _json) { 2372 QueryTestablePermissionsResponse.fromJson(core.Map _json) {
2429 if (_json.containsKey("nextPageToken")) { 2373 if (_json.containsKey("nextPageToken")) {
2430 nextPageToken = _json["nextPageToken"]; 2374 nextPageToken = _json["nextPageToken"];
2431 } 2375 }
2432 if (_json.containsKey("permissions")) { 2376 if (_json.containsKey("permissions")) {
2433 permissions = _json["permissions"].map((value) => new Permission.fromJson( value)).toList(); 2377 permissions = _json["permissions"]
2378 .map((value) => new Permission.fromJson(value))
2379 .toList();
2434 } 2380 }
2435 } 2381 }
2436 2382
2437 core.Map<core.String, core.Object> toJson() { 2383 core.Map<core.String, core.Object> toJson() {
2438 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2384 final core.Map<core.String, core.Object> _json =
2385 new core.Map<core.String, core.Object>();
2439 if (nextPageToken != null) { 2386 if (nextPageToken != null) {
2440 _json["nextPageToken"] = nextPageToken; 2387 _json["nextPageToken"] = nextPageToken;
2441 } 2388 }
2442 if (permissions != null) { 2389 if (permissions != null) {
2443 _json["permissions"] = permissions.map((value) => (value).toJson()).toList (); 2390 _json["permissions"] =
2391 permissions.map((value) => (value).toJson()).toList();
2444 } 2392 }
2445 return _json; 2393 return _json;
2446 } 2394 }
2447 } 2395 }
2448 2396
2449 /** A role in the Identity and Access Management API. */ 2397 /// A role in the Identity and Access Management API.
2450 class Role { 2398 class Role {
2451 /** 2399 /// The current deleted state of the role. This field is read only.
2452 * The current deleted state of the role. This field is read only. 2400 /// It will be ignored in calls to CreateRole and UpdateRole.
2453 * It will be ignored in calls to CreateRole and UpdateRole.
2454 */
2455 core.bool deleted; 2401 core.bool deleted;
2456 /** Optional. A human-readable description for the role. */ 2402
2403 /// Optional. A human-readable description for the role.
2457 core.String description; 2404 core.String description;
2458 /** Used to perform a consistent read-modify-write. */ 2405
2406 /// Used to perform a consistent read-modify-write.
2459 core.String etag; 2407 core.String etag;
2460 core.List<core.int> get etagAsBytes { 2408 core.List<core.int> get etagAsBytes {
2461 return convert.BASE64.decode(etag); 2409 return convert.BASE64.decode(etag);
2462 } 2410 }
2463 2411
2464 void set etagAsBytes(core.List<core.int> _bytes) { 2412 void set etagAsBytes(core.List<core.int> _bytes) {
2465 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2413 etag =
2414 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2466 } 2415 }
2467 /** 2416
2468 * The names of the permissions this role grants when bound in an IAM policy. 2417 /// The names of the permissions this role grants when bound in an IAM
2469 */ 2418 /// policy.
2470 core.List<core.String> includedPermissions; 2419 core.List<core.String> includedPermissions;
2471 /** 2420
2472 * The name of the role. 2421 /// The name of the role.
2473 * 2422 ///
2474 * When Role is used in CreateRole, the role name must not be set. 2423 /// When Role is used in CreateRole, the role name must not be set.
2475 * 2424 ///
2476 * When Role is used in output and other input such as UpdateRole, the role 2425 /// When Role is used in output and other input such as UpdateRole, the role
2477 * name is the complete path, e.g., roles/logging.viewer for curated roles 2426 /// name is the complete path, e.g., roles/logging.viewer for curated roles
2478 * and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. 2427 /// and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom
2479 */ 2428 /// roles.
2480 core.String name; 2429 core.String name;
2481 /** 2430
2482 * The current launch stage of the role. 2431 /// The current launch stage of the role.
2483 * Possible string values are: 2432 /// Possible string values are:
2484 * - "ALPHA" : The user has indicated this role is currently in an alpha 2433 /// - "ALPHA" : The user has indicated this role is currently in an alpha
2485 * phase. 2434 /// phase.
2486 * - "BETA" : The user has indicated this role is currently in a beta phase. 2435 /// - "BETA" : The user has indicated this role is currently in a beta phase.
2487 * - "GA" : The user has indicated this role is generally available. 2436 /// - "GA" : The user has indicated this role is generally available.
2488 * - "DEPRECATED" : The user has indicated this role is being deprecated. 2437 /// - "DEPRECATED" : The user has indicated this role is being deprecated.
2489 * - "DISABLED" : This role is disabled and will not contribute permissions to 2438 /// - "DISABLED" : This role is disabled and will not contribute permissions
2490 * any members 2439 /// to any members
2491 * it is granted to in policies. 2440 /// it is granted to in policies.
2492 * - "EAP" : The user has indicated this role is currently in an eap phase. 2441 /// - "EAP" : The user has indicated this role is currently in an eap phase.
2493 */
2494 core.String stage; 2442 core.String stage;
2495 /** 2443
2496 * Optional. A human-readable title for the role. Typically this 2444 /// Optional. A human-readable title for the role. Typically this
2497 * is limited to 100 UTF-8 bytes. 2445 /// is limited to 100 UTF-8 bytes.
2498 */
2499 core.String title; 2446 core.String title;
2500 2447
2501 Role(); 2448 Role();
2502 2449
2503 Role.fromJson(core.Map _json) { 2450 Role.fromJson(core.Map _json) {
2504 if (_json.containsKey("deleted")) { 2451 if (_json.containsKey("deleted")) {
2505 deleted = _json["deleted"]; 2452 deleted = _json["deleted"];
2506 } 2453 }
2507 if (_json.containsKey("description")) { 2454 if (_json.containsKey("description")) {
2508 description = _json["description"]; 2455 description = _json["description"];
2509 } 2456 }
2510 if (_json.containsKey("etag")) { 2457 if (_json.containsKey("etag")) {
2511 etag = _json["etag"]; 2458 etag = _json["etag"];
2512 } 2459 }
2513 if (_json.containsKey("includedPermissions")) { 2460 if (_json.containsKey("includedPermissions")) {
2514 includedPermissions = _json["includedPermissions"]; 2461 includedPermissions = _json["includedPermissions"];
2515 } 2462 }
2516 if (_json.containsKey("name")) { 2463 if (_json.containsKey("name")) {
2517 name = _json["name"]; 2464 name = _json["name"];
2518 } 2465 }
2519 if (_json.containsKey("stage")) { 2466 if (_json.containsKey("stage")) {
2520 stage = _json["stage"]; 2467 stage = _json["stage"];
2521 } 2468 }
2522 if (_json.containsKey("title")) { 2469 if (_json.containsKey("title")) {
2523 title = _json["title"]; 2470 title = _json["title"];
2524 } 2471 }
2525 } 2472 }
2526 2473
2527 core.Map<core.String, core.Object> toJson() { 2474 core.Map<core.String, core.Object> toJson() {
2528 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2475 final core.Map<core.String, core.Object> _json =
2476 new core.Map<core.String, core.Object>();
2529 if (deleted != null) { 2477 if (deleted != null) {
2530 _json["deleted"] = deleted; 2478 _json["deleted"] = deleted;
2531 } 2479 }
2532 if (description != null) { 2480 if (description != null) {
2533 _json["description"] = description; 2481 _json["description"] = description;
2534 } 2482 }
2535 if (etag != null) { 2483 if (etag != null) {
2536 _json["etag"] = etag; 2484 _json["etag"] = etag;
2537 } 2485 }
2538 if (includedPermissions != null) { 2486 if (includedPermissions != null) {
2539 _json["includedPermissions"] = includedPermissions; 2487 _json["includedPermissions"] = includedPermissions;
2540 } 2488 }
2541 if (name != null) { 2489 if (name != null) {
2542 _json["name"] = name; 2490 _json["name"] = name;
2543 } 2491 }
2544 if (stage != null) { 2492 if (stage != null) {
2545 _json["stage"] = stage; 2493 _json["stage"] = stage;
2546 } 2494 }
2547 if (title != null) { 2495 if (title != null) {
2548 _json["title"] = title; 2496 _json["title"] = title;
2549 } 2497 }
2550 return _json; 2498 return _json;
2551 } 2499 }
2552 } 2500 }
2553 2501
2554 /** 2502 /// A service account in the Identity and Access Management API.
2555 * A service account in the Identity and Access Management API. 2503 ///
2556 * 2504 /// To create a service account, specify the `project_id` and the `account_id`
2557 * To create a service account, specify the `project_id` and the `account_id` 2505 /// for the account. The `account_id` is unique within the project, and is
2558 * for the account. The `account_id` is unique within the project, and is used 2506 /// used
2559 * to generate the service account email address and a stable 2507 /// to generate the service account email address and a stable
2560 * `unique_id`. 2508 /// `unique_id`.
2561 * 2509 ///
2562 * If the account already exists, the account's resource name is returned 2510 /// If the account already exists, the account's resource name is returned
2563 * in util::Status's ResourceInfo.resource_name in the format of 2511 /// in util::Status's ResourceInfo.resource_name in the format of
2564 * projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller can 2512 /// projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}. The caller
2565 * use the name in other methods to access the account. 2513 /// can
2566 * 2514 /// use the name in other methods to access the account.
2567 * All other methods can identify the service account using the format 2515 ///
2568 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 2516 /// All other methods can identify the service account using the format
2569 * Using `-` as a wildcard for the project will infer the project from 2517 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
2570 * the account. The `account` value can be the `email` address or the 2518 /// Using `-` as a wildcard for the project will infer the project from
2571 * `unique_id` of the service account. 2519 /// the account. The `account` value can be the `email` address or the
2572 */ 2520 /// `unique_id` of the service account.
2573 class ServiceAccount { 2521 class ServiceAccount {
2574 /** 2522 /// Optional. A user-specified description of the service account. Must be
2575 * Optional. A user-specified description of the service account. Must be 2523 /// fewer than 100 UTF-8 bytes.
2576 * fewer than 100 UTF-8 bytes.
2577 */
2578 core.String displayName; 2524 core.String displayName;
2579 /** @OutputOnly The email address of the service account. */ 2525
2526 /// @OutputOnly The email address of the service account.
2580 core.String email; 2527 core.String email;
2581 /** Used to perform a consistent read-modify-write. */ 2528
2529 /// Used to perform a consistent read-modify-write.
2582 core.String etag; 2530 core.String etag;
2583 core.List<core.int> get etagAsBytes { 2531 core.List<core.int> get etagAsBytes {
2584 return convert.BASE64.decode(etag); 2532 return convert.BASE64.decode(etag);
2585 } 2533 }
2586 2534
2587 void set etagAsBytes(core.List<core.int> _bytes) { 2535 void set etagAsBytes(core.List<core.int> _bytes) {
2588 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2536 etag =
2537 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2589 } 2538 }
2590 /** 2539
2591 * The resource name of the service account in the following format: 2540 /// The resource name of the service account in the following format:
2592 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 2541 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
2593 * 2542 ///
2594 * Requests using `-` as a wildcard for the project will infer the project 2543 /// Requests using `-` as a wildcard for the project will infer the project
2595 * from the `account` and the `account` value can be the `email` address or 2544 /// from the `account` and the `account` value can be the `email` address or
2596 * the `unique_id` of the service account. 2545 /// the `unique_id` of the service account.
2597 * 2546 ///
2598 * In responses the resource name will always be in the format 2547 /// In responses the resource name will always be in the format
2599 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`. 2548 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}`.
2600 */
2601 core.String name; 2549 core.String name;
2602 /** 2550
2603 * @OutputOnly. The OAuth2 client id for the service account. 2551 /// @OutputOnly. The OAuth2 client id for the service account.
2604 * This is used in conjunction with the OAuth2 clientconfig API to make 2552 /// This is used in conjunction with the OAuth2 clientconfig API to make
2605 * three legged OAuth2 (3LO) flows to access the data of Google users. 2553 /// three legged OAuth2 (3LO) flows to access the data of Google users.
2606 */
2607 core.String oauth2ClientId; 2554 core.String oauth2ClientId;
2608 /** @OutputOnly The id of the project that owns the service account. */ 2555
2556 /// @OutputOnly The id of the project that owns the service account.
2609 core.String projectId; 2557 core.String projectId;
2610 /** @OutputOnly The unique and stable id of the service account. */ 2558
2559 /// @OutputOnly The unique and stable id of the service account.
2611 core.String uniqueId; 2560 core.String uniqueId;
2612 2561
2613 ServiceAccount(); 2562 ServiceAccount();
2614 2563
2615 ServiceAccount.fromJson(core.Map _json) { 2564 ServiceAccount.fromJson(core.Map _json) {
2616 if (_json.containsKey("displayName")) { 2565 if (_json.containsKey("displayName")) {
2617 displayName = _json["displayName"]; 2566 displayName = _json["displayName"];
2618 } 2567 }
2619 if (_json.containsKey("email")) { 2568 if (_json.containsKey("email")) {
2620 email = _json["email"]; 2569 email = _json["email"];
2621 } 2570 }
2622 if (_json.containsKey("etag")) { 2571 if (_json.containsKey("etag")) {
2623 etag = _json["etag"]; 2572 etag = _json["etag"];
2624 } 2573 }
2625 if (_json.containsKey("name")) { 2574 if (_json.containsKey("name")) {
2626 name = _json["name"]; 2575 name = _json["name"];
2627 } 2576 }
2628 if (_json.containsKey("oauth2ClientId")) { 2577 if (_json.containsKey("oauth2ClientId")) {
2629 oauth2ClientId = _json["oauth2ClientId"]; 2578 oauth2ClientId = _json["oauth2ClientId"];
2630 } 2579 }
2631 if (_json.containsKey("projectId")) { 2580 if (_json.containsKey("projectId")) {
2632 projectId = _json["projectId"]; 2581 projectId = _json["projectId"];
2633 } 2582 }
2634 if (_json.containsKey("uniqueId")) { 2583 if (_json.containsKey("uniqueId")) {
2635 uniqueId = _json["uniqueId"]; 2584 uniqueId = _json["uniqueId"];
2636 } 2585 }
2637 } 2586 }
2638 2587
2639 core.Map<core.String, core.Object> toJson() { 2588 core.Map<core.String, core.Object> toJson() {
2640 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2589 final core.Map<core.String, core.Object> _json =
2590 new core.Map<core.String, core.Object>();
2641 if (displayName != null) { 2591 if (displayName != null) {
2642 _json["displayName"] = displayName; 2592 _json["displayName"] = displayName;
2643 } 2593 }
2644 if (email != null) { 2594 if (email != null) {
2645 _json["email"] = email; 2595 _json["email"] = email;
2646 } 2596 }
2647 if (etag != null) { 2597 if (etag != null) {
2648 _json["etag"] = etag; 2598 _json["etag"] = etag;
2649 } 2599 }
2650 if (name != null) { 2600 if (name != null) {
2651 _json["name"] = name; 2601 _json["name"] = name;
2652 } 2602 }
2653 if (oauth2ClientId != null) { 2603 if (oauth2ClientId != null) {
2654 _json["oauth2ClientId"] = oauth2ClientId; 2604 _json["oauth2ClientId"] = oauth2ClientId;
2655 } 2605 }
2656 if (projectId != null) { 2606 if (projectId != null) {
2657 _json["projectId"] = projectId; 2607 _json["projectId"] = projectId;
2658 } 2608 }
2659 if (uniqueId != null) { 2609 if (uniqueId != null) {
2660 _json["uniqueId"] = uniqueId; 2610 _json["uniqueId"] = uniqueId;
2661 } 2611 }
2662 return _json; 2612 return _json;
2663 } 2613 }
2664 } 2614 }
2665 2615
2666 /** 2616 /// Represents a service account key.
2667 * Represents a service account key. 2617 ///
2668 * 2618 /// A service account has two sets of key-pairs: user-managed, and
2669 * A service account has two sets of key-pairs: user-managed, and 2619 /// system-managed.
2670 * system-managed. 2620 ///
2671 * 2621 /// User-managed key-pairs can be created and deleted by users. Users are
2672 * User-managed key-pairs can be created and deleted by users. Users are 2622 /// responsible for rotating these keys periodically to ensure security of
2673 * responsible for rotating these keys periodically to ensure security of 2623 /// their service accounts. Users retain the private key of these key-pairs,
2674 * their service accounts. Users retain the private key of these key-pairs, 2624 /// and Google retains ONLY the public key.
2675 * and Google retains ONLY the public key. 2625 ///
2676 * 2626 /// System-managed key-pairs are managed automatically by Google, and rotated
2677 * System-managed key-pairs are managed automatically by Google, and rotated 2627 /// daily without user intervention. The private key never leaves Google's
2678 * daily without user intervention. The private key never leaves Google's 2628 /// servers to maximize security.
2679 * servers to maximize security. 2629 ///
2680 * 2630 /// Public keys for all service accounts are also published at the OAuth2
2681 * Public keys for all service accounts are also published at the OAuth2 2631 /// Service Account API.
2682 * Service Account API.
2683 */
2684 class ServiceAccountKey { 2632 class ServiceAccountKey {
2685 /** 2633 /// Specifies the algorithm (and possibly key size) for the key.
2686 * Specifies the algorithm (and possibly key size) for the key. 2634 /// Possible string values are:
2687 * Possible string values are: 2635 /// - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm.
2688 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm. 2636 /// - "KEY_ALG_RSA_1024" : 1k RSA Key.
2689 * - "KEY_ALG_RSA_1024" : 1k RSA Key. 2637 /// - "KEY_ALG_RSA_2048" : 2k RSA Key.
2690 * - "KEY_ALG_RSA_2048" : 2k RSA Key.
2691 */
2692 core.String keyAlgorithm; 2638 core.String keyAlgorithm;
2693 /** 2639
2694 * The resource name of the service account key in the following format 2640 /// The resource name of the service account key in the following format
2695 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. 2641 /// `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}` .
2696 */
2697 core.String name; 2642 core.String name;
2698 /** 2643
2699 * The private key data. Only provided in `CreateServiceAccountKey` 2644 /// The private key data. Only provided in `CreateServiceAccountKey`
2700 * responses. Make sure to keep the private key data secure because it 2645 /// responses. Make sure to keep the private key data secure because it
2701 * allows for the assertion of the service account identity. 2646 /// allows for the assertion of the service account identity.
2702 * When decoded, the private key data can be used to authenticate with 2647 /// When decoded, the private key data can be used to authenticate with
2703 * Google API client libraries and with 2648 /// Google API client libraries and with
2704 * <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud 2649 /// <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud
2705 * auth activate-service-account</a>. 2650 /// auth activate-service-account</a>.
2706 */
2707 core.String privateKeyData; 2651 core.String privateKeyData;
2708 core.List<core.int> get privateKeyDataAsBytes { 2652 core.List<core.int> get privateKeyDataAsBytes {
2709 return convert.BASE64.decode(privateKeyData); 2653 return convert.BASE64.decode(privateKeyData);
2710 } 2654 }
2711 2655
2712 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { 2656 void set privateKeyDataAsBytes(core.List<core.int> _bytes) {
2713 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA ll("+", "-"); 2657 privateKeyData =
2658 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2714 } 2659 }
2715 /** 2660
2716 * The output format for the private key. 2661 /// The output format for the private key.
2717 * Only provided in `CreateServiceAccountKey` responses, not 2662 /// Only provided in `CreateServiceAccountKey` responses, not
2718 * in `GetServiceAccountKey` or `ListServiceAccountKey` responses. 2663 /// in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
2719 * 2664 ///
2720 * Google never exposes system-managed private keys, and never retains 2665 /// Google never exposes system-managed private keys, and never retains
2721 * user-managed private keys. 2666 /// user-managed private keys.
2722 * Possible string values are: 2667 /// Possible string values are:
2723 * - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to 2668 /// - "TYPE_UNSPECIFIED" : Unspecified. Equivalent to
2724 * `TYPE_GOOGLE_CREDENTIALS_FILE`. 2669 /// `TYPE_GOOGLE_CREDENTIALS_FILE`.
2725 * - "TYPE_PKCS12_FILE" : PKCS12 format. 2670 /// - "TYPE_PKCS12_FILE" : PKCS12 format.
2726 * The password for the PKCS12 file is `notasecret`. 2671 /// The password for the PKCS12 file is `notasecret`.
2727 * For more information, see https://tools.ietf.org/html/rfc7292. 2672 /// For more information, see https://tools.ietf.org/html/rfc7292.
2728 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format. 2673 /// - "TYPE_GOOGLE_CREDENTIALS_FILE" : Google Credentials File format.
2729 */
2730 core.String privateKeyType; 2674 core.String privateKeyType;
2731 /** 2675
2732 * The public key data. Only provided in `GetServiceAccountKey` responses. 2676 /// The public key data. Only provided in `GetServiceAccountKey` responses.
2733 */
2734 core.String publicKeyData; 2677 core.String publicKeyData;
2735 core.List<core.int> get publicKeyDataAsBytes { 2678 core.List<core.int> get publicKeyDataAsBytes {
2736 return convert.BASE64.decode(publicKeyData); 2679 return convert.BASE64.decode(publicKeyData);
2737 } 2680 }
2738 2681
2739 void set publicKeyDataAsBytes(core.List<core.int> _bytes) { 2682 void set publicKeyDataAsBytes(core.List<core.int> _bytes) {
2740 publicKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAl l("+", "-"); 2683 publicKeyData =
2684 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2741 } 2685 }
2742 /** The key can be used after this timestamp. */ 2686
2687 /// The key can be used after this timestamp.
2743 core.String validAfterTime; 2688 core.String validAfterTime;
2744 /** The key can be used before this timestamp. */ 2689
2690 /// The key can be used before this timestamp.
2745 core.String validBeforeTime; 2691 core.String validBeforeTime;
2746 2692
2747 ServiceAccountKey(); 2693 ServiceAccountKey();
2748 2694
2749 ServiceAccountKey.fromJson(core.Map _json) { 2695 ServiceAccountKey.fromJson(core.Map _json) {
2750 if (_json.containsKey("keyAlgorithm")) { 2696 if (_json.containsKey("keyAlgorithm")) {
2751 keyAlgorithm = _json["keyAlgorithm"]; 2697 keyAlgorithm = _json["keyAlgorithm"];
2752 } 2698 }
2753 if (_json.containsKey("name")) { 2699 if (_json.containsKey("name")) {
2754 name = _json["name"]; 2700 name = _json["name"];
2755 } 2701 }
2756 if (_json.containsKey("privateKeyData")) { 2702 if (_json.containsKey("privateKeyData")) {
2757 privateKeyData = _json["privateKeyData"]; 2703 privateKeyData = _json["privateKeyData"];
2758 } 2704 }
2759 if (_json.containsKey("privateKeyType")) { 2705 if (_json.containsKey("privateKeyType")) {
2760 privateKeyType = _json["privateKeyType"]; 2706 privateKeyType = _json["privateKeyType"];
2761 } 2707 }
2762 if (_json.containsKey("publicKeyData")) { 2708 if (_json.containsKey("publicKeyData")) {
2763 publicKeyData = _json["publicKeyData"]; 2709 publicKeyData = _json["publicKeyData"];
2764 } 2710 }
2765 if (_json.containsKey("validAfterTime")) { 2711 if (_json.containsKey("validAfterTime")) {
2766 validAfterTime = _json["validAfterTime"]; 2712 validAfterTime = _json["validAfterTime"];
2767 } 2713 }
2768 if (_json.containsKey("validBeforeTime")) { 2714 if (_json.containsKey("validBeforeTime")) {
2769 validBeforeTime = _json["validBeforeTime"]; 2715 validBeforeTime = _json["validBeforeTime"];
2770 } 2716 }
2771 } 2717 }
2772 2718
2773 core.Map<core.String, core.Object> toJson() { 2719 core.Map<core.String, core.Object> toJson() {
2774 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2720 final core.Map<core.String, core.Object> _json =
2721 new core.Map<core.String, core.Object>();
2775 if (keyAlgorithm != null) { 2722 if (keyAlgorithm != null) {
2776 _json["keyAlgorithm"] = keyAlgorithm; 2723 _json["keyAlgorithm"] = keyAlgorithm;
2777 } 2724 }
2778 if (name != null) { 2725 if (name != null) {
2779 _json["name"] = name; 2726 _json["name"] = name;
2780 } 2727 }
2781 if (privateKeyData != null) { 2728 if (privateKeyData != null) {
2782 _json["privateKeyData"] = privateKeyData; 2729 _json["privateKeyData"] = privateKeyData;
2783 } 2730 }
2784 if (privateKeyType != null) { 2731 if (privateKeyType != null) {
2785 _json["privateKeyType"] = privateKeyType; 2732 _json["privateKeyType"] = privateKeyType;
2786 } 2733 }
2787 if (publicKeyData != null) { 2734 if (publicKeyData != null) {
2788 _json["publicKeyData"] = publicKeyData; 2735 _json["publicKeyData"] = publicKeyData;
2789 } 2736 }
2790 if (validAfterTime != null) { 2737 if (validAfterTime != null) {
2791 _json["validAfterTime"] = validAfterTime; 2738 _json["validAfterTime"] = validAfterTime;
2792 } 2739 }
2793 if (validBeforeTime != null) { 2740 if (validBeforeTime != null) {
2794 _json["validBeforeTime"] = validBeforeTime; 2741 _json["validBeforeTime"] = validBeforeTime;
2795 } 2742 }
2796 return _json; 2743 return _json;
2797 } 2744 }
2798 } 2745 }
2799 2746
2800 /** Request message for `SetIamPolicy` method. */ 2747 /// Request message for `SetIamPolicy` method.
2801 class SetIamPolicyRequest { 2748 class SetIamPolicyRequest {
2802 /** 2749 /// REQUIRED: The complete policy to be applied to the `resource`. The size
2803 * REQUIRED: The complete policy to be applied to the `resource`. The size of 2750 /// of
2804 * the policy is limited to a few 10s of KB. An empty policy is a 2751 /// the policy is limited to a few 10s of KB. An empty policy is a
2805 * valid policy but certain Cloud Platform services (such as Projects) 2752 /// valid policy but certain Cloud Platform services (such as Projects)
2806 * might reject them. 2753 /// might reject them.
2807 */
2808 Policy policy; 2754 Policy policy;
2809 2755
2810 SetIamPolicyRequest(); 2756 SetIamPolicyRequest();
2811 2757
2812 SetIamPolicyRequest.fromJson(core.Map _json) { 2758 SetIamPolicyRequest.fromJson(core.Map _json) {
2813 if (_json.containsKey("policy")) { 2759 if (_json.containsKey("policy")) {
2814 policy = new Policy.fromJson(_json["policy"]); 2760 policy = new Policy.fromJson(_json["policy"]);
2815 } 2761 }
2816 } 2762 }
2817 2763
2818 core.Map<core.String, core.Object> toJson() { 2764 core.Map<core.String, core.Object> toJson() {
2819 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2765 final core.Map<core.String, core.Object> _json =
2766 new core.Map<core.String, core.Object>();
2820 if (policy != null) { 2767 if (policy != null) {
2821 _json["policy"] = (policy).toJson(); 2768 _json["policy"] = (policy).toJson();
2822 } 2769 }
2823 return _json; 2770 return _json;
2824 } 2771 }
2825 } 2772 }
2826 2773
2827 /** The service account sign blob request. */ 2774 /// The service account sign blob request.
2828 class SignBlobRequest { 2775 class SignBlobRequest {
2829 /** The bytes to sign. */ 2776 /// The bytes to sign.
2830 core.String bytesToSign; 2777 core.String bytesToSign;
2831 core.List<core.int> get bytesToSignAsBytes { 2778 core.List<core.int> get bytesToSignAsBytes {
2832 return convert.BASE64.decode(bytesToSign); 2779 return convert.BASE64.decode(bytesToSign);
2833 } 2780 }
2834 2781
2835 void set bytesToSignAsBytes(core.List<core.int> _bytes) { 2782 void set bytesToSignAsBytes(core.List<core.int> _bytes) {
2836 bytesToSign = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll( "+", "-"); 2783 bytesToSign =
2784 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2837 } 2785 }
2838 2786
2839 SignBlobRequest(); 2787 SignBlobRequest();
2840 2788
2841 SignBlobRequest.fromJson(core.Map _json) { 2789 SignBlobRequest.fromJson(core.Map _json) {
2842 if (_json.containsKey("bytesToSign")) { 2790 if (_json.containsKey("bytesToSign")) {
2843 bytesToSign = _json["bytesToSign"]; 2791 bytesToSign = _json["bytesToSign"];
2844 } 2792 }
2845 } 2793 }
2846 2794
2847 core.Map<core.String, core.Object> toJson() { 2795 core.Map<core.String, core.Object> toJson() {
2848 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2796 final core.Map<core.String, core.Object> _json =
2797 new core.Map<core.String, core.Object>();
2849 if (bytesToSign != null) { 2798 if (bytesToSign != null) {
2850 _json["bytesToSign"] = bytesToSign; 2799 _json["bytesToSign"] = bytesToSign;
2851 } 2800 }
2852 return _json; 2801 return _json;
2853 } 2802 }
2854 } 2803 }
2855 2804
2856 /** The service account sign blob response. */ 2805 /// The service account sign blob response.
2857 class SignBlobResponse { 2806 class SignBlobResponse {
2858 /** The id of the key used to sign the blob. */ 2807 /// The id of the key used to sign the blob.
2859 core.String keyId; 2808 core.String keyId;
2860 /** The signed blob. */ 2809
2810 /// The signed blob.
2861 core.String signature; 2811 core.String signature;
2862 core.List<core.int> get signatureAsBytes { 2812 core.List<core.int> get signatureAsBytes {
2863 return convert.BASE64.decode(signature); 2813 return convert.BASE64.decode(signature);
2864 } 2814 }
2865 2815
2866 void set signatureAsBytes(core.List<core.int> _bytes) { 2816 void set signatureAsBytes(core.List<core.int> _bytes) {
2867 signature = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+ ", "-"); 2817 signature =
2818 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2868 } 2819 }
2869 2820
2870 SignBlobResponse(); 2821 SignBlobResponse();
2871 2822
2872 SignBlobResponse.fromJson(core.Map _json) { 2823 SignBlobResponse.fromJson(core.Map _json) {
2873 if (_json.containsKey("keyId")) { 2824 if (_json.containsKey("keyId")) {
2874 keyId = _json["keyId"]; 2825 keyId = _json["keyId"];
2875 } 2826 }
2876 if (_json.containsKey("signature")) { 2827 if (_json.containsKey("signature")) {
2877 signature = _json["signature"]; 2828 signature = _json["signature"];
2878 } 2829 }
2879 } 2830 }
2880 2831
2881 core.Map<core.String, core.Object> toJson() { 2832 core.Map<core.String, core.Object> toJson() {
2882 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2833 final core.Map<core.String, core.Object> _json =
2834 new core.Map<core.String, core.Object>();
2883 if (keyId != null) { 2835 if (keyId != null) {
2884 _json["keyId"] = keyId; 2836 _json["keyId"] = keyId;
2885 } 2837 }
2886 if (signature != null) { 2838 if (signature != null) {
2887 _json["signature"] = signature; 2839 _json["signature"] = signature;
2888 } 2840 }
2889 return _json; 2841 return _json;
2890 } 2842 }
2891 } 2843 }
2892 2844
2893 /** The service account sign JWT request. */ 2845 /// The service account sign JWT request.
2894 class SignJwtRequest { 2846 class SignJwtRequest {
2895 /** The JWT payload to sign, a JSON JWT Claim set. */ 2847 /// The JWT payload to sign, a JSON JWT Claim set.
2896 core.String payload; 2848 core.String payload;
2897 2849
2898 SignJwtRequest(); 2850 SignJwtRequest();
2899 2851
2900 SignJwtRequest.fromJson(core.Map _json) { 2852 SignJwtRequest.fromJson(core.Map _json) {
2901 if (_json.containsKey("payload")) { 2853 if (_json.containsKey("payload")) {
2902 payload = _json["payload"]; 2854 payload = _json["payload"];
2903 } 2855 }
2904 } 2856 }
2905 2857
2906 core.Map<core.String, core.Object> toJson() { 2858 core.Map<core.String, core.Object> toJson() {
2907 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2859 final core.Map<core.String, core.Object> _json =
2860 new core.Map<core.String, core.Object>();
2908 if (payload != null) { 2861 if (payload != null) {
2909 _json["payload"] = payload; 2862 _json["payload"] = payload;
2910 } 2863 }
2911 return _json; 2864 return _json;
2912 } 2865 }
2913 } 2866 }
2914 2867
2915 /** The service account sign JWT response. */ 2868 /// The service account sign JWT response.
2916 class SignJwtResponse { 2869 class SignJwtResponse {
2917 /** The id of the key used to sign the JWT. */ 2870 /// The id of the key used to sign the JWT.
2918 core.String keyId; 2871 core.String keyId;
2919 /** The signed JWT. */ 2872
2873 /// The signed JWT.
2920 core.String signedJwt; 2874 core.String signedJwt;
2921 2875
2922 SignJwtResponse(); 2876 SignJwtResponse();
2923 2877
2924 SignJwtResponse.fromJson(core.Map _json) { 2878 SignJwtResponse.fromJson(core.Map _json) {
2925 if (_json.containsKey("keyId")) { 2879 if (_json.containsKey("keyId")) {
2926 keyId = _json["keyId"]; 2880 keyId = _json["keyId"];
2927 } 2881 }
2928 if (_json.containsKey("signedJwt")) { 2882 if (_json.containsKey("signedJwt")) {
2929 signedJwt = _json["signedJwt"]; 2883 signedJwt = _json["signedJwt"];
2930 } 2884 }
2931 } 2885 }
2932 2886
2933 core.Map<core.String, core.Object> toJson() { 2887 core.Map<core.String, core.Object> toJson() {
2934 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2888 final core.Map<core.String, core.Object> _json =
2889 new core.Map<core.String, core.Object>();
2935 if (keyId != null) { 2890 if (keyId != null) {
2936 _json["keyId"] = keyId; 2891 _json["keyId"] = keyId;
2937 } 2892 }
2938 if (signedJwt != null) { 2893 if (signedJwt != null) {
2939 _json["signedJwt"] = signedJwt; 2894 _json["signedJwt"] = signedJwt;
2940 } 2895 }
2941 return _json; 2896 return _json;
2942 } 2897 }
2943 } 2898 }
2944 2899
2945 /** Request message for `TestIamPermissions` method. */ 2900 /// Request message for `TestIamPermissions` method.
2946 class TestIamPermissionsRequest { 2901 class TestIamPermissionsRequest {
2947 /** 2902 /// The set of permissions to check for the `resource`. Permissions with
2948 * The set of permissions to check for the `resource`. Permissions with 2903 /// wildcards (such as '*' or 'storage.*') are not allowed. For more
2949 * wildcards (such as '*' or 'storage.*') are not allowed. For more 2904 /// information see
2950 * information see 2905 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2951 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2952 */
2953 core.List<core.String> permissions; 2906 core.List<core.String> permissions;
2954 2907
2955 TestIamPermissionsRequest(); 2908 TestIamPermissionsRequest();
2956 2909
2957 TestIamPermissionsRequest.fromJson(core.Map _json) { 2910 TestIamPermissionsRequest.fromJson(core.Map _json) {
2958 if (_json.containsKey("permissions")) { 2911 if (_json.containsKey("permissions")) {
2959 permissions = _json["permissions"]; 2912 permissions = _json["permissions"];
2960 } 2913 }
2961 } 2914 }
2962 2915
2963 core.Map<core.String, core.Object> toJson() { 2916 core.Map<core.String, core.Object> toJson() {
2964 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2917 final core.Map<core.String, core.Object> _json =
2918 new core.Map<core.String, core.Object>();
2965 if (permissions != null) { 2919 if (permissions != null) {
2966 _json["permissions"] = permissions; 2920 _json["permissions"] = permissions;
2967 } 2921 }
2968 return _json; 2922 return _json;
2969 } 2923 }
2970 } 2924 }
2971 2925
2972 /** Response message for `TestIamPermissions` method. */ 2926 /// Response message for `TestIamPermissions` method.
2973 class TestIamPermissionsResponse { 2927 class TestIamPermissionsResponse {
2974 /** 2928 /// A subset of `TestPermissionsRequest.permissions` that the caller is
2975 * A subset of `TestPermissionsRequest.permissions` that the caller is 2929 /// allowed.
2976 * allowed.
2977 */
2978 core.List<core.String> permissions; 2930 core.List<core.String> permissions;
2979 2931
2980 TestIamPermissionsResponse(); 2932 TestIamPermissionsResponse();
2981 2933
2982 TestIamPermissionsResponse.fromJson(core.Map _json) { 2934 TestIamPermissionsResponse.fromJson(core.Map _json) {
2983 if (_json.containsKey("permissions")) { 2935 if (_json.containsKey("permissions")) {
2984 permissions = _json["permissions"]; 2936 permissions = _json["permissions"];
2985 } 2937 }
2986 } 2938 }
2987 2939
2988 core.Map<core.String, core.Object> toJson() { 2940 core.Map<core.String, core.Object> toJson() {
2989 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2941 final core.Map<core.String, core.Object> _json =
2942 new core.Map<core.String, core.Object>();
2990 if (permissions != null) { 2943 if (permissions != null) {
2991 _json["permissions"] = permissions; 2944 _json["permissions"] = permissions;
2992 } 2945 }
2993 return _json; 2946 return _json;
2994 } 2947 }
2995 } 2948 }
2996 2949
2997 /** The request to undelete an existing role. */ 2950 /// The request to undelete an existing role.
2998 class UndeleteRoleRequest { 2951 class UndeleteRoleRequest {
2999 /** Used to perform a consistent read-modify-write. */ 2952 /// Used to perform a consistent read-modify-write.
3000 core.String etag; 2953 core.String etag;
3001 core.List<core.int> get etagAsBytes { 2954 core.List<core.int> get etagAsBytes {
3002 return convert.BASE64.decode(etag); 2955 return convert.BASE64.decode(etag);
3003 } 2956 }
3004 2957
3005 void set etagAsBytes(core.List<core.int> _bytes) { 2958 void set etagAsBytes(core.List<core.int> _bytes) {
3006 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2959 etag =
2960 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
3007 } 2961 }
3008 2962
3009 UndeleteRoleRequest(); 2963 UndeleteRoleRequest();
3010 2964
3011 UndeleteRoleRequest.fromJson(core.Map _json) { 2965 UndeleteRoleRequest.fromJson(core.Map _json) {
3012 if (_json.containsKey("etag")) { 2966 if (_json.containsKey("etag")) {
3013 etag = _json["etag"]; 2967 etag = _json["etag"];
3014 } 2968 }
3015 } 2969 }
3016 2970
3017 core.Map<core.String, core.Object> toJson() { 2971 core.Map<core.String, core.Object> toJson() {
3018 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2972 final core.Map<core.String, core.Object> _json =
2973 new core.Map<core.String, core.Object>();
3019 if (etag != null) { 2974 if (etag != null) {
3020 _json["etag"] = etag; 2975 _json["etag"] = etag;
3021 } 2976 }
3022 return _json; 2977 return _json;
3023 } 2978 }
3024 } 2979 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/groupssettings/v1.dart ('k') | generated/googleapis/lib/identitytoolkit/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698