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

Side by Side Diff: generated/googleapis/lib/cloudkms/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.cloudkms.v1; 3 library googleapis.cloudkms.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 cloudkms/v1'; 15 const core.String USER_AGENT = 'dart-api-client cloudkms/v1';
16 16
17 /** 17 /// Manages encryption for your cloud services the same way you do on-premises.
18 * Manages encryption for your cloud services the same way you do on-premises. 18 /// You can generate, use, rotate, and destroy AES256 encryption keys.
19 * You can generate, use, rotate, and destroy AES256 encryption keys.
20 */
21 class CloudkmsApi { 19 class CloudkmsApi {
22 /** View and manage your data across Google Cloud Platform services */ 20 /// View and manage your data across Google Cloud Platform services
23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 21 static const CloudPlatformScope =
24 22 "https://www.googleapis.com/auth/cloud-platform";
25 23
26 final commons.ApiRequester _requester; 24 final commons.ApiRequester _requester;
27 25
28 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
29 27
30 CloudkmsApi(http.Client client, {core.String rootUrl: "https://cloudkms.google apis.com/", core.String servicePath: ""}) : 28 CloudkmsApi(http.Client client,
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 29 {core.String rootUrl: "https://cloudkms.googleapis.com/",
30 core.String servicePath: ""})
31 : _requester =
32 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
32 } 33 }
33 34
34
35 class ProjectsResourceApi { 35 class ProjectsResourceApi {
36 final commons.ApiRequester _requester; 36 final commons.ApiRequester _requester;
37 37
38 ProjectsLocationsResourceApi get locations => new ProjectsLocationsResourceApi (_requester); 38 ProjectsLocationsResourceApi get locations =>
39 new ProjectsLocationsResourceApi(_requester);
39 40
40 ProjectsResourceApi(commons.ApiRequester client) : 41 ProjectsResourceApi(commons.ApiRequester client) : _requester = client;
41 _requester = client;
42 } 42 }
43 43
44
45 class ProjectsLocationsResourceApi { 44 class ProjectsLocationsResourceApi {
46 final commons.ApiRequester _requester; 45 final commons.ApiRequester _requester;
47 46
48 ProjectsLocationsKeyRingsResourceApi get keyRings => new ProjectsLocationsKeyR ingsResourceApi(_requester); 47 ProjectsLocationsKeyRingsResourceApi get keyRings =>
48 new ProjectsLocationsKeyRingsResourceApi(_requester);
49 49
50 ProjectsLocationsResourceApi(commons.ApiRequester client) : 50 ProjectsLocationsResourceApi(commons.ApiRequester client)
51 _requester = client; 51 : _requester = client;
52 52
53 /** 53 /// Get information about a location.
54 * Get information about a location. 54 ///
55 * 55 /// Request parameters:
56 * Request parameters: 56 ///
57 * 57 /// [name] - Resource name for the location.
58 * [name] - Resource name for the location. 58 /// Value must have pattern "^projects/[^/]+/locations/[^/]+$".
59 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". 59 ///
60 * 60 /// Completes with a [Location].
61 * Completes with a [Location]. 61 ///
62 * 62 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
63 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 63 /// an error.
64 * error. 64 ///
65 * 65 /// If the used [http.Client] completes with an error when making a REST
66 * If the used [http.Client] completes with an error when making a REST call, 66 /// call, this method will complete with the same error.
67 * this method will complete with the same error.
68 */
69 async.Future<Location> get(core.String name) { 67 async.Future<Location> get(core.String name) {
70 var _url = null; 68 var _url = null;
71 var _queryParams = new core.Map(); 69 var _queryParams = new core.Map();
72 var _uploadMedia = null; 70 var _uploadMedia = null;
73 var _uploadOptions = null; 71 var _uploadOptions = null;
74 var _downloadOptions = commons.DownloadOptions.Metadata; 72 var _downloadOptions = commons.DownloadOptions.Metadata;
75 var _body = null; 73 var _body = null;
76 74
77 if (name == null) { 75 if (name == null) {
78 throw new core.ArgumentError("Parameter name is required."); 76 throw new core.ArgumentError("Parameter name is required.");
79 } 77 }
80 78
81 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 79 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
82 80
83 var _response = _requester.request(_url, 81 var _response = _requester.request(_url, "GET",
84 "GET", 82 body: _body,
85 body: _body, 83 queryParams: _queryParams,
86 queryParams: _queryParams, 84 uploadOptions: _uploadOptions,
87 uploadOptions: _uploadOptions, 85 uploadMedia: _uploadMedia,
88 uploadMedia: _uploadMedia, 86 downloadOptions: _downloadOptions);
89 downloadOptions: _downloadOptions);
90 return _response.then((data) => new Location.fromJson(data)); 87 return _response.then((data) => new Location.fromJson(data));
91 } 88 }
92 89
93 /** 90 /// Lists information about the supported locations for this service.
94 * Lists information about the supported locations for this service. 91 ///
95 * 92 /// Request parameters:
96 * Request parameters: 93 ///
97 * 94 /// [name] - The resource that owns the locations collection, if applicable.
98 * [name] - The resource that owns the locations collection, if applicable. 95 /// Value must have pattern "^projects/[^/]+$".
99 * Value must have pattern "^projects/[^/]+$". 96 ///
100 * 97 /// [filter] - The standard list filter.
101 * [pageSize] - The standard list page size. 98 ///
102 * 99 /// [pageToken] - The standard list page token.
103 * [filter] - The standard list filter. 100 ///
104 * 101 /// [pageSize] - The standard list page size.
105 * [pageToken] - The standard list page token. 102 ///
106 * 103 /// Completes with a [ListLocationsResponse].
107 * Completes with a [ListLocationsResponse]. 104 ///
108 * 105 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
109 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 106 /// an error.
110 * error. 107 ///
111 * 108 /// If the used [http.Client] completes with an error when making a REST
112 * If the used [http.Client] completes with an error when making a REST call, 109 /// call, this method will complete with the same error.
113 * this method will complete with the same error. 110 async.Future<ListLocationsResponse> list(core.String name,
114 */ 111 {core.String filter, core.String pageToken, core.int pageSize}) {
115 async.Future<ListLocationsResponse> list(core.String name, {core.int pageSize, core.String filter, core.String pageToken}) {
116 var _url = null; 112 var _url = null;
117 var _queryParams = new core.Map(); 113 var _queryParams = new core.Map();
118 var _uploadMedia = null; 114 var _uploadMedia = null;
119 var _uploadOptions = null; 115 var _uploadOptions = null;
120 var _downloadOptions = commons.DownloadOptions.Metadata; 116 var _downloadOptions = commons.DownloadOptions.Metadata;
121 var _body = null; 117 var _body = null;
122 118
123 if (name == null) { 119 if (name == null) {
124 throw new core.ArgumentError("Parameter name is required."); 120 throw new core.ArgumentError("Parameter name is required.");
125 } 121 }
126 if (pageSize != null) {
127 _queryParams["pageSize"] = ["${pageSize}"];
128 }
129 if (filter != null) { 122 if (filter != null) {
130 _queryParams["filter"] = [filter]; 123 _queryParams["filter"] = [filter];
131 } 124 }
132 if (pageToken != null) { 125 if (pageToken != null) {
133 _queryParams["pageToken"] = [pageToken]; 126 _queryParams["pageToken"] = [pageToken];
134 } 127 }
128 if (pageSize != null) {
129 _queryParams["pageSize"] = ["${pageSize}"];
130 }
135 131
136 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations' ; 132 _url =
133 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/locations';
137 134
138 var _response = _requester.request(_url, 135 var _response = _requester.request(_url, "GET",
139 "GET", 136 body: _body,
140 body: _body, 137 queryParams: _queryParams,
141 queryParams: _queryParams, 138 uploadOptions: _uploadOptions,
142 uploadOptions: _uploadOptions, 139 uploadMedia: _uploadMedia,
143 uploadMedia: _uploadMedia, 140 downloadOptions: _downloadOptions);
144 downloadOptions: _downloadOptions);
145 return _response.then((data) => new ListLocationsResponse.fromJson(data)); 141 return _response.then((data) => new ListLocationsResponse.fromJson(data));
146 } 142 }
147
148 } 143 }
149 144
150
151 class ProjectsLocationsKeyRingsResourceApi { 145 class ProjectsLocationsKeyRingsResourceApi {
152 final commons.ApiRequester _requester; 146 final commons.ApiRequester _requester;
153 147
154 ProjectsLocationsKeyRingsCryptoKeysResourceApi get cryptoKeys => new ProjectsL ocationsKeyRingsCryptoKeysResourceApi(_requester); 148 ProjectsLocationsKeyRingsCryptoKeysResourceApi get cryptoKeys =>
149 new ProjectsLocationsKeyRingsCryptoKeysResourceApi(_requester);
155 150
156 ProjectsLocationsKeyRingsResourceApi(commons.ApiRequester client) : 151 ProjectsLocationsKeyRingsResourceApi(commons.ApiRequester client)
157 _requester = client; 152 : _requester = client;
158 153
159 /** 154 /// Create a new KeyRing in a given Project and Location.
160 * Create a new KeyRing in a given Project and Location. 155 ///
161 * 156 /// [request] - The metadata request object.
162 * [request] - The metadata request object. 157 ///
163 * 158 /// Request parameters:
164 * Request parameters: 159 ///
165 * 160 /// [parent] - Required. The resource name of the location associated with
166 * [parent] - Required. The resource name of the location associated with the 161 /// the
167 * KeyRings, in the format `projects / * /locations / * `. 162 /// KeyRings, in the format `projects / * /locations / * `.
168 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". 163 /// Value must have pattern "^projects/[^/]+/locations/[^/]+$".
169 * 164 ///
170 * [keyRingId] - Required. It must be unique within a location and match the 165 /// [keyRingId] - Required. It must be unique within a location and match the
171 * regular 166 /// regular
172 * expression `[a-zA-Z0-9_-]{1,63}` 167 /// expression `[a-zA-Z0-9_-]{1,63}`
173 * 168 ///
174 * Completes with a [KeyRing]. 169 /// Completes with a [KeyRing].
175 * 170 ///
176 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 171 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
177 * error. 172 /// an error.
178 * 173 ///
179 * If the used [http.Client] completes with an error when making a REST call, 174 /// If the used [http.Client] completes with an error when making a REST
180 * this method will complete with the same error. 175 /// call, this method will complete with the same error.
181 */ 176 async.Future<KeyRing> create(KeyRing request, core.String parent,
182 async.Future<KeyRing> create(KeyRing request, core.String parent, {core.String keyRingId}) { 177 {core.String keyRingId}) {
183 var _url = null; 178 var _url = null;
184 var _queryParams = new core.Map(); 179 var _queryParams = new core.Map();
185 var _uploadMedia = null; 180 var _uploadMedia = null;
186 var _uploadOptions = null; 181 var _uploadOptions = null;
187 var _downloadOptions = commons.DownloadOptions.Metadata; 182 var _downloadOptions = commons.DownloadOptions.Metadata;
188 var _body = null; 183 var _body = null;
189 184
190 if (request != null) { 185 if (request != null) {
191 _body = convert.JSON.encode((request).toJson()); 186 _body = convert.JSON.encode((request).toJson());
192 } 187 }
193 if (parent == null) { 188 if (parent == null) {
194 throw new core.ArgumentError("Parameter parent is required."); 189 throw new core.ArgumentError("Parameter parent is required.");
195 } 190 }
196 if (keyRingId != null) { 191 if (keyRingId != null) {
197 _queryParams["keyRingId"] = [keyRingId]; 192 _queryParams["keyRingId"] = [keyRingId];
198 } 193 }
199 194
200 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings '; 195 _url =
196 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings';
201 197
202 var _response = _requester.request(_url, 198 var _response = _requester.request(_url, "POST",
203 "POST", 199 body: _body,
204 body: _body, 200 queryParams: _queryParams,
205 queryParams: _queryParams, 201 uploadOptions: _uploadOptions,
206 uploadOptions: _uploadOptions, 202 uploadMedia: _uploadMedia,
207 uploadMedia: _uploadMedia, 203 downloadOptions: _downloadOptions);
208 downloadOptions: _downloadOptions);
209 return _response.then((data) => new KeyRing.fromJson(data)); 204 return _response.then((data) => new KeyRing.fromJson(data));
210 } 205 }
211 206
212 /** 207 /// Returns metadata for a given KeyRing.
213 * Returns metadata for a given KeyRing. 208 ///
214 * 209 /// Request parameters:
215 * Request parameters: 210 ///
216 * 211 /// [name] - The name of the KeyRing to get.
217 * [name] - The name of the KeyRing to get. 212 /// Value must have pattern
218 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 213 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
219 * 214 ///
220 * Completes with a [KeyRing]. 215 /// Completes with a [KeyRing].
221 * 216 ///
222 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 217 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
223 * error. 218 /// an error.
224 * 219 ///
225 * If the used [http.Client] completes with an error when making a REST call, 220 /// If the used [http.Client] completes with an error when making a REST
226 * this method will complete with the same error. 221 /// call, this method will complete with the same error.
227 */
228 async.Future<KeyRing> get(core.String name) { 222 async.Future<KeyRing> get(core.String name) {
229 var _url = null; 223 var _url = null;
230 var _queryParams = new core.Map(); 224 var _queryParams = new core.Map();
231 var _uploadMedia = null; 225 var _uploadMedia = null;
232 var _uploadOptions = null; 226 var _uploadOptions = null;
233 var _downloadOptions = commons.DownloadOptions.Metadata; 227 var _downloadOptions = commons.DownloadOptions.Metadata;
234 var _body = null; 228 var _body = null;
235 229
236 if (name == null) { 230 if (name == null) {
237 throw new core.ArgumentError("Parameter name is required."); 231 throw new core.ArgumentError("Parameter name is required.");
238 } 232 }
239 233
240 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 234 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
241 235
242 var _response = _requester.request(_url, 236 var _response = _requester.request(_url, "GET",
243 "GET", 237 body: _body,
244 body: _body, 238 queryParams: _queryParams,
245 queryParams: _queryParams, 239 uploadOptions: _uploadOptions,
246 uploadOptions: _uploadOptions, 240 uploadMedia: _uploadMedia,
247 uploadMedia: _uploadMedia, 241 downloadOptions: _downloadOptions);
248 downloadOptions: _downloadOptions);
249 return _response.then((data) => new KeyRing.fromJson(data)); 242 return _response.then((data) => new KeyRing.fromJson(data));
250 } 243 }
251 244
252 /** 245 /// Gets the access control policy for a resource.
253 * Gets the access control policy for a resource. 246 /// Returns an empty policy if the resource exists and does not have a policy
254 * Returns an empty policy if the resource exists and does not have a policy 247 /// set.
255 * set. 248 ///
256 * 249 /// Request parameters:
257 * Request parameters: 250 ///
258 * 251 /// [resource] - REQUIRED: The resource for which the policy is being
259 * [resource] - REQUIRED: The resource for which the policy is being 252 /// requested.
260 * requested. 253 /// See the operation documentation for the appropriate value for this field.
261 * See the operation documentation for the appropriate value for this field. 254 /// Value must have pattern
262 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 255 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
263 * 256 ///
264 * Completes with a [Policy]. 257 /// Completes with a [Policy].
265 * 258 ///
266 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 259 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
267 * error. 260 /// an error.
268 * 261 ///
269 * If the used [http.Client] completes with an error when making a REST call, 262 /// If the used [http.Client] completes with an error when making a REST
270 * this method will complete with the same error. 263 /// call, this method will complete with the same error.
271 */
272 async.Future<Policy> getIamPolicy(core.String resource) { 264 async.Future<Policy> getIamPolicy(core.String resource) {
273 var _url = null; 265 var _url = null;
274 var _queryParams = new core.Map(); 266 var _queryParams = new core.Map();
275 var _uploadMedia = null; 267 var _uploadMedia = null;
276 var _uploadOptions = null; 268 var _uploadOptions = null;
277 var _downloadOptions = commons.DownloadOptions.Metadata; 269 var _downloadOptions = commons.DownloadOptions.Metadata;
278 var _body = null; 270 var _body = null;
279 271
280 if (resource == null) { 272 if (resource == null) {
281 throw new core.ArgumentError("Parameter resource is required."); 273 throw new core.ArgumentError("Parameter resource is required.");
282 } 274 }
283 275
284 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam Policy'; 276 _url = 'v1/' +
277 commons.Escaper.ecapeVariableReserved('$resource') +
278 ':getIamPolicy';
285 279
286 var _response = _requester.request(_url, 280 var _response = _requester.request(_url, "GET",
287 "GET", 281 body: _body,
288 body: _body, 282 queryParams: _queryParams,
289 queryParams: _queryParams, 283 uploadOptions: _uploadOptions,
290 uploadOptions: _uploadOptions, 284 uploadMedia: _uploadMedia,
291 uploadMedia: _uploadMedia, 285 downloadOptions: _downloadOptions);
292 downloadOptions: _downloadOptions);
293 return _response.then((data) => new Policy.fromJson(data)); 286 return _response.then((data) => new Policy.fromJson(data));
294 } 287 }
295 288
296 /** 289 /// Lists KeyRings.
297 * Lists KeyRings. 290 ///
298 * 291 /// Request parameters:
299 * Request parameters: 292 ///
300 * 293 /// [parent] - Required. The resource name of the location associated with
301 * [parent] - Required. The resource name of the location associated with the 294 /// the
302 * KeyRings, in the format `projects / * /locations / * `. 295 /// KeyRings, in the format `projects / * /locations / * `.
303 * Value must have pattern "^projects/[^/]+/locations/[^/]+$". 296 /// Value must have pattern "^projects/[^/]+/locations/[^/]+$".
304 * 297 ///
305 * [pageSize] - Optional limit on the number of KeyRings to include in the 298 /// [pageToken] - Optional pagination token, returned earlier via
306 * response. Further KeyRings can subsequently be obtained by 299 /// ListKeyRingsResponse.next_page_token.
307 * including the ListKeyRingsResponse.next_page_token in a subsequent 300 ///
308 * request. If unspecified, the server will pick an appropriate default. 301 /// [pageSize] - Optional limit on the number of KeyRings to include in the
309 * 302 /// response. Further KeyRings can subsequently be obtained by
310 * [pageToken] - Optional pagination token, returned earlier via 303 /// including the ListKeyRingsResponse.next_page_token in a subsequent
311 * ListKeyRingsResponse.next_page_token. 304 /// request. If unspecified, the server will pick an appropriate default.
312 * 305 ///
313 * Completes with a [ListKeyRingsResponse]. 306 /// Completes with a [ListKeyRingsResponse].
314 * 307 ///
315 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 308 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
316 * error. 309 /// an error.
317 * 310 ///
318 * If the used [http.Client] completes with an error when making a REST call, 311 /// If the used [http.Client] completes with an error when making a REST
319 * this method will complete with the same error. 312 /// call, this method will complete with the same error.
320 */ 313 async.Future<ListKeyRingsResponse> list(core.String parent,
321 async.Future<ListKeyRingsResponse> list(core.String parent, {core.int pageSize , core.String pageToken}) { 314 {core.String pageToken, core.int pageSize}) {
322 var _url = null; 315 var _url = null;
323 var _queryParams = new core.Map(); 316 var _queryParams = new core.Map();
324 var _uploadMedia = null; 317 var _uploadMedia = null;
325 var _uploadOptions = null; 318 var _uploadOptions = null;
326 var _downloadOptions = commons.DownloadOptions.Metadata; 319 var _downloadOptions = commons.DownloadOptions.Metadata;
327 var _body = null; 320 var _body = null;
328 321
329 if (parent == null) { 322 if (parent == null) {
330 throw new core.ArgumentError("Parameter parent is required."); 323 throw new core.ArgumentError("Parameter parent is required.");
331 } 324 }
325 if (pageToken != null) {
326 _queryParams["pageToken"] = [pageToken];
327 }
332 if (pageSize != null) { 328 if (pageSize != null) {
333 _queryParams["pageSize"] = ["${pageSize}"]; 329 _queryParams["pageSize"] = ["${pageSize}"];
334 } 330 }
335 if (pageToken != null) {
336 _queryParams["pageToken"] = [pageToken];
337 }
338 331
339 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings '; 332 _url =
333 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/keyRings';
340 334
341 var _response = _requester.request(_url, 335 var _response = _requester.request(_url, "GET",
342 "GET", 336 body: _body,
343 body: _body, 337 queryParams: _queryParams,
344 queryParams: _queryParams, 338 uploadOptions: _uploadOptions,
345 uploadOptions: _uploadOptions, 339 uploadMedia: _uploadMedia,
346 uploadMedia: _uploadMedia, 340 downloadOptions: _downloadOptions);
347 downloadOptions: _downloadOptions);
348 return _response.then((data) => new ListKeyRingsResponse.fromJson(data)); 341 return _response.then((data) => new ListKeyRingsResponse.fromJson(data));
349 } 342 }
350 343
351 /** 344 /// Sets the access control policy on the specified resource. Replaces any
352 * Sets the access control policy on the specified resource. Replaces any 345 /// existing policy.
353 * existing policy. 346 ///
354 * 347 /// [request] - The metadata request object.
355 * [request] - The metadata request object. 348 ///
356 * 349 /// Request parameters:
357 * Request parameters: 350 ///
358 * 351 /// [resource] - REQUIRED: The resource for which the policy is being
359 * [resource] - REQUIRED: The resource for which the policy is being 352 /// specified.
360 * specified. 353 /// See the operation documentation for the appropriate value for this field.
361 * See the operation documentation for the appropriate value for this field. 354 /// Value must have pattern
362 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 355 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
363 * 356 ///
364 * Completes with a [Policy]. 357 /// Completes with a [Policy].
365 * 358 ///
366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 359 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
367 * error. 360 /// an error.
368 * 361 ///
369 * If the used [http.Client] completes with an error when making a REST call, 362 /// If the used [http.Client] completes with an error when making a REST
370 * this method will complete with the same error. 363 /// call, this method will complete with the same error.
371 */ 364 async.Future<Policy> setIamPolicy(
372 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) { 365 SetIamPolicyRequest request, core.String resource) {
373 var _url = null; 366 var _url = null;
374 var _queryParams = new core.Map(); 367 var _queryParams = new core.Map();
375 var _uploadMedia = null; 368 var _uploadMedia = null;
376 var _uploadOptions = null; 369 var _uploadOptions = null;
377 var _downloadOptions = commons.DownloadOptions.Metadata; 370 var _downloadOptions = commons.DownloadOptions.Metadata;
378 var _body = null; 371 var _body = null;
379 372
380 if (request != null) { 373 if (request != null) {
381 _body = convert.JSON.encode((request).toJson()); 374 _body = convert.JSON.encode((request).toJson());
382 } 375 }
383 if (resource == null) { 376 if (resource == null) {
384 throw new core.ArgumentError("Parameter resource is required."); 377 throw new core.ArgumentError("Parameter resource is required.");
385 } 378 }
386 379
387 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam Policy'; 380 _url = 'v1/' +
381 commons.Escaper.ecapeVariableReserved('$resource') +
382 ':setIamPolicy';
388 383
389 var _response = _requester.request(_url, 384 var _response = _requester.request(_url, "POST",
390 "POST", 385 body: _body,
391 body: _body, 386 queryParams: _queryParams,
392 queryParams: _queryParams, 387 uploadOptions: _uploadOptions,
393 uploadOptions: _uploadOptions, 388 uploadMedia: _uploadMedia,
394 uploadMedia: _uploadMedia, 389 downloadOptions: _downloadOptions);
395 downloadOptions: _downloadOptions);
396 return _response.then((data) => new Policy.fromJson(data)); 390 return _response.then((data) => new Policy.fromJson(data));
397 } 391 }
398 392
399 /** 393 /// Returns permissions that a caller has on the specified resource.
400 * Returns permissions that a caller has on the specified resource. 394 /// If the resource does not exist, this will return an empty set of
401 * If the resource does not exist, this will return an empty set of 395 /// permissions, not a NOT_FOUND error.
402 * permissions, not a NOT_FOUND error. 396 ///
403 * 397 /// Note: This operation is designed to be used for building permission-aware
404 * Note: This operation is designed to be used for building permission-aware 398 /// UIs and command-line tools, not for authorization checking. This
405 * UIs and command-line tools, not for authorization checking. This operation 399 /// operation
406 * may "fail open" without warning. 400 /// may "fail open" without warning.
407 * 401 ///
408 * [request] - The metadata request object. 402 /// [request] - The metadata request object.
409 * 403 ///
410 * Request parameters: 404 /// Request parameters:
411 * 405 ///
412 * [resource] - REQUIRED: The resource for which the policy detail is being 406 /// [resource] - REQUIRED: The resource for which the policy detail is being
413 * requested. 407 /// requested.
414 * See the operation documentation for the appropriate value for this field. 408 /// See the operation documentation for the appropriate value for this field.
415 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 409 /// Value must have pattern
416 * 410 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
417 * Completes with a [TestIamPermissionsResponse]. 411 ///
418 * 412 /// Completes with a [TestIamPermissionsResponse].
419 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 413 ///
420 * error. 414 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
421 * 415 /// an error.
422 * If the used [http.Client] completes with an error when making a REST call, 416 ///
423 * this method will complete with the same error. 417 /// If the used [http.Client] completes with an error when making a REST
424 */ 418 /// call, this method will complete with the same error.
425 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) { 419 async.Future<TestIamPermissionsResponse> testIamPermissions(
420 TestIamPermissionsRequest request, core.String resource) {
426 var _url = null; 421 var _url = null;
427 var _queryParams = new core.Map(); 422 var _queryParams = new core.Map();
428 var _uploadMedia = null; 423 var _uploadMedia = null;
429 var _uploadOptions = null; 424 var _uploadOptions = null;
430 var _downloadOptions = commons.DownloadOptions.Metadata; 425 var _downloadOptions = commons.DownloadOptions.Metadata;
431 var _body = null; 426 var _body = null;
432 427
433 if (request != null) { 428 if (request != null) {
434 _body = convert.JSON.encode((request).toJson()); 429 _body = convert.JSON.encode((request).toJson());
435 } 430 }
436 if (resource == null) { 431 if (resource == null) {
437 throw new core.ArgumentError("Parameter resource is required."); 432 throw new core.ArgumentError("Parameter resource is required.");
438 } 433 }
439 434
440 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa mPermissions'; 435 _url = 'v1/' +
436 commons.Escaper.ecapeVariableReserved('$resource') +
437 ':testIamPermissions';
441 438
442 var _response = _requester.request(_url, 439 var _response = _requester.request(_url, "POST",
443 "POST", 440 body: _body,
444 body: _body, 441 queryParams: _queryParams,
445 queryParams: _queryParams, 442 uploadOptions: _uploadOptions,
446 uploadOptions: _uploadOptions, 443 uploadMedia: _uploadMedia,
447 uploadMedia: _uploadMedia, 444 downloadOptions: _downloadOptions);
448 downloadOptions: _downloadOptions); 445 return _response
449 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 446 .then((data) => new TestIamPermissionsResponse.fromJson(data));
450 } 447 }
451
452 } 448 }
453 449
454
455 class ProjectsLocationsKeyRingsCryptoKeysResourceApi { 450 class ProjectsLocationsKeyRingsCryptoKeysResourceApi {
456 final commons.ApiRequester _requester; 451 final commons.ApiRequester _requester;
457 452
458 ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi get cryptoKeyV ersions => new ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi(_ requester); 453 ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi
454 get cryptoKeyVersions =>
455 new ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi(
456 _requester);
459 457
460 ProjectsLocationsKeyRingsCryptoKeysResourceApi(commons.ApiRequester client) : 458 ProjectsLocationsKeyRingsCryptoKeysResourceApi(commons.ApiRequester client)
461 _requester = client; 459 : _requester = client;
462 460
463 /** 461 /// Create a new CryptoKey within a KeyRing.
464 * Create a new CryptoKey within a KeyRing. 462 ///
465 * 463 /// CryptoKey.purpose is required.
466 * CryptoKey.purpose is required. 464 ///
467 * 465 /// [request] - The metadata request object.
468 * [request] - The metadata request object. 466 ///
469 * 467 /// Request parameters:
470 * Request parameters: 468 ///
471 * 469 /// [parent] - Required. The name of the KeyRing associated with the
472 * [parent] - Required. The name of the KeyRing associated with the 470 /// CryptoKeys.
473 * CryptoKeys. 471 /// Value must have pattern
474 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 472 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
475 * 473 ///
476 * [cryptoKeyId] - Required. It must be unique within a KeyRing and match the 474 /// [cryptoKeyId] - Required. It must be unique within a KeyRing and match
477 * regular 475 /// the regular
478 * expression `[a-zA-Z0-9_-]{1,63}` 476 /// expression `[a-zA-Z0-9_-]{1,63}`
479 * 477 ///
480 * Completes with a [CryptoKey]. 478 /// Completes with a [CryptoKey].
481 * 479 ///
482 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 480 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
483 * error. 481 /// an error.
484 * 482 ///
485 * If the used [http.Client] completes with an error when making a REST call, 483 /// If the used [http.Client] completes with an error when making a REST
486 * this method will complete with the same error. 484 /// call, this method will complete with the same error.
487 */ 485 async.Future<CryptoKey> create(CryptoKey request, core.String parent,
488 async.Future<CryptoKey> create(CryptoKey request, core.String parent, {core.St ring cryptoKeyId}) { 486 {core.String cryptoKeyId}) {
489 var _url = null; 487 var _url = null;
490 var _queryParams = new core.Map(); 488 var _queryParams = new core.Map();
491 var _uploadMedia = null; 489 var _uploadMedia = null;
492 var _uploadOptions = null; 490 var _uploadOptions = null;
493 var _downloadOptions = commons.DownloadOptions.Metadata; 491 var _downloadOptions = commons.DownloadOptions.Metadata;
494 var _body = null; 492 var _body = null;
495 493
496 if (request != null) { 494 if (request != null) {
497 _body = convert.JSON.encode((request).toJson()); 495 _body = convert.JSON.encode((request).toJson());
498 } 496 }
499 if (parent == null) { 497 if (parent == null) {
500 throw new core.ArgumentError("Parameter parent is required."); 498 throw new core.ArgumentError("Parameter parent is required.");
501 } 499 }
502 if (cryptoKeyId != null) { 500 if (cryptoKeyId != null) {
503 _queryParams["cryptoKeyId"] = [cryptoKeyId]; 501 _queryParams["cryptoKeyId"] = [cryptoKeyId];
504 } 502 }
505 503
506 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe ys'; 504 _url = 'v1/' +
505 commons.Escaper.ecapeVariableReserved('$parent') +
506 '/cryptoKeys';
507 507
508 var _response = _requester.request(_url, 508 var _response = _requester.request(_url, "POST",
509 "POST", 509 body: _body,
510 body: _body, 510 queryParams: _queryParams,
511 queryParams: _queryParams, 511 uploadOptions: _uploadOptions,
512 uploadOptions: _uploadOptions, 512 uploadMedia: _uploadMedia,
513 uploadMedia: _uploadMedia, 513 downloadOptions: _downloadOptions);
514 downloadOptions: _downloadOptions);
515 return _response.then((data) => new CryptoKey.fromJson(data)); 514 return _response.then((data) => new CryptoKey.fromJson(data));
516 } 515 }
517 516
518 /** 517 /// Decrypts data that was protected by Encrypt.
519 * Decrypts data that was protected by Encrypt. 518 ///
520 * 519 /// [request] - The metadata request object.
521 * [request] - The metadata request object. 520 ///
522 * 521 /// Request parameters:
523 * Request parameters: 522 ///
524 * 523 /// [name] - Required. The resource name of the CryptoKey to use for
525 * [name] - Required. The resource name of the CryptoKey to use for 524 /// decryption.
526 * decryption. 525 /// The server will choose the appropriate version.
527 * The server will choose the appropriate version. 526 /// Value must have pattern
528 * Value must have pattern 527 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
529 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 528 ///
530 * 529 /// Completes with a [DecryptResponse].
531 * Completes with a [DecryptResponse]. 530 ///
532 * 531 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 532 /// an error.
534 * error. 533 ///
535 * 534 /// If the used [http.Client] completes with an error when making a REST
536 * If the used [http.Client] completes with an error when making a REST call, 535 /// call, this method will complete with the same error.
537 * this method will complete with the same error. 536 async.Future<DecryptResponse> decrypt(
538 */ 537 DecryptRequest request, core.String name) {
539 async.Future<DecryptResponse> decrypt(DecryptRequest request, core.String name ) {
540 var _url = null; 538 var _url = null;
541 var _queryParams = new core.Map(); 539 var _queryParams = new core.Map();
542 var _uploadMedia = null; 540 var _uploadMedia = null;
543 var _uploadOptions = null; 541 var _uploadOptions = null;
544 var _downloadOptions = commons.DownloadOptions.Metadata; 542 var _downloadOptions = commons.DownloadOptions.Metadata;
545 var _body = null; 543 var _body = null;
546 544
547 if (request != null) { 545 if (request != null) {
548 _body = convert.JSON.encode((request).toJson()); 546 _body = convert.JSON.encode((request).toJson());
549 } 547 }
550 if (name == null) { 548 if (name == null) {
551 throw new core.ArgumentError("Parameter name is required."); 549 throw new core.ArgumentError("Parameter name is required.");
552 } 550 }
553 551
554 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':decrypt'; 552 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':decrypt';
555 553
556 var _response = _requester.request(_url, 554 var _response = _requester.request(_url, "POST",
557 "POST", 555 body: _body,
558 body: _body, 556 queryParams: _queryParams,
559 queryParams: _queryParams, 557 uploadOptions: _uploadOptions,
560 uploadOptions: _uploadOptions, 558 uploadMedia: _uploadMedia,
561 uploadMedia: _uploadMedia, 559 downloadOptions: _downloadOptions);
562 downloadOptions: _downloadOptions);
563 return _response.then((data) => new DecryptResponse.fromJson(data)); 560 return _response.then((data) => new DecryptResponse.fromJson(data));
564 } 561 }
565 562
566 /** 563 /// Encrypts data, so that it can only be recovered by a call to Decrypt.
567 * Encrypts data, so that it can only be recovered by a call to Decrypt. 564 ///
568 * 565 /// [request] - The metadata request object.
569 * [request] - The metadata request object. 566 ///
570 * 567 /// Request parameters:
571 * Request parameters: 568 ///
572 * 569 /// [name] - Required. The resource name of the CryptoKey or CryptoKeyVersion
573 * [name] - Required. The resource name of the CryptoKey or CryptoKeyVersion 570 /// to use for encryption.
574 * to use for encryption. 571 ///
575 * 572 /// If a CryptoKey is specified, the server will use its
576 * If a CryptoKey is specified, the server will use its 573 /// primary version.
577 * primary version. 574 /// Value must have pattern
578 * Value must have pattern 575 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$".
579 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$". 576 ///
580 * 577 /// Completes with a [EncryptResponse].
581 * Completes with a [EncryptResponse]. 578 ///
582 * 579 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
583 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 580 /// an error.
584 * error. 581 ///
585 * 582 /// If the used [http.Client] completes with an error when making a REST
586 * If the used [http.Client] completes with an error when making a REST call, 583 /// call, this method will complete with the same error.
587 * this method will complete with the same error. 584 async.Future<EncryptResponse> encrypt(
588 */ 585 EncryptRequest request, core.String name) {
589 async.Future<EncryptResponse> encrypt(EncryptRequest request, core.String name ) {
590 var _url = null; 586 var _url = null;
591 var _queryParams = new core.Map(); 587 var _queryParams = new core.Map();
592 var _uploadMedia = null; 588 var _uploadMedia = null;
593 var _uploadOptions = null; 589 var _uploadOptions = null;
594 var _downloadOptions = commons.DownloadOptions.Metadata; 590 var _downloadOptions = commons.DownloadOptions.Metadata;
595 var _body = null; 591 var _body = null;
596 592
597 if (request != null) { 593 if (request != null) {
598 _body = convert.JSON.encode((request).toJson()); 594 _body = convert.JSON.encode((request).toJson());
599 } 595 }
600 if (name == null) { 596 if (name == null) {
601 throw new core.ArgumentError("Parameter name is required."); 597 throw new core.ArgumentError("Parameter name is required.");
602 } 598 }
603 599
604 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':encrypt'; 600 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':encrypt';
605 601
606 var _response = _requester.request(_url, 602 var _response = _requester.request(_url, "POST",
607 "POST", 603 body: _body,
608 body: _body, 604 queryParams: _queryParams,
609 queryParams: _queryParams, 605 uploadOptions: _uploadOptions,
610 uploadOptions: _uploadOptions, 606 uploadMedia: _uploadMedia,
611 uploadMedia: _uploadMedia, 607 downloadOptions: _downloadOptions);
612 downloadOptions: _downloadOptions);
613 return _response.then((data) => new EncryptResponse.fromJson(data)); 608 return _response.then((data) => new EncryptResponse.fromJson(data));
614 } 609 }
615 610
616 /** 611 /// Returns metadata for a given CryptoKey, as well as its
617 * Returns metadata for a given CryptoKey, as well as its 612 /// primary CryptoKeyVersion.
618 * primary CryptoKeyVersion. 613 ///
619 * 614 /// Request parameters:
620 * Request parameters: 615 ///
621 * 616 /// [name] - The name of the CryptoKey to get.
622 * [name] - The name of the CryptoKey to get. 617 /// Value must have pattern
623 * Value must have pattern 618 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
624 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 619 ///
625 * 620 /// Completes with a [CryptoKey].
626 * Completes with a [CryptoKey]. 621 ///
627 * 622 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
628 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 623 /// an error.
629 * error. 624 ///
630 * 625 /// If the used [http.Client] completes with an error when making a REST
631 * If the used [http.Client] completes with an error when making a REST call, 626 /// call, this method will complete with the same error.
632 * this method will complete with the same error.
633 */
634 async.Future<CryptoKey> get(core.String name) { 627 async.Future<CryptoKey> get(core.String name) {
635 var _url = null; 628 var _url = null;
636 var _queryParams = new core.Map(); 629 var _queryParams = new core.Map();
637 var _uploadMedia = null; 630 var _uploadMedia = null;
638 var _uploadOptions = null; 631 var _uploadOptions = null;
639 var _downloadOptions = commons.DownloadOptions.Metadata; 632 var _downloadOptions = commons.DownloadOptions.Metadata;
640 var _body = null; 633 var _body = null;
641 634
642 if (name == null) { 635 if (name == null) {
643 throw new core.ArgumentError("Parameter name is required."); 636 throw new core.ArgumentError("Parameter name is required.");
644 } 637 }
645 638
646 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 639 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
647 640
648 var _response = _requester.request(_url, 641 var _response = _requester.request(_url, "GET",
649 "GET", 642 body: _body,
650 body: _body, 643 queryParams: _queryParams,
651 queryParams: _queryParams, 644 uploadOptions: _uploadOptions,
652 uploadOptions: _uploadOptions, 645 uploadMedia: _uploadMedia,
653 uploadMedia: _uploadMedia, 646 downloadOptions: _downloadOptions);
654 downloadOptions: _downloadOptions);
655 return _response.then((data) => new CryptoKey.fromJson(data)); 647 return _response.then((data) => new CryptoKey.fromJson(data));
656 } 648 }
657 649
658 /** 650 /// Gets the access control policy for a resource.
659 * Gets the access control policy for a resource. 651 /// Returns an empty policy if the resource exists and does not have a policy
660 * Returns an empty policy if the resource exists and does not have a policy 652 /// set.
661 * set. 653 ///
662 * 654 /// Request parameters:
663 * Request parameters: 655 ///
664 * 656 /// [resource] - REQUIRED: The resource for which the policy is being
665 * [resource] - REQUIRED: The resource for which the policy is being 657 /// requested.
666 * requested. 658 /// See the operation documentation for the appropriate value for this field.
667 * See the operation documentation for the appropriate value for this field. 659 /// Value must have pattern
668 * Value must have pattern 660 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
669 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 661 ///
670 * 662 /// Completes with a [Policy].
671 * Completes with a [Policy]. 663 ///
672 * 664 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
673 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 665 /// an error.
674 * error. 666 ///
675 * 667 /// If the used [http.Client] completes with an error when making a REST
676 * If the used [http.Client] completes with an error when making a REST call, 668 /// call, this method will complete with the same error.
677 * this method will complete with the same error.
678 */
679 async.Future<Policy> getIamPolicy(core.String resource) { 669 async.Future<Policy> getIamPolicy(core.String resource) {
680 var _url = null; 670 var _url = null;
681 var _queryParams = new core.Map(); 671 var _queryParams = new core.Map();
682 var _uploadMedia = null; 672 var _uploadMedia = null;
683 var _uploadOptions = null; 673 var _uploadOptions = null;
684 var _downloadOptions = commons.DownloadOptions.Metadata; 674 var _downloadOptions = commons.DownloadOptions.Metadata;
685 var _body = null; 675 var _body = null;
686 676
687 if (resource == null) { 677 if (resource == null) {
688 throw new core.ArgumentError("Parameter resource is required."); 678 throw new core.ArgumentError("Parameter resource is required.");
689 } 679 }
690 680
691 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam Policy'; 681 _url = 'v1/' +
682 commons.Escaper.ecapeVariableReserved('$resource') +
683 ':getIamPolicy';
692 684
693 var _response = _requester.request(_url, 685 var _response = _requester.request(_url, "GET",
694 "GET", 686 body: _body,
695 body: _body, 687 queryParams: _queryParams,
696 queryParams: _queryParams, 688 uploadOptions: _uploadOptions,
697 uploadOptions: _uploadOptions, 689 uploadMedia: _uploadMedia,
698 uploadMedia: _uploadMedia, 690 downloadOptions: _downloadOptions);
699 downloadOptions: _downloadOptions);
700 return _response.then((data) => new Policy.fromJson(data)); 691 return _response.then((data) => new Policy.fromJson(data));
701 } 692 }
702 693
703 /** 694 /// Lists CryptoKeys.
704 * Lists CryptoKeys. 695 ///
705 * 696 /// Request parameters:
706 * Request parameters: 697 ///
707 * 698 /// [parent] - Required. The resource name of the KeyRing to list, in the
708 * [parent] - Required. The resource name of the KeyRing to list, in the 699 /// format
709 * format 700 /// `projects / * /locations / * /keyRings / * `.
710 * `projects / * /locations / * /keyRings / * `. 701 /// Value must have pattern
711 * Value must have pattern "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$". 702 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$".
712 * 703 ///
713 * [pageSize] - Optional limit on the number of CryptoKeys to include in the 704 /// [pageToken] - Optional pagination token, returned earlier via
714 * response. Further CryptoKeys can subsequently be obtained by 705 /// ListCryptoKeysResponse.next_page_token.
715 * including the ListCryptoKeysResponse.next_page_token in a subsequent 706 ///
716 * request. If unspecified, the server will pick an appropriate default. 707 /// [pageSize] - Optional limit on the number of CryptoKeys to include in the
717 * 708 /// response. Further CryptoKeys can subsequently be obtained by
718 * [pageToken] - Optional pagination token, returned earlier via 709 /// including the ListCryptoKeysResponse.next_page_token in a subsequent
719 * ListCryptoKeysResponse.next_page_token. 710 /// request. If unspecified, the server will pick an appropriate default.
720 * 711 ///
721 * Completes with a [ListCryptoKeysResponse]. 712 /// Completes with a [ListCryptoKeysResponse].
722 * 713 ///
723 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 714 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
724 * error. 715 /// an error.
725 * 716 ///
726 * If the used [http.Client] completes with an error when making a REST call, 717 /// If the used [http.Client] completes with an error when making a REST
727 * this method will complete with the same error. 718 /// call, this method will complete with the same error.
728 */ 719 async.Future<ListCryptoKeysResponse> list(core.String parent,
729 async.Future<ListCryptoKeysResponse> list(core.String parent, {core.int pageSi ze, core.String pageToken}) { 720 {core.String pageToken, core.int pageSize}) {
730 var _url = null; 721 var _url = null;
731 var _queryParams = new core.Map(); 722 var _queryParams = new core.Map();
732 var _uploadMedia = null; 723 var _uploadMedia = null;
733 var _uploadOptions = null; 724 var _uploadOptions = null;
734 var _downloadOptions = commons.DownloadOptions.Metadata; 725 var _downloadOptions = commons.DownloadOptions.Metadata;
735 var _body = null; 726 var _body = null;
736 727
737 if (parent == null) { 728 if (parent == null) {
738 throw new core.ArgumentError("Parameter parent is required."); 729 throw new core.ArgumentError("Parameter parent is required.");
739 } 730 }
731 if (pageToken != null) {
732 _queryParams["pageToken"] = [pageToken];
733 }
740 if (pageSize != null) { 734 if (pageSize != null) {
741 _queryParams["pageSize"] = ["${pageSize}"]; 735 _queryParams["pageSize"] = ["${pageSize}"];
742 } 736 }
743 if (pageToken != null) {
744 _queryParams["pageToken"] = [pageToken];
745 }
746 737
747 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe ys'; 738 _url = 'v1/' +
739 commons.Escaper.ecapeVariableReserved('$parent') +
740 '/cryptoKeys';
748 741
749 var _response = _requester.request(_url, 742 var _response = _requester.request(_url, "GET",
750 "GET", 743 body: _body,
751 body: _body, 744 queryParams: _queryParams,
752 queryParams: _queryParams, 745 uploadOptions: _uploadOptions,
753 uploadOptions: _uploadOptions, 746 uploadMedia: _uploadMedia,
754 uploadMedia: _uploadMedia, 747 downloadOptions: _downloadOptions);
755 downloadOptions: _downloadOptions);
756 return _response.then((data) => new ListCryptoKeysResponse.fromJson(data)); 748 return _response.then((data) => new ListCryptoKeysResponse.fromJson(data));
757 } 749 }
758 750
759 /** 751 /// Update a CryptoKey.
760 * Update a CryptoKey. 752 ///
761 * 753 /// [request] - The metadata request object.
762 * [request] - The metadata request object. 754 ///
763 * 755 /// Request parameters:
764 * Request parameters: 756 ///
765 * 757 /// [name] - Output only. The resource name for this CryptoKey in the format
766 * [name] - Output only. The resource name for this CryptoKey in the format 758 /// `projects / * /locations / * /keyRings / * /cryptoKeys / * `.
767 * `projects / * /locations / * /keyRings / * /cryptoKeys / * `. 759 /// Value must have pattern
768 * Value must have pattern 760 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
769 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 761 ///
770 * 762 /// [updateMask] - Required list of fields to be updated in this request.
771 * [updateMask] - Required list of fields to be updated in this request. 763 ///
772 * 764 /// Completes with a [CryptoKey].
773 * Completes with a [CryptoKey]. 765 ///
774 * 766 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 767 /// an error.
776 * error. 768 ///
777 * 769 /// If the used [http.Client] completes with an error when making a REST
778 * If the used [http.Client] completes with an error when making a REST call, 770 /// call, this method will complete with the same error.
779 * this method will complete with the same error. 771 async.Future<CryptoKey> patch(CryptoKey request, core.String name,
780 */ 772 {core.String updateMask}) {
781 async.Future<CryptoKey> patch(CryptoKey request, core.String name, {core.Strin g updateMask}) {
782 var _url = null; 773 var _url = null;
783 var _queryParams = new core.Map(); 774 var _queryParams = new core.Map();
784 var _uploadMedia = null; 775 var _uploadMedia = null;
785 var _uploadOptions = null; 776 var _uploadOptions = null;
786 var _downloadOptions = commons.DownloadOptions.Metadata; 777 var _downloadOptions = commons.DownloadOptions.Metadata;
787 var _body = null; 778 var _body = null;
788 779
789 if (request != null) { 780 if (request != null) {
790 _body = convert.JSON.encode((request).toJson()); 781 _body = convert.JSON.encode((request).toJson());
791 } 782 }
792 if (name == null) { 783 if (name == null) {
793 throw new core.ArgumentError("Parameter name is required."); 784 throw new core.ArgumentError("Parameter name is required.");
794 } 785 }
795 if (updateMask != null) { 786 if (updateMask != null) {
796 _queryParams["updateMask"] = [updateMask]; 787 _queryParams["updateMask"] = [updateMask];
797 } 788 }
798 789
799 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 790 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
800 791
801 var _response = _requester.request(_url, 792 var _response = _requester.request(_url, "PATCH",
802 "PATCH", 793 body: _body,
803 body: _body, 794 queryParams: _queryParams,
804 queryParams: _queryParams, 795 uploadOptions: _uploadOptions,
805 uploadOptions: _uploadOptions, 796 uploadMedia: _uploadMedia,
806 uploadMedia: _uploadMedia, 797 downloadOptions: _downloadOptions);
807 downloadOptions: _downloadOptions);
808 return _response.then((data) => new CryptoKey.fromJson(data)); 798 return _response.then((data) => new CryptoKey.fromJson(data));
809 } 799 }
810 800
811 /** 801 /// Sets the access control policy on the specified resource. Replaces any
812 * Sets the access control policy on the specified resource. Replaces any 802 /// existing policy.
813 * existing policy. 803 ///
814 * 804 /// [request] - The metadata request object.
815 * [request] - The metadata request object. 805 ///
816 * 806 /// Request parameters:
817 * Request parameters: 807 ///
818 * 808 /// [resource] - REQUIRED: The resource for which the policy is being
819 * [resource] - REQUIRED: The resource for which the policy is being 809 /// specified.
820 * specified. 810 /// See the operation documentation for the appropriate value for this field.
821 * See the operation documentation for the appropriate value for this field. 811 /// Value must have pattern
822 * Value must have pattern 812 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
823 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 813 ///
824 * 814 /// Completes with a [Policy].
825 * Completes with a [Policy]. 815 ///
826 * 816 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
827 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 817 /// an error.
828 * error. 818 ///
829 * 819 /// If the used [http.Client] completes with an error when making a REST
830 * If the used [http.Client] completes with an error when making a REST call, 820 /// call, this method will complete with the same error.
831 * this method will complete with the same error. 821 async.Future<Policy> setIamPolicy(
832 */ 822 SetIamPolicyRequest request, core.String resource) {
833 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
834 var _url = null; 823 var _url = null;
835 var _queryParams = new core.Map(); 824 var _queryParams = new core.Map();
836 var _uploadMedia = null; 825 var _uploadMedia = null;
837 var _uploadOptions = null; 826 var _uploadOptions = null;
838 var _downloadOptions = commons.DownloadOptions.Metadata; 827 var _downloadOptions = commons.DownloadOptions.Metadata;
839 var _body = null; 828 var _body = null;
840 829
841 if (request != null) { 830 if (request != null) {
842 _body = convert.JSON.encode((request).toJson()); 831 _body = convert.JSON.encode((request).toJson());
843 } 832 }
844 if (resource == null) { 833 if (resource == null) {
845 throw new core.ArgumentError("Parameter resource is required."); 834 throw new core.ArgumentError("Parameter resource is required.");
846 } 835 }
847 836
848 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam Policy'; 837 _url = 'v1/' +
838 commons.Escaper.ecapeVariableReserved('$resource') +
839 ':setIamPolicy';
849 840
850 var _response = _requester.request(_url, 841 var _response = _requester.request(_url, "POST",
851 "POST", 842 body: _body,
852 body: _body, 843 queryParams: _queryParams,
853 queryParams: _queryParams, 844 uploadOptions: _uploadOptions,
854 uploadOptions: _uploadOptions, 845 uploadMedia: _uploadMedia,
855 uploadMedia: _uploadMedia, 846 downloadOptions: _downloadOptions);
856 downloadOptions: _downloadOptions);
857 return _response.then((data) => new Policy.fromJson(data)); 847 return _response.then((data) => new Policy.fromJson(data));
858 } 848 }
859 849
860 /** 850 /// Returns permissions that a caller has on the specified resource.
861 * Returns permissions that a caller has on the specified resource. 851 /// If the resource does not exist, this will return an empty set of
862 * If the resource does not exist, this will return an empty set of 852 /// permissions, not a NOT_FOUND error.
863 * permissions, not a NOT_FOUND error. 853 ///
864 * 854 /// Note: This operation is designed to be used for building permission-aware
865 * Note: This operation is designed to be used for building permission-aware 855 /// UIs and command-line tools, not for authorization checking. This
866 * UIs and command-line tools, not for authorization checking. This operation 856 /// operation
867 * may "fail open" without warning. 857 /// may "fail open" without warning.
868 * 858 ///
869 * [request] - The metadata request object. 859 /// [request] - The metadata request object.
870 * 860 ///
871 * Request parameters: 861 /// Request parameters:
872 * 862 ///
873 * [resource] - REQUIRED: The resource for which the policy detail is being 863 /// [resource] - REQUIRED: The resource for which the policy detail is being
874 * requested. 864 /// requested.
875 * See the operation documentation for the appropriate value for this field. 865 /// See the operation documentation for the appropriate value for this field.
876 * Value must have pattern 866 /// Value must have pattern
877 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 867 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
878 * 868 ///
879 * Completes with a [TestIamPermissionsResponse]. 869 /// Completes with a [TestIamPermissionsResponse].
880 * 870 ///
881 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 871 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
882 * error. 872 /// an error.
883 * 873 ///
884 * If the used [http.Client] completes with an error when making a REST call, 874 /// If the used [http.Client] completes with an error when making a REST
885 * this method will complete with the same error. 875 /// call, this method will complete with the same error.
886 */ 876 async.Future<TestIamPermissionsResponse> testIamPermissions(
887 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) { 877 TestIamPermissionsRequest request, core.String resource) {
888 var _url = null; 878 var _url = null;
889 var _queryParams = new core.Map(); 879 var _queryParams = new core.Map();
890 var _uploadMedia = null; 880 var _uploadMedia = null;
891 var _uploadOptions = null; 881 var _uploadOptions = null;
892 var _downloadOptions = commons.DownloadOptions.Metadata; 882 var _downloadOptions = commons.DownloadOptions.Metadata;
893 var _body = null; 883 var _body = null;
894 884
895 if (request != null) { 885 if (request != null) {
896 _body = convert.JSON.encode((request).toJson()); 886 _body = convert.JSON.encode((request).toJson());
897 } 887 }
898 if (resource == null) { 888 if (resource == null) {
899 throw new core.ArgumentError("Parameter resource is required."); 889 throw new core.ArgumentError("Parameter resource is required.");
900 } 890 }
901 891
902 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa mPermissions'; 892 _url = 'v1/' +
893 commons.Escaper.ecapeVariableReserved('$resource') +
894 ':testIamPermissions';
903 895
904 var _response = _requester.request(_url, 896 var _response = _requester.request(_url, "POST",
905 "POST", 897 body: _body,
906 body: _body, 898 queryParams: _queryParams,
907 queryParams: _queryParams, 899 uploadOptions: _uploadOptions,
908 uploadOptions: _uploadOptions, 900 uploadMedia: _uploadMedia,
909 uploadMedia: _uploadMedia, 901 downloadOptions: _downloadOptions);
910 downloadOptions: _downloadOptions); 902 return _response
911 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data )); 903 .then((data) => new TestIamPermissionsResponse.fromJson(data));
912 } 904 }
913 905
914 /** 906 /// Update the version of a CryptoKey that will be used in Encrypt
915 * Update the version of a CryptoKey that will be used in Encrypt 907 ///
916 * 908 /// [request] - The metadata request object.
917 * [request] - The metadata request object. 909 ///
918 * 910 /// Request parameters:
919 * Request parameters: 911 ///
920 * 912 /// [name] - The resource name of the CryptoKey to update.
921 * [name] - The resource name of the CryptoKey to update. 913 /// Value must have pattern
922 * Value must have pattern 914 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
923 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 915 ///
924 * 916 /// Completes with a [CryptoKey].
925 * Completes with a [CryptoKey]. 917 ///
926 * 918 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
927 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 919 /// an error.
928 * error. 920 ///
929 * 921 /// If the used [http.Client] completes with an error when making a REST
930 * If the used [http.Client] completes with an error when making a REST call, 922 /// call, this method will complete with the same error.
931 * this method will complete with the same error. 923 async.Future<CryptoKey> updatePrimaryVersion(
932 */ 924 UpdateCryptoKeyPrimaryVersionRequest request, core.String name) {
933 async.Future<CryptoKey> updatePrimaryVersion(UpdateCryptoKeyPrimaryVersionRequ est request, core.String name) {
934 var _url = null; 925 var _url = null;
935 var _queryParams = new core.Map(); 926 var _queryParams = new core.Map();
936 var _uploadMedia = null; 927 var _uploadMedia = null;
937 var _uploadOptions = null; 928 var _uploadOptions = null;
938 var _downloadOptions = commons.DownloadOptions.Metadata; 929 var _downloadOptions = commons.DownloadOptions.Metadata;
939 var _body = null; 930 var _body = null;
940 931
941 if (request != null) { 932 if (request != null) {
942 _body = convert.JSON.encode((request).toJson()); 933 _body = convert.JSON.encode((request).toJson());
943 } 934 }
944 if (name == null) { 935 if (name == null) {
945 throw new core.ArgumentError("Parameter name is required."); 936 throw new core.ArgumentError("Parameter name is required.");
946 } 937 }
947 938
948 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':updatePrim aryVersion'; 939 _url = 'v1/' +
940 commons.Escaper.ecapeVariableReserved('$name') +
941 ':updatePrimaryVersion';
949 942
950 var _response = _requester.request(_url, 943 var _response = _requester.request(_url, "POST",
951 "POST", 944 body: _body,
952 body: _body, 945 queryParams: _queryParams,
953 queryParams: _queryParams, 946 uploadOptions: _uploadOptions,
954 uploadOptions: _uploadOptions, 947 uploadMedia: _uploadMedia,
955 uploadMedia: _uploadMedia, 948 downloadOptions: _downloadOptions);
956 downloadOptions: _downloadOptions);
957 return _response.then((data) => new CryptoKey.fromJson(data)); 949 return _response.then((data) => new CryptoKey.fromJson(data));
958 } 950 }
959
960 } 951 }
961 952
962
963 class ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi { 953 class ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi {
964 final commons.ApiRequester _requester; 954 final commons.ApiRequester _requester;
965 955
966 ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi(commons.ApiReq uester client) : 956 ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi(
967 _requester = client; 957 commons.ApiRequester client)
958 : _requester = client;
968 959
969 /** 960 /// Create a new CryptoKeyVersion in a CryptoKey.
970 * Create a new CryptoKeyVersion in a CryptoKey. 961 ///
971 * 962 /// The server will assign the next sequential id. If unset,
972 * The server will assign the next sequential id. If unset, 963 /// state will be set to
973 * state will be set to 964 /// ENABLED.
974 * ENABLED. 965 ///
975 * 966 /// [request] - The metadata request object.
976 * [request] - The metadata request object. 967 ///
977 * 968 /// Request parameters:
978 * Request parameters: 969 ///
979 * 970 /// [parent] - Required. The name of the CryptoKey associated with
980 * [parent] - Required. The name of the CryptoKey associated with 971 /// the CryptoKeyVersions.
981 * the CryptoKeyVersions. 972 /// Value must have pattern
982 * Value must have pattern 973 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
983 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 974 ///
984 * 975 /// Completes with a [CryptoKeyVersion].
985 * Completes with a [CryptoKeyVersion]. 976 ///
986 * 977 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
987 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 978 /// an error.
988 * error. 979 ///
989 * 980 /// If the used [http.Client] completes with an error when making a REST
990 * If the used [http.Client] completes with an error when making a REST call, 981 /// call, this method will complete with the same error.
991 * this method will complete with the same error. 982 async.Future<CryptoKeyVersion> create(
992 */ 983 CryptoKeyVersion request, core.String parent) {
993 async.Future<CryptoKeyVersion> create(CryptoKeyVersion request, core.String pa rent) {
994 var _url = null; 984 var _url = null;
995 var _queryParams = new core.Map(); 985 var _queryParams = new core.Map();
996 var _uploadMedia = null; 986 var _uploadMedia = null;
997 var _uploadOptions = null; 987 var _uploadOptions = null;
998 var _downloadOptions = commons.DownloadOptions.Metadata; 988 var _downloadOptions = commons.DownloadOptions.Metadata;
999 var _body = null; 989 var _body = null;
1000 990
1001 if (request != null) { 991 if (request != null) {
1002 _body = convert.JSON.encode((request).toJson()); 992 _body = convert.JSON.encode((request).toJson());
1003 } 993 }
1004 if (parent == null) { 994 if (parent == null) {
1005 throw new core.ArgumentError("Parameter parent is required."); 995 throw new core.ArgumentError("Parameter parent is required.");
1006 } 996 }
1007 997
1008 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe yVersions'; 998 _url = 'v1/' +
999 commons.Escaper.ecapeVariableReserved('$parent') +
1000 '/cryptoKeyVersions';
1009 1001
1010 var _response = _requester.request(_url, 1002 var _response = _requester.request(_url, "POST",
1011 "POST", 1003 body: _body,
1012 body: _body, 1004 queryParams: _queryParams,
1013 queryParams: _queryParams, 1005 uploadOptions: _uploadOptions,
1014 uploadOptions: _uploadOptions, 1006 uploadMedia: _uploadMedia,
1015 uploadMedia: _uploadMedia, 1007 downloadOptions: _downloadOptions);
1016 downloadOptions: _downloadOptions);
1017 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); 1008 return _response.then((data) => new CryptoKeyVersion.fromJson(data));
1018 } 1009 }
1019 1010
1020 /** 1011 /// Schedule a CryptoKeyVersion for destruction.
1021 * Schedule a CryptoKeyVersion for destruction. 1012 ///
1022 * 1013 /// Upon calling this method, CryptoKeyVersion.state will be set to
1023 * Upon calling this method, CryptoKeyVersion.state will be set to 1014 /// DESTROY_SCHEDULED
1024 * DESTROY_SCHEDULED 1015 /// and destroy_time will be set to a time 24
1025 * and destroy_time will be set to a time 24 1016 /// hours in the future, at which point the state
1026 * hours in the future, at which point the state 1017 /// will be changed to
1027 * will be changed to 1018 /// DESTROYED, and the key
1028 * DESTROYED, and the key 1019 /// material will be irrevocably destroyed.
1029 * material will be irrevocably destroyed. 1020 ///
1030 * 1021 /// Before the destroy_time is reached,
1031 * Before the destroy_time is reached, 1022 /// RestoreCryptoKeyVersion may be called to reverse the process.
1032 * RestoreCryptoKeyVersion may be called to reverse the process. 1023 ///
1033 * 1024 /// [request] - The metadata request object.
1034 * [request] - The metadata request object. 1025 ///
1035 * 1026 /// Request parameters:
1036 * Request parameters: 1027 ///
1037 * 1028 /// [name] - The resource name of the CryptoKeyVersion to destroy.
1038 * [name] - The resource name of the CryptoKeyVersion to destroy. 1029 /// Value must have pattern
1039 * Value must have pattern 1030 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKey Versions/[^/]+$".
1040 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyV ersions/[^/]+$". 1031 ///
1041 * 1032 /// Completes with a [CryptoKeyVersion].
1042 * Completes with a [CryptoKeyVersion]. 1033 ///
1043 * 1034 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1044 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1035 /// an error.
1045 * error. 1036 ///
1046 * 1037 /// If the used [http.Client] completes with an error when making a REST
1047 * If the used [http.Client] completes with an error when making a REST call, 1038 /// call, this method will complete with the same error.
1048 * this method will complete with the same error. 1039 async.Future<CryptoKeyVersion> destroy(
1049 */ 1040 DestroyCryptoKeyVersionRequest request, core.String name) {
1050 async.Future<CryptoKeyVersion> destroy(DestroyCryptoKeyVersionRequest request, core.String name) {
1051 var _url = null; 1041 var _url = null;
1052 var _queryParams = new core.Map(); 1042 var _queryParams = new core.Map();
1053 var _uploadMedia = null; 1043 var _uploadMedia = null;
1054 var _uploadOptions = null; 1044 var _uploadOptions = null;
1055 var _downloadOptions = commons.DownloadOptions.Metadata; 1045 var _downloadOptions = commons.DownloadOptions.Metadata;
1056 var _body = null; 1046 var _body = null;
1057 1047
1058 if (request != null) { 1048 if (request != null) {
1059 _body = convert.JSON.encode((request).toJson()); 1049 _body = convert.JSON.encode((request).toJson());
1060 } 1050 }
1061 if (name == null) { 1051 if (name == null) {
1062 throw new core.ArgumentError("Parameter name is required."); 1052 throw new core.ArgumentError("Parameter name is required.");
1063 } 1053 }
1064 1054
1065 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':destroy'; 1055 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':destroy';
1066 1056
1067 var _response = _requester.request(_url, 1057 var _response = _requester.request(_url, "POST",
1068 "POST", 1058 body: _body,
1069 body: _body, 1059 queryParams: _queryParams,
1070 queryParams: _queryParams, 1060 uploadOptions: _uploadOptions,
1071 uploadOptions: _uploadOptions, 1061 uploadMedia: _uploadMedia,
1072 uploadMedia: _uploadMedia, 1062 downloadOptions: _downloadOptions);
1073 downloadOptions: _downloadOptions);
1074 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); 1063 return _response.then((data) => new CryptoKeyVersion.fromJson(data));
1075 } 1064 }
1076 1065
1077 /** 1066 /// Returns metadata for a given CryptoKeyVersion.
1078 * Returns metadata for a given CryptoKeyVersion. 1067 ///
1079 * 1068 /// Request parameters:
1080 * Request parameters: 1069 ///
1081 * 1070 /// [name] - The name of the CryptoKeyVersion to get.
1082 * [name] - The name of the CryptoKeyVersion to get. 1071 /// Value must have pattern
1083 * Value must have pattern 1072 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKey Versions/[^/]+$".
1084 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyV ersions/[^/]+$". 1073 ///
1085 * 1074 /// Completes with a [CryptoKeyVersion].
1086 * Completes with a [CryptoKeyVersion]. 1075 ///
1087 * 1076 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1088 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1077 /// an error.
1089 * error. 1078 ///
1090 * 1079 /// If the used [http.Client] completes with an error when making a REST
1091 * If the used [http.Client] completes with an error when making a REST call, 1080 /// call, this method will complete with the same error.
1092 * this method will complete with the same error.
1093 */
1094 async.Future<CryptoKeyVersion> get(core.String name) { 1081 async.Future<CryptoKeyVersion> get(core.String name) {
1095 var _url = null; 1082 var _url = null;
1096 var _queryParams = new core.Map(); 1083 var _queryParams = new core.Map();
1097 var _uploadMedia = null; 1084 var _uploadMedia = null;
1098 var _uploadOptions = null; 1085 var _uploadOptions = null;
1099 var _downloadOptions = commons.DownloadOptions.Metadata; 1086 var _downloadOptions = commons.DownloadOptions.Metadata;
1100 var _body = null; 1087 var _body = null;
1101 1088
1102 if (name == null) { 1089 if (name == null) {
1103 throw new core.ArgumentError("Parameter name is required."); 1090 throw new core.ArgumentError("Parameter name is required.");
1104 } 1091 }
1105 1092
1106 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1093 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1107 1094
1108 var _response = _requester.request(_url, 1095 var _response = _requester.request(_url, "GET",
1109 "GET", 1096 body: _body,
1110 body: _body, 1097 queryParams: _queryParams,
1111 queryParams: _queryParams, 1098 uploadOptions: _uploadOptions,
1112 uploadOptions: _uploadOptions, 1099 uploadMedia: _uploadMedia,
1113 uploadMedia: _uploadMedia, 1100 downloadOptions: _downloadOptions);
1114 downloadOptions: _downloadOptions);
1115 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); 1101 return _response.then((data) => new CryptoKeyVersion.fromJson(data));
1116 } 1102 }
1117 1103
1118 /** 1104 /// Lists CryptoKeyVersions.
1119 * Lists CryptoKeyVersions. 1105 ///
1120 * 1106 /// Request parameters:
1121 * Request parameters: 1107 ///
1122 * 1108 /// [parent] - Required. The resource name of the CryptoKey to list, in the
1123 * [parent] - Required. The resource name of the CryptoKey to list, in the 1109 /// format
1124 * format 1110 /// `projects / * /locations / * /keyRings / * /cryptoKeys / * `.
1125 * `projects / * /locations / * /keyRings / * /cryptoKeys / * `. 1111 /// Value must have pattern
1126 * Value must have pattern 1112 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$".
1127 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$". 1113 ///
1128 * 1114 /// [pageToken] - Optional pagination token, returned earlier via
1129 * [pageSize] - Optional limit on the number of CryptoKeyVersions to 1115 /// ListCryptoKeyVersionsResponse.next_page_token.
1130 * include in the response. Further CryptoKeyVersions can 1116 ///
1131 * subsequently be obtained by including the 1117 /// [pageSize] - Optional limit on the number of CryptoKeyVersions to
1132 * ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. 1118 /// include in the response. Further CryptoKeyVersions can
1133 * If unspecified, the server will pick an appropriate default. 1119 /// subsequently be obtained by including the
1134 * 1120 /// ListCryptoKeyVersionsResponse.next_page_token in a subsequent request.
1135 * [pageToken] - Optional pagination token, returned earlier via 1121 /// If unspecified, the server will pick an appropriate default.
1136 * ListCryptoKeyVersionsResponse.next_page_token. 1122 ///
1137 * 1123 /// Completes with a [ListCryptoKeyVersionsResponse].
1138 * Completes with a [ListCryptoKeyVersionsResponse]. 1124 ///
1139 * 1125 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1140 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1126 /// an error.
1141 * error. 1127 ///
1142 * 1128 /// If the used [http.Client] completes with an error when making a REST
1143 * If the used [http.Client] completes with an error when making a REST call, 1129 /// call, this method will complete with the same error.
1144 * this method will complete with the same error. 1130 async.Future<ListCryptoKeyVersionsResponse> list(core.String parent,
1145 */ 1131 {core.String pageToken, core.int pageSize}) {
1146 async.Future<ListCryptoKeyVersionsResponse> list(core.String parent, {core.int pageSize, core.String pageToken}) {
1147 var _url = null; 1132 var _url = null;
1148 var _queryParams = new core.Map(); 1133 var _queryParams = new core.Map();
1149 var _uploadMedia = null; 1134 var _uploadMedia = null;
1150 var _uploadOptions = null; 1135 var _uploadOptions = null;
1151 var _downloadOptions = commons.DownloadOptions.Metadata; 1136 var _downloadOptions = commons.DownloadOptions.Metadata;
1152 var _body = null; 1137 var _body = null;
1153 1138
1154 if (parent == null) { 1139 if (parent == null) {
1155 throw new core.ArgumentError("Parameter parent is required."); 1140 throw new core.ArgumentError("Parameter parent is required.");
1156 } 1141 }
1142 if (pageToken != null) {
1143 _queryParams["pageToken"] = [pageToken];
1144 }
1157 if (pageSize != null) { 1145 if (pageSize != null) {
1158 _queryParams["pageSize"] = ["${pageSize}"]; 1146 _queryParams["pageSize"] = ["${pageSize}"];
1159 } 1147 }
1160 if (pageToken != null) {
1161 _queryParams["pageToken"] = [pageToken];
1162 }
1163 1148
1164 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/cryptoKe yVersions'; 1149 _url = 'v1/' +
1150 commons.Escaper.ecapeVariableReserved('$parent') +
1151 '/cryptoKeyVersions';
1165 1152
1166 var _response = _requester.request(_url, 1153 var _response = _requester.request(_url, "GET",
1167 "GET", 1154 body: _body,
1168 body: _body, 1155 queryParams: _queryParams,
1169 queryParams: _queryParams, 1156 uploadOptions: _uploadOptions,
1170 uploadOptions: _uploadOptions, 1157 uploadMedia: _uploadMedia,
1171 uploadMedia: _uploadMedia, 1158 downloadOptions: _downloadOptions);
1172 downloadOptions: _downloadOptions); 1159 return _response
1173 return _response.then((data) => new ListCryptoKeyVersionsResponse.fromJson(d ata)); 1160 .then((data) => new ListCryptoKeyVersionsResponse.fromJson(data));
1174 } 1161 }
1175 1162
1176 /** 1163 /// Update a CryptoKeyVersion's metadata.
1177 * Update a CryptoKeyVersion's metadata. 1164 ///
1178 * 1165 /// state may be changed between
1179 * state may be changed between 1166 /// ENABLED and
1180 * ENABLED and 1167 /// DISABLED using this
1181 * DISABLED using this 1168 /// method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to
1182 * method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to 1169 /// move between other states.
1183 * move between other states. 1170 ///
1184 * 1171 /// [request] - The metadata request object.
1185 * [request] - The metadata request object. 1172 ///
1186 * 1173 /// Request parameters:
1187 * Request parameters: 1174 ///
1188 * 1175 /// [name] - Output only. The resource name for this CryptoKeyVersion in the
1189 * [name] - Output only. The resource name for this CryptoKeyVersion in the 1176 /// format
1190 * format 1177 /// `projects / * /locations / * /keyRings / * /cryptoKeys / *
1191 * `projects / * /locations / * /keyRings / * /cryptoKeys / * 1178 /// /cryptoKeyVersions / * `.
1192 * /cryptoKeyVersions / * `. 1179 /// Value must have pattern
1193 * Value must have pattern 1180 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKey Versions/[^/]+$".
1194 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyV ersions/[^/]+$". 1181 ///
1195 * 1182 /// [updateMask] - Required list of fields to be updated in this request.
1196 * [updateMask] - Required list of fields to be updated in this request. 1183 ///
1197 * 1184 /// Completes with a [CryptoKeyVersion].
1198 * Completes with a [CryptoKeyVersion]. 1185 ///
1199 * 1186 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1200 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1187 /// an error.
1201 * error. 1188 ///
1202 * 1189 /// If the used [http.Client] completes with an error when making a REST
1203 * If the used [http.Client] completes with an error when making a REST call, 1190 /// call, this method will complete with the same error.
1204 * this method will complete with the same error. 1191 async.Future<CryptoKeyVersion> patch(
1205 */ 1192 CryptoKeyVersion request, core.String name,
1206 async.Future<CryptoKeyVersion> patch(CryptoKeyVersion request, core.String nam e, {core.String updateMask}) { 1193 {core.String updateMask}) {
1207 var _url = null; 1194 var _url = null;
1208 var _queryParams = new core.Map(); 1195 var _queryParams = new core.Map();
1209 var _uploadMedia = null; 1196 var _uploadMedia = null;
1210 var _uploadOptions = null; 1197 var _uploadOptions = null;
1211 var _downloadOptions = commons.DownloadOptions.Metadata; 1198 var _downloadOptions = commons.DownloadOptions.Metadata;
1212 var _body = null; 1199 var _body = null;
1213 1200
1214 if (request != null) { 1201 if (request != null) {
1215 _body = convert.JSON.encode((request).toJson()); 1202 _body = convert.JSON.encode((request).toJson());
1216 } 1203 }
1217 if (name == null) { 1204 if (name == null) {
1218 throw new core.ArgumentError("Parameter name is required."); 1205 throw new core.ArgumentError("Parameter name is required.");
1219 } 1206 }
1220 if (updateMask != null) { 1207 if (updateMask != null) {
1221 _queryParams["updateMask"] = [updateMask]; 1208 _queryParams["updateMask"] = [updateMask];
1222 } 1209 }
1223 1210
1224 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); 1211 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1225 1212
1226 var _response = _requester.request(_url, 1213 var _response = _requester.request(_url, "PATCH",
1227 "PATCH", 1214 body: _body,
1228 body: _body, 1215 queryParams: _queryParams,
1229 queryParams: _queryParams, 1216 uploadOptions: _uploadOptions,
1230 uploadOptions: _uploadOptions, 1217 uploadMedia: _uploadMedia,
1231 uploadMedia: _uploadMedia, 1218 downloadOptions: _downloadOptions);
1232 downloadOptions: _downloadOptions);
1233 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); 1219 return _response.then((data) => new CryptoKeyVersion.fromJson(data));
1234 } 1220 }
1235 1221
1236 /** 1222 /// Restore a CryptoKeyVersion in the
1237 * Restore a CryptoKeyVersion in the 1223 /// DESTROY_SCHEDULED,
1238 * DESTROY_SCHEDULED, 1224 /// state.
1239 * state. 1225 ///
1240 * 1226 /// Upon restoration of the CryptoKeyVersion, state
1241 * Upon restoration of the CryptoKeyVersion, state 1227 /// will be set to DISABLED,
1242 * will be set to DISABLED, 1228 /// and destroy_time will be cleared.
1243 * and destroy_time will be cleared. 1229 ///
1244 * 1230 /// [request] - The metadata request object.
1245 * [request] - The metadata request object. 1231 ///
1246 * 1232 /// Request parameters:
1247 * Request parameters: 1233 ///
1248 * 1234 /// [name] - The resource name of the CryptoKeyVersion to restore.
1249 * [name] - The resource name of the CryptoKeyVersion to restore. 1235 /// Value must have pattern
1250 * Value must have pattern 1236 /// "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKey Versions/[^/]+$".
1251 * "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyV ersions/[^/]+$". 1237 ///
1252 * 1238 /// Completes with a [CryptoKeyVersion].
1253 * Completes with a [CryptoKeyVersion]. 1239 ///
1254 * 1240 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
1255 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 1241 /// an error.
1256 * error. 1242 ///
1257 * 1243 /// If the used [http.Client] completes with an error when making a REST
1258 * If the used [http.Client] completes with an error when making a REST call, 1244 /// call, this method will complete with the same error.
1259 * this method will complete with the same error. 1245 async.Future<CryptoKeyVersion> restore(
1260 */ 1246 RestoreCryptoKeyVersionRequest request, core.String name) {
1261 async.Future<CryptoKeyVersion> restore(RestoreCryptoKeyVersionRequest request, core.String name) {
1262 var _url = null; 1247 var _url = null;
1263 var _queryParams = new core.Map(); 1248 var _queryParams = new core.Map();
1264 var _uploadMedia = null; 1249 var _uploadMedia = null;
1265 var _uploadOptions = null; 1250 var _uploadOptions = null;
1266 var _downloadOptions = commons.DownloadOptions.Metadata; 1251 var _downloadOptions = commons.DownloadOptions.Metadata;
1267 var _body = null; 1252 var _body = null;
1268 1253
1269 if (request != null) { 1254 if (request != null) {
1270 _body = convert.JSON.encode((request).toJson()); 1255 _body = convert.JSON.encode((request).toJson());
1271 } 1256 }
1272 if (name == null) { 1257 if (name == null) {
1273 throw new core.ArgumentError("Parameter name is required."); 1258 throw new core.ArgumentError("Parameter name is required.");
1274 } 1259 }
1275 1260
1276 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':restore'; 1261 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':restore';
1277 1262
1278 var _response = _requester.request(_url, 1263 var _response = _requester.request(_url, "POST",
1279 "POST", 1264 body: _body,
1280 body: _body, 1265 queryParams: _queryParams,
1281 queryParams: _queryParams, 1266 uploadOptions: _uploadOptions,
1282 uploadOptions: _uploadOptions, 1267 uploadMedia: _uploadMedia,
1283 uploadMedia: _uploadMedia, 1268 downloadOptions: _downloadOptions);
1284 downloadOptions: _downloadOptions);
1285 return _response.then((data) => new CryptoKeyVersion.fromJson(data)); 1269 return _response.then((data) => new CryptoKeyVersion.fromJson(data));
1286 } 1270 }
1287
1288 } 1271 }
1289 1272
1290 1273 /// Specifies the audit configuration for a service.
1291 1274 /// The configuration determines which permission types are logged, and what
1292 /** 1275 /// identities, if any, are exempted from logging.
1293 * Specifies the audit configuration for a service. 1276 /// An AuditConfig must have one or more AuditLogConfigs.
1294 * The configuration determines which permission types are logged, and what 1277 ///
1295 * identities, if any, are exempted from logging. 1278 /// If there are AuditConfigs for both `allServices` and a specific service,
1296 * An AuditConfig must have one or more AuditLogConfigs. 1279 /// the union of the two AuditConfigs is used for that service: the log_types
1297 * 1280 /// specified in each AuditConfig are enabled, and the exempted_members in each
1298 * If there are AuditConfigs for both `allServices` and a specific service, 1281 /// AuditConfig are exempted.
1299 * the union of the two AuditConfigs is used for that service: the log_types 1282 ///
1300 * specified in each AuditConfig are enabled, and the exempted_members in each 1283 /// Example Policy with multiple AuditConfigs:
1301 * AuditConfig are exempted. 1284 ///
1302 * 1285 /// {
1303 * Example Policy with multiple AuditConfigs: 1286 /// "audit_configs": [
1304 * 1287 /// {
1305 * { 1288 /// "service": "allServices"
1306 * "audit_configs": [ 1289 /// "audit_log_configs": [
1307 * { 1290 /// {
1308 * "service": "allServices" 1291 /// "log_type": "DATA_READ",
1309 * "audit_log_configs": [ 1292 /// "exempted_members": [
1310 * { 1293 /// "user:foo@gmail.com"
1311 * "log_type": "DATA_READ", 1294 /// ]
1312 * "exempted_members": [ 1295 /// },
1313 * "user:foo@gmail.com" 1296 /// {
1314 * ] 1297 /// "log_type": "DATA_WRITE",
1315 * }, 1298 /// },
1316 * { 1299 /// {
1317 * "log_type": "DATA_WRITE", 1300 /// "log_type": "ADMIN_READ",
1318 * }, 1301 /// }
1319 * { 1302 /// ]
1320 * "log_type": "ADMIN_READ", 1303 /// },
1321 * } 1304 /// {
1322 * ] 1305 /// "service": "fooservice.googleapis.com"
1323 * }, 1306 /// "audit_log_configs": [
1324 * { 1307 /// {
1325 * "service": "fooservice.googleapis.com" 1308 /// "log_type": "DATA_READ",
1326 * "audit_log_configs": [ 1309 /// },
1327 * { 1310 /// {
1328 * "log_type": "DATA_READ", 1311 /// "log_type": "DATA_WRITE",
1329 * }, 1312 /// "exempted_members": [
1330 * { 1313 /// "user:bar@gmail.com"
1331 * "log_type": "DATA_WRITE", 1314 /// ]
1332 * "exempted_members": [ 1315 /// }
1333 * "user:bar@gmail.com" 1316 /// ]
1334 * ] 1317 /// }
1335 * } 1318 /// ]
1336 * ] 1319 /// }
1337 * } 1320 ///
1338 * ] 1321 /// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1339 * } 1322 /// logging. It also exempts foo@gmail.com from DATA_READ logging, and
1340 * 1323 /// bar@gmail.com from DATA_WRITE logging.
1341 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1342 * logging. It also exempts foo@gmail.com from DATA_READ logging, and
1343 * bar@gmail.com from DATA_WRITE logging.
1344 */
1345 class AuditConfig { 1324 class AuditConfig {
1346 /** 1325 /// The configuration for logging of each type of permission.
1347 * The configuration for logging of each type of permission. 1326 /// Next ID: 4
1348 * Next ID: 4
1349 */
1350 core.List<AuditLogConfig> auditLogConfigs; 1327 core.List<AuditLogConfig> auditLogConfigs;
1351 core.List<core.String> exemptedMembers; 1328 core.List<core.String> exemptedMembers;
1352 /** 1329
1353 * Specifies a service that will be enabled for audit logging. 1330 /// Specifies a service that will be enabled for audit logging.
1354 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 1331 /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1355 * `allServices` is a special value that covers all services. 1332 /// `allServices` is a special value that covers all services.
1356 */
1357 core.String service; 1333 core.String service;
1358 1334
1359 AuditConfig(); 1335 AuditConfig();
1360 1336
1361 AuditConfig.fromJson(core.Map _json) { 1337 AuditConfig.fromJson(core.Map _json) {
1362 if (_json.containsKey("auditLogConfigs")) { 1338 if (_json.containsKey("auditLogConfigs")) {
1363 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf ig.fromJson(value)).toList(); 1339 auditLogConfigs = _json["auditLogConfigs"]
1340 .map((value) => new AuditLogConfig.fromJson(value))
1341 .toList();
1364 } 1342 }
1365 if (_json.containsKey("exemptedMembers")) { 1343 if (_json.containsKey("exemptedMembers")) {
1366 exemptedMembers = _json["exemptedMembers"]; 1344 exemptedMembers = _json["exemptedMembers"];
1367 } 1345 }
1368 if (_json.containsKey("service")) { 1346 if (_json.containsKey("service")) {
1369 service = _json["service"]; 1347 service = _json["service"];
1370 } 1348 }
1371 } 1349 }
1372 1350
1373 core.Map<core.String, core.Object> toJson() { 1351 core.Map<core.String, core.Object> toJson() {
1374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1352 final core.Map<core.String, core.Object> _json =
1353 new core.Map<core.String, core.Object>();
1375 if (auditLogConfigs != null) { 1354 if (auditLogConfigs != null) {
1376 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson() ).toList(); 1355 _json["auditLogConfigs"] =
1356 auditLogConfigs.map((value) => (value).toJson()).toList();
1377 } 1357 }
1378 if (exemptedMembers != null) { 1358 if (exemptedMembers != null) {
1379 _json["exemptedMembers"] = exemptedMembers; 1359 _json["exemptedMembers"] = exemptedMembers;
1380 } 1360 }
1381 if (service != null) { 1361 if (service != null) {
1382 _json["service"] = service; 1362 _json["service"] = service;
1383 } 1363 }
1384 return _json; 1364 return _json;
1385 } 1365 }
1386 } 1366 }
1387 1367
1388 /** 1368 /// Provides the configuration for logging a type of permissions.
1389 * Provides the configuration for logging a type of permissions. 1369 /// Example:
1390 * Example: 1370 ///
1391 * 1371 /// {
1392 * { 1372 /// "audit_log_configs": [
1393 * "audit_log_configs": [ 1373 /// {
1394 * { 1374 /// "log_type": "DATA_READ",
1395 * "log_type": "DATA_READ", 1375 /// "exempted_members": [
1396 * "exempted_members": [ 1376 /// "user:foo@gmail.com"
1397 * "user:foo@gmail.com" 1377 /// ]
1398 * ] 1378 /// },
1399 * }, 1379 /// {
1400 * { 1380 /// "log_type": "DATA_WRITE",
1401 * "log_type": "DATA_WRITE", 1381 /// }
1402 * } 1382 /// ]
1403 * ] 1383 /// }
1404 * } 1384 ///
1405 * 1385 /// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
1406 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting 1386 /// foo@gmail.com from DATA_READ logging.
1407 * foo@gmail.com from DATA_READ logging.
1408 */
1409 class AuditLogConfig { 1387 class AuditLogConfig {
1410 /** 1388 /// Specifies the identities that do not cause logging for this type of
1411 * Specifies the identities that do not cause logging for this type of 1389 /// permission.
1412 * permission. 1390 /// Follows the same format of Binding.members.
1413 * Follows the same format of Binding.members.
1414 */
1415 core.List<core.String> exemptedMembers; 1391 core.List<core.String> exemptedMembers;
1416 /** 1392
1417 * The log type that this config enables. 1393 /// The log type that this config enables.
1418 * Possible string values are: 1394 /// Possible string values are:
1419 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. 1395 /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this.
1420 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy 1396 /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy
1421 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create 1397 /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create
1422 * - "DATA_READ" : Data reads. Example: CloudSQL Users list 1398 /// - "DATA_READ" : Data reads. Example: CloudSQL Users list
1423 */
1424 core.String logType; 1399 core.String logType;
1425 1400
1426 AuditLogConfig(); 1401 AuditLogConfig();
1427 1402
1428 AuditLogConfig.fromJson(core.Map _json) { 1403 AuditLogConfig.fromJson(core.Map _json) {
1429 if (_json.containsKey("exemptedMembers")) { 1404 if (_json.containsKey("exemptedMembers")) {
1430 exemptedMembers = _json["exemptedMembers"]; 1405 exemptedMembers = _json["exemptedMembers"];
1431 } 1406 }
1432 if (_json.containsKey("logType")) { 1407 if (_json.containsKey("logType")) {
1433 logType = _json["logType"]; 1408 logType = _json["logType"];
1434 } 1409 }
1435 } 1410 }
1436 1411
1437 core.Map<core.String, core.Object> toJson() { 1412 core.Map<core.String, core.Object> toJson() {
1438 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1413 final core.Map<core.String, core.Object> _json =
1414 new core.Map<core.String, core.Object>();
1439 if (exemptedMembers != null) { 1415 if (exemptedMembers != null) {
1440 _json["exemptedMembers"] = exemptedMembers; 1416 _json["exemptedMembers"] = exemptedMembers;
1441 } 1417 }
1442 if (logType != null) { 1418 if (logType != null) {
1443 _json["logType"] = logType; 1419 _json["logType"] = logType;
1444 } 1420 }
1445 return _json; 1421 return _json;
1446 } 1422 }
1447 } 1423 }
1448 1424
1449 /** Associates `members` with a `role`. */ 1425 /// Associates `members` with a `role`.
1450 class Binding { 1426 class Binding {
1451 /** 1427 /// The condition that is associated with this binding.
1452 * The condition that is associated with this binding. 1428 /// NOTE: an unsatisfied condition will not allow user access via current
1453 * NOTE: an unsatisfied condition will not allow user access via current 1429 /// binding. Different bindings, including their conditions, are examined
1454 * binding. Different bindings, including their conditions, are examined 1430 /// independently.
1455 * independently. 1431 /// This field is GOOGLE_INTERNAL.
1456 * This field is GOOGLE_INTERNAL.
1457 */
1458 Expr condition; 1432 Expr condition;
1459 /** 1433
1460 * Specifies the identities requesting access for a Cloud Platform resource. 1434 /// Specifies the identities requesting access for a Cloud Platform resource.
1461 * `members` can have the following values: 1435 /// `members` can have the following values:
1462 * 1436 ///
1463 * * `allUsers`: A special identifier that represents anyone who is 1437 /// * `allUsers`: A special identifier that represents anyone who is
1464 * on the internet; with or without a Google account. 1438 /// on the internet; with or without a Google account.
1465 * 1439 ///
1466 * * `allAuthenticatedUsers`: A special identifier that represents anyone 1440 /// * `allAuthenticatedUsers`: A special identifier that represents anyone
1467 * who is authenticated with a Google account or a service account. 1441 /// who is authenticated with a Google account or a service account.
1468 * 1442 ///
1469 * * `user:{emailid}`: An email address that represents a specific Google 1443 /// * `user:{emailid}`: An email address that represents a specific Google
1470 * account. For example, `alice@gmail.com` or `joe@example.com`. 1444 /// account. For example, `alice@gmail.com` or `joe@example.com`.
1471 * 1445 ///
1472 * 1446 ///
1473 * * `serviceAccount:{emailid}`: An email address that represents a service 1447 /// * `serviceAccount:{emailid}`: An email address that represents a service
1474 * account. For example, `my-other-app@appspot.gserviceaccount.com`. 1448 /// account. For example, `my-other-app@appspot.gserviceaccount.com`.
1475 * 1449 ///
1476 * * `group:{emailid}`: An email address that represents a Google group. 1450 /// * `group:{emailid}`: An email address that represents a Google group.
1477 * For example, `admins@example.com`. 1451 /// For example, `admins@example.com`.
1478 * 1452 ///
1479 * 1453 ///
1480 * * `domain:{domain}`: A Google Apps domain name that represents all the 1454 /// * `domain:{domain}`: A Google Apps domain name that represents all the
1481 * users of that domain. For example, `google.com` or `example.com`. 1455 /// users of that domain. For example, `google.com` or `example.com`.
1482 */
1483 core.List<core.String> members; 1456 core.List<core.String> members;
1484 /** 1457
1485 * Role that is assigned to `members`. 1458 /// Role that is assigned to `members`.
1486 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1459 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
1487 * Required 1460 /// Required
1488 */
1489 core.String role; 1461 core.String role;
1490 1462
1491 Binding(); 1463 Binding();
1492 1464
1493 Binding.fromJson(core.Map _json) { 1465 Binding.fromJson(core.Map _json) {
1494 if (_json.containsKey("condition")) { 1466 if (_json.containsKey("condition")) {
1495 condition = new Expr.fromJson(_json["condition"]); 1467 condition = new Expr.fromJson(_json["condition"]);
1496 } 1468 }
1497 if (_json.containsKey("members")) { 1469 if (_json.containsKey("members")) {
1498 members = _json["members"]; 1470 members = _json["members"];
1499 } 1471 }
1500 if (_json.containsKey("role")) { 1472 if (_json.containsKey("role")) {
1501 role = _json["role"]; 1473 role = _json["role"];
1502 } 1474 }
1503 } 1475 }
1504 1476
1505 core.Map<core.String, core.Object> toJson() { 1477 core.Map<core.String, core.Object> toJson() {
1506 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1478 final core.Map<core.String, core.Object> _json =
1479 new core.Map<core.String, core.Object>();
1507 if (condition != null) { 1480 if (condition != null) {
1508 _json["condition"] = (condition).toJson(); 1481 _json["condition"] = (condition).toJson();
1509 } 1482 }
1510 if (members != null) { 1483 if (members != null) {
1511 _json["members"] = members; 1484 _json["members"] = members;
1512 } 1485 }
1513 if (role != null) { 1486 if (role != null) {
1514 _json["role"] = role; 1487 _json["role"] = role;
1515 } 1488 }
1516 return _json; 1489 return _json;
1517 } 1490 }
1518 } 1491 }
1519 1492
1520 /** Write a Cloud Audit log */ 1493 /// A CryptoKey represents a logical key that can be used for cryptographic
1521 class CloudAuditOptions { 1494 /// operations.
1522 /** 1495 ///
1523 * The log_name to populate in the Cloud Audit Record. 1496 /// A CryptoKey is made up of one or more versions, which
1524 * Possible string values are: 1497 /// represent the actual key material used in cryptographic operations.
1525 * - "UNSPECIFIED_LOG_NAME" : Default. Should not be used. 1498 class CryptoKey {
1526 * - "ADMIN_ACTIVITY" : Corresponds to "cloudaudit.googleapis.com/activity" 1499 /// Output only. The time at which this CryptoKey was created.
1527 * - "DATA_ACCESS" : Corresponds to "cloudaudit.googleapis.com/data_access" 1500 core.String createTime;
1528 */
1529 core.String logName;
1530 1501
1531 CloudAuditOptions(); 1502 /// Labels with user defined metadata.
1503 core.Map<core.String, core.String> labels;
1532 1504
1533 CloudAuditOptions.fromJson(core.Map _json) { 1505 /// Output only. The resource name for this CryptoKey in the format
1534 if (_json.containsKey("logName")) { 1506 /// `projects / * /locations / * /keyRings / * /cryptoKeys / * `.
1535 logName = _json["logName"]; 1507 core.String name;
1536 }
1537 }
1538 1508
1539 core.Map<core.String, core.Object> toJson() { 1509 /// At next_rotation_time, the Key Management Service will automatically:
1540 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1510 ///
1541 if (logName != null) { 1511 /// 1. Create a new version of this CryptoKey.
1542 _json["logName"] = logName; 1512 /// 2. Mark the new version as primary.
1543 } 1513 ///
1544 return _json; 1514 /// Key rotations performed manually via
1545 } 1515 /// CreateCryptoKeyVersion and
1546 } 1516 /// UpdateCryptoKeyPrimaryVersion
1517 /// do not affect next_rotation_time.
1518 core.String nextRotationTime;
1547 1519
1548 /** A condition to be met. */ 1520 /// Output only. A copy of the "primary" CryptoKeyVersion that will be used
1549 class Condition { 1521 /// by Encrypt when this CryptoKey is given
1550 /** 1522 /// in EncryptRequest.name.
1551 * Trusted attributes supplied by the IAM system. 1523 ///
1552 * Possible string values are: 1524 /// The CryptoKey's primary version can be updated via
1553 * - "NO_ATTR" : Default non-attribute. 1525 /// UpdateCryptoKeyPrimaryVersion.
1554 * - "AUTHORITY" : Either principal or (if present) authority selector. 1526 CryptoKeyVersion primary;
1555 * - "ATTRIBUTION" : The principal (even if an authority selector is present),
1556 * which
1557 * must only be used for attribution, not authorization.
1558 * - "APPROVER" : An approver (distinct from the requester) that has
1559 * authorized this
1560 * request.
1561 * When used with IN, the condition indicates that one of the approvers
1562 * associated with the request matches the specified principal, or is a
1563 * member of the specified group. Approvers can only grant additional
1564 * access, and are thus only used in a strictly positive context
1565 * (e.g. ALLOW/IN or DENY/NOT_IN).
1566 * - "JUSTIFICATION_TYPE" : What types of justifications have been supplied
1567 * with this request.
1568 * String values should match enum names from tech.iam.JustificationType,
1569 * e.g. "MANUAL_STRING". It is not permitted to grant access based on
1570 * the *absence* of a justification, so justification conditions can only
1571 * be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN).
1572 *
1573 * Multiple justifications, e.g., a Buganizer ID and a manually-entered
1574 * reason, are normal and supported.
1575 */
1576 core.String iam;
1577 /**
1578 * An operator to apply the subject with.
1579 * Possible string values are:
1580 * - "NO_OP" : Default no-op.
1581 * - "EQUALS" : DEPRECATED. Use IN instead.
1582 * - "NOT_EQUALS" : DEPRECATED. Use NOT_IN instead.
1583 * - "IN" : The condition is true if the subject (or any element of it if it
1584 * is
1585 * a set) matches any of the supplied values.
1586 * - "NOT_IN" : The condition is true if the subject (or every element of it
1587 * if it is
1588 * a set) matches none of the supplied values.
1589 * - "DISCHARGED" : Subject is discharged
1590 */
1591 core.String op;
1592 /** Trusted attributes discharged by the service. */
1593 core.String svc;
1594 /**
1595 * Trusted attributes supplied by any service that owns resources and uses
1596 * the IAM system for access control.
1597 * Possible string values are:
1598 * - "NO_ATTR" : Default non-attribute type
1599 * - "REGION" : Region of the resource
1600 * - "SERVICE" : Service name
1601 * - "NAME" : Resource name
1602 * - "IP" : IP address of the caller
1603 */
1604 core.String sys;
1605 /** DEPRECATED. Use 'values' instead. */
1606 core.String value;
1607 /** The objects of the condition. This is mutually exclusive with 'value'. */
1608 core.List<core.String> values;
1609 1527
1610 Condition(); 1528 /// The immutable purpose of this CryptoKey. Currently, the only acceptable
1529 /// purpose is ENCRYPT_DECRYPT.
1530 /// Possible string values are:
1531 /// - "CRYPTO_KEY_PURPOSE_UNSPECIFIED" : Not specified.
1532 /// - "ENCRYPT_DECRYPT" : CryptoKeys with this purpose may be used with
1533 /// Encrypt and
1534 /// Decrypt.
1535 core.String purpose;
1611 1536
1612 Condition.fromJson(core.Map _json) { 1537 /// next_rotation_time will be advanced by this period when the service
1613 if (_json.containsKey("iam")) { 1538 /// automatically rotates a key. Must be at least one day.
1614 iam = _json["iam"]; 1539 ///
1615 } 1540 /// If rotation_period is set, next_rotation_time must also be set.
1616 if (_json.containsKey("op")) {
1617 op = _json["op"];
1618 }
1619 if (_json.containsKey("svc")) {
1620 svc = _json["svc"];
1621 }
1622 if (_json.containsKey("sys")) {
1623 sys = _json["sys"];
1624 }
1625 if (_json.containsKey("value")) {
1626 value = _json["value"];
1627 }
1628 if (_json.containsKey("values")) {
1629 values = _json["values"];
1630 }
1631 }
1632
1633 core.Map<core.String, core.Object> toJson() {
1634 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1635 if (iam != null) {
1636 _json["iam"] = iam;
1637 }
1638 if (op != null) {
1639 _json["op"] = op;
1640 }
1641 if (svc != null) {
1642 _json["svc"] = svc;
1643 }
1644 if (sys != null) {
1645 _json["sys"] = sys;
1646 }
1647 if (value != null) {
1648 _json["value"] = value;
1649 }
1650 if (values != null) {
1651 _json["values"] = values;
1652 }
1653 return _json;
1654 }
1655 }
1656
1657 /**
1658 * Increment a streamz counter with the specified metric and field names.
1659 *
1660 * Metric names should start with a '/', generally be lowercase-only,
1661 * and end in "_count". Field names should not contain an initial slash.
1662 * The actual exported metric names will have "/iam/policy" prepended.
1663 *
1664 * Field names correspond to IAM request parameters and field values are
1665 * their respective values.
1666 *
1667 * At present the only supported field names are
1668 * - "iam_principal", corresponding to IAMContext.principal;
1669 * - "" (empty string), resulting in one aggretated counter with no field.
1670 *
1671 * Examples:
1672 * counter { metric: "/debug_access_count" field: "iam_principal" }
1673 * ==> increment counter /iam/policy/backend_debug_access_count
1674 * {iam_principal=[value of IAMContext.principal]}
1675 *
1676 * At this time we do not support:
1677 * * multiple field names (though this may be supported in the future)
1678 * * decrementing the counter
1679 * * incrementing it by anything other than 1
1680 */
1681 class CounterOptions {
1682 /** The field value to attribute. */
1683 core.String field;
1684 /** The metric to update. */
1685 core.String metric;
1686
1687 CounterOptions();
1688
1689 CounterOptions.fromJson(core.Map _json) {
1690 if (_json.containsKey("field")) {
1691 field = _json["field"];
1692 }
1693 if (_json.containsKey("metric")) {
1694 metric = _json["metric"];
1695 }
1696 }
1697
1698 core.Map<core.String, core.Object> toJson() {
1699 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1700 if (field != null) {
1701 _json["field"] = field;
1702 }
1703 if (metric != null) {
1704 _json["metric"] = metric;
1705 }
1706 return _json;
1707 }
1708 }
1709
1710 /**
1711 * A CryptoKey represents a logical key that can be used for cryptographic
1712 * operations.
1713 *
1714 * A CryptoKey is made up of one or more versions, which
1715 * represent the actual key material used in cryptographic operations.
1716 */
1717 class CryptoKey {
1718 /** Output only. The time at which this CryptoKey was created. */
1719 core.String createTime;
1720 /**
1721 * Output only. The resource name for this CryptoKey in the format
1722 * `projects / * /locations / * /keyRings / * /cryptoKeys / * `.
1723 */
1724 core.String name;
1725 /**
1726 * At next_rotation_time, the Key Management Service will automatically:
1727 *
1728 * 1. Create a new version of this CryptoKey.
1729 * 2. Mark the new version as primary.
1730 *
1731 * Key rotations performed manually via
1732 * CreateCryptoKeyVersion and
1733 * UpdateCryptoKeyPrimaryVersion
1734 * do not affect next_rotation_time.
1735 */
1736 core.String nextRotationTime;
1737 /**
1738 * Output only. A copy of the "primary" CryptoKeyVersion that will be used
1739 * by Encrypt when this CryptoKey is given
1740 * in EncryptRequest.name.
1741 *
1742 * The CryptoKey's primary version can be updated via
1743 * UpdateCryptoKeyPrimaryVersion.
1744 */
1745 CryptoKeyVersion primary;
1746 /**
1747 * The immutable purpose of this CryptoKey. Currently, the only acceptable
1748 * purpose is ENCRYPT_DECRYPT.
1749 * Possible string values are:
1750 * - "CRYPTO_KEY_PURPOSE_UNSPECIFIED" : Not specified.
1751 * - "ENCRYPT_DECRYPT" : CryptoKeys with this purpose may be used with
1752 * Encrypt and
1753 * Decrypt.
1754 */
1755 core.String purpose;
1756 /**
1757 * next_rotation_time will be advanced by this period when the service
1758 * automatically rotates a key. Must be at least one day.
1759 *
1760 * If rotation_period is set, next_rotation_time must also be set.
1761 */
1762 core.String rotationPeriod; 1541 core.String rotationPeriod;
1763 1542
1764 CryptoKey(); 1543 CryptoKey();
1765 1544
1766 CryptoKey.fromJson(core.Map _json) { 1545 CryptoKey.fromJson(core.Map _json) {
1767 if (_json.containsKey("createTime")) { 1546 if (_json.containsKey("createTime")) {
1768 createTime = _json["createTime"]; 1547 createTime = _json["createTime"];
1769 } 1548 }
1549 if (_json.containsKey("labels")) {
1550 labels = _json["labels"];
1551 }
1770 if (_json.containsKey("name")) { 1552 if (_json.containsKey("name")) {
1771 name = _json["name"]; 1553 name = _json["name"];
1772 } 1554 }
1773 if (_json.containsKey("nextRotationTime")) { 1555 if (_json.containsKey("nextRotationTime")) {
1774 nextRotationTime = _json["nextRotationTime"]; 1556 nextRotationTime = _json["nextRotationTime"];
1775 } 1557 }
1776 if (_json.containsKey("primary")) { 1558 if (_json.containsKey("primary")) {
1777 primary = new CryptoKeyVersion.fromJson(_json["primary"]); 1559 primary = new CryptoKeyVersion.fromJson(_json["primary"]);
1778 } 1560 }
1779 if (_json.containsKey("purpose")) { 1561 if (_json.containsKey("purpose")) {
1780 purpose = _json["purpose"]; 1562 purpose = _json["purpose"];
1781 } 1563 }
1782 if (_json.containsKey("rotationPeriod")) { 1564 if (_json.containsKey("rotationPeriod")) {
1783 rotationPeriod = _json["rotationPeriod"]; 1565 rotationPeriod = _json["rotationPeriod"];
1784 } 1566 }
1785 } 1567 }
1786 1568
1787 core.Map<core.String, core.Object> toJson() { 1569 core.Map<core.String, core.Object> toJson() {
1788 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1570 final core.Map<core.String, core.Object> _json =
1571 new core.Map<core.String, core.Object>();
1789 if (createTime != null) { 1572 if (createTime != null) {
1790 _json["createTime"] = createTime; 1573 _json["createTime"] = createTime;
1791 } 1574 }
1575 if (labels != null) {
1576 _json["labels"] = labels;
1577 }
1792 if (name != null) { 1578 if (name != null) {
1793 _json["name"] = name; 1579 _json["name"] = name;
1794 } 1580 }
1795 if (nextRotationTime != null) { 1581 if (nextRotationTime != null) {
1796 _json["nextRotationTime"] = nextRotationTime; 1582 _json["nextRotationTime"] = nextRotationTime;
1797 } 1583 }
1798 if (primary != null) { 1584 if (primary != null) {
1799 _json["primary"] = (primary).toJson(); 1585 _json["primary"] = (primary).toJson();
1800 } 1586 }
1801 if (purpose != null) { 1587 if (purpose != null) {
1802 _json["purpose"] = purpose; 1588 _json["purpose"] = purpose;
1803 } 1589 }
1804 if (rotationPeriod != null) { 1590 if (rotationPeriod != null) {
1805 _json["rotationPeriod"] = rotationPeriod; 1591 _json["rotationPeriod"] = rotationPeriod;
1806 } 1592 }
1807 return _json; 1593 return _json;
1808 } 1594 }
1809 } 1595 }
1810 1596
1811 /** 1597 /// A CryptoKeyVersion represents an individual cryptographic key, and the
1812 * A CryptoKeyVersion represents an individual cryptographic key, and the 1598 /// associated key material.
1813 * associated key material. 1599 ///
1814 * 1600 /// It can be used for cryptographic operations either directly, or via its
1815 * It can be used for cryptographic operations either directly, or via its 1601 /// parent CryptoKey, in which case the server will choose the appropriate
1816 * parent CryptoKey, in which case the server will choose the appropriate 1602 /// version for the operation.
1817 * version for the operation. 1603 ///
1818 */ 1604 /// For security reasons, the raw cryptographic key material represented by a
1605 /// CryptoKeyVersion can never be viewed or exported. It can only be used to
1606 /// encrypt or decrypt data when an authorized user or application invokes
1607 /// Cloud
1608 /// KMS.
1819 class CryptoKeyVersion { 1609 class CryptoKeyVersion {
1820 /** Output only. The time at which this CryptoKeyVersion was created. */ 1610 /// Output only. The time at which this CryptoKeyVersion was created.
1821 core.String createTime; 1611 core.String createTime;
1822 /** 1612
1823 * Output only. The time this CryptoKeyVersion's key material was 1613 /// Output only. The time this CryptoKeyVersion's key material was
1824 * destroyed. Only present if state is 1614 /// destroyed. Only present if state is
1825 * DESTROYED. 1615 /// DESTROYED.
1826 */
1827 core.String destroyEventTime; 1616 core.String destroyEventTime;
1828 /** 1617
1829 * Output only. The time this CryptoKeyVersion's key material is scheduled 1618 /// Output only. The time this CryptoKeyVersion's key material is scheduled
1830 * for destruction. Only present if state is 1619 /// for destruction. Only present if state is
1831 * DESTROY_SCHEDULED. 1620 /// DESTROY_SCHEDULED.
1832 */
1833 core.String destroyTime; 1621 core.String destroyTime;
1834 /** 1622
1835 * Output only. The resource name for this CryptoKeyVersion in the format 1623 /// Output only. The resource name for this CryptoKeyVersion in the format
1836 * `projects / * /locations / * /keyRings / * /cryptoKeys / * 1624 /// `projects / * /locations / * /keyRings / * /cryptoKeys / *
1837 * /cryptoKeyVersions / * `. 1625 /// /cryptoKeyVersions / * `.
1838 */
1839 core.String name; 1626 core.String name;
1840 /** 1627
1841 * The current state of the CryptoKeyVersion. 1628 /// The current state of the CryptoKeyVersion.
1842 * Possible string values are: 1629 /// Possible string values are:
1843 * - "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED" : Not specified. 1630 /// - "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED" : Not specified.
1844 * - "ENABLED" : This version may be used in Encrypt and 1631 /// - "ENABLED" : This version may be used in Encrypt and
1845 * Decrypt requests. 1632 /// Decrypt requests.
1846 * - "DISABLED" : This version may not be used, but the key material is still 1633 /// - "DISABLED" : This version may not be used, but the key material is
1847 * available, 1634 /// still available,
1848 * and the version can be placed back into the ENABLED state. 1635 /// and the version can be placed back into the ENABLED state.
1849 * - "DESTROYED" : This version is destroyed, and the key material is no 1636 /// - "DESTROYED" : This version is destroyed, and the key material is no
1850 * longer stored. 1637 /// longer stored.
1851 * A version may not leave this state once entered. 1638 /// A version may not leave this state once entered.
1852 * - "DESTROY_SCHEDULED" : This version is scheduled for destruction, and will 1639 /// - "DESTROY_SCHEDULED" : This version is scheduled for destruction, and
1853 * be destroyed soon. 1640 /// will be destroyed soon.
1854 * Call 1641 /// Call
1855 * RestoreCryptoKeyVersion 1642 /// RestoreCryptoKeyVersion
1856 * to put it back into the DISABLED state. 1643 /// to put it back into the DISABLED state.
1857 */
1858 core.String state; 1644 core.String state;
1859 1645
1860 CryptoKeyVersion(); 1646 CryptoKeyVersion();
1861 1647
1862 CryptoKeyVersion.fromJson(core.Map _json) { 1648 CryptoKeyVersion.fromJson(core.Map _json) {
1863 if (_json.containsKey("createTime")) { 1649 if (_json.containsKey("createTime")) {
1864 createTime = _json["createTime"]; 1650 createTime = _json["createTime"];
1865 } 1651 }
1866 if (_json.containsKey("destroyEventTime")) { 1652 if (_json.containsKey("destroyEventTime")) {
1867 destroyEventTime = _json["destroyEventTime"]; 1653 destroyEventTime = _json["destroyEventTime"];
1868 } 1654 }
1869 if (_json.containsKey("destroyTime")) { 1655 if (_json.containsKey("destroyTime")) {
1870 destroyTime = _json["destroyTime"]; 1656 destroyTime = _json["destroyTime"];
1871 } 1657 }
1872 if (_json.containsKey("name")) { 1658 if (_json.containsKey("name")) {
1873 name = _json["name"]; 1659 name = _json["name"];
1874 } 1660 }
1875 if (_json.containsKey("state")) { 1661 if (_json.containsKey("state")) {
1876 state = _json["state"]; 1662 state = _json["state"];
1877 } 1663 }
1878 } 1664 }
1879 1665
1880 core.Map<core.String, core.Object> toJson() { 1666 core.Map<core.String, core.Object> toJson() {
1881 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1667 final core.Map<core.String, core.Object> _json =
1668 new core.Map<core.String, core.Object>();
1882 if (createTime != null) { 1669 if (createTime != null) {
1883 _json["createTime"] = createTime; 1670 _json["createTime"] = createTime;
1884 } 1671 }
1885 if (destroyEventTime != null) { 1672 if (destroyEventTime != null) {
1886 _json["destroyEventTime"] = destroyEventTime; 1673 _json["destroyEventTime"] = destroyEventTime;
1887 } 1674 }
1888 if (destroyTime != null) { 1675 if (destroyTime != null) {
1889 _json["destroyTime"] = destroyTime; 1676 _json["destroyTime"] = destroyTime;
1890 } 1677 }
1891 if (name != null) { 1678 if (name != null) {
1892 _json["name"] = name; 1679 _json["name"] = name;
1893 } 1680 }
1894 if (state != null) { 1681 if (state != null) {
1895 _json["state"] = state; 1682 _json["state"] = state;
1896 } 1683 }
1897 return _json; 1684 return _json;
1898 } 1685 }
1899 } 1686 }
1900 1687
1901 /** Write a Data Access (Gin) log */ 1688 /// Request message for KeyManagementService.Decrypt.
1902 class DataAccessOptions {
1903 /**
1904 * Whether Gin logging should happen in a fail-closed manner at the caller.
1905 * This is relevant only in the LocalIAM implementation, for now.
1906 * Possible string values are:
1907 * - "LOG_MODE_UNSPECIFIED" : Client is not required to write a partial Gin
1908 * log immediately after
1909 * the authorization check. If client chooses to write one and it fails,
1910 * client may either fail open (allow the operation to continue) or
1911 * fail closed (handle as a DENY outcome).
1912 * - "LOG_FAIL_CLOSED" : The application's operation in the context of which
1913 * this authorization
1914 * check is being made may only be performed if it is successfully logged
1915 * to Gin. For instance, the authorization library may satisfy this
1916 * obligation by emitting a partial log entry at authorization check time
1917 * and only returning ALLOW to the application if it succeeds.
1918 *
1919 * If a matching Rule has this directive, but the client has not indicated
1920 * that it will honor such requirements, then the IAM check will result in
1921 * authorization failure by setting CheckPolicyResponse.success=false.
1922 */
1923 core.String logMode;
1924
1925 DataAccessOptions();
1926
1927 DataAccessOptions.fromJson(core.Map _json) {
1928 if (_json.containsKey("logMode")) {
1929 logMode = _json["logMode"];
1930 }
1931 }
1932
1933 core.Map<core.String, core.Object> toJson() {
1934 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1935 if (logMode != null) {
1936 _json["logMode"] = logMode;
1937 }
1938 return _json;
1939 }
1940 }
1941
1942 /** Request message for KeyManagementService.Decrypt. */
1943 class DecryptRequest { 1689 class DecryptRequest {
1944 /** 1690 /// Optional data that must match the data originally supplied in
1945 * Optional data that must match the data originally supplied in 1691 /// EncryptRequest.additional_authenticated_data.
1946 * EncryptRequest.additional_authenticated_data.
1947 */
1948 core.String additionalAuthenticatedData; 1692 core.String additionalAuthenticatedData;
1949 core.List<core.int> get additionalAuthenticatedDataAsBytes { 1693 core.List<core.int> get additionalAuthenticatedDataAsBytes {
1950 return convert.BASE64.decode(additionalAuthenticatedData); 1694 return convert.BASE64.decode(additionalAuthenticatedData);
1951 } 1695 }
1952 1696
1953 void set additionalAuthenticatedDataAsBytes(core.List<core.int> _bytes) { 1697 void set additionalAuthenticatedDataAsBytes(core.List<core.int> _bytes) {
1954 additionalAuthenticatedData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); 1698 additionalAuthenticatedData =
1699 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
1955 } 1700 }
1956 /** 1701
1957 * Required. The encrypted data originally returned in 1702 /// Required. The encrypted data originally returned in
1958 * EncryptResponse.ciphertext. 1703 /// EncryptResponse.ciphertext.
1959 */
1960 core.String ciphertext; 1704 core.String ciphertext;
1961 core.List<core.int> get ciphertextAsBytes { 1705 core.List<core.int> get ciphertextAsBytes {
1962 return convert.BASE64.decode(ciphertext); 1706 return convert.BASE64.decode(ciphertext);
1963 } 1707 }
1964 1708
1965 void set ciphertextAsBytes(core.List<core.int> _bytes) { 1709 void set ciphertextAsBytes(core.List<core.int> _bytes) {
1966 ciphertext = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(" +", "-"); 1710 ciphertext =
1711 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
1967 } 1712 }
1968 1713
1969 DecryptRequest(); 1714 DecryptRequest();
1970 1715
1971 DecryptRequest.fromJson(core.Map _json) { 1716 DecryptRequest.fromJson(core.Map _json) {
1972 if (_json.containsKey("additionalAuthenticatedData")) { 1717 if (_json.containsKey("additionalAuthenticatedData")) {
1973 additionalAuthenticatedData = _json["additionalAuthenticatedData"]; 1718 additionalAuthenticatedData = _json["additionalAuthenticatedData"];
1974 } 1719 }
1975 if (_json.containsKey("ciphertext")) { 1720 if (_json.containsKey("ciphertext")) {
1976 ciphertext = _json["ciphertext"]; 1721 ciphertext = _json["ciphertext"];
1977 } 1722 }
1978 } 1723 }
1979 1724
1980 core.Map<core.String, core.Object> toJson() { 1725 core.Map<core.String, core.Object> toJson() {
1981 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1726 final core.Map<core.String, core.Object> _json =
1727 new core.Map<core.String, core.Object>();
1982 if (additionalAuthenticatedData != null) { 1728 if (additionalAuthenticatedData != null) {
1983 _json["additionalAuthenticatedData"] = additionalAuthenticatedData; 1729 _json["additionalAuthenticatedData"] = additionalAuthenticatedData;
1984 } 1730 }
1985 if (ciphertext != null) { 1731 if (ciphertext != null) {
1986 _json["ciphertext"] = ciphertext; 1732 _json["ciphertext"] = ciphertext;
1987 } 1733 }
1988 return _json; 1734 return _json;
1989 } 1735 }
1990 } 1736 }
1991 1737
1992 /** Response message for KeyManagementService.Decrypt. */ 1738 /// Response message for KeyManagementService.Decrypt.
1993 class DecryptResponse { 1739 class DecryptResponse {
1994 /** The decrypted data originally supplied in EncryptRequest.plaintext. */ 1740 /// The decrypted data originally supplied in EncryptRequest.plaintext.
1995 core.String plaintext; 1741 core.String plaintext;
1996 core.List<core.int> get plaintextAsBytes { 1742 core.List<core.int> get plaintextAsBytes {
1997 return convert.BASE64.decode(plaintext); 1743 return convert.BASE64.decode(plaintext);
1998 } 1744 }
1999 1745
2000 void set plaintextAsBytes(core.List<core.int> _bytes) { 1746 void set plaintextAsBytes(core.List<core.int> _bytes) {
2001 plaintext = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+ ", "-"); 1747 plaintext =
1748 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2002 } 1749 }
2003 1750
2004 DecryptResponse(); 1751 DecryptResponse();
2005 1752
2006 DecryptResponse.fromJson(core.Map _json) { 1753 DecryptResponse.fromJson(core.Map _json) {
2007 if (_json.containsKey("plaintext")) { 1754 if (_json.containsKey("plaintext")) {
2008 plaintext = _json["plaintext"]; 1755 plaintext = _json["plaintext"];
2009 } 1756 }
2010 } 1757 }
2011 1758
2012 core.Map<core.String, core.Object> toJson() { 1759 core.Map<core.String, core.Object> toJson() {
2013 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1760 final core.Map<core.String, core.Object> _json =
1761 new core.Map<core.String, core.Object>();
2014 if (plaintext != null) { 1762 if (plaintext != null) {
2015 _json["plaintext"] = plaintext; 1763 _json["plaintext"] = plaintext;
2016 } 1764 }
2017 return _json; 1765 return _json;
2018 } 1766 }
2019 } 1767 }
2020 1768
2021 /** Request message for KeyManagementService.DestroyCryptoKeyVersion. */ 1769 /// Request message for KeyManagementService.DestroyCryptoKeyVersion.
2022 class DestroyCryptoKeyVersionRequest { 1770 class DestroyCryptoKeyVersionRequest {
2023
2024 DestroyCryptoKeyVersionRequest(); 1771 DestroyCryptoKeyVersionRequest();
2025 1772
2026 DestroyCryptoKeyVersionRequest.fromJson(core.Map _json) { 1773 DestroyCryptoKeyVersionRequest.fromJson(core.Map _json) {}
2027 }
2028 1774
2029 core.Map<core.String, core.Object> toJson() { 1775 core.Map<core.String, core.Object> toJson() {
2030 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1776 final core.Map<core.String, core.Object> _json =
1777 new core.Map<core.String, core.Object>();
2031 return _json; 1778 return _json;
2032 } 1779 }
2033 } 1780 }
2034 1781
2035 /** Request message for KeyManagementService.Encrypt. */ 1782 /// Request message for KeyManagementService.Encrypt.
2036 class EncryptRequest { 1783 class EncryptRequest {
2037 /** 1784 /// Optional data that, if specified, must also be provided during decryption
2038 * Optional data that, if specified, must also be provided during decryption 1785 /// through DecryptRequest.additional_authenticated_data. Must be no
2039 * through DecryptRequest.additional_authenticated_data. Must be no 1786 /// larger than 64KiB.
2040 * larger than 64KiB.
2041 */
2042 core.String additionalAuthenticatedData; 1787 core.String additionalAuthenticatedData;
2043 core.List<core.int> get additionalAuthenticatedDataAsBytes { 1788 core.List<core.int> get additionalAuthenticatedDataAsBytes {
2044 return convert.BASE64.decode(additionalAuthenticatedData); 1789 return convert.BASE64.decode(additionalAuthenticatedData);
2045 } 1790 }
2046 1791
2047 void set additionalAuthenticatedDataAsBytes(core.List<core.int> _bytes) { 1792 void set additionalAuthenticatedDataAsBytes(core.List<core.int> _bytes) {
2048 additionalAuthenticatedData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); 1793 additionalAuthenticatedData =
1794 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2049 } 1795 }
2050 /** Required. The data to encrypt. Must be no larger than 64KiB. */ 1796
1797 /// Required. The data to encrypt. Must be no larger than 64KiB.
2051 core.String plaintext; 1798 core.String plaintext;
2052 core.List<core.int> get plaintextAsBytes { 1799 core.List<core.int> get plaintextAsBytes {
2053 return convert.BASE64.decode(plaintext); 1800 return convert.BASE64.decode(plaintext);
2054 } 1801 }
2055 1802
2056 void set plaintextAsBytes(core.List<core.int> _bytes) { 1803 void set plaintextAsBytes(core.List<core.int> _bytes) {
2057 plaintext = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+ ", "-"); 1804 plaintext =
1805 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2058 } 1806 }
2059 1807
2060 EncryptRequest(); 1808 EncryptRequest();
2061 1809
2062 EncryptRequest.fromJson(core.Map _json) { 1810 EncryptRequest.fromJson(core.Map _json) {
2063 if (_json.containsKey("additionalAuthenticatedData")) { 1811 if (_json.containsKey("additionalAuthenticatedData")) {
2064 additionalAuthenticatedData = _json["additionalAuthenticatedData"]; 1812 additionalAuthenticatedData = _json["additionalAuthenticatedData"];
2065 } 1813 }
2066 if (_json.containsKey("plaintext")) { 1814 if (_json.containsKey("plaintext")) {
2067 plaintext = _json["plaintext"]; 1815 plaintext = _json["plaintext"];
2068 } 1816 }
2069 } 1817 }
2070 1818
2071 core.Map<core.String, core.Object> toJson() { 1819 core.Map<core.String, core.Object> toJson() {
2072 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1820 final core.Map<core.String, core.Object> _json =
1821 new core.Map<core.String, core.Object>();
2073 if (additionalAuthenticatedData != null) { 1822 if (additionalAuthenticatedData != null) {
2074 _json["additionalAuthenticatedData"] = additionalAuthenticatedData; 1823 _json["additionalAuthenticatedData"] = additionalAuthenticatedData;
2075 } 1824 }
2076 if (plaintext != null) { 1825 if (plaintext != null) {
2077 _json["plaintext"] = plaintext; 1826 _json["plaintext"] = plaintext;
2078 } 1827 }
2079 return _json; 1828 return _json;
2080 } 1829 }
2081 } 1830 }
2082 1831
2083 /** Response message for KeyManagementService.Encrypt. */ 1832 /// Response message for KeyManagementService.Encrypt.
2084 class EncryptResponse { 1833 class EncryptResponse {
2085 /** The encrypted data. */ 1834 /// The encrypted data.
2086 core.String ciphertext; 1835 core.String ciphertext;
2087 core.List<core.int> get ciphertextAsBytes { 1836 core.List<core.int> get ciphertextAsBytes {
2088 return convert.BASE64.decode(ciphertext); 1837 return convert.BASE64.decode(ciphertext);
2089 } 1838 }
2090 1839
2091 void set ciphertextAsBytes(core.List<core.int> _bytes) { 1840 void set ciphertextAsBytes(core.List<core.int> _bytes) {
2092 ciphertext = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(" +", "-"); 1841 ciphertext =
1842 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2093 } 1843 }
2094 /** The resource name of the CryptoKeyVersion used in encryption. */ 1844
1845 /// The resource name of the CryptoKeyVersion used in encryption.
2095 core.String name; 1846 core.String name;
2096 1847
2097 EncryptResponse(); 1848 EncryptResponse();
2098 1849
2099 EncryptResponse.fromJson(core.Map _json) { 1850 EncryptResponse.fromJson(core.Map _json) {
2100 if (_json.containsKey("ciphertext")) { 1851 if (_json.containsKey("ciphertext")) {
2101 ciphertext = _json["ciphertext"]; 1852 ciphertext = _json["ciphertext"];
2102 } 1853 }
2103 if (_json.containsKey("name")) { 1854 if (_json.containsKey("name")) {
2104 name = _json["name"]; 1855 name = _json["name"];
2105 } 1856 }
2106 } 1857 }
2107 1858
2108 core.Map<core.String, core.Object> toJson() { 1859 core.Map<core.String, core.Object> toJson() {
2109 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1860 final core.Map<core.String, core.Object> _json =
1861 new core.Map<core.String, core.Object>();
2110 if (ciphertext != null) { 1862 if (ciphertext != null) {
2111 _json["ciphertext"] = ciphertext; 1863 _json["ciphertext"] = ciphertext;
2112 } 1864 }
2113 if (name != null) { 1865 if (name != null) {
2114 _json["name"] = name; 1866 _json["name"] = name;
2115 } 1867 }
2116 return _json; 1868 return _json;
2117 } 1869 }
2118 } 1870 }
2119 1871
2120 /** 1872 /// Represents an expression text. Example:
2121 * Represents an expression text. Example: 1873 ///
2122 * 1874 /// title: "User account presence"
2123 * title: "User account presence" 1875 /// description: "Determines whether the request has a user account"
2124 * description: "Determines whether the request has a user account" 1876 /// expression: "size(request.user) > 0"
2125 * expression: "size(request.user) > 0"
2126 */
2127 class Expr { 1877 class Expr {
2128 /** 1878 /// An optional description of the expression. This is a longer text which
2129 * An optional description of the expression. This is a longer text which 1879 /// describes the expression, e.g. when hovered over it in a UI.
2130 * describes the expression, e.g. when hovered over it in a UI.
2131 */
2132 core.String description; 1880 core.String description;
2133 /** 1881
2134 * Textual representation of an expression in 1882 /// Textual representation of an expression in
2135 * Common Expression Language syntax. 1883 /// Common Expression Language syntax.
2136 * 1884 ///
2137 * The application context of the containing message determines which 1885 /// The application context of the containing message determines which
2138 * well-known feature set of CEL is supported. 1886 /// well-known feature set of CEL is supported.
2139 */
2140 core.String expression; 1887 core.String expression;
2141 /** 1888
2142 * An optional string indicating the location of the expression for error 1889 /// An optional string indicating the location of the expression for error
2143 * reporting, e.g. a file name and a position in the file. 1890 /// reporting, e.g. a file name and a position in the file.
2144 */
2145 core.String location; 1891 core.String location;
2146 /** 1892
2147 * An optional title for the expression, i.e. a short string describing 1893 /// An optional title for the expression, i.e. a short string describing
2148 * its purpose. This can be used e.g. in UIs which allow to enter the 1894 /// its purpose. This can be used e.g. in UIs which allow to enter the
2149 * expression. 1895 /// expression.
2150 */
2151 core.String title; 1896 core.String title;
2152 1897
2153 Expr(); 1898 Expr();
2154 1899
2155 Expr.fromJson(core.Map _json) { 1900 Expr.fromJson(core.Map _json) {
2156 if (_json.containsKey("description")) { 1901 if (_json.containsKey("description")) {
2157 description = _json["description"]; 1902 description = _json["description"];
2158 } 1903 }
2159 if (_json.containsKey("expression")) { 1904 if (_json.containsKey("expression")) {
2160 expression = _json["expression"]; 1905 expression = _json["expression"];
2161 } 1906 }
2162 if (_json.containsKey("location")) { 1907 if (_json.containsKey("location")) {
2163 location = _json["location"]; 1908 location = _json["location"];
2164 } 1909 }
2165 if (_json.containsKey("title")) { 1910 if (_json.containsKey("title")) {
2166 title = _json["title"]; 1911 title = _json["title"];
2167 } 1912 }
2168 } 1913 }
2169 1914
2170 core.Map<core.String, core.Object> toJson() { 1915 core.Map<core.String, core.Object> toJson() {
2171 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1916 final core.Map<core.String, core.Object> _json =
1917 new core.Map<core.String, core.Object>();
2172 if (description != null) { 1918 if (description != null) {
2173 _json["description"] = description; 1919 _json["description"] = description;
2174 } 1920 }
2175 if (expression != null) { 1921 if (expression != null) {
2176 _json["expression"] = expression; 1922 _json["expression"] = expression;
2177 } 1923 }
2178 if (location != null) { 1924 if (location != null) {
2179 _json["location"] = location; 1925 _json["location"] = location;
2180 } 1926 }
2181 if (title != null) { 1927 if (title != null) {
2182 _json["title"] = title; 1928 _json["title"] = title;
2183 } 1929 }
2184 return _json; 1930 return _json;
2185 } 1931 }
2186 } 1932 }
2187 1933
2188 /** A KeyRing is a toplevel logical grouping of CryptoKeys. */ 1934 /// A KeyRing is a toplevel logical grouping of CryptoKeys.
2189 class KeyRing { 1935 class KeyRing {
2190 /** Output only. The time at which this KeyRing was created. */ 1936 /// Output only. The time at which this KeyRing was created.
2191 core.String createTime; 1937 core.String createTime;
2192 /** 1938
2193 * Output only. The resource name for the KeyRing in the format 1939 /// Output only. The resource name for the KeyRing in the format
2194 * `projects / * /locations / * /keyRings / * `. 1940 /// `projects / * /locations / * /keyRings / * `.
2195 */
2196 core.String name; 1941 core.String name;
2197 1942
2198 KeyRing(); 1943 KeyRing();
2199 1944
2200 KeyRing.fromJson(core.Map _json) { 1945 KeyRing.fromJson(core.Map _json) {
2201 if (_json.containsKey("createTime")) { 1946 if (_json.containsKey("createTime")) {
2202 createTime = _json["createTime"]; 1947 createTime = _json["createTime"];
2203 } 1948 }
2204 if (_json.containsKey("name")) { 1949 if (_json.containsKey("name")) {
2205 name = _json["name"]; 1950 name = _json["name"];
2206 } 1951 }
2207 } 1952 }
2208 1953
2209 core.Map<core.String, core.Object> toJson() { 1954 core.Map<core.String, core.Object> toJson() {
2210 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1955 final core.Map<core.String, core.Object> _json =
1956 new core.Map<core.String, core.Object>();
2211 if (createTime != null) { 1957 if (createTime != null) {
2212 _json["createTime"] = createTime; 1958 _json["createTime"] = createTime;
2213 } 1959 }
2214 if (name != null) { 1960 if (name != null) {
2215 _json["name"] = name; 1961 _json["name"] = name;
2216 } 1962 }
2217 return _json; 1963 return _json;
2218 } 1964 }
2219 } 1965 }
2220 1966
2221 /** Response message for KeyManagementService.ListCryptoKeyVersions. */ 1967 /// Response message for KeyManagementService.ListCryptoKeyVersions.
2222 class ListCryptoKeyVersionsResponse { 1968 class ListCryptoKeyVersionsResponse {
2223 /** The list of CryptoKeyVersions. */ 1969 /// The list of CryptoKeyVersions.
2224 core.List<CryptoKeyVersion> cryptoKeyVersions; 1970 core.List<CryptoKeyVersion> cryptoKeyVersions;
2225 /** 1971
2226 * A token to retrieve next page of results. Pass this value in 1972 /// A token to retrieve next page of results. Pass this value in
2227 * ListCryptoKeyVersionsRequest.page_token to retrieve the next page of 1973 /// ListCryptoKeyVersionsRequest.page_token to retrieve the next page of
2228 * results. 1974 /// results.
2229 */
2230 core.String nextPageToken; 1975 core.String nextPageToken;
2231 /** 1976
2232 * The total number of CryptoKeyVersions that matched the 1977 /// The total number of CryptoKeyVersions that matched the
2233 * query. 1978 /// query.
2234 */
2235 core.int totalSize; 1979 core.int totalSize;
2236 1980
2237 ListCryptoKeyVersionsResponse(); 1981 ListCryptoKeyVersionsResponse();
2238 1982
2239 ListCryptoKeyVersionsResponse.fromJson(core.Map _json) { 1983 ListCryptoKeyVersionsResponse.fromJson(core.Map _json) {
2240 if (_json.containsKey("cryptoKeyVersions")) { 1984 if (_json.containsKey("cryptoKeyVersions")) {
2241 cryptoKeyVersions = _json["cryptoKeyVersions"].map((value) => new CryptoKe yVersion.fromJson(value)).toList(); 1985 cryptoKeyVersions = _json["cryptoKeyVersions"]
1986 .map((value) => new CryptoKeyVersion.fromJson(value))
1987 .toList();
2242 } 1988 }
2243 if (_json.containsKey("nextPageToken")) { 1989 if (_json.containsKey("nextPageToken")) {
2244 nextPageToken = _json["nextPageToken"]; 1990 nextPageToken = _json["nextPageToken"];
2245 } 1991 }
2246 if (_json.containsKey("totalSize")) { 1992 if (_json.containsKey("totalSize")) {
2247 totalSize = _json["totalSize"]; 1993 totalSize = _json["totalSize"];
2248 } 1994 }
2249 } 1995 }
2250 1996
2251 core.Map<core.String, core.Object> toJson() { 1997 core.Map<core.String, core.Object> toJson() {
2252 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1998 final core.Map<core.String, core.Object> _json =
1999 new core.Map<core.String, core.Object>();
2253 if (cryptoKeyVersions != null) { 2000 if (cryptoKeyVersions != null) {
2254 _json["cryptoKeyVersions"] = cryptoKeyVersions.map((value) => (value).toJs on()).toList(); 2001 _json["cryptoKeyVersions"] =
2002 cryptoKeyVersions.map((value) => (value).toJson()).toList();
2255 } 2003 }
2256 if (nextPageToken != null) { 2004 if (nextPageToken != null) {
2257 _json["nextPageToken"] = nextPageToken; 2005 _json["nextPageToken"] = nextPageToken;
2258 } 2006 }
2259 if (totalSize != null) { 2007 if (totalSize != null) {
2260 _json["totalSize"] = totalSize; 2008 _json["totalSize"] = totalSize;
2261 } 2009 }
2262 return _json; 2010 return _json;
2263 } 2011 }
2264 } 2012 }
2265 2013
2266 /** Response message for KeyManagementService.ListCryptoKeys. */ 2014 /// Response message for KeyManagementService.ListCryptoKeys.
2267 class ListCryptoKeysResponse { 2015 class ListCryptoKeysResponse {
2268 /** The list of CryptoKeys. */ 2016 /// The list of CryptoKeys.
2269 core.List<CryptoKey> cryptoKeys; 2017 core.List<CryptoKey> cryptoKeys;
2270 /** 2018
2271 * A token to retrieve next page of results. Pass this value in 2019 /// A token to retrieve next page of results. Pass this value in
2272 * ListCryptoKeysRequest.page_token to retrieve the next page of results. 2020 /// ListCryptoKeysRequest.page_token to retrieve the next page of results.
2273 */
2274 core.String nextPageToken; 2021 core.String nextPageToken;
2275 /** The total number of CryptoKeys that matched the query. */ 2022
2023 /// The total number of CryptoKeys that matched the query.
2276 core.int totalSize; 2024 core.int totalSize;
2277 2025
2278 ListCryptoKeysResponse(); 2026 ListCryptoKeysResponse();
2279 2027
2280 ListCryptoKeysResponse.fromJson(core.Map _json) { 2028 ListCryptoKeysResponse.fromJson(core.Map _json) {
2281 if (_json.containsKey("cryptoKeys")) { 2029 if (_json.containsKey("cryptoKeys")) {
2282 cryptoKeys = _json["cryptoKeys"].map((value) => new CryptoKey.fromJson(val ue)).toList(); 2030 cryptoKeys = _json["cryptoKeys"]
2031 .map((value) => new CryptoKey.fromJson(value))
2032 .toList();
2283 } 2033 }
2284 if (_json.containsKey("nextPageToken")) { 2034 if (_json.containsKey("nextPageToken")) {
2285 nextPageToken = _json["nextPageToken"]; 2035 nextPageToken = _json["nextPageToken"];
2286 } 2036 }
2287 if (_json.containsKey("totalSize")) { 2037 if (_json.containsKey("totalSize")) {
2288 totalSize = _json["totalSize"]; 2038 totalSize = _json["totalSize"];
2289 } 2039 }
2290 } 2040 }
2291 2041
2292 core.Map<core.String, core.Object> toJson() { 2042 core.Map<core.String, core.Object> toJson() {
2293 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2043 final core.Map<core.String, core.Object> _json =
2044 new core.Map<core.String, core.Object>();
2294 if (cryptoKeys != null) { 2045 if (cryptoKeys != null) {
2295 _json["cryptoKeys"] = cryptoKeys.map((value) => (value).toJson()).toList() ; 2046 _json["cryptoKeys"] =
2047 cryptoKeys.map((value) => (value).toJson()).toList();
2296 } 2048 }
2297 if (nextPageToken != null) { 2049 if (nextPageToken != null) {
2298 _json["nextPageToken"] = nextPageToken; 2050 _json["nextPageToken"] = nextPageToken;
2299 } 2051 }
2300 if (totalSize != null) { 2052 if (totalSize != null) {
2301 _json["totalSize"] = totalSize; 2053 _json["totalSize"] = totalSize;
2302 } 2054 }
2303 return _json; 2055 return _json;
2304 } 2056 }
2305 } 2057 }
2306 2058
2307 /** Response message for KeyManagementService.ListKeyRings. */ 2059 /// Response message for KeyManagementService.ListKeyRings.
2308 class ListKeyRingsResponse { 2060 class ListKeyRingsResponse {
2309 /** The list of KeyRings. */ 2061 /// The list of KeyRings.
2310 core.List<KeyRing> keyRings; 2062 core.List<KeyRing> keyRings;
2311 /** 2063
2312 * A token to retrieve next page of results. Pass this value in 2064 /// A token to retrieve next page of results. Pass this value in
2313 * ListKeyRingsRequest.page_token to retrieve the next page of results. 2065 /// ListKeyRingsRequest.page_token to retrieve the next page of results.
2314 */
2315 core.String nextPageToken; 2066 core.String nextPageToken;
2316 /** The total number of KeyRings that matched the query. */ 2067
2068 /// The total number of KeyRings that matched the query.
2317 core.int totalSize; 2069 core.int totalSize;
2318 2070
2319 ListKeyRingsResponse(); 2071 ListKeyRingsResponse();
2320 2072
2321 ListKeyRingsResponse.fromJson(core.Map _json) { 2073 ListKeyRingsResponse.fromJson(core.Map _json) {
2322 if (_json.containsKey("keyRings")) { 2074 if (_json.containsKey("keyRings")) {
2323 keyRings = _json["keyRings"].map((value) => new KeyRing.fromJson(value)).t oList(); 2075 keyRings = _json["keyRings"]
2076 .map((value) => new KeyRing.fromJson(value))
2077 .toList();
2324 } 2078 }
2325 if (_json.containsKey("nextPageToken")) { 2079 if (_json.containsKey("nextPageToken")) {
2326 nextPageToken = _json["nextPageToken"]; 2080 nextPageToken = _json["nextPageToken"];
2327 } 2081 }
2328 if (_json.containsKey("totalSize")) { 2082 if (_json.containsKey("totalSize")) {
2329 totalSize = _json["totalSize"]; 2083 totalSize = _json["totalSize"];
2330 } 2084 }
2331 } 2085 }
2332 2086
2333 core.Map<core.String, core.Object> toJson() { 2087 core.Map<core.String, core.Object> toJson() {
2334 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2088 final core.Map<core.String, core.Object> _json =
2089 new core.Map<core.String, core.Object>();
2335 if (keyRings != null) { 2090 if (keyRings != null) {
2336 _json["keyRings"] = keyRings.map((value) => (value).toJson()).toList(); 2091 _json["keyRings"] = keyRings.map((value) => (value).toJson()).toList();
2337 } 2092 }
2338 if (nextPageToken != null) { 2093 if (nextPageToken != null) {
2339 _json["nextPageToken"] = nextPageToken; 2094 _json["nextPageToken"] = nextPageToken;
2340 } 2095 }
2341 if (totalSize != null) { 2096 if (totalSize != null) {
2342 _json["totalSize"] = totalSize; 2097 _json["totalSize"] = totalSize;
2343 } 2098 }
2344 return _json; 2099 return _json;
2345 } 2100 }
2346 } 2101 }
2347 2102
2348 /** The response message for Locations.ListLocations. */ 2103 /// The response message for Locations.ListLocations.
2349 class ListLocationsResponse { 2104 class ListLocationsResponse {
2350 /** A list of locations that matches the specified filter in the request. */ 2105 /// A list of locations that matches the specified filter in the request.
2351 core.List<Location> locations; 2106 core.List<Location> locations;
2352 /** The standard List next-page token. */ 2107
2108 /// The standard List next-page token.
2353 core.String nextPageToken; 2109 core.String nextPageToken;
2354 2110
2355 ListLocationsResponse(); 2111 ListLocationsResponse();
2356 2112
2357 ListLocationsResponse.fromJson(core.Map _json) { 2113 ListLocationsResponse.fromJson(core.Map _json) {
2358 if (_json.containsKey("locations")) { 2114 if (_json.containsKey("locations")) {
2359 locations = _json["locations"].map((value) => new Location.fromJson(value) ).toList(); 2115 locations = _json["locations"]
2116 .map((value) => new Location.fromJson(value))
2117 .toList();
2360 } 2118 }
2361 if (_json.containsKey("nextPageToken")) { 2119 if (_json.containsKey("nextPageToken")) {
2362 nextPageToken = _json["nextPageToken"]; 2120 nextPageToken = _json["nextPageToken"];
2363 } 2121 }
2364 } 2122 }
2365 2123
2366 core.Map<core.String, core.Object> toJson() { 2124 core.Map<core.String, core.Object> toJson() {
2367 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2125 final core.Map<core.String, core.Object> _json =
2126 new core.Map<core.String, core.Object>();
2368 if (locations != null) { 2127 if (locations != null) {
2369 _json["locations"] = locations.map((value) => (value).toJson()).toList(); 2128 _json["locations"] = locations.map((value) => (value).toJson()).toList();
2370 } 2129 }
2371 if (nextPageToken != null) { 2130 if (nextPageToken != null) {
2372 _json["nextPageToken"] = nextPageToken; 2131 _json["nextPageToken"] = nextPageToken;
2373 } 2132 }
2374 return _json; 2133 return _json;
2375 } 2134 }
2376 } 2135 }
2377 2136
2378 /** A resource that represents Google Cloud Platform location. */ 2137 /// A resource that represents Google Cloud Platform location.
2379 class Location { 2138 class Location {
2380 /** 2139 /// Cross-service attributes for the location. For example
2381 * Cross-service attributes for the location. For example 2140 ///
2382 * 2141 /// {"cloud.googleapis.com/region": "us-east1"}
2383 * {"cloud.googleapis.com/region": "us-east1"}
2384 */
2385 core.Map<core.String, core.String> labels; 2142 core.Map<core.String, core.String> labels;
2386 /** The canonical id for this location. For example: `"us-east1"`. */ 2143
2144 /// The canonical id for this location. For example: `"us-east1"`.
2387 core.String locationId; 2145 core.String locationId;
2388 /** 2146
2389 * Service-specific metadata. For example the available capacity at the given 2147 /// Service-specific metadata. For example the available capacity at the
2390 * location. 2148 /// given
2391 * 2149 /// location.
2392 * The values for Object must be JSON objects. It can consist of `num`, 2150 ///
2393 * `String`, `bool` and `null` as well as `Map` and `List` values. 2151 /// The values for Object must be JSON objects. It can consist of `num`,
2394 */ 2152 /// `String`, `bool` and `null` as well as `Map` and `List` values.
2395 core.Map<core.String, core.Object> metadata; 2153 core.Map<core.String, core.Object> metadata;
2396 /** 2154
2397 * Resource name for the location, which may vary between implementations. 2155 /// Resource name for the location, which may vary between implementations.
2398 * For example: `"projects/example-project/locations/us-east1"` 2156 /// For example: `"projects/example-project/locations/us-east1"`
2399 */
2400 core.String name; 2157 core.String name;
2401 2158
2402 Location(); 2159 Location();
2403 2160
2404 Location.fromJson(core.Map _json) { 2161 Location.fromJson(core.Map _json) {
2405 if (_json.containsKey("labels")) { 2162 if (_json.containsKey("labels")) {
2406 labels = _json["labels"]; 2163 labels = _json["labels"];
2407 } 2164 }
2408 if (_json.containsKey("locationId")) { 2165 if (_json.containsKey("locationId")) {
2409 locationId = _json["locationId"]; 2166 locationId = _json["locationId"];
2410 } 2167 }
2411 if (_json.containsKey("metadata")) { 2168 if (_json.containsKey("metadata")) {
2412 metadata = _json["metadata"]; 2169 metadata = _json["metadata"];
2413 } 2170 }
2414 if (_json.containsKey("name")) { 2171 if (_json.containsKey("name")) {
2415 name = _json["name"]; 2172 name = _json["name"];
2416 } 2173 }
2417 } 2174 }
2418 2175
2419 core.Map<core.String, core.Object> toJson() { 2176 core.Map<core.String, core.Object> toJson() {
2420 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2177 final core.Map<core.String, core.Object> _json =
2178 new core.Map<core.String, core.Object>();
2421 if (labels != null) { 2179 if (labels != null) {
2422 _json["labels"] = labels; 2180 _json["labels"] = labels;
2423 } 2181 }
2424 if (locationId != null) { 2182 if (locationId != null) {
2425 _json["locationId"] = locationId; 2183 _json["locationId"] = locationId;
2426 } 2184 }
2427 if (metadata != null) { 2185 if (metadata != null) {
2428 _json["metadata"] = metadata; 2186 _json["metadata"] = metadata;
2429 } 2187 }
2430 if (name != null) { 2188 if (name != null) {
2431 _json["name"] = name; 2189 _json["name"] = name;
2432 } 2190 }
2433 return _json; 2191 return _json;
2434 } 2192 }
2435 } 2193 }
2436 2194
2437 /** Specifies what kind of log the caller must write */ 2195 /// Defines an Identity and Access Management (IAM) policy. It is used to
2438 class LogConfig { 2196 /// specify access control policies for Cloud Platform resources.
2439 /** Cloud audit options. */ 2197 ///
2440 CloudAuditOptions cloudAudit; 2198 ///
2441 /** Counter options. */ 2199 /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
2442 CounterOptions counter; 2200 /// `members` to a `role`, where the members can be user accounts, Google
2443 /** Data access options. */ 2201 /// groups,
2444 DataAccessOptions dataAccess; 2202 /// Google domains, and service accounts. A `role` is a named list of
2203 /// permissions
2204 /// defined by IAM.
2205 ///
2206 /// **Example**
2207 ///
2208 /// {
2209 /// "bindings": [
2210 /// {
2211 /// "role": "roles/owner",
2212 /// "members": [
2213 /// "user:mike@example.com",
2214 /// "group:admins@example.com",
2215 /// "domain:google.com",
2216 /// "serviceAccount:my-other-app@appspot.gserviceaccount.com",
2217 /// ]
2218 /// },
2219 /// {
2220 /// "role": "roles/viewer",
2221 /// "members": ["user:sean@example.com"]
2222 /// }
2223 /// ]
2224 /// }
2225 ///
2226 /// For a description of IAM and its features, see the
2227 /// [IAM developer's guide](https://cloud.google.com/iam).
2228 class Policy {
2229 /// Specifies cloud audit logging configuration for this policy.
2230 core.List<AuditConfig> auditConfigs;
2445 2231
2446 LogConfig(); 2232 /// Associates a list of `members` to a `role`.
2233 /// `bindings` with no members will result in an error.
2234 core.List<Binding> bindings;
2447 2235
2448 LogConfig.fromJson(core.Map _json) { 2236 /// `etag` is used for optimistic concurrency control as a way to help
2449 if (_json.containsKey("cloudAudit")) { 2237 /// prevent simultaneous updates of a policy from overwriting each other.
2450 cloudAudit = new CloudAuditOptions.fromJson(_json["cloudAudit"]); 2238 /// It is strongly suggested that systems make use of the `etag` in the
2451 } 2239 /// read-modify-write cycle to perform policy updates in order to avoid race
2452 if (_json.containsKey("counter")) { 2240 /// conditions: An `etag` is returned in the response to `getIamPolicy`, and
2453 counter = new CounterOptions.fromJson(_json["counter"]); 2241 /// systems are expected to put that etag in the request to `setIamPolicy` to
2454 } 2242 /// ensure that their change will be applied to the same version of the
2455 if (_json.containsKey("dataAccess")) { 2243 /// policy.
2456 dataAccess = new DataAccessOptions.fromJson(_json["dataAccess"]); 2244 ///
2457 } 2245 /// If no `etag` is provided in the call to `setIamPolicy`, then the existing
2458 } 2246 /// policy is overwritten blindly.
2459
2460 core.Map<core.String, core.Object> toJson() {
2461 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2462 if (cloudAudit != null) {
2463 _json["cloudAudit"] = (cloudAudit).toJson();
2464 }
2465 if (counter != null) {
2466 _json["counter"] = (counter).toJson();
2467 }
2468 if (dataAccess != null) {
2469 _json["dataAccess"] = (dataAccess).toJson();
2470 }
2471 return _json;
2472 }
2473 }
2474
2475 /**
2476 * Defines an Identity and Access Management (IAM) policy. It is used to
2477 * specify access control policies for Cloud Platform resources.
2478 *
2479 *
2480 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
2481 * `members` to a `role`, where the members can be user accounts, Google groups,
2482 * Google domains, and service accounts. A `role` is a named list of permissions
2483 * defined by IAM.
2484 *
2485 * **Example**
2486 *
2487 * {
2488 * "bindings": [
2489 * {
2490 * "role": "roles/owner",
2491 * "members": [
2492 * "user:mike@example.com",
2493 * "group:admins@example.com",
2494 * "domain:google.com",
2495 * "serviceAccount:my-other-app@appspot.gserviceaccount.com",
2496 * ]
2497 * },
2498 * {
2499 * "role": "roles/viewer",
2500 * "members": ["user:sean@example.com"]
2501 * }
2502 * ]
2503 * }
2504 *
2505 * For a description of IAM and its features, see the
2506 * [IAM developer's guide](https://cloud.google.com/iam).
2507 */
2508 class Policy {
2509 /** Specifies cloud audit logging configuration for this policy. */
2510 core.List<AuditConfig> auditConfigs;
2511 /**
2512 * Associates a list of `members` to a `role`.
2513 * `bindings` with no members will result in an error.
2514 */
2515 core.List<Binding> bindings;
2516 /**
2517 * `etag` is used for optimistic concurrency control as a way to help
2518 * prevent simultaneous updates of a policy from overwriting each other.
2519 * It is strongly suggested that systems make use of the `etag` in the
2520 * read-modify-write cycle to perform policy updates in order to avoid race
2521 * conditions: An `etag` is returned in the response to `getIamPolicy`, and
2522 * systems are expected to put that etag in the request to `setIamPolicy` to
2523 * ensure that their change will be applied to the same version of the policy.
2524 *
2525 * If no `etag` is provided in the call to `setIamPolicy`, then the existing
2526 * policy is overwritten blindly.
2527 */
2528 core.String etag; 2247 core.String etag;
2529 core.List<core.int> get etagAsBytes { 2248 core.List<core.int> get etagAsBytes {
2530 return convert.BASE64.decode(etag); 2249 return convert.BASE64.decode(etag);
2531 } 2250 }
2532 2251
2533 void set etagAsBytes(core.List<core.int> _bytes) { 2252 void set etagAsBytes(core.List<core.int> _bytes) {
2534 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2253 etag =
2254 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-");
2535 } 2255 }
2256
2536 core.bool iamOwned; 2257 core.bool iamOwned;
2537 /** 2258
2538 * If more than one rule is specified, the rules are applied in the following 2259 /// Version of the `Policy`. The default version is 0.
2539 * manner:
2540 * - All matching LOG rules are always applied.
2541 * - If any DENY/DENY_WITH_LOG rule matches, permission is denied.
2542 * Logging will be applied if one or more matching rule requires logging.
2543 * - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
2544 * granted.
2545 * Logging will be applied if one or more matching rule requires logging.
2546 * - Otherwise, if no rule applies, permission is denied.
2547 */
2548 core.List<Rule> rules;
2549 /** Version of the `Policy`. The default version is 0. */
2550 core.int version; 2260 core.int version;
2551 2261
2552 Policy(); 2262 Policy();
2553 2263
2554 Policy.fromJson(core.Map _json) { 2264 Policy.fromJson(core.Map _json) {
2555 if (_json.containsKey("auditConfigs")) { 2265 if (_json.containsKey("auditConfigs")) {
2556 auditConfigs = _json["auditConfigs"].map((value) => new AuditConfig.fromJs on(value)).toList(); 2266 auditConfigs = _json["auditConfigs"]
2267 .map((value) => new AuditConfig.fromJson(value))
2268 .toList();
2557 } 2269 }
2558 if (_json.containsKey("bindings")) { 2270 if (_json.containsKey("bindings")) {
2559 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList(); 2271 bindings = _json["bindings"]
2272 .map((value) => new Binding.fromJson(value))
2273 .toList();
2560 } 2274 }
2561 if (_json.containsKey("etag")) { 2275 if (_json.containsKey("etag")) {
2562 etag = _json["etag"]; 2276 etag = _json["etag"];
2563 } 2277 }
2564 if (_json.containsKey("iamOwned")) { 2278 if (_json.containsKey("iamOwned")) {
2565 iamOwned = _json["iamOwned"]; 2279 iamOwned = _json["iamOwned"];
2566 } 2280 }
2567 if (_json.containsKey("rules")) {
2568 rules = _json["rules"].map((value) => new Rule.fromJson(value)).toList();
2569 }
2570 if (_json.containsKey("version")) { 2281 if (_json.containsKey("version")) {
2571 version = _json["version"]; 2282 version = _json["version"];
2572 } 2283 }
2573 } 2284 }
2574 2285
2575 core.Map<core.String, core.Object> toJson() { 2286 core.Map<core.String, core.Object> toJson() {
2576 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2287 final core.Map<core.String, core.Object> _json =
2288 new core.Map<core.String, core.Object>();
2577 if (auditConfigs != null) { 2289 if (auditConfigs != null) {
2578 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi st(); 2290 _json["auditConfigs"] =
2291 auditConfigs.map((value) => (value).toJson()).toList();
2579 } 2292 }
2580 if (bindings != null) { 2293 if (bindings != null) {
2581 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); 2294 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
2582 } 2295 }
2583 if (etag != null) { 2296 if (etag != null) {
2584 _json["etag"] = etag; 2297 _json["etag"] = etag;
2585 } 2298 }
2586 if (iamOwned != null) { 2299 if (iamOwned != null) {
2587 _json["iamOwned"] = iamOwned; 2300 _json["iamOwned"] = iamOwned;
2588 } 2301 }
2589 if (rules != null) {
2590 _json["rules"] = rules.map((value) => (value).toJson()).toList();
2591 }
2592 if (version != null) { 2302 if (version != null) {
2593 _json["version"] = version; 2303 _json["version"] = version;
2594 } 2304 }
2595 return _json; 2305 return _json;
2596 } 2306 }
2597 } 2307 }
2598 2308
2599 /** Request message for KeyManagementService.RestoreCryptoKeyVersion. */ 2309 /// Request message for KeyManagementService.RestoreCryptoKeyVersion.
2600 class RestoreCryptoKeyVersionRequest { 2310 class RestoreCryptoKeyVersionRequest {
2601
2602 RestoreCryptoKeyVersionRequest(); 2311 RestoreCryptoKeyVersionRequest();
2603 2312
2604 RestoreCryptoKeyVersionRequest.fromJson(core.Map _json) { 2313 RestoreCryptoKeyVersionRequest.fromJson(core.Map _json) {}
2605 }
2606 2314
2607 core.Map<core.String, core.Object> toJson() { 2315 core.Map<core.String, core.Object> toJson() {
2608 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2316 final core.Map<core.String, core.Object> _json =
2317 new core.Map<core.String, core.Object>();
2609 return _json; 2318 return _json;
2610 } 2319 }
2611 } 2320 }
2612 2321
2613 /** A rule to be applied in a Policy. */ 2322 /// Request message for `SetIamPolicy` method.
2614 class Rule { 2323 class SetIamPolicyRequest {
2615 /** 2324 /// REQUIRED: The complete policy to be applied to the `resource`. The size
2616 * Required 2325 /// of
2617 * Possible string values are: 2326 /// the policy is limited to a few 10s of KB. An empty policy is a
2618 * - "NO_ACTION" : Default no action. 2327 /// valid policy but certain Cloud Platform services (such as Projects)
2619 * - "ALLOW" : Matching 'Entries' grant access. 2328 /// might reject them.
2620 * - "ALLOW_WITH_LOG" : Matching 'Entries' grant access and the caller 2329 Policy policy;
2621 * promises to log
2622 * the request per the returned log_configs.
2623 * - "DENY" : Matching 'Entries' deny access.
2624 * - "DENY_WITH_LOG" : Matching 'Entries' deny access and the caller promises
2625 * to log
2626 * the request per the returned log_configs.
2627 * - "LOG" : Matching 'Entries' tell IAM.Check callers to generate logs.
2628 */
2629 core.String action;
2630 /** Additional restrictions that must be met */
2631 core.List<Condition> conditions;
2632 /** Human-readable description of the rule. */
2633 core.String description;
2634 /**
2635 * If one or more 'in' clauses are specified, the rule matches if
2636 * the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
2637 */
2638 core.List<core.String> in_;
2639 /**
2640 * The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
2641 * that match the LOG action.
2642 */
2643 core.List<LogConfig> logConfig;
2644 /**
2645 * If one or more 'not_in' clauses are specified, the rule matches
2646 * if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries.
2647 * The format for in and not_in entries is the same as for members in a
2648 * Binding (see google/iam/v1/policy.proto).
2649 */
2650 core.List<core.String> notIn;
2651 /**
2652 * A permission is a string of form '<service>.<resource type>.<verb>'
2653 * (e.g., 'storage.buckets.list'). A value of '*' matches all permissions,
2654 * and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
2655 */
2656 core.List<core.String> permissions;
2657 2330
2658 Rule(); 2331 /// OPTIONAL: A FieldMask specifying which fields of the policy to modify.
2659 2332 /// Only
2660 Rule.fromJson(core.Map _json) { 2333 /// the fields in the mask will be modified. If no mask is provided, the
2661 if (_json.containsKey("action")) { 2334 /// following default mask is used:
2662 action = _json["action"]; 2335 /// paths: "bindings, etag"
2663 } 2336 /// This field is only used by Cloud IAM.
2664 if (_json.containsKey("conditions")) {
2665 conditions = _json["conditions"].map((value) => new Condition.fromJson(val ue)).toList();
2666 }
2667 if (_json.containsKey("description")) {
2668 description = _json["description"];
2669 }
2670 if (_json.containsKey("in")) {
2671 in_ = _json["in"];
2672 }
2673 if (_json.containsKey("logConfig")) {
2674 logConfig = _json["logConfig"].map((value) => new LogConfig.fromJson(value )).toList();
2675 }
2676 if (_json.containsKey("notIn")) {
2677 notIn = _json["notIn"];
2678 }
2679 if (_json.containsKey("permissions")) {
2680 permissions = _json["permissions"];
2681 }
2682 }
2683
2684 core.Map<core.String, core.Object> toJson() {
2685 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2686 if (action != null) {
2687 _json["action"] = action;
2688 }
2689 if (conditions != null) {
2690 _json["conditions"] = conditions.map((value) => (value).toJson()).toList() ;
2691 }
2692 if (description != null) {
2693 _json["description"] = description;
2694 }
2695 if (in_ != null) {
2696 _json["in"] = in_;
2697 }
2698 if (logConfig != null) {
2699 _json["logConfig"] = logConfig.map((value) => (value).toJson()).toList();
2700 }
2701 if (notIn != null) {
2702 _json["notIn"] = notIn;
2703 }
2704 if (permissions != null) {
2705 _json["permissions"] = permissions;
2706 }
2707 return _json;
2708 }
2709 }
2710
2711 /** Request message for `SetIamPolicy` method. */
2712 class SetIamPolicyRequest {
2713 /**
2714 * REQUIRED: The complete policy to be applied to the `resource`. The size of
2715 * the policy is limited to a few 10s of KB. An empty policy is a
2716 * valid policy but certain Cloud Platform services (such as Projects)
2717 * might reject them.
2718 */
2719 Policy policy;
2720 /**
2721 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
2722 * the fields in the mask will be modified. If no mask is provided, the
2723 * following default mask is used:
2724 * paths: "bindings, etag"
2725 * This field is only used by Cloud IAM.
2726 */
2727 core.String updateMask; 2337 core.String updateMask;
2728 2338
2729 SetIamPolicyRequest(); 2339 SetIamPolicyRequest();
2730 2340
2731 SetIamPolicyRequest.fromJson(core.Map _json) { 2341 SetIamPolicyRequest.fromJson(core.Map _json) {
2732 if (_json.containsKey("policy")) { 2342 if (_json.containsKey("policy")) {
2733 policy = new Policy.fromJson(_json["policy"]); 2343 policy = new Policy.fromJson(_json["policy"]);
2734 } 2344 }
2735 if (_json.containsKey("updateMask")) { 2345 if (_json.containsKey("updateMask")) {
2736 updateMask = _json["updateMask"]; 2346 updateMask = _json["updateMask"];
2737 } 2347 }
2738 } 2348 }
2739 2349
2740 core.Map<core.String, core.Object> toJson() { 2350 core.Map<core.String, core.Object> toJson() {
2741 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2351 final core.Map<core.String, core.Object> _json =
2352 new core.Map<core.String, core.Object>();
2742 if (policy != null) { 2353 if (policy != null) {
2743 _json["policy"] = (policy).toJson(); 2354 _json["policy"] = (policy).toJson();
2744 } 2355 }
2745 if (updateMask != null) { 2356 if (updateMask != null) {
2746 _json["updateMask"] = updateMask; 2357 _json["updateMask"] = updateMask;
2747 } 2358 }
2748 return _json; 2359 return _json;
2749 } 2360 }
2750 } 2361 }
2751 2362
2752 /** Request message for `TestIamPermissions` method. */ 2363 /// Request message for `TestIamPermissions` method.
2753 class TestIamPermissionsRequest { 2364 class TestIamPermissionsRequest {
2754 /** 2365 /// The set of permissions to check for the `resource`. Permissions with
2755 * The set of permissions to check for the `resource`. Permissions with 2366 /// wildcards (such as '*' or 'storage.*') are not allowed. For more
2756 * wildcards (such as '*' or 'storage.*') are not allowed. For more 2367 /// information see
2757 * information see 2368 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2758 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2759 */
2760 core.List<core.String> permissions; 2369 core.List<core.String> permissions;
2761 2370
2762 TestIamPermissionsRequest(); 2371 TestIamPermissionsRequest();
2763 2372
2764 TestIamPermissionsRequest.fromJson(core.Map _json) { 2373 TestIamPermissionsRequest.fromJson(core.Map _json) {
2765 if (_json.containsKey("permissions")) { 2374 if (_json.containsKey("permissions")) {
2766 permissions = _json["permissions"]; 2375 permissions = _json["permissions"];
2767 } 2376 }
2768 } 2377 }
2769 2378
2770 core.Map<core.String, core.Object> toJson() { 2379 core.Map<core.String, core.Object> toJson() {
2771 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2380 final core.Map<core.String, core.Object> _json =
2381 new core.Map<core.String, core.Object>();
2772 if (permissions != null) { 2382 if (permissions != null) {
2773 _json["permissions"] = permissions; 2383 _json["permissions"] = permissions;
2774 } 2384 }
2775 return _json; 2385 return _json;
2776 } 2386 }
2777 } 2387 }
2778 2388
2779 /** Response message for `TestIamPermissions` method. */ 2389 /// Response message for `TestIamPermissions` method.
2780 class TestIamPermissionsResponse { 2390 class TestIamPermissionsResponse {
2781 /** 2391 /// A subset of `TestPermissionsRequest.permissions` that the caller is
2782 * A subset of `TestPermissionsRequest.permissions` that the caller is 2392 /// allowed.
2783 * allowed.
2784 */
2785 core.List<core.String> permissions; 2393 core.List<core.String> permissions;
2786 2394
2787 TestIamPermissionsResponse(); 2395 TestIamPermissionsResponse();
2788 2396
2789 TestIamPermissionsResponse.fromJson(core.Map _json) { 2397 TestIamPermissionsResponse.fromJson(core.Map _json) {
2790 if (_json.containsKey("permissions")) { 2398 if (_json.containsKey("permissions")) {
2791 permissions = _json["permissions"]; 2399 permissions = _json["permissions"];
2792 } 2400 }
2793 } 2401 }
2794 2402
2795 core.Map<core.String, core.Object> toJson() { 2403 core.Map<core.String, core.Object> toJson() {
2796 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2404 final core.Map<core.String, core.Object> _json =
2405 new core.Map<core.String, core.Object>();
2797 if (permissions != null) { 2406 if (permissions != null) {
2798 _json["permissions"] = permissions; 2407 _json["permissions"] = permissions;
2799 } 2408 }
2800 return _json; 2409 return _json;
2801 } 2410 }
2802 } 2411 }
2803 2412
2804 /** Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion. */ 2413 /// Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.
2805 class UpdateCryptoKeyPrimaryVersionRequest { 2414 class UpdateCryptoKeyPrimaryVersionRequest {
2806 /** The id of the child CryptoKeyVersion to use as primary. */ 2415 /// The id of the child CryptoKeyVersion to use as primary.
2807 core.String cryptoKeyVersionId; 2416 core.String cryptoKeyVersionId;
2808 2417
2809 UpdateCryptoKeyPrimaryVersionRequest(); 2418 UpdateCryptoKeyPrimaryVersionRequest();
2810 2419
2811 UpdateCryptoKeyPrimaryVersionRequest.fromJson(core.Map _json) { 2420 UpdateCryptoKeyPrimaryVersionRequest.fromJson(core.Map _json) {
2812 if (_json.containsKey("cryptoKeyVersionId")) { 2421 if (_json.containsKey("cryptoKeyVersionId")) {
2813 cryptoKeyVersionId = _json["cryptoKeyVersionId"]; 2422 cryptoKeyVersionId = _json["cryptoKeyVersionId"];
2814 } 2423 }
2815 } 2424 }
2816 2425
2817 core.Map<core.String, core.Object> toJson() { 2426 core.Map<core.String, core.Object> toJson() {
2818 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2427 final core.Map<core.String, core.Object> _json =
2428 new core.Map<core.String, core.Object>();
2819 if (cryptoKeyVersionId != null) { 2429 if (cryptoKeyVersionId != null) {
2820 _json["cryptoKeyVersionId"] = cryptoKeyVersionId; 2430 _json["cryptoKeyVersionId"] = cryptoKeyVersionId;
2821 } 2431 }
2822 return _json; 2432 return _json;
2823 } 2433 }
2824 } 2434 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/cloudfunctions/v1.dart ('k') | generated/googleapis/lib/cloudresourcemanager/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698