OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.cloudresourcemanager.v1; | 3 library googleapis.cloudresourcemanager.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 cloudresourcemanager/v1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudresourcemanager/v1'; |
16 | 16 |
17 /** | 17 /// The Google Cloud Resource Manager API provides methods for creating, |
18 * The Google Cloud Resource Manager API provides methods for creating, reading, | 18 /// reading, and updating project metadata. |
19 * and updating project metadata. | |
20 */ | |
21 class CloudresourcemanagerApi { | 19 class CloudresourcemanagerApi { |
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 = |
| 22 "https://www.googleapis.com/auth/cloud-platform"; |
24 | 23 |
25 /** View your data across Google Cloud Platform services */ | 24 /// View your data across Google Cloud Platform services |
26 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; | 25 static const CloudPlatformReadOnlyScope = |
27 | 26 "https://www.googleapis.com/auth/cloud-platform.read-only"; |
28 | 27 |
29 final commons.ApiRequester _requester; | 28 final commons.ApiRequester _requester; |
30 | 29 |
31 FoldersResourceApi get folders => new FoldersResourceApi(_requester); | 30 FoldersResourceApi get folders => new FoldersResourceApi(_requester); |
32 LiensResourceApi get liens => new LiensResourceApi(_requester); | 31 LiensResourceApi get liens => new LiensResourceApi(_requester); |
33 OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 32 OperationsResourceApi get operations => new OperationsResourceApi(_requester); |
34 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re
quester); | 33 OrganizationsResourceApi get organizations => |
| 34 new OrganizationsResourceApi(_requester); |
35 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 35 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
36 | 36 |
37 CloudresourcemanagerApi(http.Client client, {core.String rootUrl: "https://clo
udresourcemanager.googleapis.com/", core.String servicePath: ""}) : | 37 CloudresourcemanagerApi(http.Client client, |
38 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 38 {core.String rootUrl: "https://cloudresourcemanager.googleapis.com/", |
| 39 core.String servicePath: ""}) |
| 40 : _requester = |
| 41 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
39 } | 42 } |
40 | 43 |
41 | |
42 class FoldersResourceApi { | 44 class FoldersResourceApi { |
43 final commons.ApiRequester _requester; | 45 final commons.ApiRequester _requester; |
44 | 46 |
45 FoldersResourceApi(commons.ApiRequester client) : | 47 FoldersResourceApi(commons.ApiRequester client) : _requester = client; |
46 _requester = client; | |
47 | 48 |
48 /** | 49 /// Clears a `Policy` from a resource. |
49 * Clears a `Policy` from a resource. | 50 /// |
50 * | 51 /// [request] - The metadata request object. |
51 * [request] - The metadata request object. | 52 /// |
52 * | 53 /// Request parameters: |
53 * Request parameters: | 54 /// |
54 * | 55 /// [resource] - Name of the resource for the `Policy` to clear. |
55 * [resource] - Name of the resource for the `Policy` to clear. | 56 /// Value must have pattern "^folders/[^/]+$". |
56 * Value must have pattern "^folders/[^/]+$". | 57 /// |
57 * | 58 /// Completes with a [Empty]. |
58 * Completes with a [Empty]. | 59 /// |
59 * | 60 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
60 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 61 /// an error. |
61 * error. | 62 /// |
62 * | 63 /// If the used [http.Client] completes with an error when making a REST |
63 * If the used [http.Client] completes with an error when making a REST call, | 64 /// call, this method will complete with the same error. |
64 * this method will complete with the same error. | 65 async.Future<Empty> clearOrgPolicy( |
65 */ | 66 ClearOrgPolicyRequest request, core.String resource) { |
66 async.Future<Empty> clearOrgPolicy(ClearOrgPolicyRequest request, core.String
resource) { | |
67 var _url = null; | 67 var _url = null; |
68 var _queryParams = new core.Map(); | 68 var _queryParams = new core.Map(); |
69 var _uploadMedia = null; | 69 var _uploadMedia = null; |
70 var _uploadOptions = null; | 70 var _uploadOptions = null; |
71 var _downloadOptions = commons.DownloadOptions.Metadata; | 71 var _downloadOptions = commons.DownloadOptions.Metadata; |
72 var _body = null; | 72 var _body = null; |
73 | 73 |
74 if (request != null) { | 74 if (request != null) { |
75 _body = convert.JSON.encode((request).toJson()); | 75 _body = convert.JSON.encode((request).toJson()); |
76 } | 76 } |
77 if (resource == null) { | 77 if (resource == null) { |
78 throw new core.ArgumentError("Parameter resource is required."); | 78 throw new core.ArgumentError("Parameter resource is required."); |
79 } | 79 } |
80 | 80 |
81 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicy'; | 81 _url = 'v1/' + |
| 82 commons.Escaper.ecapeVariableReserved('$resource') + |
| 83 ':clearOrgPolicy'; |
82 | 84 |
83 var _response = _requester.request(_url, | 85 var _response = _requester.request(_url, "POST", |
84 "POST", | 86 body: _body, |
85 body: _body, | 87 queryParams: _queryParams, |
86 queryParams: _queryParams, | 88 uploadOptions: _uploadOptions, |
87 uploadOptions: _uploadOptions, | 89 uploadMedia: _uploadMedia, |
88 uploadMedia: _uploadMedia, | 90 downloadOptions: _downloadOptions); |
89 downloadOptions: _downloadOptions); | |
90 return _response.then((data) => new Empty.fromJson(data)); | 91 return _response.then((data) => new Empty.fromJson(data)); |
91 } | 92 } |
92 | 93 |
93 /** | 94 /// Gets the effective `Policy` on a resource. This is the result of merging |
94 * Gets the effective `Policy` on a resource. This is the result of merging | 95 /// `Policies` in the resource hierarchy. The returned `Policy` will not have |
95 * `Policies` in the resource hierarchy. The returned `Policy` will not have | 96 /// an `etag`set because it is a computed `Policy` across multiple resources. |
96 * an `etag`set because it is a computed `Policy` across multiple resources. | 97 /// |
97 * | 98 /// [request] - The metadata request object. |
98 * [request] - The metadata request object. | 99 /// |
99 * | 100 /// Request parameters: |
100 * Request parameters: | 101 /// |
101 * | 102 /// [resource] - The name of the resource to start computing the effective |
102 * [resource] - The name of the resource to start computing the effective | 103 /// `Policy`. |
103 * `Policy`. | 104 /// Value must have pattern "^folders/[^/]+$". |
104 * Value must have pattern "^folders/[^/]+$". | 105 /// |
105 * | 106 /// Completes with a [OrgPolicy]. |
106 * Completes with a [OrgPolicy]. | 107 /// |
107 * | 108 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 109 /// an error. |
109 * error. | 110 /// |
110 * | 111 /// If the used [http.Client] completes with an error when making a REST |
111 * If the used [http.Client] completes with an error when making a REST call, | 112 /// call, this method will complete with the same error. |
112 * this method will complete with the same error. | 113 async.Future<OrgPolicy> getEffectiveOrgPolicy( |
113 */ | 114 GetEffectiveOrgPolicyRequest request, core.String resource) { |
114 async.Future<OrgPolicy> getEffectiveOrgPolicy(GetEffectiveOrgPolicyRequest req
uest, core.String resource) { | |
115 var _url = null; | 115 var _url = null; |
116 var _queryParams = new core.Map(); | 116 var _queryParams = new core.Map(); |
117 var _uploadMedia = null; | 117 var _uploadMedia = null; |
118 var _uploadOptions = null; | 118 var _uploadOptions = null; |
119 var _downloadOptions = commons.DownloadOptions.Metadata; | 119 var _downloadOptions = commons.DownloadOptions.Metadata; |
120 var _body = null; | 120 var _body = null; |
121 | 121 |
122 if (request != null) { | 122 if (request != null) { |
123 _body = convert.JSON.encode((request).toJson()); | 123 _body = convert.JSON.encode((request).toJson()); |
124 } | 124 } |
125 if (resource == null) { | 125 if (resource == null) { |
126 throw new core.ArgumentError("Parameter resource is required."); | 126 throw new core.ArgumentError("Parameter resource is required."); |
127 } | 127 } |
128 | 128 |
129 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicy'; | 129 _url = 'v1/' + |
| 130 commons.Escaper.ecapeVariableReserved('$resource') + |
| 131 ':getEffectiveOrgPolicy'; |
130 | 132 |
131 var _response = _requester.request(_url, | 133 var _response = _requester.request(_url, "POST", |
132 "POST", | 134 body: _body, |
133 body: _body, | 135 queryParams: _queryParams, |
134 queryParams: _queryParams, | 136 uploadOptions: _uploadOptions, |
135 uploadOptions: _uploadOptions, | 137 uploadMedia: _uploadMedia, |
136 uploadMedia: _uploadMedia, | 138 downloadOptions: _downloadOptions); |
137 downloadOptions: _downloadOptions); | |
138 return _response.then((data) => new OrgPolicy.fromJson(data)); | 139 return _response.then((data) => new OrgPolicy.fromJson(data)); |
139 } | 140 } |
140 | 141 |
141 /** | 142 /// Gets a `Policy` on a resource. |
142 * Gets a `Policy` on a resource. | 143 /// |
143 * | 144 /// If no `Policy` is set on the resource, a `Policy` is returned with |
144 * If no `Policy` is set on the resource, a `Policy` is returned with default | 145 /// default |
145 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | 146 /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The |
146 * `etag` value can be used with `SetOrgPolicy()` to create or update a | 147 /// `etag` value can be used with `SetOrgPolicy()` to create or update a |
147 * `Policy` during read-modify-write. | 148 /// `Policy` during read-modify-write. |
148 * | 149 /// |
149 * [request] - The metadata request object. | 150 /// [request] - The metadata request object. |
150 * | 151 /// |
151 * Request parameters: | 152 /// Request parameters: |
152 * | 153 /// |
153 * [resource] - Name of the resource the `Policy` is set on. | 154 /// [resource] - Name of the resource the `Policy` is set on. |
154 * Value must have pattern "^folders/[^/]+$". | 155 /// Value must have pattern "^folders/[^/]+$". |
155 * | 156 /// |
156 * Completes with a [OrgPolicy]. | 157 /// Completes with a [OrgPolicy]. |
157 * | 158 /// |
158 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 159 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
159 * error. | 160 /// an error. |
160 * | 161 /// |
161 * If the used [http.Client] completes with an error when making a REST call, | 162 /// If the used [http.Client] completes with an error when making a REST |
162 * this method will complete with the same error. | 163 /// call, this method will complete with the same error. |
163 */ | 164 async.Future<OrgPolicy> getOrgPolicy( |
164 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String
resource) { | 165 GetOrgPolicyRequest request, core.String resource) { |
165 var _url = null; | 166 var _url = null; |
166 var _queryParams = new core.Map(); | 167 var _queryParams = new core.Map(); |
167 var _uploadMedia = null; | 168 var _uploadMedia = null; |
168 var _uploadOptions = null; | 169 var _uploadOptions = null; |
169 var _downloadOptions = commons.DownloadOptions.Metadata; | 170 var _downloadOptions = commons.DownloadOptions.Metadata; |
170 var _body = null; | 171 var _body = null; |
171 | 172 |
172 if (request != null) { | 173 if (request != null) { |
173 _body = convert.JSON.encode((request).toJson()); | 174 _body = convert.JSON.encode((request).toJson()); |
174 } | 175 } |
175 if (resource == null) { | 176 if (resource == null) { |
176 throw new core.ArgumentError("Parameter resource is required."); | 177 throw new core.ArgumentError("Parameter resource is required."); |
177 } | 178 } |
178 | 179 |
179 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
Policy'; | 180 _url = 'v1/' + |
| 181 commons.Escaper.ecapeVariableReserved('$resource') + |
| 182 ':getOrgPolicy'; |
180 | 183 |
181 var _response = _requester.request(_url, | 184 var _response = _requester.request(_url, "POST", |
182 "POST", | 185 body: _body, |
183 body: _body, | 186 queryParams: _queryParams, |
184 queryParams: _queryParams, | 187 uploadOptions: _uploadOptions, |
185 uploadOptions: _uploadOptions, | 188 uploadMedia: _uploadMedia, |
186 uploadMedia: _uploadMedia, | 189 downloadOptions: _downloadOptions); |
187 downloadOptions: _downloadOptions); | |
188 return _response.then((data) => new OrgPolicy.fromJson(data)); | 190 return _response.then((data) => new OrgPolicy.fromJson(data)); |
189 } | 191 } |
190 | 192 |
191 /** | 193 /// Lists `Constraints` that could be applied on the specified resource. |
192 * Lists `Constraints` that could be applied on the specified resource. | 194 /// |
193 * | 195 /// [request] - The metadata request object. |
194 * [request] - The metadata request object. | 196 /// |
195 * | 197 /// Request parameters: |
196 * Request parameters: | 198 /// |
197 * | 199 /// [resource] - Name of the resource to list `Constraints` for. |
198 * [resource] - Name of the resource to list `Constraints` for. | 200 /// Value must have pattern "^folders/[^/]+$". |
199 * Value must have pattern "^folders/[^/]+$". | 201 /// |
200 * | 202 /// Completes with a [ListAvailableOrgPolicyConstraintsResponse]. |
201 * Completes with a [ListAvailableOrgPolicyConstraintsResponse]. | 203 /// |
202 * | 204 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
203 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 205 /// an error. |
204 * error. | 206 /// |
205 * | 207 /// If the used [http.Client] completes with an error when making a REST |
206 * If the used [http.Client] completes with an error when making a REST call, | 208 /// call, this method will complete with the same error. |
207 * this method will complete with the same error. | 209 async.Future<ListAvailableOrgPolicyConstraintsResponse> |
208 */ | 210 listAvailableOrgPolicyConstraints( |
209 async.Future<ListAvailableOrgPolicyConstraintsResponse> listAvailableOrgPolicy
Constraints(ListAvailableOrgPolicyConstraintsRequest request, core.String resour
ce) { | 211 ListAvailableOrgPolicyConstraintsRequest request, |
| 212 core.String resource) { |
210 var _url = null; | 213 var _url = null; |
211 var _queryParams = new core.Map(); | 214 var _queryParams = new core.Map(); |
212 var _uploadMedia = null; | 215 var _uploadMedia = null; |
213 var _uploadOptions = null; | 216 var _uploadOptions = null; |
214 var _downloadOptions = commons.DownloadOptions.Metadata; | 217 var _downloadOptions = commons.DownloadOptions.Metadata; |
215 var _body = null; | 218 var _body = null; |
216 | 219 |
217 if (request != null) { | 220 if (request != null) { |
218 _body = convert.JSON.encode((request).toJson()); | 221 _body = convert.JSON.encode((request).toJson()); |
219 } | 222 } |
220 if (resource == null) { | 223 if (resource == null) { |
221 throw new core.ArgumentError("Parameter resource is required."); | 224 throw new core.ArgumentError("Parameter resource is required."); |
222 } | 225 } |
223 | 226 |
224 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listAv
ailableOrgPolicyConstraints'; | 227 _url = 'v1/' + |
| 228 commons.Escaper.ecapeVariableReserved('$resource') + |
| 229 ':listAvailableOrgPolicyConstraints'; |
225 | 230 |
226 var _response = _requester.request(_url, | 231 var _response = _requester.request(_url, "POST", |
227 "POST", | 232 body: _body, |
228 body: _body, | 233 queryParams: _queryParams, |
229 queryParams: _queryParams, | 234 uploadOptions: _uploadOptions, |
230 uploadOptions: _uploadOptions, | 235 uploadMedia: _uploadMedia, |
231 uploadMedia: _uploadMedia, | 236 downloadOptions: _downloadOptions); |
232 downloadOptions: _downloadOptions); | 237 return _response.then( |
233 return _response.then((data) => new ListAvailableOrgPolicyConstraintsRespons
e.fromJson(data)); | 238 (data) => new ListAvailableOrgPolicyConstraintsResponse.fromJson(data)); |
234 } | 239 } |
235 | 240 |
236 /** | 241 /// Lists all the `Policies` set for a particular resource. |
237 * Lists all the `Policies` set for a particular resource. | 242 /// |
238 * | 243 /// [request] - The metadata request object. |
239 * [request] - The metadata request object. | 244 /// |
240 * | 245 /// Request parameters: |
241 * Request parameters: | 246 /// |
242 * | 247 /// [resource] - Name of the resource to list Policies for. |
243 * [resource] - Name of the resource to list Policies for. | 248 /// Value must have pattern "^folders/[^/]+$". |
244 * Value must have pattern "^folders/[^/]+$". | 249 /// |
245 * | 250 /// Completes with a [ListOrgPoliciesResponse]. |
246 * Completes with a [ListOrgPoliciesResponse]. | 251 /// |
247 * | 252 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
248 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 253 /// an error. |
249 * error. | 254 /// |
250 * | 255 /// If the used [http.Client] completes with an error when making a REST |
251 * If the used [http.Client] completes with an error when making a REST call, | 256 /// call, this method will complete with the same error. |
252 * this method will complete with the same error. | 257 async.Future<ListOrgPoliciesResponse> listOrgPolicies( |
253 */ | 258 ListOrgPoliciesRequest request, core.String resource) { |
254 async.Future<ListOrgPoliciesResponse> listOrgPolicies(ListOrgPoliciesRequest r
equest, core.String resource) { | |
255 var _url = null; | 259 var _url = null; |
256 var _queryParams = new core.Map(); | 260 var _queryParams = new core.Map(); |
257 var _uploadMedia = null; | 261 var _uploadMedia = null; |
258 var _uploadOptions = null; | 262 var _uploadOptions = null; |
259 var _downloadOptions = commons.DownloadOptions.Metadata; | 263 var _downloadOptions = commons.DownloadOptions.Metadata; |
260 var _body = null; | 264 var _body = null; |
261 | 265 |
262 if (request != null) { | 266 if (request != null) { |
263 _body = convert.JSON.encode((request).toJson()); | 267 _body = convert.JSON.encode((request).toJson()); |
264 } | 268 } |
265 if (resource == null) { | 269 if (resource == null) { |
266 throw new core.ArgumentError("Parameter resource is required."); | 270 throw new core.ArgumentError("Parameter resource is required."); |
267 } | 271 } |
268 | 272 |
269 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listOr
gPolicies'; | 273 _url = 'v1/' + |
| 274 commons.Escaper.ecapeVariableReserved('$resource') + |
| 275 ':listOrgPolicies'; |
270 | 276 |
271 var _response = _requester.request(_url, | 277 var _response = _requester.request(_url, "POST", |
272 "POST", | 278 body: _body, |
273 body: _body, | 279 queryParams: _queryParams, |
274 queryParams: _queryParams, | 280 uploadOptions: _uploadOptions, |
275 uploadOptions: _uploadOptions, | 281 uploadMedia: _uploadMedia, |
276 uploadMedia: _uploadMedia, | 282 downloadOptions: _downloadOptions); |
277 downloadOptions: _downloadOptions); | |
278 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); | 283 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); |
279 } | 284 } |
280 | 285 |
281 /** | 286 /// Updates the specified `Policy` on the resource. Creates a new `Policy` |
282 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | 287 /// for |
283 * that `Constraint` on the resource if one does not exist. | 288 /// that `Constraint` on the resource if one does not exist. |
284 * | 289 /// |
285 * Not supplying an `etag` on the request `Policy` results in an unconditional | 290 /// Not supplying an `etag` on the request `Policy` results in an |
286 * write of the `Policy`. | 291 /// unconditional |
287 * | 292 /// write of the `Policy`. |
288 * [request] - The metadata request object. | 293 /// |
289 * | 294 /// [request] - The metadata request object. |
290 * Request parameters: | 295 /// |
291 * | 296 /// Request parameters: |
292 * [resource] - Resource name of the resource to attach the `Policy`. | 297 /// |
293 * Value must have pattern "^folders/[^/]+$". | 298 /// [resource] - Resource name of the resource to attach the `Policy`. |
294 * | 299 /// Value must have pattern "^folders/[^/]+$". |
295 * Completes with a [OrgPolicy]. | 300 /// |
296 * | 301 /// Completes with a [OrgPolicy]. |
297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 302 /// |
298 * error. | 303 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
299 * | 304 /// an error. |
300 * If the used [http.Client] completes with an error when making a REST call, | 305 /// |
301 * this method will complete with the same error. | 306 /// If the used [http.Client] completes with an error when making a REST |
302 */ | 307 /// call, this method will complete with the same error. |
303 async.Future<OrgPolicy> setOrgPolicy(SetOrgPolicyRequest request, core.String
resource) { | 308 async.Future<OrgPolicy> setOrgPolicy( |
| 309 SetOrgPolicyRequest request, core.String resource) { |
304 var _url = null; | 310 var _url = null; |
305 var _queryParams = new core.Map(); | 311 var _queryParams = new core.Map(); |
306 var _uploadMedia = null; | 312 var _uploadMedia = null; |
307 var _uploadOptions = null; | 313 var _uploadOptions = null; |
308 var _downloadOptions = commons.DownloadOptions.Metadata; | 314 var _downloadOptions = commons.DownloadOptions.Metadata; |
309 var _body = null; | 315 var _body = null; |
310 | 316 |
311 if (request != null) { | 317 if (request != null) { |
312 _body = convert.JSON.encode((request).toJson()); | 318 _body = convert.JSON.encode((request).toJson()); |
313 } | 319 } |
314 if (resource == null) { | 320 if (resource == null) { |
315 throw new core.ArgumentError("Parameter resource is required."); | 321 throw new core.ArgumentError("Parameter resource is required."); |
316 } | 322 } |
317 | 323 |
318 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
Policy'; | 324 _url = 'v1/' + |
| 325 commons.Escaper.ecapeVariableReserved('$resource') + |
| 326 ':setOrgPolicy'; |
319 | 327 |
320 var _response = _requester.request(_url, | 328 var _response = _requester.request(_url, "POST", |
321 "POST", | 329 body: _body, |
322 body: _body, | 330 queryParams: _queryParams, |
323 queryParams: _queryParams, | 331 uploadOptions: _uploadOptions, |
324 uploadOptions: _uploadOptions, | 332 uploadMedia: _uploadMedia, |
325 uploadMedia: _uploadMedia, | 333 downloadOptions: _downloadOptions); |
326 downloadOptions: _downloadOptions); | |
327 return _response.then((data) => new OrgPolicy.fromJson(data)); | 334 return _response.then((data) => new OrgPolicy.fromJson(data)); |
328 } | 335 } |
329 | |
330 } | 336 } |
331 | 337 |
332 | |
333 class LiensResourceApi { | 338 class LiensResourceApi { |
334 final commons.ApiRequester _requester; | 339 final commons.ApiRequester _requester; |
335 | 340 |
336 LiensResourceApi(commons.ApiRequester client) : | 341 LiensResourceApi(commons.ApiRequester client) : _requester = client; |
337 _requester = client; | |
338 | 342 |
339 /** | 343 /// Create a Lien which applies to the resource denoted by the `parent` |
340 * Create a Lien which applies to the resource denoted by the `parent` field. | 344 /// field. |
341 * | 345 /// |
342 * Callers of this method will require permission on the `parent` resource. | 346 /// Callers of this method will require permission on the `parent` resource. |
343 * For example, applying to `projects/1234` requires permission | 347 /// For example, applying to `projects/1234` requires permission |
344 * `resourcemanager.projects.updateLiens`. | 348 /// `resourcemanager.projects.updateLiens`. |
345 * | 349 /// |
346 * NOTE: Some resources may limit the number of Liens which may be applied. | 350 /// NOTE: Some resources may limit the number of Liens which may be applied. |
347 * | 351 /// |
348 * [request] - The metadata request object. | 352 /// [request] - The metadata request object. |
349 * | 353 /// |
350 * Request parameters: | 354 /// Request parameters: |
351 * | 355 /// |
352 * Completes with a [Lien]. | 356 /// Completes with a [Lien]. |
353 * | 357 /// |
354 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 358 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
355 * error. | 359 /// an error. |
356 * | 360 /// |
357 * If the used [http.Client] completes with an error when making a REST call, | 361 /// If the used [http.Client] completes with an error when making a REST |
358 * this method will complete with the same error. | 362 /// call, this method will complete with the same error. |
359 */ | |
360 async.Future<Lien> create(Lien request) { | 363 async.Future<Lien> create(Lien request) { |
361 var _url = null; | 364 var _url = null; |
362 var _queryParams = new core.Map(); | 365 var _queryParams = new core.Map(); |
363 var _uploadMedia = null; | 366 var _uploadMedia = null; |
364 var _uploadOptions = null; | 367 var _uploadOptions = null; |
365 var _downloadOptions = commons.DownloadOptions.Metadata; | 368 var _downloadOptions = commons.DownloadOptions.Metadata; |
366 var _body = null; | 369 var _body = null; |
367 | 370 |
368 if (request != null) { | 371 if (request != null) { |
369 _body = convert.JSON.encode((request).toJson()); | 372 _body = convert.JSON.encode((request).toJson()); |
370 } | 373 } |
371 | 374 |
372 _url = 'v1/liens'; | 375 _url = 'v1/liens'; |
373 | 376 |
374 var _response = _requester.request(_url, | 377 var _response = _requester.request(_url, "POST", |
375 "POST", | 378 body: _body, |
376 body: _body, | 379 queryParams: _queryParams, |
377 queryParams: _queryParams, | 380 uploadOptions: _uploadOptions, |
378 uploadOptions: _uploadOptions, | 381 uploadMedia: _uploadMedia, |
379 uploadMedia: _uploadMedia, | 382 downloadOptions: _downloadOptions); |
380 downloadOptions: _downloadOptions); | |
381 return _response.then((data) => new Lien.fromJson(data)); | 383 return _response.then((data) => new Lien.fromJson(data)); |
382 } | 384 } |
383 | 385 |
384 /** | 386 /// Delete a Lien by `name`. |
385 * Delete a Lien by `name`. | 387 /// |
386 * | 388 /// Callers of this method will require permission on the `parent` resource. |
387 * Callers of this method will require permission on the `parent` resource. | 389 /// For example, a Lien with a `parent` of `projects/1234` requires |
388 * For example, a Lien with a `parent` of `projects/1234` requires permission | 390 /// permission |
389 * `resourcemanager.projects.updateLiens`. | 391 /// `resourcemanager.projects.updateLiens`. |
390 * | 392 /// |
391 * Request parameters: | 393 /// Request parameters: |
392 * | 394 /// |
393 * [name] - The name/identifier of the Lien to delete. | 395 /// [name] - The name/identifier of the Lien to delete. |
394 * Value must have pattern "^liens/.+$". | 396 /// Value must have pattern "^liens/.+$". |
395 * | 397 /// |
396 * Completes with a [Empty]. | 398 /// Completes with a [Empty]. |
397 * | 399 /// |
398 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 400 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
399 * error. | 401 /// an error. |
400 * | 402 /// |
401 * If the used [http.Client] completes with an error when making a REST call, | 403 /// If the used [http.Client] completes with an error when making a REST |
402 * this method will complete with the same error. | 404 /// call, this method will complete with the same error. |
403 */ | |
404 async.Future<Empty> delete(core.String name) { | 405 async.Future<Empty> delete(core.String name) { |
405 var _url = null; | 406 var _url = null; |
406 var _queryParams = new core.Map(); | 407 var _queryParams = new core.Map(); |
407 var _uploadMedia = null; | 408 var _uploadMedia = null; |
408 var _uploadOptions = null; | 409 var _uploadOptions = null; |
409 var _downloadOptions = commons.DownloadOptions.Metadata; | 410 var _downloadOptions = commons.DownloadOptions.Metadata; |
410 var _body = null; | 411 var _body = null; |
411 | 412 |
412 if (name == null) { | 413 if (name == null) { |
413 throw new core.ArgumentError("Parameter name is required."); | 414 throw new core.ArgumentError("Parameter name is required."); |
414 } | 415 } |
415 | 416 |
416 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 417 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
417 | 418 |
418 var _response = _requester.request(_url, | 419 var _response = _requester.request(_url, "DELETE", |
419 "DELETE", | 420 body: _body, |
420 body: _body, | 421 queryParams: _queryParams, |
421 queryParams: _queryParams, | 422 uploadOptions: _uploadOptions, |
422 uploadOptions: _uploadOptions, | 423 uploadMedia: _uploadMedia, |
423 uploadMedia: _uploadMedia, | 424 downloadOptions: _downloadOptions); |
424 downloadOptions: _downloadOptions); | |
425 return _response.then((data) => new Empty.fromJson(data)); | 425 return _response.then((data) => new Empty.fromJson(data)); |
426 } | 426 } |
427 | 427 |
428 /** | 428 /// List all Liens applied to the `parent` resource. |
429 * List all Liens applied to the `parent` resource. | 429 /// |
430 * | 430 /// Callers of this method will require permission on the `parent` resource. |
431 * Callers of this method will require permission on the `parent` resource. | 431 /// For example, a Lien with a `parent` of `projects/1234` requires |
432 * For example, a Lien with a `parent` of `projects/1234` requires permission | 432 /// permission |
433 * `resourcemanager.projects.get`. | 433 /// `resourcemanager.projects.get`. |
434 * | 434 /// |
435 * Request parameters: | 435 /// Request parameters: |
436 * | 436 /// |
437 * [pageToken] - The `next_page_token` value returned from a previous List | 437 /// [parent] - The name of the resource to list all attached Liens. |
438 * request, if any. | 438 /// For example, `projects/1234`. |
439 * | 439 /// |
440 * [pageSize] - The maximum number of items to return. This is a suggestion | 440 /// [pageToken] - The `next_page_token` value returned from a previous List |
441 * for the server. | 441 /// request, if any. |
442 * | 442 /// |
443 * [parent] - The name of the resource to list all attached Liens. | 443 /// [pageSize] - The maximum number of items to return. This is a suggestion |
444 * For example, `projects/1234`. | 444 /// for the server. |
445 * | 445 /// |
446 * Completes with a [ListLiensResponse]. | 446 /// Completes with a [ListLiensResponse]. |
447 * | 447 /// |
448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 448 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
449 * error. | 449 /// an error. |
450 * | 450 /// |
451 * If the used [http.Client] completes with an error when making a REST call, | 451 /// If the used [http.Client] completes with an error when making a REST |
452 * this method will complete with the same error. | 452 /// call, this method will complete with the same error. |
453 */ | 453 async.Future<ListLiensResponse> list( |
454 async.Future<ListLiensResponse> list({core.String pageToken, core.int pageSize
, core.String parent}) { | 454 {core.String parent, core.String pageToken, core.int pageSize}) { |
455 var _url = null; | 455 var _url = null; |
456 var _queryParams = new core.Map(); | 456 var _queryParams = new core.Map(); |
457 var _uploadMedia = null; | 457 var _uploadMedia = null; |
458 var _uploadOptions = null; | 458 var _uploadOptions = null; |
459 var _downloadOptions = commons.DownloadOptions.Metadata; | 459 var _downloadOptions = commons.DownloadOptions.Metadata; |
460 var _body = null; | 460 var _body = null; |
461 | 461 |
| 462 if (parent != null) { |
| 463 _queryParams["parent"] = [parent]; |
| 464 } |
462 if (pageToken != null) { | 465 if (pageToken != null) { |
463 _queryParams["pageToken"] = [pageToken]; | 466 _queryParams["pageToken"] = [pageToken]; |
464 } | 467 } |
465 if (pageSize != null) { | 468 if (pageSize != null) { |
466 _queryParams["pageSize"] = ["${pageSize}"]; | 469 _queryParams["pageSize"] = ["${pageSize}"]; |
467 } | 470 } |
468 if (parent != null) { | |
469 _queryParams["parent"] = [parent]; | |
470 } | |
471 | 471 |
472 _url = 'v1/liens'; | 472 _url = 'v1/liens'; |
473 | 473 |
474 var _response = _requester.request(_url, | 474 var _response = _requester.request(_url, "GET", |
475 "GET", | 475 body: _body, |
476 body: _body, | 476 queryParams: _queryParams, |
477 queryParams: _queryParams, | 477 uploadOptions: _uploadOptions, |
478 uploadOptions: _uploadOptions, | 478 uploadMedia: _uploadMedia, |
479 uploadMedia: _uploadMedia, | 479 downloadOptions: _downloadOptions); |
480 downloadOptions: _downloadOptions); | |
481 return _response.then((data) => new ListLiensResponse.fromJson(data)); | 480 return _response.then((data) => new ListLiensResponse.fromJson(data)); |
482 } | 481 } |
483 | |
484 } | 482 } |
485 | 483 |
486 | |
487 class OperationsResourceApi { | 484 class OperationsResourceApi { |
488 final commons.ApiRequester _requester; | 485 final commons.ApiRequester _requester; |
489 | 486 |
490 OperationsResourceApi(commons.ApiRequester client) : | 487 OperationsResourceApi(commons.ApiRequester client) : _requester = client; |
491 _requester = client; | |
492 | 488 |
493 /** | 489 /// Gets the latest state of a long-running operation. Clients can use this |
494 * Gets the latest state of a long-running operation. Clients can use this | 490 /// method to poll the operation result at intervals as recommended by the |
495 * method to poll the operation result at intervals as recommended by the API | 491 /// API |
496 * service. | 492 /// service. |
497 * | 493 /// |
498 * Request parameters: | 494 /// Request parameters: |
499 * | 495 /// |
500 * [name] - The name of the operation resource. | 496 /// [name] - The name of the operation resource. |
501 * Value must have pattern "^operations/.+$". | 497 /// Value must have pattern "^operations/.+$". |
502 * | 498 /// |
503 * Completes with a [Operation]. | 499 /// Completes with a [Operation]. |
504 * | 500 /// |
505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 501 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
506 * error. | 502 /// an error. |
507 * | 503 /// |
508 * If the used [http.Client] completes with an error when making a REST call, | 504 /// If the used [http.Client] completes with an error when making a REST |
509 * this method will complete with the same error. | 505 /// call, this method will complete with the same error. |
510 */ | |
511 async.Future<Operation> get(core.String name) { | 506 async.Future<Operation> get(core.String name) { |
512 var _url = null; | 507 var _url = null; |
513 var _queryParams = new core.Map(); | 508 var _queryParams = new core.Map(); |
514 var _uploadMedia = null; | 509 var _uploadMedia = null; |
515 var _uploadOptions = null; | 510 var _uploadOptions = null; |
516 var _downloadOptions = commons.DownloadOptions.Metadata; | 511 var _downloadOptions = commons.DownloadOptions.Metadata; |
517 var _body = null; | 512 var _body = null; |
518 | 513 |
519 if (name == null) { | 514 if (name == null) { |
520 throw new core.ArgumentError("Parameter name is required."); | 515 throw new core.ArgumentError("Parameter name is required."); |
521 } | 516 } |
522 | 517 |
523 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 518 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
524 | 519 |
525 var _response = _requester.request(_url, | 520 var _response = _requester.request(_url, "GET", |
526 "GET", | 521 body: _body, |
527 body: _body, | 522 queryParams: _queryParams, |
528 queryParams: _queryParams, | 523 uploadOptions: _uploadOptions, |
529 uploadOptions: _uploadOptions, | 524 uploadMedia: _uploadMedia, |
530 uploadMedia: _uploadMedia, | 525 downloadOptions: _downloadOptions); |
531 downloadOptions: _downloadOptions); | |
532 return _response.then((data) => new Operation.fromJson(data)); | 526 return _response.then((data) => new Operation.fromJson(data)); |
533 } | 527 } |
534 | |
535 } | 528 } |
536 | 529 |
537 | |
538 class OrganizationsResourceApi { | 530 class OrganizationsResourceApi { |
539 final commons.ApiRequester _requester; | 531 final commons.ApiRequester _requester; |
540 | 532 |
541 OrganizationsResourceApi(commons.ApiRequester client) : | 533 OrganizationsResourceApi(commons.ApiRequester client) : _requester = client; |
542 _requester = client; | |
543 | 534 |
544 /** | 535 /// Clears a `Policy` from a resource. |
545 * Clears a `Policy` from a resource. | 536 /// |
546 * | 537 /// [request] - The metadata request object. |
547 * [request] - The metadata request object. | 538 /// |
548 * | 539 /// Request parameters: |
549 * Request parameters: | 540 /// |
550 * | 541 /// [resource] - Name of the resource for the `Policy` to clear. |
551 * [resource] - Name of the resource for the `Policy` to clear. | 542 /// Value must have pattern "^organizations/[^/]+$". |
552 * Value must have pattern "^organizations/[^/]+$". | 543 /// |
553 * | 544 /// Completes with a [Empty]. |
554 * Completes with a [Empty]. | 545 /// |
555 * | 546 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
556 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 547 /// an error. |
557 * error. | 548 /// |
558 * | 549 /// If the used [http.Client] completes with an error when making a REST |
559 * If the used [http.Client] completes with an error when making a REST call, | 550 /// call, this method will complete with the same error. |
560 * this method will complete with the same error. | 551 async.Future<Empty> clearOrgPolicy( |
561 */ | 552 ClearOrgPolicyRequest request, core.String resource) { |
562 async.Future<Empty> clearOrgPolicy(ClearOrgPolicyRequest request, core.String
resource) { | |
563 var _url = null; | 553 var _url = null; |
564 var _queryParams = new core.Map(); | 554 var _queryParams = new core.Map(); |
565 var _uploadMedia = null; | 555 var _uploadMedia = null; |
566 var _uploadOptions = null; | 556 var _uploadOptions = null; |
567 var _downloadOptions = commons.DownloadOptions.Metadata; | 557 var _downloadOptions = commons.DownloadOptions.Metadata; |
568 var _body = null; | 558 var _body = null; |
569 | 559 |
570 if (request != null) { | 560 if (request != null) { |
571 _body = convert.JSON.encode((request).toJson()); | 561 _body = convert.JSON.encode((request).toJson()); |
572 } | 562 } |
573 if (resource == null) { | 563 if (resource == null) { |
574 throw new core.ArgumentError("Parameter resource is required."); | 564 throw new core.ArgumentError("Parameter resource is required."); |
575 } | 565 } |
576 | 566 |
577 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicy'; | 567 _url = 'v1/' + |
| 568 commons.Escaper.ecapeVariableReserved('$resource') + |
| 569 ':clearOrgPolicy'; |
578 | 570 |
579 var _response = _requester.request(_url, | 571 var _response = _requester.request(_url, "POST", |
580 "POST", | 572 body: _body, |
581 body: _body, | 573 queryParams: _queryParams, |
582 queryParams: _queryParams, | 574 uploadOptions: _uploadOptions, |
583 uploadOptions: _uploadOptions, | 575 uploadMedia: _uploadMedia, |
584 uploadMedia: _uploadMedia, | 576 downloadOptions: _downloadOptions); |
585 downloadOptions: _downloadOptions); | |
586 return _response.then((data) => new Empty.fromJson(data)); | 577 return _response.then((data) => new Empty.fromJson(data)); |
587 } | 578 } |
588 | 579 |
589 /** | 580 /// Fetches an Organization resource identified by the specified resource |
590 * Fetches an Organization resource identified by the specified resource name. | 581 /// name. |
591 * | 582 /// |
592 * Request parameters: | 583 /// Request parameters: |
593 * | 584 /// |
594 * [name] - The resource name of the Organization to fetch, e.g. | 585 /// [name] - The resource name of the Organization to fetch, e.g. |
595 * "organizations/1234". | 586 /// "organizations/1234". |
596 * Value must have pattern "^organizations/[^/]+$". | 587 /// Value must have pattern "^organizations/[^/]+$". |
597 * | 588 /// |
598 * Completes with a [Organization]. | 589 /// Completes with a [Organization]. |
599 * | 590 /// |
600 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 591 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
601 * error. | 592 /// an error. |
602 * | 593 /// |
603 * If the used [http.Client] completes with an error when making a REST call, | 594 /// If the used [http.Client] completes with an error when making a REST |
604 * this method will complete with the same error. | 595 /// call, this method will complete with the same error. |
605 */ | |
606 async.Future<Organization> get(core.String name) { | 596 async.Future<Organization> get(core.String name) { |
607 var _url = null; | 597 var _url = null; |
608 var _queryParams = new core.Map(); | 598 var _queryParams = new core.Map(); |
609 var _uploadMedia = null; | 599 var _uploadMedia = null; |
610 var _uploadOptions = null; | 600 var _uploadOptions = null; |
611 var _downloadOptions = commons.DownloadOptions.Metadata; | 601 var _downloadOptions = commons.DownloadOptions.Metadata; |
612 var _body = null; | 602 var _body = null; |
613 | 603 |
614 if (name == null) { | 604 if (name == null) { |
615 throw new core.ArgumentError("Parameter name is required."); | 605 throw new core.ArgumentError("Parameter name is required."); |
616 } | 606 } |
617 | 607 |
618 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 608 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
619 | 609 |
620 var _response = _requester.request(_url, | 610 var _response = _requester.request(_url, "GET", |
621 "GET", | 611 body: _body, |
622 body: _body, | 612 queryParams: _queryParams, |
623 queryParams: _queryParams, | 613 uploadOptions: _uploadOptions, |
624 uploadOptions: _uploadOptions, | 614 uploadMedia: _uploadMedia, |
625 uploadMedia: _uploadMedia, | 615 downloadOptions: _downloadOptions); |
626 downloadOptions: _downloadOptions); | |
627 return _response.then((data) => new Organization.fromJson(data)); | 616 return _response.then((data) => new Organization.fromJson(data)); |
628 } | 617 } |
629 | 618 |
630 /** | 619 /// Gets the effective `Policy` on a resource. This is the result of merging |
631 * Gets the effective `Policy` on a resource. This is the result of merging | 620 /// `Policies` in the resource hierarchy. The returned `Policy` will not have |
632 * `Policies` in the resource hierarchy. The returned `Policy` will not have | 621 /// an `etag`set because it is a computed `Policy` across multiple resources. |
633 * an `etag`set because it is a computed `Policy` across multiple resources. | 622 /// |
634 * | 623 /// [request] - The metadata request object. |
635 * [request] - The metadata request object. | 624 /// |
636 * | 625 /// Request parameters: |
637 * Request parameters: | 626 /// |
638 * | 627 /// [resource] - The name of the resource to start computing the effective |
639 * [resource] - The name of the resource to start computing the effective | 628 /// `Policy`. |
640 * `Policy`. | 629 /// Value must have pattern "^organizations/[^/]+$". |
641 * Value must have pattern "^organizations/[^/]+$". | 630 /// |
642 * | 631 /// Completes with a [OrgPolicy]. |
643 * Completes with a [OrgPolicy]. | 632 /// |
644 * | 633 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
645 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 634 /// an error. |
646 * error. | 635 /// |
647 * | 636 /// If the used [http.Client] completes with an error when making a REST |
648 * If the used [http.Client] completes with an error when making a REST call, | 637 /// call, this method will complete with the same error. |
649 * this method will complete with the same error. | 638 async.Future<OrgPolicy> getEffectiveOrgPolicy( |
650 */ | 639 GetEffectiveOrgPolicyRequest request, core.String resource) { |
651 async.Future<OrgPolicy> getEffectiveOrgPolicy(GetEffectiveOrgPolicyRequest req
uest, core.String resource) { | |
652 var _url = null; | 640 var _url = null; |
653 var _queryParams = new core.Map(); | 641 var _queryParams = new core.Map(); |
654 var _uploadMedia = null; | 642 var _uploadMedia = null; |
655 var _uploadOptions = null; | 643 var _uploadOptions = null; |
656 var _downloadOptions = commons.DownloadOptions.Metadata; | 644 var _downloadOptions = commons.DownloadOptions.Metadata; |
657 var _body = null; | 645 var _body = null; |
658 | 646 |
659 if (request != null) { | 647 if (request != null) { |
660 _body = convert.JSON.encode((request).toJson()); | 648 _body = convert.JSON.encode((request).toJson()); |
661 } | 649 } |
662 if (resource == null) { | 650 if (resource == null) { |
663 throw new core.ArgumentError("Parameter resource is required."); | 651 throw new core.ArgumentError("Parameter resource is required."); |
664 } | 652 } |
665 | 653 |
666 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicy'; | 654 _url = 'v1/' + |
| 655 commons.Escaper.ecapeVariableReserved('$resource') + |
| 656 ':getEffectiveOrgPolicy'; |
667 | 657 |
668 var _response = _requester.request(_url, | 658 var _response = _requester.request(_url, "POST", |
669 "POST", | 659 body: _body, |
670 body: _body, | 660 queryParams: _queryParams, |
671 queryParams: _queryParams, | 661 uploadOptions: _uploadOptions, |
672 uploadOptions: _uploadOptions, | 662 uploadMedia: _uploadMedia, |
673 uploadMedia: _uploadMedia, | 663 downloadOptions: _downloadOptions); |
674 downloadOptions: _downloadOptions); | |
675 return _response.then((data) => new OrgPolicy.fromJson(data)); | 664 return _response.then((data) => new OrgPolicy.fromJson(data)); |
676 } | 665 } |
677 | 666 |
678 /** | 667 /// Gets the access control policy for an Organization resource. May be empty |
679 * Gets the access control policy for an Organization resource. May be empty | 668 /// if no such policy or resource exists. The `resource` field should be the |
680 * if no such policy or resource exists. The `resource` field should be the | 669 /// organization's resource name, e.g. "organizations/123". |
681 * organization's resource name, e.g. "organizations/123". | 670 /// |
682 * | 671 /// Authorization requires the Google IAM permission |
683 * Authorization requires the Google IAM permission | 672 /// `resourcemanager.organizations.getIamPolicy` on the specified |
684 * `resourcemanager.organizations.getIamPolicy` on the specified organization | 673 /// organization |
685 * | 674 /// |
686 * [request] - The metadata request object. | 675 /// [request] - The metadata request object. |
687 * | 676 /// |
688 * Request parameters: | 677 /// Request parameters: |
689 * | 678 /// |
690 * [resource] - REQUIRED: The resource for which the policy is being | 679 /// [resource] - REQUIRED: The resource for which the policy is being |
691 * requested. | 680 /// requested. |
692 * See the operation documentation for the appropriate value for this field. | 681 /// See the operation documentation for the appropriate value for this field. |
693 * Value must have pattern "^organizations/[^/]+$". | 682 /// Value must have pattern "^organizations/[^/]+$". |
694 * | 683 /// |
695 * Completes with a [Policy]. | 684 /// Completes with a [Policy]. |
696 * | 685 /// |
697 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 686 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
698 * error. | 687 /// an error. |
699 * | 688 /// |
700 * If the used [http.Client] completes with an error when making a REST call, | 689 /// If the used [http.Client] completes with an error when making a REST |
701 * this method will complete with the same error. | 690 /// call, this method will complete with the same error. |
702 */ | 691 async.Future<Policy> getIamPolicy( |
703 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res
ource) { | 692 GetIamPolicyRequest request, core.String resource) { |
704 var _url = null; | 693 var _url = null; |
705 var _queryParams = new core.Map(); | 694 var _queryParams = new core.Map(); |
706 var _uploadMedia = null; | 695 var _uploadMedia = null; |
707 var _uploadOptions = null; | 696 var _uploadOptions = null; |
708 var _downloadOptions = commons.DownloadOptions.Metadata; | 697 var _downloadOptions = commons.DownloadOptions.Metadata; |
709 var _body = null; | 698 var _body = null; |
710 | 699 |
711 if (request != null) { | 700 if (request != null) { |
712 _body = convert.JSON.encode((request).toJson()); | 701 _body = convert.JSON.encode((request).toJson()); |
713 } | 702 } |
714 if (resource == null) { | 703 if (resource == null) { |
715 throw new core.ArgumentError("Parameter resource is required."); | 704 throw new core.ArgumentError("Parameter resource is required."); |
716 } | 705 } |
717 | 706 |
718 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; | 707 _url = 'v1/' + |
| 708 commons.Escaper.ecapeVariableReserved('$resource') + |
| 709 ':getIamPolicy'; |
719 | 710 |
720 var _response = _requester.request(_url, | 711 var _response = _requester.request(_url, "POST", |
721 "POST", | 712 body: _body, |
722 body: _body, | 713 queryParams: _queryParams, |
723 queryParams: _queryParams, | 714 uploadOptions: _uploadOptions, |
724 uploadOptions: _uploadOptions, | 715 uploadMedia: _uploadMedia, |
725 uploadMedia: _uploadMedia, | 716 downloadOptions: _downloadOptions); |
726 downloadOptions: _downloadOptions); | |
727 return _response.then((data) => new Policy.fromJson(data)); | 717 return _response.then((data) => new Policy.fromJson(data)); |
728 } | 718 } |
729 | 719 |
730 /** | 720 /// Gets a `Policy` on a resource. |
731 * Gets a `Policy` on a resource. | 721 /// |
732 * | 722 /// If no `Policy` is set on the resource, a `Policy` is returned with |
733 * If no `Policy` is set on the resource, a `Policy` is returned with default | 723 /// default |
734 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | 724 /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The |
735 * `etag` value can be used with `SetOrgPolicy()` to create or update a | 725 /// `etag` value can be used with `SetOrgPolicy()` to create or update a |
736 * `Policy` during read-modify-write. | 726 /// `Policy` during read-modify-write. |
737 * | 727 /// |
738 * [request] - The metadata request object. | 728 /// [request] - The metadata request object. |
739 * | 729 /// |
740 * Request parameters: | 730 /// Request parameters: |
741 * | 731 /// |
742 * [resource] - Name of the resource the `Policy` is set on. | 732 /// [resource] - Name of the resource the `Policy` is set on. |
743 * Value must have pattern "^organizations/[^/]+$". | 733 /// Value must have pattern "^organizations/[^/]+$". |
744 * | 734 /// |
745 * Completes with a [OrgPolicy]. | 735 /// Completes with a [OrgPolicy]. |
746 * | 736 /// |
747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 737 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
748 * error. | 738 /// an error. |
749 * | 739 /// |
750 * If the used [http.Client] completes with an error when making a REST call, | 740 /// If the used [http.Client] completes with an error when making a REST |
751 * this method will complete with the same error. | 741 /// call, this method will complete with the same error. |
752 */ | 742 async.Future<OrgPolicy> getOrgPolicy( |
753 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String
resource) { | 743 GetOrgPolicyRequest request, core.String resource) { |
754 var _url = null; | 744 var _url = null; |
755 var _queryParams = new core.Map(); | 745 var _queryParams = new core.Map(); |
756 var _uploadMedia = null; | 746 var _uploadMedia = null; |
757 var _uploadOptions = null; | 747 var _uploadOptions = null; |
758 var _downloadOptions = commons.DownloadOptions.Metadata; | 748 var _downloadOptions = commons.DownloadOptions.Metadata; |
759 var _body = null; | 749 var _body = null; |
760 | 750 |
761 if (request != null) { | 751 if (request != null) { |
762 _body = convert.JSON.encode((request).toJson()); | 752 _body = convert.JSON.encode((request).toJson()); |
763 } | 753 } |
764 if (resource == null) { | 754 if (resource == null) { |
765 throw new core.ArgumentError("Parameter resource is required."); | 755 throw new core.ArgumentError("Parameter resource is required."); |
766 } | 756 } |
767 | 757 |
768 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
Policy'; | 758 _url = 'v1/' + |
| 759 commons.Escaper.ecapeVariableReserved('$resource') + |
| 760 ':getOrgPolicy'; |
769 | 761 |
770 var _response = _requester.request(_url, | 762 var _response = _requester.request(_url, "POST", |
771 "POST", | 763 body: _body, |
772 body: _body, | 764 queryParams: _queryParams, |
773 queryParams: _queryParams, | 765 uploadOptions: _uploadOptions, |
774 uploadOptions: _uploadOptions, | 766 uploadMedia: _uploadMedia, |
775 uploadMedia: _uploadMedia, | 767 downloadOptions: _downloadOptions); |
776 downloadOptions: _downloadOptions); | |
777 return _response.then((data) => new OrgPolicy.fromJson(data)); | 768 return _response.then((data) => new OrgPolicy.fromJson(data)); |
778 } | 769 } |
779 | 770 |
780 /** | 771 /// Lists `Constraints` that could be applied on the specified resource. |
781 * Lists `Constraints` that could be applied on the specified resource. | 772 /// |
782 * | 773 /// [request] - The metadata request object. |
783 * [request] - The metadata request object. | 774 /// |
784 * | 775 /// Request parameters: |
785 * Request parameters: | 776 /// |
786 * | 777 /// [resource] - Name of the resource to list `Constraints` for. |
787 * [resource] - Name of the resource to list `Constraints` for. | 778 /// Value must have pattern "^organizations/[^/]+$". |
788 * Value must have pattern "^organizations/[^/]+$". | 779 /// |
789 * | 780 /// Completes with a [ListAvailableOrgPolicyConstraintsResponse]. |
790 * Completes with a [ListAvailableOrgPolicyConstraintsResponse]. | 781 /// |
791 * | 782 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
792 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 783 /// an error. |
793 * error. | 784 /// |
794 * | 785 /// If the used [http.Client] completes with an error when making a REST |
795 * If the used [http.Client] completes with an error when making a REST call, | 786 /// call, this method will complete with the same error. |
796 * this method will complete with the same error. | 787 async.Future<ListAvailableOrgPolicyConstraintsResponse> |
797 */ | 788 listAvailableOrgPolicyConstraints( |
798 async.Future<ListAvailableOrgPolicyConstraintsResponse> listAvailableOrgPolicy
Constraints(ListAvailableOrgPolicyConstraintsRequest request, core.String resour
ce) { | 789 ListAvailableOrgPolicyConstraintsRequest request, |
| 790 core.String resource) { |
799 var _url = null; | 791 var _url = null; |
800 var _queryParams = new core.Map(); | 792 var _queryParams = new core.Map(); |
801 var _uploadMedia = null; | 793 var _uploadMedia = null; |
802 var _uploadOptions = null; | 794 var _uploadOptions = null; |
803 var _downloadOptions = commons.DownloadOptions.Metadata; | 795 var _downloadOptions = commons.DownloadOptions.Metadata; |
804 var _body = null; | 796 var _body = null; |
805 | 797 |
806 if (request != null) { | 798 if (request != null) { |
807 _body = convert.JSON.encode((request).toJson()); | 799 _body = convert.JSON.encode((request).toJson()); |
808 } | 800 } |
809 if (resource == null) { | 801 if (resource == null) { |
810 throw new core.ArgumentError("Parameter resource is required."); | 802 throw new core.ArgumentError("Parameter resource is required."); |
811 } | 803 } |
812 | 804 |
813 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listAv
ailableOrgPolicyConstraints'; | 805 _url = 'v1/' + |
| 806 commons.Escaper.ecapeVariableReserved('$resource') + |
| 807 ':listAvailableOrgPolicyConstraints'; |
814 | 808 |
815 var _response = _requester.request(_url, | 809 var _response = _requester.request(_url, "POST", |
816 "POST", | 810 body: _body, |
817 body: _body, | 811 queryParams: _queryParams, |
818 queryParams: _queryParams, | 812 uploadOptions: _uploadOptions, |
819 uploadOptions: _uploadOptions, | 813 uploadMedia: _uploadMedia, |
820 uploadMedia: _uploadMedia, | 814 downloadOptions: _downloadOptions); |
821 downloadOptions: _downloadOptions); | 815 return _response.then( |
822 return _response.then((data) => new ListAvailableOrgPolicyConstraintsRespons
e.fromJson(data)); | 816 (data) => new ListAvailableOrgPolicyConstraintsResponse.fromJson(data)); |
823 } | 817 } |
824 | 818 |
825 /** | 819 /// Lists all the `Policies` set for a particular resource. |
826 * Lists all the `Policies` set for a particular resource. | 820 /// |
827 * | 821 /// [request] - The metadata request object. |
828 * [request] - The metadata request object. | 822 /// |
829 * | 823 /// Request parameters: |
830 * Request parameters: | 824 /// |
831 * | 825 /// [resource] - Name of the resource to list Policies for. |
832 * [resource] - Name of the resource to list Policies for. | 826 /// Value must have pattern "^organizations/[^/]+$". |
833 * Value must have pattern "^organizations/[^/]+$". | 827 /// |
834 * | 828 /// Completes with a [ListOrgPoliciesResponse]. |
835 * Completes with a [ListOrgPoliciesResponse]. | 829 /// |
836 * | 830 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
837 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 831 /// an error. |
838 * error. | 832 /// |
839 * | 833 /// If the used [http.Client] completes with an error when making a REST |
840 * If the used [http.Client] completes with an error when making a REST call, | 834 /// call, this method will complete with the same error. |
841 * this method will complete with the same error. | 835 async.Future<ListOrgPoliciesResponse> listOrgPolicies( |
842 */ | 836 ListOrgPoliciesRequest request, core.String resource) { |
843 async.Future<ListOrgPoliciesResponse> listOrgPolicies(ListOrgPoliciesRequest r
equest, core.String resource) { | |
844 var _url = null; | 837 var _url = null; |
845 var _queryParams = new core.Map(); | 838 var _queryParams = new core.Map(); |
846 var _uploadMedia = null; | 839 var _uploadMedia = null; |
847 var _uploadOptions = null; | 840 var _uploadOptions = null; |
848 var _downloadOptions = commons.DownloadOptions.Metadata; | 841 var _downloadOptions = commons.DownloadOptions.Metadata; |
849 var _body = null; | 842 var _body = null; |
850 | 843 |
851 if (request != null) { | 844 if (request != null) { |
852 _body = convert.JSON.encode((request).toJson()); | 845 _body = convert.JSON.encode((request).toJson()); |
853 } | 846 } |
854 if (resource == null) { | 847 if (resource == null) { |
855 throw new core.ArgumentError("Parameter resource is required."); | 848 throw new core.ArgumentError("Parameter resource is required."); |
856 } | 849 } |
857 | 850 |
858 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listOr
gPolicies'; | 851 _url = 'v1/' + |
| 852 commons.Escaper.ecapeVariableReserved('$resource') + |
| 853 ':listOrgPolicies'; |
859 | 854 |
860 var _response = _requester.request(_url, | 855 var _response = _requester.request(_url, "POST", |
861 "POST", | 856 body: _body, |
862 body: _body, | 857 queryParams: _queryParams, |
863 queryParams: _queryParams, | 858 uploadOptions: _uploadOptions, |
864 uploadOptions: _uploadOptions, | 859 uploadMedia: _uploadMedia, |
865 uploadMedia: _uploadMedia, | 860 downloadOptions: _downloadOptions); |
866 downloadOptions: _downloadOptions); | |
867 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); | 861 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); |
868 } | 862 } |
869 | 863 |
870 /** | 864 /// Searches Organization resources that are visible to the user and satisfy |
871 * Searches Organization resources that are visible to the user and satisfy | 865 /// the specified filter. This method returns Organizations in an unspecified |
872 * the specified filter. This method returns Organizations in an unspecified | 866 /// order. New Organizations do not necessarily appear at the end of the |
873 * order. New Organizations do not necessarily appear at the end of the | 867 /// results. |
874 * results. | 868 /// |
875 * | 869 /// Search will only return organizations on which the user has the |
876 * Search will only return organizations on which the user has the permission | 870 /// permission |
877 * `resourcemanager.organizations.get` | 871 /// `resourcemanager.organizations.get` |
878 * | 872 /// |
879 * [request] - The metadata request object. | 873 /// [request] - The metadata request object. |
880 * | 874 /// |
881 * Request parameters: | 875 /// Request parameters: |
882 * | 876 /// |
883 * Completes with a [SearchOrganizationsResponse]. | 877 /// Completes with a [SearchOrganizationsResponse]. |
884 * | 878 /// |
885 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 879 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
886 * error. | 880 /// an error. |
887 * | 881 /// |
888 * If the used [http.Client] completes with an error when making a REST call, | 882 /// If the used [http.Client] completes with an error when making a REST |
889 * this method will complete with the same error. | 883 /// call, this method will complete with the same error. |
890 */ | 884 async.Future<SearchOrganizationsResponse> search( |
891 async.Future<SearchOrganizationsResponse> search(SearchOrganizationsRequest re
quest) { | 885 SearchOrganizationsRequest request) { |
892 var _url = null; | 886 var _url = null; |
893 var _queryParams = new core.Map(); | 887 var _queryParams = new core.Map(); |
894 var _uploadMedia = null; | 888 var _uploadMedia = null; |
895 var _uploadOptions = null; | 889 var _uploadOptions = null; |
896 var _downloadOptions = commons.DownloadOptions.Metadata; | 890 var _downloadOptions = commons.DownloadOptions.Metadata; |
897 var _body = null; | 891 var _body = null; |
898 | 892 |
899 if (request != null) { | 893 if (request != null) { |
900 _body = convert.JSON.encode((request).toJson()); | 894 _body = convert.JSON.encode((request).toJson()); |
901 } | 895 } |
902 | 896 |
903 _url = 'v1/organizations:search'; | 897 _url = 'v1/organizations:search'; |
904 | 898 |
905 var _response = _requester.request(_url, | 899 var _response = _requester.request(_url, "POST", |
906 "POST", | 900 body: _body, |
907 body: _body, | 901 queryParams: _queryParams, |
908 queryParams: _queryParams, | 902 uploadOptions: _uploadOptions, |
909 uploadOptions: _uploadOptions, | 903 uploadMedia: _uploadMedia, |
910 uploadMedia: _uploadMedia, | 904 downloadOptions: _downloadOptions); |
911 downloadOptions: _downloadOptions); | 905 return _response |
912 return _response.then((data) => new SearchOrganizationsResponse.fromJson(dat
a)); | 906 .then((data) => new SearchOrganizationsResponse.fromJson(data)); |
913 } | 907 } |
914 | 908 |
915 /** | 909 /// Sets the access control policy on an Organization resource. Replaces any |
916 * Sets the access control policy on an Organization resource. Replaces any | 910 /// existing policy. The `resource` field should be the organization's |
917 * existing policy. The `resource` field should be the organization's resource | 911 /// resource |
918 * name, e.g. "organizations/123". | 912 /// name, e.g. "organizations/123". |
919 * | 913 /// |
920 * Authorization requires the Google IAM permission | 914 /// Authorization requires the Google IAM permission |
921 * `resourcemanager.organizations.setIamPolicy` on the specified organization | 915 /// `resourcemanager.organizations.setIamPolicy` on the specified |
922 * | 916 /// organization |
923 * [request] - The metadata request object. | 917 /// |
924 * | 918 /// [request] - The metadata request object. |
925 * Request parameters: | 919 /// |
926 * | 920 /// Request parameters: |
927 * [resource] - REQUIRED: The resource for which the policy is being | 921 /// |
928 * specified. | 922 /// [resource] - REQUIRED: The resource for which the policy is being |
929 * See the operation documentation for the appropriate value for this field. | 923 /// specified. |
930 * Value must have pattern "^organizations/[^/]+$". | 924 /// See the operation documentation for the appropriate value for this field. |
931 * | 925 /// Value must have pattern "^organizations/[^/]+$". |
932 * Completes with a [Policy]. | 926 /// |
933 * | 927 /// Completes with a [Policy]. |
934 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 928 /// |
935 * error. | 929 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
936 * | 930 /// an error. |
937 * If the used [http.Client] completes with an error when making a REST call, | 931 /// |
938 * this method will complete with the same error. | 932 /// If the used [http.Client] completes with an error when making a REST |
939 */ | 933 /// call, this method will complete with the same error. |
940 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { | 934 async.Future<Policy> setIamPolicy( |
| 935 SetIamPolicyRequest request, core.String resource) { |
941 var _url = null; | 936 var _url = null; |
942 var _queryParams = new core.Map(); | 937 var _queryParams = new core.Map(); |
943 var _uploadMedia = null; | 938 var _uploadMedia = null; |
944 var _uploadOptions = null; | 939 var _uploadOptions = null; |
945 var _downloadOptions = commons.DownloadOptions.Metadata; | 940 var _downloadOptions = commons.DownloadOptions.Metadata; |
946 var _body = null; | 941 var _body = null; |
947 | 942 |
948 if (request != null) { | 943 if (request != null) { |
949 _body = convert.JSON.encode((request).toJson()); | 944 _body = convert.JSON.encode((request).toJson()); |
950 } | 945 } |
951 if (resource == null) { | 946 if (resource == null) { |
952 throw new core.ArgumentError("Parameter resource is required."); | 947 throw new core.ArgumentError("Parameter resource is required."); |
953 } | 948 } |
954 | 949 |
955 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; | 950 _url = 'v1/' + |
| 951 commons.Escaper.ecapeVariableReserved('$resource') + |
| 952 ':setIamPolicy'; |
956 | 953 |
957 var _response = _requester.request(_url, | 954 var _response = _requester.request(_url, "POST", |
958 "POST", | 955 body: _body, |
959 body: _body, | 956 queryParams: _queryParams, |
960 queryParams: _queryParams, | 957 uploadOptions: _uploadOptions, |
961 uploadOptions: _uploadOptions, | 958 uploadMedia: _uploadMedia, |
962 uploadMedia: _uploadMedia, | 959 downloadOptions: _downloadOptions); |
963 downloadOptions: _downloadOptions); | |
964 return _response.then((data) => new Policy.fromJson(data)); | 960 return _response.then((data) => new Policy.fromJson(data)); |
965 } | 961 } |
966 | 962 |
967 /** | 963 /// Updates the specified `Policy` on the resource. Creates a new `Policy` |
968 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | 964 /// for |
969 * that `Constraint` on the resource if one does not exist. | 965 /// that `Constraint` on the resource if one does not exist. |
970 * | 966 /// |
971 * Not supplying an `etag` on the request `Policy` results in an unconditional | 967 /// Not supplying an `etag` on the request `Policy` results in an |
972 * write of the `Policy`. | 968 /// unconditional |
973 * | 969 /// write of the `Policy`. |
974 * [request] - The metadata request object. | 970 /// |
975 * | 971 /// [request] - The metadata request object. |
976 * Request parameters: | 972 /// |
977 * | 973 /// Request parameters: |
978 * [resource] - Resource name of the resource to attach the `Policy`. | 974 /// |
979 * Value must have pattern "^organizations/[^/]+$". | 975 /// [resource] - Resource name of the resource to attach the `Policy`. |
980 * | 976 /// Value must have pattern "^organizations/[^/]+$". |
981 * Completes with a [OrgPolicy]. | 977 /// |
982 * | 978 /// Completes with a [OrgPolicy]. |
983 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 979 /// |
984 * error. | 980 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
985 * | 981 /// an error. |
986 * If the used [http.Client] completes with an error when making a REST call, | 982 /// |
987 * this method will complete with the same error. | 983 /// If the used [http.Client] completes with an error when making a REST |
988 */ | 984 /// call, this method will complete with the same error. |
989 async.Future<OrgPolicy> setOrgPolicy(SetOrgPolicyRequest request, core.String
resource) { | 985 async.Future<OrgPolicy> setOrgPolicy( |
| 986 SetOrgPolicyRequest request, core.String resource) { |
990 var _url = null; | 987 var _url = null; |
991 var _queryParams = new core.Map(); | 988 var _queryParams = new core.Map(); |
992 var _uploadMedia = null; | 989 var _uploadMedia = null; |
993 var _uploadOptions = null; | 990 var _uploadOptions = null; |
994 var _downloadOptions = commons.DownloadOptions.Metadata; | 991 var _downloadOptions = commons.DownloadOptions.Metadata; |
995 var _body = null; | 992 var _body = null; |
996 | 993 |
997 if (request != null) { | 994 if (request != null) { |
998 _body = convert.JSON.encode((request).toJson()); | 995 _body = convert.JSON.encode((request).toJson()); |
999 } | 996 } |
1000 if (resource == null) { | 997 if (resource == null) { |
1001 throw new core.ArgumentError("Parameter resource is required."); | 998 throw new core.ArgumentError("Parameter resource is required."); |
1002 } | 999 } |
1003 | 1000 |
1004 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
Policy'; | 1001 _url = 'v1/' + |
| 1002 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1003 ':setOrgPolicy'; |
1005 | 1004 |
1006 var _response = _requester.request(_url, | 1005 var _response = _requester.request(_url, "POST", |
1007 "POST", | 1006 body: _body, |
1008 body: _body, | 1007 queryParams: _queryParams, |
1009 queryParams: _queryParams, | 1008 uploadOptions: _uploadOptions, |
1010 uploadOptions: _uploadOptions, | 1009 uploadMedia: _uploadMedia, |
1011 uploadMedia: _uploadMedia, | 1010 downloadOptions: _downloadOptions); |
1012 downloadOptions: _downloadOptions); | |
1013 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1011 return _response.then((data) => new OrgPolicy.fromJson(data)); |
1014 } | 1012 } |
1015 | 1013 |
1016 /** | 1014 /// Returns permissions that a caller has on the specified Organization. |
1017 * Returns permissions that a caller has on the specified Organization. | 1015 /// The `resource` field should be the organization's resource name, |
1018 * The `resource` field should be the organization's resource name, | 1016 /// e.g. "organizations/123". |
1019 * e.g. "organizations/123". | 1017 /// |
1020 * | 1018 /// There are no permissions required for making this API call. |
1021 * There are no permissions required for making this API call. | 1019 /// |
1022 * | 1020 /// [request] - The metadata request object. |
1023 * [request] - The metadata request object. | 1021 /// |
1024 * | 1022 /// Request parameters: |
1025 * Request parameters: | 1023 /// |
1026 * | 1024 /// [resource] - REQUIRED: The resource for which the policy detail is being |
1027 * [resource] - REQUIRED: The resource for which the policy detail is being | 1025 /// requested. |
1028 * requested. | 1026 /// See the operation documentation for the appropriate value for this field. |
1029 * See the operation documentation for the appropriate value for this field. | 1027 /// Value must have pattern "^organizations/[^/]+$". |
1030 * Value must have pattern "^organizations/[^/]+$". | 1028 /// |
1031 * | 1029 /// Completes with a [TestIamPermissionsResponse]. |
1032 * Completes with a [TestIamPermissionsResponse]. | 1030 /// |
1033 * | 1031 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1034 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1032 /// an error. |
1035 * error. | 1033 /// |
1036 * | 1034 /// If the used [http.Client] completes with an error when making a REST |
1037 * If the used [http.Client] completes with an error when making a REST call, | 1035 /// call, this method will complete with the same error. |
1038 * this method will complete with the same error. | 1036 async.Future<TestIamPermissionsResponse> testIamPermissions( |
1039 */ | 1037 TestIamPermissionsRequest request, core.String resource) { |
1040 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { | |
1041 var _url = null; | 1038 var _url = null; |
1042 var _queryParams = new core.Map(); | 1039 var _queryParams = new core.Map(); |
1043 var _uploadMedia = null; | 1040 var _uploadMedia = null; |
1044 var _uploadOptions = null; | 1041 var _uploadOptions = null; |
1045 var _downloadOptions = commons.DownloadOptions.Metadata; | 1042 var _downloadOptions = commons.DownloadOptions.Metadata; |
1046 var _body = null; | 1043 var _body = null; |
1047 | 1044 |
1048 if (request != null) { | 1045 if (request != null) { |
1049 _body = convert.JSON.encode((request).toJson()); | 1046 _body = convert.JSON.encode((request).toJson()); |
1050 } | 1047 } |
1051 if (resource == null) { | 1048 if (resource == null) { |
1052 throw new core.ArgumentError("Parameter resource is required."); | 1049 throw new core.ArgumentError("Parameter resource is required."); |
1053 } | 1050 } |
1054 | 1051 |
1055 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; | 1052 _url = 'v1/' + |
| 1053 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1054 ':testIamPermissions'; |
1056 | 1055 |
1057 var _response = _requester.request(_url, | 1056 var _response = _requester.request(_url, "POST", |
1058 "POST", | 1057 body: _body, |
1059 body: _body, | 1058 queryParams: _queryParams, |
1060 queryParams: _queryParams, | 1059 uploadOptions: _uploadOptions, |
1061 uploadOptions: _uploadOptions, | 1060 uploadMedia: _uploadMedia, |
1062 uploadMedia: _uploadMedia, | 1061 downloadOptions: _downloadOptions); |
1063 downloadOptions: _downloadOptions); | 1062 return _response |
1064 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 1063 .then((data) => new TestIamPermissionsResponse.fromJson(data)); |
1065 } | 1064 } |
1066 | |
1067 } | 1065 } |
1068 | 1066 |
1069 | |
1070 class ProjectsResourceApi { | 1067 class ProjectsResourceApi { |
1071 final commons.ApiRequester _requester; | 1068 final commons.ApiRequester _requester; |
1072 | 1069 |
1073 ProjectsResourceApi(commons.ApiRequester client) : | 1070 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
1074 _requester = client; | |
1075 | 1071 |
1076 /** | 1072 /// Clears a `Policy` from a resource. |
1077 * Clears a `Policy` from a resource. | 1073 /// |
1078 * | 1074 /// [request] - The metadata request object. |
1079 * [request] - The metadata request object. | 1075 /// |
1080 * | 1076 /// Request parameters: |
1081 * Request parameters: | 1077 /// |
1082 * | 1078 /// [resource] - Name of the resource for the `Policy` to clear. |
1083 * [resource] - Name of the resource for the `Policy` to clear. | 1079 /// Value must have pattern "^projects/[^/]+$". |
1084 * Value must have pattern "^projects/[^/]+$". | 1080 /// |
1085 * | 1081 /// Completes with a [Empty]. |
1086 * Completes with a [Empty]. | 1082 /// |
1087 * | 1083 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1088 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1084 /// an error. |
1089 * error. | 1085 /// |
1090 * | 1086 /// 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, | 1087 /// call, this method will complete with the same error. |
1092 * this method will complete with the same error. | 1088 async.Future<Empty> clearOrgPolicy( |
1093 */ | 1089 ClearOrgPolicyRequest request, core.String resource) { |
1094 async.Future<Empty> clearOrgPolicy(ClearOrgPolicyRequest request, core.String
resource) { | |
1095 var _url = null; | 1090 var _url = null; |
1096 var _queryParams = new core.Map(); | 1091 var _queryParams = new core.Map(); |
1097 var _uploadMedia = null; | 1092 var _uploadMedia = null; |
1098 var _uploadOptions = null; | 1093 var _uploadOptions = null; |
1099 var _downloadOptions = commons.DownloadOptions.Metadata; | 1094 var _downloadOptions = commons.DownloadOptions.Metadata; |
1100 var _body = null; | 1095 var _body = null; |
1101 | 1096 |
1102 if (request != null) { | 1097 if (request != null) { |
1103 _body = convert.JSON.encode((request).toJson()); | 1098 _body = convert.JSON.encode((request).toJson()); |
1104 } | 1099 } |
1105 if (resource == null) { | 1100 if (resource == null) { |
1106 throw new core.ArgumentError("Parameter resource is required."); | 1101 throw new core.ArgumentError("Parameter resource is required."); |
1107 } | 1102 } |
1108 | 1103 |
1109 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicy'; | 1104 _url = 'v1/' + |
| 1105 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1106 ':clearOrgPolicy'; |
1110 | 1107 |
1111 var _response = _requester.request(_url, | 1108 var _response = _requester.request(_url, "POST", |
1112 "POST", | 1109 body: _body, |
1113 body: _body, | 1110 queryParams: _queryParams, |
1114 queryParams: _queryParams, | 1111 uploadOptions: _uploadOptions, |
1115 uploadOptions: _uploadOptions, | 1112 uploadMedia: _uploadMedia, |
1116 uploadMedia: _uploadMedia, | 1113 downloadOptions: _downloadOptions); |
1117 downloadOptions: _downloadOptions); | |
1118 return _response.then((data) => new Empty.fromJson(data)); | 1114 return _response.then((data) => new Empty.fromJson(data)); |
1119 } | 1115 } |
1120 | 1116 |
1121 /** | 1117 /// Request that a new Project be created. The result is an Operation which |
1122 * Request that a new Project be created. The result is an Operation which | 1118 /// can be used to track the creation process. It is automatically deleted |
1123 * can be used to track the creation process. It is automatically deleted | 1119 /// after a few hours, so there is no need to call DeleteOperation. |
1124 * after a few hours, so there is no need to call DeleteOperation. | 1120 /// |
1125 * | 1121 /// Our SLO permits Project creation to take up to 30 seconds at the 90th |
1126 * Our SLO permits Project creation to take up to 30 seconds at the 90th | 1122 /// percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile |
1127 * percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile | 1123 /// latency. 95th percentile latency is around 11 seconds. We recommend |
1128 * latency. 95th percentile latency is around 11 seconds. We recommend | 1124 /// polling at the 5th second with an exponential backoff. |
1129 * polling at the 5th second with an exponential backoff. | 1125 /// |
1130 * | 1126 /// Authorization requires the Google IAM permission |
1131 * Authorization requires the Google IAM permission | 1127 /// `resourcemanager.projects.create` on the specified parent for the new |
1132 * `resourcemanager.projects.create` on the specified parent for the new | 1128 /// project. |
1133 * project. | 1129 /// |
1134 * | 1130 /// [request] - The metadata request object. |
1135 * [request] - The metadata request object. | 1131 /// |
1136 * | 1132 /// Request parameters: |
1137 * Request parameters: | 1133 /// |
1138 * | 1134 /// Completes with a [Operation]. |
1139 * Completes with a [Operation]. | 1135 /// |
1140 * | 1136 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1141 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1137 /// an error. |
1142 * error. | 1138 /// |
1143 * | 1139 /// If the used [http.Client] completes with an error when making a REST |
1144 * If the used [http.Client] completes with an error when making a REST call, | 1140 /// call, this method will complete with the same error. |
1145 * this method will complete with the same error. | |
1146 */ | |
1147 async.Future<Operation> create(Project request) { | 1141 async.Future<Operation> create(Project request) { |
1148 var _url = null; | 1142 var _url = null; |
1149 var _queryParams = new core.Map(); | 1143 var _queryParams = new core.Map(); |
1150 var _uploadMedia = null; | 1144 var _uploadMedia = null; |
1151 var _uploadOptions = null; | 1145 var _uploadOptions = null; |
1152 var _downloadOptions = commons.DownloadOptions.Metadata; | 1146 var _downloadOptions = commons.DownloadOptions.Metadata; |
1153 var _body = null; | 1147 var _body = null; |
1154 | 1148 |
1155 if (request != null) { | 1149 if (request != null) { |
1156 _body = convert.JSON.encode((request).toJson()); | 1150 _body = convert.JSON.encode((request).toJson()); |
1157 } | 1151 } |
1158 | 1152 |
1159 _url = 'v1/projects'; | 1153 _url = 'v1/projects'; |
1160 | 1154 |
1161 var _response = _requester.request(_url, | 1155 var _response = _requester.request(_url, "POST", |
1162 "POST", | 1156 body: _body, |
1163 body: _body, | 1157 queryParams: _queryParams, |
1164 queryParams: _queryParams, | 1158 uploadOptions: _uploadOptions, |
1165 uploadOptions: _uploadOptions, | 1159 uploadMedia: _uploadMedia, |
1166 uploadMedia: _uploadMedia, | 1160 downloadOptions: _downloadOptions); |
1167 downloadOptions: _downloadOptions); | |
1168 return _response.then((data) => new Operation.fromJson(data)); | 1161 return _response.then((data) => new Operation.fromJson(data)); |
1169 } | 1162 } |
1170 | 1163 |
1171 /** | 1164 /// Marks the Project identified by the specified |
1172 * Marks the Project identified by the specified | 1165 /// `project_id` (for example, `my-project-123`) for deletion. |
1173 * `project_id` (for example, `my-project-123`) for deletion. | 1166 /// This method will only affect the Project if the following criteria are |
1174 * This method will only affect the Project if the following criteria are met: | 1167 /// met: |
1175 * | 1168 /// |
1176 * + The Project does not have a billing account associated with it. | 1169 /// + The Project does not have a billing account associated with it. |
1177 * + The Project has a lifecycle state of | 1170 /// + The Project has a lifecycle state of |
1178 * ACTIVE. | 1171 /// ACTIVE. |
1179 * | 1172 /// |
1180 * This method changes the Project's lifecycle state from | 1173 /// This method changes the Project's lifecycle state from |
1181 * ACTIVE | 1174 /// ACTIVE |
1182 * to DELETE_REQUESTED. | 1175 /// to DELETE_REQUESTED. |
1183 * The deletion starts at an unspecified time, | 1176 /// The deletion starts at an unspecified time, |
1184 * at which point the Project is no longer accessible. | 1177 /// at which point the Project is no longer accessible. |
1185 * | 1178 /// |
1186 * Until the deletion completes, you can check the lifecycle state | 1179 /// Until the deletion completes, you can check the lifecycle state |
1187 * checked by retrieving the Project with GetProject, | 1180 /// checked by retrieving the Project with GetProject, |
1188 * and the Project remains visible to ListProjects. | 1181 /// and the Project remains visible to ListProjects. |
1189 * However, you cannot update the project. | 1182 /// However, you cannot update the project. |
1190 * | 1183 /// |
1191 * After the deletion completes, the Project is not retrievable by | 1184 /// After the deletion completes, the Project is not retrievable by |
1192 * the GetProject and | 1185 /// the GetProject and |
1193 * ListProjects methods. | 1186 /// ListProjects methods. |
1194 * | 1187 /// |
1195 * The caller must have modify permissions for this Project. | 1188 /// The caller must have modify permissions for this Project. |
1196 * | 1189 /// |
1197 * Request parameters: | 1190 /// Request parameters: |
1198 * | 1191 /// |
1199 * [projectId] - The Project ID (for example, `foo-bar-123`). | 1192 /// [projectId] - The Project ID (for example, `foo-bar-123`). |
1200 * | 1193 /// |
1201 * Required. | 1194 /// Required. |
1202 * | 1195 /// |
1203 * Completes with a [Empty]. | 1196 /// Completes with a [Empty]. |
1204 * | 1197 /// |
1205 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1198 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1206 * error. | 1199 /// an error. |
1207 * | 1200 /// |
1208 * If the used [http.Client] completes with an error when making a REST call, | 1201 /// If the used [http.Client] completes with an error when making a REST |
1209 * this method will complete with the same error. | 1202 /// call, this method will complete with the same error. |
1210 */ | |
1211 async.Future<Empty> delete(core.String projectId) { | 1203 async.Future<Empty> delete(core.String projectId) { |
1212 var _url = null; | 1204 var _url = null; |
1213 var _queryParams = new core.Map(); | 1205 var _queryParams = new core.Map(); |
1214 var _uploadMedia = null; | 1206 var _uploadMedia = null; |
1215 var _uploadOptions = null; | 1207 var _uploadOptions = null; |
1216 var _downloadOptions = commons.DownloadOptions.Metadata; | 1208 var _downloadOptions = commons.DownloadOptions.Metadata; |
1217 var _body = null; | 1209 var _body = null; |
1218 | 1210 |
1219 if (projectId == null) { | 1211 if (projectId == null) { |
1220 throw new core.ArgumentError("Parameter projectId is required."); | 1212 throw new core.ArgumentError("Parameter projectId is required."); |
1221 } | 1213 } |
1222 | 1214 |
1223 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); | 1215 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); |
1224 | 1216 |
1225 var _response = _requester.request(_url, | 1217 var _response = _requester.request(_url, "DELETE", |
1226 "DELETE", | 1218 body: _body, |
1227 body: _body, | 1219 queryParams: _queryParams, |
1228 queryParams: _queryParams, | 1220 uploadOptions: _uploadOptions, |
1229 uploadOptions: _uploadOptions, | 1221 uploadMedia: _uploadMedia, |
1230 uploadMedia: _uploadMedia, | 1222 downloadOptions: _downloadOptions); |
1231 downloadOptions: _downloadOptions); | |
1232 return _response.then((data) => new Empty.fromJson(data)); | 1223 return _response.then((data) => new Empty.fromJson(data)); |
1233 } | 1224 } |
1234 | 1225 |
1235 /** | 1226 /// Retrieves the Project identified by the specified |
1236 * Retrieves the Project identified by the specified | 1227 /// `project_id` (for example, `my-project-123`). |
1237 * `project_id` (for example, `my-project-123`). | 1228 /// |
1238 * | 1229 /// The caller must have read permissions for this Project. |
1239 * The caller must have read permissions for this Project. | 1230 /// |
1240 * | 1231 /// Request parameters: |
1241 * Request parameters: | 1232 /// |
1242 * | 1233 /// [projectId] - The Project ID (for example, `my-project-123`). |
1243 * [projectId] - The Project ID (for example, `my-project-123`). | 1234 /// |
1244 * | 1235 /// Required. |
1245 * Required. | 1236 /// |
1246 * | 1237 /// Completes with a [Project]. |
1247 * Completes with a [Project]. | 1238 /// |
1248 * | 1239 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1240 /// an error. |
1250 * error. | 1241 /// |
1251 * | 1242 /// If the used [http.Client] completes with an error when making a REST |
1252 * If the used [http.Client] completes with an error when making a REST call, | 1243 /// call, this method will complete with the same error. |
1253 * this method will complete with the same error. | |
1254 */ | |
1255 async.Future<Project> get(core.String projectId) { | 1244 async.Future<Project> get(core.String projectId) { |
1256 var _url = null; | 1245 var _url = null; |
1257 var _queryParams = new core.Map(); | 1246 var _queryParams = new core.Map(); |
1258 var _uploadMedia = null; | 1247 var _uploadMedia = null; |
1259 var _uploadOptions = null; | 1248 var _uploadOptions = null; |
1260 var _downloadOptions = commons.DownloadOptions.Metadata; | 1249 var _downloadOptions = commons.DownloadOptions.Metadata; |
1261 var _body = null; | 1250 var _body = null; |
1262 | 1251 |
1263 if (projectId == null) { | 1252 if (projectId == null) { |
1264 throw new core.ArgumentError("Parameter projectId is required."); | 1253 throw new core.ArgumentError("Parameter projectId is required."); |
1265 } | 1254 } |
1266 | 1255 |
1267 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); | 1256 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); |
1268 | 1257 |
1269 var _response = _requester.request(_url, | 1258 var _response = _requester.request(_url, "GET", |
1270 "GET", | 1259 body: _body, |
1271 body: _body, | 1260 queryParams: _queryParams, |
1272 queryParams: _queryParams, | 1261 uploadOptions: _uploadOptions, |
1273 uploadOptions: _uploadOptions, | 1262 uploadMedia: _uploadMedia, |
1274 uploadMedia: _uploadMedia, | 1263 downloadOptions: _downloadOptions); |
1275 downloadOptions: _downloadOptions); | |
1276 return _response.then((data) => new Project.fromJson(data)); | 1264 return _response.then((data) => new Project.fromJson(data)); |
1277 } | 1265 } |
1278 | 1266 |
1279 /** | 1267 /// Gets a list of ancestors in the resource hierarchy for the Project |
1280 * Gets a list of ancestors in the resource hierarchy for the Project | 1268 /// identified by the specified `project_id` (for example, `my-project-123`). |
1281 * identified by the specified `project_id` (for example, `my-project-123`). | 1269 /// |
1282 * | 1270 /// The caller must have read permissions for this Project. |
1283 * The caller must have read permissions for this Project. | 1271 /// |
1284 * | 1272 /// [request] - The metadata request object. |
1285 * [request] - The metadata request object. | 1273 /// |
1286 * | 1274 /// Request parameters: |
1287 * Request parameters: | 1275 /// |
1288 * | 1276 /// [projectId] - The Project ID (for example, `my-project-123`). |
1289 * [projectId] - The Project ID (for example, `my-project-123`). | 1277 /// |
1290 * | 1278 /// Required. |
1291 * Required. | 1279 /// |
1292 * | 1280 /// Completes with a [GetAncestryResponse]. |
1293 * Completes with a [GetAncestryResponse]. | 1281 /// |
1294 * | 1282 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1295 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1283 /// an error. |
1296 * error. | 1284 /// |
1297 * | 1285 /// If the used [http.Client] completes with an error when making a REST |
1298 * If the used [http.Client] completes with an error when making a REST call, | 1286 /// call, this method will complete with the same error. |
1299 * this method will complete with the same error. | 1287 async.Future<GetAncestryResponse> getAncestry( |
1300 */ | 1288 GetAncestryRequest request, core.String projectId) { |
1301 async.Future<GetAncestryResponse> getAncestry(GetAncestryRequest request, core
.String projectId) { | |
1302 var _url = null; | 1289 var _url = null; |
1303 var _queryParams = new core.Map(); | 1290 var _queryParams = new core.Map(); |
1304 var _uploadMedia = null; | 1291 var _uploadMedia = null; |
1305 var _uploadOptions = null; | 1292 var _uploadOptions = null; |
1306 var _downloadOptions = commons.DownloadOptions.Metadata; | 1293 var _downloadOptions = commons.DownloadOptions.Metadata; |
1307 var _body = null; | 1294 var _body = null; |
1308 | 1295 |
1309 if (request != null) { | 1296 if (request != null) { |
1310 _body = convert.JSON.encode((request).toJson()); | 1297 _body = convert.JSON.encode((request).toJson()); |
1311 } | 1298 } |
1312 if (projectId == null) { | 1299 if (projectId == null) { |
1313 throw new core.ArgumentError("Parameter projectId is required."); | 1300 throw new core.ArgumentError("Parameter projectId is required."); |
1314 } | 1301 } |
1315 | 1302 |
1316 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':getA
ncestry'; | 1303 _url = 'v1/projects/' + |
| 1304 commons.Escaper.ecapeVariable('$projectId') + |
| 1305 ':getAncestry'; |
1317 | 1306 |
1318 var _response = _requester.request(_url, | 1307 var _response = _requester.request(_url, "POST", |
1319 "POST", | 1308 body: _body, |
1320 body: _body, | 1309 queryParams: _queryParams, |
1321 queryParams: _queryParams, | 1310 uploadOptions: _uploadOptions, |
1322 uploadOptions: _uploadOptions, | 1311 uploadMedia: _uploadMedia, |
1323 uploadMedia: _uploadMedia, | 1312 downloadOptions: _downloadOptions); |
1324 downloadOptions: _downloadOptions); | |
1325 return _response.then((data) => new GetAncestryResponse.fromJson(data)); | 1313 return _response.then((data) => new GetAncestryResponse.fromJson(data)); |
1326 } | 1314 } |
1327 | 1315 |
1328 /** | 1316 /// Gets the effective `Policy` on a resource. This is the result of merging |
1329 * Gets the effective `Policy` on a resource. This is the result of merging | 1317 /// `Policies` in the resource hierarchy. The returned `Policy` will not have |
1330 * `Policies` in the resource hierarchy. The returned `Policy` will not have | 1318 /// an `etag`set because it is a computed `Policy` across multiple resources. |
1331 * an `etag`set because it is a computed `Policy` across multiple resources. | 1319 /// |
1332 * | 1320 /// [request] - The metadata request object. |
1333 * [request] - The metadata request object. | 1321 /// |
1334 * | 1322 /// Request parameters: |
1335 * Request parameters: | 1323 /// |
1336 * | 1324 /// [resource] - The name of the resource to start computing the effective |
1337 * [resource] - The name of the resource to start computing the effective | 1325 /// `Policy`. |
1338 * `Policy`. | 1326 /// Value must have pattern "^projects/[^/]+$". |
1339 * Value must have pattern "^projects/[^/]+$". | 1327 /// |
1340 * | 1328 /// Completes with a [OrgPolicy]. |
1341 * Completes with a [OrgPolicy]. | 1329 /// |
1342 * | 1330 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1331 /// an error. |
1344 * error. | 1332 /// |
1345 * | 1333 /// If the used [http.Client] completes with an error when making a REST |
1346 * If the used [http.Client] completes with an error when making a REST call, | 1334 /// call, this method will complete with the same error. |
1347 * this method will complete with the same error. | 1335 async.Future<OrgPolicy> getEffectiveOrgPolicy( |
1348 */ | 1336 GetEffectiveOrgPolicyRequest request, core.String resource) { |
1349 async.Future<OrgPolicy> getEffectiveOrgPolicy(GetEffectiveOrgPolicyRequest req
uest, core.String resource) { | |
1350 var _url = null; | 1337 var _url = null; |
1351 var _queryParams = new core.Map(); | 1338 var _queryParams = new core.Map(); |
1352 var _uploadMedia = null; | 1339 var _uploadMedia = null; |
1353 var _uploadOptions = null; | 1340 var _uploadOptions = null; |
1354 var _downloadOptions = commons.DownloadOptions.Metadata; | 1341 var _downloadOptions = commons.DownloadOptions.Metadata; |
1355 var _body = null; | 1342 var _body = null; |
1356 | 1343 |
1357 if (request != null) { | 1344 if (request != null) { |
1358 _body = convert.JSON.encode((request).toJson()); | 1345 _body = convert.JSON.encode((request).toJson()); |
1359 } | 1346 } |
1360 if (resource == null) { | 1347 if (resource == null) { |
1361 throw new core.ArgumentError("Parameter resource is required."); | 1348 throw new core.ArgumentError("Parameter resource is required."); |
1362 } | 1349 } |
1363 | 1350 |
1364 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicy'; | 1351 _url = 'v1/' + |
| 1352 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1353 ':getEffectiveOrgPolicy'; |
1365 | 1354 |
1366 var _response = _requester.request(_url, | 1355 var _response = _requester.request(_url, "POST", |
1367 "POST", | 1356 body: _body, |
1368 body: _body, | 1357 queryParams: _queryParams, |
1369 queryParams: _queryParams, | 1358 uploadOptions: _uploadOptions, |
1370 uploadOptions: _uploadOptions, | 1359 uploadMedia: _uploadMedia, |
1371 uploadMedia: _uploadMedia, | 1360 downloadOptions: _downloadOptions); |
1372 downloadOptions: _downloadOptions); | |
1373 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1361 return _response.then((data) => new OrgPolicy.fromJson(data)); |
1374 } | 1362 } |
1375 | 1363 |
1376 /** | 1364 /// Returns the IAM access control policy for the specified Project. |
1377 * Returns the IAM access control policy for the specified Project. | 1365 /// Permission is denied if the policy or the resource does not exist. |
1378 * Permission is denied if the policy or the resource does not exist. | 1366 /// |
1379 * | 1367 /// Authorization requires the Google IAM permission |
1380 * Authorization requires the Google IAM permission | 1368 /// `resourcemanager.projects.getIamPolicy` on the project |
1381 * `resourcemanager.projects.getIamPolicy` on the project | 1369 /// |
1382 * | 1370 /// [request] - The metadata request object. |
1383 * [request] - The metadata request object. | 1371 /// |
1384 * | 1372 /// Request parameters: |
1385 * Request parameters: | 1373 /// |
1386 * | 1374 /// [resource] - REQUIRED: The resource for which the policy is being |
1387 * [resource] - REQUIRED: The resource for which the policy is being | 1375 /// requested. |
1388 * requested. | 1376 /// See the operation documentation for the appropriate value for this field. |
1389 * See the operation documentation for the appropriate value for this field. | 1377 /// |
1390 * | 1378 /// Completes with a [Policy]. |
1391 * Completes with a [Policy]. | 1379 /// |
1392 * | 1380 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1393 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1381 /// an error. |
1394 * error. | 1382 /// |
1395 * | 1383 /// If the used [http.Client] completes with an error when making a REST |
1396 * If the used [http.Client] completes with an error when making a REST call, | 1384 /// call, this method will complete with the same error. |
1397 * this method will complete with the same error. | 1385 async.Future<Policy> getIamPolicy( |
1398 */ | 1386 GetIamPolicyRequest request, core.String resource) { |
1399 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res
ource) { | |
1400 var _url = null; | 1387 var _url = null; |
1401 var _queryParams = new core.Map(); | 1388 var _queryParams = new core.Map(); |
1402 var _uploadMedia = null; | 1389 var _uploadMedia = null; |
1403 var _uploadOptions = null; | 1390 var _uploadOptions = null; |
1404 var _downloadOptions = commons.DownloadOptions.Metadata; | 1391 var _downloadOptions = commons.DownloadOptions.Metadata; |
1405 var _body = null; | 1392 var _body = null; |
1406 | 1393 |
1407 if (request != null) { | 1394 if (request != null) { |
1408 _body = convert.JSON.encode((request).toJson()); | 1395 _body = convert.JSON.encode((request).toJson()); |
1409 } | 1396 } |
1410 if (resource == null) { | 1397 if (resource == null) { |
1411 throw new core.ArgumentError("Parameter resource is required."); | 1398 throw new core.ArgumentError("Parameter resource is required."); |
1412 } | 1399 } |
1413 | 1400 |
1414 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':getIa
mPolicy'; | 1401 _url = 'v1/projects/' + |
| 1402 commons.Escaper.ecapeVariable('$resource') + |
| 1403 ':getIamPolicy'; |
1415 | 1404 |
1416 var _response = _requester.request(_url, | 1405 var _response = _requester.request(_url, "POST", |
1417 "POST", | 1406 body: _body, |
1418 body: _body, | 1407 queryParams: _queryParams, |
1419 queryParams: _queryParams, | 1408 uploadOptions: _uploadOptions, |
1420 uploadOptions: _uploadOptions, | 1409 uploadMedia: _uploadMedia, |
1421 uploadMedia: _uploadMedia, | 1410 downloadOptions: _downloadOptions); |
1422 downloadOptions: _downloadOptions); | |
1423 return _response.then((data) => new Policy.fromJson(data)); | 1411 return _response.then((data) => new Policy.fromJson(data)); |
1424 } | 1412 } |
1425 | 1413 |
1426 /** | 1414 /// Gets a `Policy` on a resource. |
1427 * Gets a `Policy` on a resource. | 1415 /// |
1428 * | 1416 /// If no `Policy` is set on the resource, a `Policy` is returned with |
1429 * If no `Policy` is set on the resource, a `Policy` is returned with default | 1417 /// default |
1430 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | 1418 /// values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The |
1431 * `etag` value can be used with `SetOrgPolicy()` to create or update a | 1419 /// `etag` value can be used with `SetOrgPolicy()` to create or update a |
1432 * `Policy` during read-modify-write. | 1420 /// `Policy` during read-modify-write. |
1433 * | 1421 /// |
1434 * [request] - The metadata request object. | 1422 /// [request] - The metadata request object. |
1435 * | 1423 /// |
1436 * Request parameters: | 1424 /// Request parameters: |
1437 * | 1425 /// |
1438 * [resource] - Name of the resource the `Policy` is set on. | 1426 /// [resource] - Name of the resource the `Policy` is set on. |
1439 * Value must have pattern "^projects/[^/]+$". | 1427 /// Value must have pattern "^projects/[^/]+$". |
1440 * | 1428 /// |
1441 * Completes with a [OrgPolicy]. | 1429 /// Completes with a [OrgPolicy]. |
1442 * | 1430 /// |
1443 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1431 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1444 * error. | 1432 /// an error. |
1445 * | 1433 /// |
1446 * If the used [http.Client] completes with an error when making a REST call, | 1434 /// If the used [http.Client] completes with an error when making a REST |
1447 * this method will complete with the same error. | 1435 /// call, this method will complete with the same error. |
1448 */ | 1436 async.Future<OrgPolicy> getOrgPolicy( |
1449 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String
resource) { | 1437 GetOrgPolicyRequest request, core.String resource) { |
1450 var _url = null; | 1438 var _url = null; |
1451 var _queryParams = new core.Map(); | 1439 var _queryParams = new core.Map(); |
1452 var _uploadMedia = null; | 1440 var _uploadMedia = null; |
1453 var _uploadOptions = null; | 1441 var _uploadOptions = null; |
1454 var _downloadOptions = commons.DownloadOptions.Metadata; | 1442 var _downloadOptions = commons.DownloadOptions.Metadata; |
1455 var _body = null; | 1443 var _body = null; |
1456 | 1444 |
1457 if (request != null) { | 1445 if (request != null) { |
1458 _body = convert.JSON.encode((request).toJson()); | 1446 _body = convert.JSON.encode((request).toJson()); |
1459 } | 1447 } |
1460 if (resource == null) { | 1448 if (resource == null) { |
1461 throw new core.ArgumentError("Parameter resource is required."); | 1449 throw new core.ArgumentError("Parameter resource is required."); |
1462 } | 1450 } |
1463 | 1451 |
1464 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
Policy'; | 1452 _url = 'v1/' + |
| 1453 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1454 ':getOrgPolicy'; |
1465 | 1455 |
1466 var _response = _requester.request(_url, | 1456 var _response = _requester.request(_url, "POST", |
1467 "POST", | 1457 body: _body, |
1468 body: _body, | 1458 queryParams: _queryParams, |
1469 queryParams: _queryParams, | 1459 uploadOptions: _uploadOptions, |
1470 uploadOptions: _uploadOptions, | 1460 uploadMedia: _uploadMedia, |
1471 uploadMedia: _uploadMedia, | 1461 downloadOptions: _downloadOptions); |
1472 downloadOptions: _downloadOptions); | |
1473 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1462 return _response.then((data) => new OrgPolicy.fromJson(data)); |
1474 } | 1463 } |
1475 | 1464 |
1476 /** | 1465 /// Lists Projects that are visible to the user and satisfy the |
1477 * Lists Projects that are visible to the user and satisfy the | 1466 /// specified filter. This method returns Projects in an unspecified order. |
1478 * specified filter. This method returns Projects in an unspecified order. | 1467 /// New Projects do not necessarily appear at the end of the list. |
1479 * New Projects do not necessarily appear at the end of the list. | 1468 /// |
1480 * | 1469 /// Request parameters: |
1481 * Request parameters: | 1470 /// |
1482 * | 1471 /// [filter] - An expression for filtering the results of the request. |
1483 * [pageSize] - The maximum number of Projects to return in the response. | 1472 /// Filter rules are |
1484 * The server can return fewer Projects than requested. | 1473 /// case insensitive. The fields eligible for filtering are: |
1485 * If unspecified, server picks an appropriate default. | 1474 /// |
1486 * | 1475 /// + `name` |
1487 * Optional. | 1476 /// + `id` |
1488 * | 1477 /// + <code>labels.<em>key</em></code> where *key* is the name of a label |
1489 * [filter] - An expression for filtering the results of the request. Filter | 1478 /// |
1490 * rules are | 1479 /// Some examples of using labels as filters: |
1491 * case insensitive. The fields eligible for filtering are: | 1480 /// |
1492 * | 1481 /// |Filter|Description| |
1493 * + `name` | 1482 /// |------|-----------| |
1494 * + `id` | 1483 /// |name:how*|The project's name starts with "how".| |
1495 * + <code>labels.<em>key</em></code> where *key* is the name of a label | 1484 /// |name:Howl|The project's name is `Howl` or `howl`.| |
1496 * | 1485 /// |name:HOWL|Equivalent to above.| |
1497 * Some examples of using labels as filters: | 1486 /// |NAME:howl|Equivalent to above.| |
1498 * | 1487 /// |labels.color:*|The project has the label `color`.| |
1499 * |Filter|Description| | 1488 /// |labels.color:red|The project's label `color` has the value `red`.| |
1500 * |------|-----------| | 1489 /// |labels.color:red labels.size:big|The project's label `color` has |
1501 * |name:how*|The project's name starts with "how".| | 1490 /// the value `red` and its label `size` has the value `big`. |
1502 * |name:Howl|The project's name is `Howl` or `howl`.| | 1491 /// |
1503 * |name:HOWL|Equivalent to above.| | 1492 /// If you specify a filter that has both `parent.type` and `parent.id`, then |
1504 * |NAME:howl|Equivalent to above.| | 1493 /// the `resourcemanager.projects.list` permission is checked on the parent. |
1505 * |labels.color:*|The project has the label `color`.| | 1494 /// If the user has this permission, all projects under the parent will be |
1506 * |labels.color:red|The project's label `color` has the value `red`.| | 1495 /// returned after remaining filters have been applied. If the user lacks |
1507 * |labels.color:red labels.size:big|The project's label `color` has the | 1496 /// this |
1508 * value `red` and its label `size` has the value `big`. | 1497 /// permission, then all projects for which the user has the |
1509 * | 1498 /// `resourcemanager.projects.get` permission will be returned after |
1510 * If you specify a filter that has both `parent.type` and `parent.id`, then | 1499 /// remaining |
1511 * the `resourcemanager.projects.list` permission is checked on the parent. | 1500 /// filters have been applied. If no filter is specified, the call will |
1512 * If the user has this permission, all projects under the parent will be | 1501 /// return |
1513 * returned after remaining filters have been applied. If the user lacks this | 1502 /// projects for which the user has `resourcemanager.projects.get` |
1514 * permission, then all projects for which the user has the | 1503 /// permissions. |
1515 * `resourcemanager.projects.get` permission will be returned after remaining | 1504 /// |
1516 * filters have been applied. If no filter is specified, the call will return | 1505 /// Optional. |
1517 * projects for which the user has `resourcemanager.projects.get` permissions. | 1506 /// |
1518 * | 1507 /// [pageToken] - A pagination token returned from a previous call to |
1519 * Optional. | 1508 /// ListProjects |
1520 * | 1509 /// that indicates from where listing should continue. |
1521 * [pageToken] - A pagination token returned from a previous call to | 1510 /// |
1522 * ListProjects | 1511 /// Optional. |
1523 * that indicates from where listing should continue. | 1512 /// |
1524 * | 1513 /// [pageSize] - The maximum number of Projects to return in the response. |
1525 * Optional. | 1514 /// The server can return fewer Projects than requested. |
1526 * | 1515 /// If unspecified, server picks an appropriate default. |
1527 * Completes with a [ListProjectsResponse]. | 1516 /// |
1528 * | 1517 /// Optional. |
1529 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1518 /// |
1530 * error. | 1519 /// Completes with a [ListProjectsResponse]. |
1531 * | 1520 /// |
1532 * If the used [http.Client] completes with an error when making a REST call, | 1521 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1533 * this method will complete with the same error. | 1522 /// an error. |
1534 */ | 1523 /// |
1535 async.Future<ListProjectsResponse> list({core.int pageSize, core.String filter
, core.String pageToken}) { | 1524 /// If the used [http.Client] completes with an error when making a REST |
| 1525 /// call, this method will complete with the same error. |
| 1526 async.Future<ListProjectsResponse> list( |
| 1527 {core.String filter, core.String pageToken, core.int pageSize}) { |
1536 var _url = null; | 1528 var _url = null; |
1537 var _queryParams = new core.Map(); | 1529 var _queryParams = new core.Map(); |
1538 var _uploadMedia = null; | 1530 var _uploadMedia = null; |
1539 var _uploadOptions = null; | 1531 var _uploadOptions = null; |
1540 var _downloadOptions = commons.DownloadOptions.Metadata; | 1532 var _downloadOptions = commons.DownloadOptions.Metadata; |
1541 var _body = null; | 1533 var _body = null; |
1542 | 1534 |
1543 if (pageSize != null) { | |
1544 _queryParams["pageSize"] = ["${pageSize}"]; | |
1545 } | |
1546 if (filter != null) { | 1535 if (filter != null) { |
1547 _queryParams["filter"] = [filter]; | 1536 _queryParams["filter"] = [filter]; |
1548 } | 1537 } |
1549 if (pageToken != null) { | 1538 if (pageToken != null) { |
1550 _queryParams["pageToken"] = [pageToken]; | 1539 _queryParams["pageToken"] = [pageToken]; |
1551 } | 1540 } |
| 1541 if (pageSize != null) { |
| 1542 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1543 } |
1552 | 1544 |
1553 _url = 'v1/projects'; | 1545 _url = 'v1/projects'; |
1554 | 1546 |
1555 var _response = _requester.request(_url, | 1547 var _response = _requester.request(_url, "GET", |
1556 "GET", | 1548 body: _body, |
1557 body: _body, | 1549 queryParams: _queryParams, |
1558 queryParams: _queryParams, | 1550 uploadOptions: _uploadOptions, |
1559 uploadOptions: _uploadOptions, | 1551 uploadMedia: _uploadMedia, |
1560 uploadMedia: _uploadMedia, | 1552 downloadOptions: _downloadOptions); |
1561 downloadOptions: _downloadOptions); | |
1562 return _response.then((data) => new ListProjectsResponse.fromJson(data)); | 1553 return _response.then((data) => new ListProjectsResponse.fromJson(data)); |
1563 } | 1554 } |
1564 | 1555 |
1565 /** | 1556 /// Lists `Constraints` that could be applied on the specified resource. |
1566 * Lists `Constraints` that could be applied on the specified resource. | 1557 /// |
1567 * | 1558 /// [request] - The metadata request object. |
1568 * [request] - The metadata request object. | 1559 /// |
1569 * | 1560 /// Request parameters: |
1570 * Request parameters: | 1561 /// |
1571 * | 1562 /// [resource] - Name of the resource to list `Constraints` for. |
1572 * [resource] - Name of the resource to list `Constraints` for. | 1563 /// Value must have pattern "^projects/[^/]+$". |
1573 * Value must have pattern "^projects/[^/]+$". | 1564 /// |
1574 * | 1565 /// Completes with a [ListAvailableOrgPolicyConstraintsResponse]. |
1575 * Completes with a [ListAvailableOrgPolicyConstraintsResponse]. | 1566 /// |
1576 * | 1567 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1577 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1568 /// an error. |
1578 * error. | 1569 /// |
1579 * | 1570 /// If the used [http.Client] completes with an error when making a REST |
1580 * If the used [http.Client] completes with an error when making a REST call, | 1571 /// call, this method will complete with the same error. |
1581 * this method will complete with the same error. | 1572 async.Future<ListAvailableOrgPolicyConstraintsResponse> |
1582 */ | 1573 listAvailableOrgPolicyConstraints( |
1583 async.Future<ListAvailableOrgPolicyConstraintsResponse> listAvailableOrgPolicy
Constraints(ListAvailableOrgPolicyConstraintsRequest request, core.String resour
ce) { | 1574 ListAvailableOrgPolicyConstraintsRequest request, |
| 1575 core.String resource) { |
1584 var _url = null; | 1576 var _url = null; |
1585 var _queryParams = new core.Map(); | 1577 var _queryParams = new core.Map(); |
1586 var _uploadMedia = null; | 1578 var _uploadMedia = null; |
1587 var _uploadOptions = null; | 1579 var _uploadOptions = null; |
1588 var _downloadOptions = commons.DownloadOptions.Metadata; | 1580 var _downloadOptions = commons.DownloadOptions.Metadata; |
1589 var _body = null; | 1581 var _body = null; |
1590 | 1582 |
1591 if (request != null) { | 1583 if (request != null) { |
1592 _body = convert.JSON.encode((request).toJson()); | 1584 _body = convert.JSON.encode((request).toJson()); |
1593 } | 1585 } |
1594 if (resource == null) { | 1586 if (resource == null) { |
1595 throw new core.ArgumentError("Parameter resource is required."); | 1587 throw new core.ArgumentError("Parameter resource is required."); |
1596 } | 1588 } |
1597 | 1589 |
1598 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listAv
ailableOrgPolicyConstraints'; | 1590 _url = 'v1/' + |
| 1591 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1592 ':listAvailableOrgPolicyConstraints'; |
1599 | 1593 |
1600 var _response = _requester.request(_url, | 1594 var _response = _requester.request(_url, "POST", |
1601 "POST", | 1595 body: _body, |
1602 body: _body, | 1596 queryParams: _queryParams, |
1603 queryParams: _queryParams, | 1597 uploadOptions: _uploadOptions, |
1604 uploadOptions: _uploadOptions, | 1598 uploadMedia: _uploadMedia, |
1605 uploadMedia: _uploadMedia, | 1599 downloadOptions: _downloadOptions); |
1606 downloadOptions: _downloadOptions); | 1600 return _response.then( |
1607 return _response.then((data) => new ListAvailableOrgPolicyConstraintsRespons
e.fromJson(data)); | 1601 (data) => new ListAvailableOrgPolicyConstraintsResponse.fromJson(data)); |
1608 } | 1602 } |
1609 | 1603 |
1610 /** | 1604 /// Lists all the `Policies` set for a particular resource. |
1611 * Lists all the `Policies` set for a particular resource. | 1605 /// |
1612 * | 1606 /// [request] - The metadata request object. |
1613 * [request] - The metadata request object. | 1607 /// |
1614 * | 1608 /// Request parameters: |
1615 * Request parameters: | 1609 /// |
1616 * | 1610 /// [resource] - Name of the resource to list Policies for. |
1617 * [resource] - Name of the resource to list Policies for. | 1611 /// Value must have pattern "^projects/[^/]+$". |
1618 * Value must have pattern "^projects/[^/]+$". | 1612 /// |
1619 * | 1613 /// Completes with a [ListOrgPoliciesResponse]. |
1620 * Completes with a [ListOrgPoliciesResponse]. | 1614 /// |
1621 * | 1615 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1622 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1616 /// an error. |
1623 * error. | 1617 /// |
1624 * | 1618 /// If the used [http.Client] completes with an error when making a REST |
1625 * If the used [http.Client] completes with an error when making a REST call, | 1619 /// call, this method will complete with the same error. |
1626 * this method will complete with the same error. | 1620 async.Future<ListOrgPoliciesResponse> listOrgPolicies( |
1627 */ | 1621 ListOrgPoliciesRequest request, core.String resource) { |
1628 async.Future<ListOrgPoliciesResponse> listOrgPolicies(ListOrgPoliciesRequest r
equest, core.String resource) { | |
1629 var _url = null; | 1622 var _url = null; |
1630 var _queryParams = new core.Map(); | 1623 var _queryParams = new core.Map(); |
1631 var _uploadMedia = null; | 1624 var _uploadMedia = null; |
1632 var _uploadOptions = null; | 1625 var _uploadOptions = null; |
1633 var _downloadOptions = commons.DownloadOptions.Metadata; | 1626 var _downloadOptions = commons.DownloadOptions.Metadata; |
1634 var _body = null; | 1627 var _body = null; |
1635 | 1628 |
1636 if (request != null) { | 1629 if (request != null) { |
1637 _body = convert.JSON.encode((request).toJson()); | 1630 _body = convert.JSON.encode((request).toJson()); |
1638 } | 1631 } |
1639 if (resource == null) { | 1632 if (resource == null) { |
1640 throw new core.ArgumentError("Parameter resource is required."); | 1633 throw new core.ArgumentError("Parameter resource is required."); |
1641 } | 1634 } |
1642 | 1635 |
1643 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':listOr
gPolicies'; | 1636 _url = 'v1/' + |
| 1637 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1638 ':listOrgPolicies'; |
1644 | 1639 |
1645 var _response = _requester.request(_url, | 1640 var _response = _requester.request(_url, "POST", |
1646 "POST", | 1641 body: _body, |
1647 body: _body, | 1642 queryParams: _queryParams, |
1648 queryParams: _queryParams, | 1643 uploadOptions: _uploadOptions, |
1649 uploadOptions: _uploadOptions, | 1644 uploadMedia: _uploadMedia, |
1650 uploadMedia: _uploadMedia, | 1645 downloadOptions: _downloadOptions); |
1651 downloadOptions: _downloadOptions); | |
1652 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); | 1646 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data)); |
1653 } | 1647 } |
1654 | 1648 |
1655 /** | 1649 /// Sets the IAM access control policy for the specified Project. Replaces |
1656 * Sets the IAM access control policy for the specified Project. Replaces | 1650 /// any existing policy. |
1657 * any existing policy. | 1651 /// |
1658 * | 1652 /// The following constraints apply when using `setIamPolicy()`: |
1659 * The following constraints apply when using `setIamPolicy()`: | 1653 /// |
1660 * | 1654 /// + Project does not support `allUsers` and `allAuthenticatedUsers` as |
1661 * + Project does not support `allUsers` and `allAuthenticatedUsers` as | 1655 /// `members` in a `Binding` of a `Policy`. |
1662 * `members` in a `Binding` of a `Policy`. | 1656 /// |
1663 * | 1657 /// + The owner role can be granted only to `user` and `serviceAccount`. |
1664 * + The owner role can be granted only to `user` and `serviceAccount`. | 1658 /// |
1665 * | 1659 /// + Service accounts can be made owners of a project directly |
1666 * + Service accounts can be made owners of a project directly | 1660 /// without any restrictions. However, to be added as an owner, a user must |
1667 * without any restrictions. However, to be added as an owner, a user must be | 1661 /// be |
1668 * invited via Cloud Platform console and must accept the invitation. | 1662 /// invited via Cloud Platform console and must accept the invitation. |
1669 * | 1663 /// |
1670 * + A user cannot be granted the owner role using `setIamPolicy()`. The user | 1664 /// + A user cannot be granted the owner role using `setIamPolicy()`. The |
1671 * must be granted the owner role using the Cloud Platform Console and must | 1665 /// user |
1672 * explicitly accept the invitation. | 1666 /// must be granted the owner role using the Cloud Platform Console and must |
1673 * | 1667 /// explicitly accept the invitation. |
1674 * + Invitations to grant the owner role cannot be sent using | 1668 /// |
1675 * `setIamPolicy()`; | 1669 /// + Invitations to grant the owner role cannot be sent using |
1676 * they must be sent only using the Cloud Platform Console. | 1670 /// `setIamPolicy()`; |
1677 * | 1671 /// they must be sent only using the Cloud Platform Console. |
1678 * + Membership changes that leave the project without any owners that have | 1672 /// |
1679 * accepted the Terms of Service (ToS) will be rejected. | 1673 /// + Membership changes that leave the project without any owners that have |
1680 * | 1674 /// accepted the Terms of Service (ToS) will be rejected. |
1681 * + If the project is not part of an organization, there must be at least | 1675 /// |
1682 * one owner who has accepted the Terms of Service (ToS) agreement in the | 1676 /// + If the project is not part of an organization, there must be at least |
1683 * policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner | 1677 /// one owner who has accepted the Terms of Service (ToS) agreement in the |
1684 * from the policy will fail. This restriction also applies to legacy | 1678 /// policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner |
1685 * projects that no longer have owners who have accepted the ToS. Edits to | 1679 /// from the policy will fail. This restriction also applies to legacy |
1686 * IAM policies will be rejected until the lack of a ToS-accepting owner is | 1680 /// projects that no longer have owners who have accepted the ToS. Edits to |
1687 * rectified. | 1681 /// IAM policies will be rejected until the lack of a ToS-accepting owner is |
1688 * | 1682 /// rectified. |
1689 * + Calling this method requires enabling the App Engine Admin API. | 1683 /// |
1690 * | 1684 /// + Calling this method requires enabling the App Engine Admin API. |
1691 * Note: Removing service accounts from policies or changing their roles | 1685 /// |
1692 * can render services completely inoperable. It is important to understand | 1686 /// Note: Removing service accounts from policies or changing their roles |
1693 * how the service account is being used before removing or updating its | 1687 /// can render services completely inoperable. It is important to understand |
1694 * roles. | 1688 /// how the service account is being used before removing or updating its |
1695 * | 1689 /// roles. |
1696 * Authorization requires the Google IAM permission | 1690 /// |
1697 * `resourcemanager.projects.setIamPolicy` on the project | 1691 /// Authorization requires the Google IAM permission |
1698 * | 1692 /// `resourcemanager.projects.setIamPolicy` on the project |
1699 * [request] - The metadata request object. | 1693 /// |
1700 * | 1694 /// [request] - The metadata request object. |
1701 * Request parameters: | 1695 /// |
1702 * | 1696 /// Request parameters: |
1703 * [resource] - REQUIRED: The resource for which the policy is being | 1697 /// |
1704 * specified. | 1698 /// [resource] - REQUIRED: The resource for which the policy is being |
1705 * See the operation documentation for the appropriate value for this field. | 1699 /// specified. |
1706 * | 1700 /// See the operation documentation for the appropriate value for this field. |
1707 * Completes with a [Policy]. | 1701 /// |
1708 * | 1702 /// Completes with a [Policy]. |
1709 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1703 /// |
1710 * error. | 1704 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1711 * | 1705 /// an error. |
1712 * If the used [http.Client] completes with an error when making a REST call, | 1706 /// |
1713 * this method will complete with the same error. | 1707 /// If the used [http.Client] completes with an error when making a REST |
1714 */ | 1708 /// call, this method will complete with the same error. |
1715 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { | 1709 async.Future<Policy> setIamPolicy( |
| 1710 SetIamPolicyRequest request, core.String resource) { |
1716 var _url = null; | 1711 var _url = null; |
1717 var _queryParams = new core.Map(); | 1712 var _queryParams = new core.Map(); |
1718 var _uploadMedia = null; | 1713 var _uploadMedia = null; |
1719 var _uploadOptions = null; | 1714 var _uploadOptions = null; |
1720 var _downloadOptions = commons.DownloadOptions.Metadata; | 1715 var _downloadOptions = commons.DownloadOptions.Metadata; |
1721 var _body = null; | 1716 var _body = null; |
1722 | 1717 |
1723 if (request != null) { | 1718 if (request != null) { |
1724 _body = convert.JSON.encode((request).toJson()); | 1719 _body = convert.JSON.encode((request).toJson()); |
1725 } | 1720 } |
1726 if (resource == null) { | 1721 if (resource == null) { |
1727 throw new core.ArgumentError("Parameter resource is required."); | 1722 throw new core.ArgumentError("Parameter resource is required."); |
1728 } | 1723 } |
1729 | 1724 |
1730 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':setIa
mPolicy'; | 1725 _url = 'v1/projects/' + |
| 1726 commons.Escaper.ecapeVariable('$resource') + |
| 1727 ':setIamPolicy'; |
1731 | 1728 |
1732 var _response = _requester.request(_url, | 1729 var _response = _requester.request(_url, "POST", |
1733 "POST", | 1730 body: _body, |
1734 body: _body, | 1731 queryParams: _queryParams, |
1735 queryParams: _queryParams, | 1732 uploadOptions: _uploadOptions, |
1736 uploadOptions: _uploadOptions, | 1733 uploadMedia: _uploadMedia, |
1737 uploadMedia: _uploadMedia, | 1734 downloadOptions: _downloadOptions); |
1738 downloadOptions: _downloadOptions); | |
1739 return _response.then((data) => new Policy.fromJson(data)); | 1735 return _response.then((data) => new Policy.fromJson(data)); |
1740 } | 1736 } |
1741 | 1737 |
1742 /** | 1738 /// Updates the specified `Policy` on the resource. Creates a new `Policy` |
1743 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | 1739 /// for |
1744 * that `Constraint` on the resource if one does not exist. | 1740 /// that `Constraint` on the resource if one does not exist. |
1745 * | 1741 /// |
1746 * Not supplying an `etag` on the request `Policy` results in an unconditional | 1742 /// Not supplying an `etag` on the request `Policy` results in an |
1747 * write of the `Policy`. | 1743 /// unconditional |
1748 * | 1744 /// write of the `Policy`. |
1749 * [request] - The metadata request object. | 1745 /// |
1750 * | 1746 /// [request] - The metadata request object. |
1751 * Request parameters: | 1747 /// |
1752 * | 1748 /// Request parameters: |
1753 * [resource] - Resource name of the resource to attach the `Policy`. | 1749 /// |
1754 * Value must have pattern "^projects/[^/]+$". | 1750 /// [resource] - Resource name of the resource to attach the `Policy`. |
1755 * | 1751 /// Value must have pattern "^projects/[^/]+$". |
1756 * Completes with a [OrgPolicy]. | 1752 /// |
1757 * | 1753 /// Completes with a [OrgPolicy]. |
1758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1754 /// |
1759 * error. | 1755 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1760 * | 1756 /// an error. |
1761 * If the used [http.Client] completes with an error when making a REST call, | 1757 /// |
1762 * this method will complete with the same error. | 1758 /// If the used [http.Client] completes with an error when making a REST |
1763 */ | 1759 /// call, this method will complete with the same error. |
1764 async.Future<OrgPolicy> setOrgPolicy(SetOrgPolicyRequest request, core.String
resource) { | 1760 async.Future<OrgPolicy> setOrgPolicy( |
| 1761 SetOrgPolicyRequest request, core.String resource) { |
1765 var _url = null; | 1762 var _url = null; |
1766 var _queryParams = new core.Map(); | 1763 var _queryParams = new core.Map(); |
1767 var _uploadMedia = null; | 1764 var _uploadMedia = null; |
1768 var _uploadOptions = null; | 1765 var _uploadOptions = null; |
1769 var _downloadOptions = commons.DownloadOptions.Metadata; | 1766 var _downloadOptions = commons.DownloadOptions.Metadata; |
1770 var _body = null; | 1767 var _body = null; |
1771 | 1768 |
1772 if (request != null) { | 1769 if (request != null) { |
1773 _body = convert.JSON.encode((request).toJson()); | 1770 _body = convert.JSON.encode((request).toJson()); |
1774 } | 1771 } |
1775 if (resource == null) { | 1772 if (resource == null) { |
1776 throw new core.ArgumentError("Parameter resource is required."); | 1773 throw new core.ArgumentError("Parameter resource is required."); |
1777 } | 1774 } |
1778 | 1775 |
1779 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
Policy'; | 1776 _url = 'v1/' + |
| 1777 commons.Escaper.ecapeVariableReserved('$resource') + |
| 1778 ':setOrgPolicy'; |
1780 | 1779 |
1781 var _response = _requester.request(_url, | 1780 var _response = _requester.request(_url, "POST", |
1782 "POST", | 1781 body: _body, |
1783 body: _body, | 1782 queryParams: _queryParams, |
1784 queryParams: _queryParams, | 1783 uploadOptions: _uploadOptions, |
1785 uploadOptions: _uploadOptions, | 1784 uploadMedia: _uploadMedia, |
1786 uploadMedia: _uploadMedia, | 1785 downloadOptions: _downloadOptions); |
1787 downloadOptions: _downloadOptions); | |
1788 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1786 return _response.then((data) => new OrgPolicy.fromJson(data)); |
1789 } | 1787 } |
1790 | 1788 |
1791 /** | 1789 /// Returns permissions that a caller has on the specified Project. |
1792 * Returns permissions that a caller has on the specified Project. | 1790 /// |
1793 * | 1791 /// There are no permissions required for making this API call. |
1794 * There are no permissions required for making this API call. | 1792 /// |
1795 * | 1793 /// [request] - The metadata request object. |
1796 * [request] - The metadata request object. | 1794 /// |
1797 * | 1795 /// Request parameters: |
1798 * Request parameters: | 1796 /// |
1799 * | 1797 /// [resource] - REQUIRED: The resource for which the policy detail is being |
1800 * [resource] - REQUIRED: The resource for which the policy detail is being | 1798 /// requested. |
1801 * requested. | 1799 /// See the operation documentation for the appropriate value for this field. |
1802 * See the operation documentation for the appropriate value for this field. | 1800 /// |
1803 * | 1801 /// Completes with a [TestIamPermissionsResponse]. |
1804 * Completes with a [TestIamPermissionsResponse]. | 1802 /// |
1805 * | 1803 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1804 /// an error. |
1807 * error. | 1805 /// |
1808 * | 1806 /// If the used [http.Client] completes with an error when making a REST |
1809 * If the used [http.Client] completes with an error when making a REST call, | 1807 /// call, this method will complete with the same error. |
1810 * this method will complete with the same error. | 1808 async.Future<TestIamPermissionsResponse> testIamPermissions( |
1811 */ | 1809 TestIamPermissionsRequest request, core.String resource) { |
1812 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { | |
1813 var _url = null; | 1810 var _url = null; |
1814 var _queryParams = new core.Map(); | 1811 var _queryParams = new core.Map(); |
1815 var _uploadMedia = null; | 1812 var _uploadMedia = null; |
1816 var _uploadOptions = null; | 1813 var _uploadOptions = null; |
1817 var _downloadOptions = commons.DownloadOptions.Metadata; | 1814 var _downloadOptions = commons.DownloadOptions.Metadata; |
1818 var _body = null; | 1815 var _body = null; |
1819 | 1816 |
1820 if (request != null) { | 1817 if (request != null) { |
1821 _body = convert.JSON.encode((request).toJson()); | 1818 _body = convert.JSON.encode((request).toJson()); |
1822 } | 1819 } |
1823 if (resource == null) { | 1820 if (resource == null) { |
1824 throw new core.ArgumentError("Parameter resource is required."); | 1821 throw new core.ArgumentError("Parameter resource is required."); |
1825 } | 1822 } |
1826 | 1823 |
1827 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$resource') + ':testI
amPermissions'; | 1824 _url = 'v1/projects/' + |
| 1825 commons.Escaper.ecapeVariable('$resource') + |
| 1826 ':testIamPermissions'; |
1828 | 1827 |
1829 var _response = _requester.request(_url, | 1828 var _response = _requester.request(_url, "POST", |
1830 "POST", | 1829 body: _body, |
1831 body: _body, | 1830 queryParams: _queryParams, |
1832 queryParams: _queryParams, | 1831 uploadOptions: _uploadOptions, |
1833 uploadOptions: _uploadOptions, | 1832 uploadMedia: _uploadMedia, |
1834 uploadMedia: _uploadMedia, | 1833 downloadOptions: _downloadOptions); |
1835 downloadOptions: _downloadOptions); | 1834 return _response |
1836 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 1835 .then((data) => new TestIamPermissionsResponse.fromJson(data)); |
1837 } | 1836 } |
1838 | 1837 |
1839 /** | 1838 /// Restores the Project identified by the specified |
1840 * Restores the Project identified by the specified | 1839 /// `project_id` (for example, `my-project-123`). |
1841 * `project_id` (for example, `my-project-123`). | 1840 /// You can only use this method for a Project that has a lifecycle state of |
1842 * You can only use this method for a Project that has a lifecycle state of | 1841 /// DELETE_REQUESTED. |
1843 * DELETE_REQUESTED. | 1842 /// After deletion starts, the Project cannot be restored. |
1844 * After deletion starts, the Project cannot be restored. | 1843 /// |
1845 * | 1844 /// The caller must have modify permissions for this Project. |
1846 * The caller must have modify permissions for this Project. | 1845 /// |
1847 * | 1846 /// [request] - The metadata request object. |
1848 * [request] - The metadata request object. | 1847 /// |
1849 * | 1848 /// Request parameters: |
1850 * Request parameters: | 1849 /// |
1851 * | 1850 /// [projectId] - The project ID (for example, `foo-bar-123`). |
1852 * [projectId] - The project ID (for example, `foo-bar-123`). | 1851 /// |
1853 * | 1852 /// Required. |
1854 * Required. | 1853 /// |
1855 * | 1854 /// Completes with a [Empty]. |
1856 * Completes with a [Empty]. | 1855 /// |
1857 * | 1856 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1858 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1857 /// an error. |
1859 * error. | 1858 /// |
1860 * | 1859 /// If the used [http.Client] completes with an error when making a REST |
1861 * If the used [http.Client] completes with an error when making a REST call, | 1860 /// call, this method will complete with the same error. |
1862 * this method will complete with the same error. | 1861 async.Future<Empty> undelete( |
1863 */ | 1862 UndeleteProjectRequest request, core.String projectId) { |
1864 async.Future<Empty> undelete(UndeleteProjectRequest request, core.String proje
ctId) { | |
1865 var _url = null; | 1863 var _url = null; |
1866 var _queryParams = new core.Map(); | 1864 var _queryParams = new core.Map(); |
1867 var _uploadMedia = null; | 1865 var _uploadMedia = null; |
1868 var _uploadOptions = null; | 1866 var _uploadOptions = null; |
1869 var _downloadOptions = commons.DownloadOptions.Metadata; | 1867 var _downloadOptions = commons.DownloadOptions.Metadata; |
1870 var _body = null; | 1868 var _body = null; |
1871 | 1869 |
1872 if (request != null) { | 1870 if (request != null) { |
1873 _body = convert.JSON.encode((request).toJson()); | 1871 _body = convert.JSON.encode((request).toJson()); |
1874 } | 1872 } |
1875 if (projectId == null) { | 1873 if (projectId == null) { |
1876 throw new core.ArgumentError("Parameter projectId is required."); | 1874 throw new core.ArgumentError("Parameter projectId is required."); |
1877 } | 1875 } |
1878 | 1876 |
1879 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + ':unde
lete'; | 1877 _url = 'v1/projects/' + |
| 1878 commons.Escaper.ecapeVariable('$projectId') + |
| 1879 ':undelete'; |
1880 | 1880 |
1881 var _response = _requester.request(_url, | 1881 var _response = _requester.request(_url, "POST", |
1882 "POST", | 1882 body: _body, |
1883 body: _body, | 1883 queryParams: _queryParams, |
1884 queryParams: _queryParams, | 1884 uploadOptions: _uploadOptions, |
1885 uploadOptions: _uploadOptions, | 1885 uploadMedia: _uploadMedia, |
1886 uploadMedia: _uploadMedia, | 1886 downloadOptions: _downloadOptions); |
1887 downloadOptions: _downloadOptions); | |
1888 return _response.then((data) => new Empty.fromJson(data)); | 1887 return _response.then((data) => new Empty.fromJson(data)); |
1889 } | 1888 } |
1890 | 1889 |
1891 /** | 1890 /// Updates the attributes of the Project identified by the specified |
1892 * Updates the attributes of the Project identified by the specified | 1891 /// `project_id` (for example, `my-project-123`). |
1893 * `project_id` (for example, `my-project-123`). | 1892 /// |
1894 * | 1893 /// The caller must have modify permissions for this Project. |
1895 * The caller must have modify permissions for this Project. | 1894 /// |
1896 * | 1895 /// [request] - The metadata request object. |
1897 * [request] - The metadata request object. | 1896 /// |
1898 * | 1897 /// Request parameters: |
1899 * Request parameters: | 1898 /// |
1900 * | 1899 /// [projectId] - The project ID (for example, `my-project-123`). |
1901 * [projectId] - The project ID (for example, `my-project-123`). | 1900 /// |
1902 * | 1901 /// Required. |
1903 * Required. | 1902 /// |
1904 * | 1903 /// Completes with a [Project]. |
1905 * Completes with a [Project]. | 1904 /// |
1906 * | 1905 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
1907 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1906 /// an error. |
1908 * error. | 1907 /// |
1909 * | 1908 /// If the used [http.Client] completes with an error when making a REST |
1910 * If the used [http.Client] completes with an error when making a REST call, | 1909 /// call, this method will complete with the same error. |
1911 * this method will complete with the same error. | |
1912 */ | |
1913 async.Future<Project> update(Project request, core.String projectId) { | 1910 async.Future<Project> update(Project request, core.String projectId) { |
1914 var _url = null; | 1911 var _url = null; |
1915 var _queryParams = new core.Map(); | 1912 var _queryParams = new core.Map(); |
1916 var _uploadMedia = null; | 1913 var _uploadMedia = null; |
1917 var _uploadOptions = null; | 1914 var _uploadOptions = null; |
1918 var _downloadOptions = commons.DownloadOptions.Metadata; | 1915 var _downloadOptions = commons.DownloadOptions.Metadata; |
1919 var _body = null; | 1916 var _body = null; |
1920 | 1917 |
1921 if (request != null) { | 1918 if (request != null) { |
1922 _body = convert.JSON.encode((request).toJson()); | 1919 _body = convert.JSON.encode((request).toJson()); |
1923 } | 1920 } |
1924 if (projectId == null) { | 1921 if (projectId == null) { |
1925 throw new core.ArgumentError("Parameter projectId is required."); | 1922 throw new core.ArgumentError("Parameter projectId is required."); |
1926 } | 1923 } |
1927 | 1924 |
1928 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); | 1925 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId'); |
1929 | 1926 |
1930 var _response = _requester.request(_url, | 1927 var _response = _requester.request(_url, "PUT", |
1931 "PUT", | 1928 body: _body, |
1932 body: _body, | 1929 queryParams: _queryParams, |
1933 queryParams: _queryParams, | 1930 uploadOptions: _uploadOptions, |
1934 uploadOptions: _uploadOptions, | 1931 uploadMedia: _uploadMedia, |
1935 uploadMedia: _uploadMedia, | 1932 downloadOptions: _downloadOptions); |
1936 downloadOptions: _downloadOptions); | |
1937 return _response.then((data) => new Project.fromJson(data)); | 1933 return _response.then((data) => new Project.fromJson(data)); |
1938 } | 1934 } |
1939 | |
1940 } | 1935 } |
1941 | 1936 |
1942 | 1937 /// Identifying information for a single ancestor of a project. |
1943 | |
1944 /** Identifying information for a single ancestor of a project. */ | |
1945 class Ancestor { | 1938 class Ancestor { |
1946 /** Resource id of the ancestor. */ | 1939 /// Resource id of the ancestor. |
1947 ResourceId resourceId; | 1940 ResourceId resourceId; |
1948 | 1941 |
1949 Ancestor(); | 1942 Ancestor(); |
1950 | 1943 |
1951 Ancestor.fromJson(core.Map _json) { | 1944 Ancestor.fromJson(core.Map _json) { |
1952 if (_json.containsKey("resourceId")) { | 1945 if (_json.containsKey("resourceId")) { |
1953 resourceId = new ResourceId.fromJson(_json["resourceId"]); | 1946 resourceId = new ResourceId.fromJson(_json["resourceId"]); |
1954 } | 1947 } |
1955 } | 1948 } |
1956 | 1949 |
1957 core.Map<core.String, core.Object> toJson() { | 1950 core.Map<core.String, core.Object> toJson() { |
1958 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1951 final core.Map<core.String, core.Object> _json = |
| 1952 new core.Map<core.String, core.Object>(); |
1959 if (resourceId != null) { | 1953 if (resourceId != null) { |
1960 _json["resourceId"] = (resourceId).toJson(); | 1954 _json["resourceId"] = (resourceId).toJson(); |
1961 } | 1955 } |
1962 return _json; | 1956 return _json; |
1963 } | 1957 } |
1964 } | 1958 } |
1965 | 1959 |
1966 /** | 1960 /// Specifies the audit configuration for a service. |
1967 * Specifies the audit configuration for a service. | 1961 /// The configuration determines which permission types are logged, and what |
1968 * The configuration determines which permission types are logged, and what | 1962 /// identities, if any, are exempted from logging. |
1969 * identities, if any, are exempted from logging. | 1963 /// An AuditConfig must have one or more AuditLogConfigs. |
1970 * An AuditConfig must have one or more AuditLogConfigs. | 1964 /// |
1971 * | 1965 /// If there are AuditConfigs for both `allServices` and a specific service, |
1972 * If there are AuditConfigs for both `allServices` and a specific service, | 1966 /// the union of the two AuditConfigs is used for that service: the log_types |
1973 * the union of the two AuditConfigs is used for that service: the log_types | 1967 /// specified in each AuditConfig are enabled, and the exempted_members in each |
1974 * specified in each AuditConfig are enabled, and the exempted_members in each | 1968 /// AuditConfig are exempted. |
1975 * AuditConfig are exempted. | 1969 /// |
1976 * | 1970 /// Example Policy with multiple AuditConfigs: |
1977 * Example Policy with multiple AuditConfigs: | 1971 /// |
1978 * | 1972 /// { |
1979 * { | 1973 /// "audit_configs": [ |
1980 * "audit_configs": [ | 1974 /// { |
1981 * { | 1975 /// "service": "allServices" |
1982 * "service": "allServices" | 1976 /// "audit_log_configs": [ |
1983 * "audit_log_configs": [ | 1977 /// { |
1984 * { | 1978 /// "log_type": "DATA_READ", |
1985 * "log_type": "DATA_READ", | 1979 /// "exempted_members": [ |
1986 * "exempted_members": [ | 1980 /// "user:foo@gmail.com" |
1987 * "user:foo@gmail.com" | 1981 /// ] |
1988 * ] | 1982 /// }, |
1989 * }, | 1983 /// { |
1990 * { | 1984 /// "log_type": "DATA_WRITE", |
1991 * "log_type": "DATA_WRITE", | 1985 /// }, |
1992 * }, | 1986 /// { |
1993 * { | 1987 /// "log_type": "ADMIN_READ", |
1994 * "log_type": "ADMIN_READ", | 1988 /// } |
1995 * } | 1989 /// ] |
1996 * ] | 1990 /// }, |
1997 * }, | 1991 /// { |
1998 * { | 1992 /// "service": "fooservice.googleapis.com" |
1999 * "service": "fooservice.googleapis.com" | 1993 /// "audit_log_configs": [ |
2000 * "audit_log_configs": [ | 1994 /// { |
2001 * { | 1995 /// "log_type": "DATA_READ", |
2002 * "log_type": "DATA_READ", | 1996 /// }, |
2003 * }, | 1997 /// { |
2004 * { | 1998 /// "log_type": "DATA_WRITE", |
2005 * "log_type": "DATA_WRITE", | 1999 /// "exempted_members": [ |
2006 * "exempted_members": [ | 2000 /// "user:bar@gmail.com" |
2007 * "user:bar@gmail.com" | 2001 /// ] |
2008 * ] | 2002 /// } |
2009 * } | 2003 /// ] |
2010 * ] | 2004 /// } |
2011 * } | 2005 /// ] |
2012 * ] | 2006 /// } |
2013 * } | 2007 /// |
2014 * | 2008 /// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
2015 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ | 2009 /// logging. It also exempts foo@gmail.com from DATA_READ logging, and |
2016 * logging. It also exempts foo@gmail.com from DATA_READ logging, and | 2010 /// bar@gmail.com from DATA_WRITE logging. |
2017 * bar@gmail.com from DATA_WRITE logging. | |
2018 */ | |
2019 class AuditConfig { | 2011 class AuditConfig { |
2020 /** | 2012 /// The configuration for logging of each type of permission. |
2021 * The configuration for logging of each type of permission. | 2013 /// Next ID: 4 |
2022 * Next ID: 4 | |
2023 */ | |
2024 core.List<AuditLogConfig> auditLogConfigs; | 2014 core.List<AuditLogConfig> auditLogConfigs; |
2025 /** | 2015 |
2026 * Specifies a service that will be enabled for audit logging. | 2016 /// Specifies a service that will be enabled for audit logging. |
2027 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. | 2017 /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
2028 * `allServices` is a special value that covers all services. | 2018 /// `allServices` is a special value that covers all services. |
2029 */ | |
2030 core.String service; | 2019 core.String service; |
2031 | 2020 |
2032 AuditConfig(); | 2021 AuditConfig(); |
2033 | 2022 |
2034 AuditConfig.fromJson(core.Map _json) { | 2023 AuditConfig.fromJson(core.Map _json) { |
2035 if (_json.containsKey("auditLogConfigs")) { | 2024 if (_json.containsKey("auditLogConfigs")) { |
2036 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); | 2025 auditLogConfigs = _json["auditLogConfigs"] |
| 2026 .map((value) => new AuditLogConfig.fromJson(value)) |
| 2027 .toList(); |
2037 } | 2028 } |
2038 if (_json.containsKey("service")) { | 2029 if (_json.containsKey("service")) { |
2039 service = _json["service"]; | 2030 service = _json["service"]; |
2040 } | 2031 } |
2041 } | 2032 } |
2042 | 2033 |
2043 core.Map<core.String, core.Object> toJson() { | 2034 core.Map<core.String, core.Object> toJson() { |
2044 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2035 final core.Map<core.String, core.Object> _json = |
| 2036 new core.Map<core.String, core.Object>(); |
2045 if (auditLogConfigs != null) { | 2037 if (auditLogConfigs != null) { |
2046 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson()
).toList(); | 2038 _json["auditLogConfigs"] = |
| 2039 auditLogConfigs.map((value) => (value).toJson()).toList(); |
2047 } | 2040 } |
2048 if (service != null) { | 2041 if (service != null) { |
2049 _json["service"] = service; | 2042 _json["service"] = service; |
2050 } | 2043 } |
2051 return _json; | 2044 return _json; |
2052 } | 2045 } |
2053 } | 2046 } |
2054 | 2047 |
2055 /** | 2048 /// Provides the configuration for logging a type of permissions. |
2056 * Provides the configuration for logging a type of permissions. | 2049 /// Example: |
2057 * Example: | 2050 /// |
2058 * | 2051 /// { |
2059 * { | 2052 /// "audit_log_configs": [ |
2060 * "audit_log_configs": [ | 2053 /// { |
2061 * { | 2054 /// "log_type": "DATA_READ", |
2062 * "log_type": "DATA_READ", | 2055 /// "exempted_members": [ |
2063 * "exempted_members": [ | 2056 /// "user:foo@gmail.com" |
2064 * "user:foo@gmail.com" | 2057 /// ] |
2065 * ] | 2058 /// }, |
2066 * }, | 2059 /// { |
2067 * { | 2060 /// "log_type": "DATA_WRITE", |
2068 * "log_type": "DATA_WRITE", | 2061 /// } |
2069 * } | 2062 /// ] |
2070 * ] | 2063 /// } |
2071 * } | 2064 /// |
2072 * | 2065 /// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
2073 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting | 2066 /// foo@gmail.com from DATA_READ logging. |
2074 * foo@gmail.com from DATA_READ logging. | |
2075 */ | |
2076 class AuditLogConfig { | 2067 class AuditLogConfig { |
2077 /** | 2068 /// Specifies the identities that do not cause logging for this type of |
2078 * Specifies the identities that do not cause logging for this type of | 2069 /// permission. |
2079 * permission. | 2070 /// Follows the same format of Binding.members. |
2080 * Follows the same format of Binding.members. | |
2081 */ | |
2082 core.List<core.String> exemptedMembers; | 2071 core.List<core.String> exemptedMembers; |
2083 /** | 2072 |
2084 * The log type that this config enables. | 2073 /// The log type that this config enables. |
2085 * Possible string values are: | 2074 /// Possible string values are: |
2086 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. | 2075 /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. |
2087 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy | 2076 /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy |
2088 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create | 2077 /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create |
2089 * - "DATA_READ" : Data reads. Example: CloudSQL Users list | 2078 /// - "DATA_READ" : Data reads. Example: CloudSQL Users list |
2090 */ | |
2091 core.String logType; | 2079 core.String logType; |
2092 | 2080 |
2093 AuditLogConfig(); | 2081 AuditLogConfig(); |
2094 | 2082 |
2095 AuditLogConfig.fromJson(core.Map _json) { | 2083 AuditLogConfig.fromJson(core.Map _json) { |
2096 if (_json.containsKey("exemptedMembers")) { | 2084 if (_json.containsKey("exemptedMembers")) { |
2097 exemptedMembers = _json["exemptedMembers"]; | 2085 exemptedMembers = _json["exemptedMembers"]; |
2098 } | 2086 } |
2099 if (_json.containsKey("logType")) { | 2087 if (_json.containsKey("logType")) { |
2100 logType = _json["logType"]; | 2088 logType = _json["logType"]; |
2101 } | 2089 } |
2102 } | 2090 } |
2103 | 2091 |
2104 core.Map<core.String, core.Object> toJson() { | 2092 core.Map<core.String, core.Object> toJson() { |
2105 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2093 final core.Map<core.String, core.Object> _json = |
| 2094 new core.Map<core.String, core.Object>(); |
2106 if (exemptedMembers != null) { | 2095 if (exemptedMembers != null) { |
2107 _json["exemptedMembers"] = exemptedMembers; | 2096 _json["exemptedMembers"] = exemptedMembers; |
2108 } | 2097 } |
2109 if (logType != null) { | 2098 if (logType != null) { |
2110 _json["logType"] = logType; | 2099 _json["logType"] = logType; |
2111 } | 2100 } |
2112 return _json; | 2101 return _json; |
2113 } | 2102 } |
2114 } | 2103 } |
2115 | 2104 |
2116 /** Associates `members` with a `role`. */ | 2105 /// Associates `members` with a `role`. |
2117 class Binding { | 2106 class Binding { |
2118 /** | 2107 /// Specifies the identities requesting access for a Cloud Platform resource. |
2119 * Specifies the identities requesting access for a Cloud Platform resource. | 2108 /// `members` can have the following values: |
2120 * `members` can have the following values: | 2109 /// |
2121 * | 2110 /// * `allUsers`: A special identifier that represents anyone who is |
2122 * * `allUsers`: A special identifier that represents anyone who is | 2111 /// on the internet; with or without a Google account. |
2123 * on the internet; with or without a Google account. | 2112 /// |
2124 * | 2113 /// * `allAuthenticatedUsers`: A special identifier that represents anyone |
2125 * * `allAuthenticatedUsers`: A special identifier that represents anyone | 2114 /// who is authenticated with a Google account or a service account. |
2126 * who is authenticated with a Google account or a service account. | 2115 /// |
2127 * | 2116 /// * `user:{emailid}`: An email address that represents a specific Google |
2128 * * `user:{emailid}`: An email address that represents a specific Google | 2117 /// account. For example, `alice@gmail.com` or `joe@example.com`. |
2129 * account. For example, `alice@gmail.com` or `joe@example.com`. | 2118 /// |
2130 * | 2119 /// |
2131 * | 2120 /// * `serviceAccount:{emailid}`: An email address that represents a service |
2132 * * `serviceAccount:{emailid}`: An email address that represents a service | 2121 /// account. For example, `my-other-app@appspot.gserviceaccount.com`. |
2133 * account. For example, `my-other-app@appspot.gserviceaccount.com`. | 2122 /// |
2134 * | 2123 /// * `group:{emailid}`: An email address that represents a Google group. |
2135 * * `group:{emailid}`: An email address that represents a Google group. | 2124 /// For example, `admins@example.com`. |
2136 * For example, `admins@example.com`. | 2125 /// |
2137 * | 2126 /// |
2138 * | 2127 /// * `domain:{domain}`: A Google Apps domain name that represents all the |
2139 * * `domain:{domain}`: A Google Apps domain name that represents all the | 2128 /// users of that domain. For example, `google.com` or `example.com`. |
2140 * users of that domain. For example, `google.com` or `example.com`. | |
2141 */ | |
2142 core.List<core.String> members; | 2129 core.List<core.String> members; |
2143 /** | 2130 |
2144 * Role that is assigned to `members`. | 2131 /// Role that is assigned to `members`. |
2145 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. | 2132 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
2146 * Required | 2133 /// Required |
2147 */ | |
2148 core.String role; | 2134 core.String role; |
2149 | 2135 |
2150 Binding(); | 2136 Binding(); |
2151 | 2137 |
2152 Binding.fromJson(core.Map _json) { | 2138 Binding.fromJson(core.Map _json) { |
2153 if (_json.containsKey("members")) { | 2139 if (_json.containsKey("members")) { |
2154 members = _json["members"]; | 2140 members = _json["members"]; |
2155 } | 2141 } |
2156 if (_json.containsKey("role")) { | 2142 if (_json.containsKey("role")) { |
2157 role = _json["role"]; | 2143 role = _json["role"]; |
2158 } | 2144 } |
2159 } | 2145 } |
2160 | 2146 |
2161 core.Map<core.String, core.Object> toJson() { | 2147 core.Map<core.String, core.Object> toJson() { |
2162 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2148 final core.Map<core.String, core.Object> _json = |
| 2149 new core.Map<core.String, core.Object>(); |
2163 if (members != null) { | 2150 if (members != null) { |
2164 _json["members"] = members; | 2151 _json["members"] = members; |
2165 } | 2152 } |
2166 if (role != null) { | 2153 if (role != null) { |
2167 _json["role"] = role; | 2154 _json["role"] = role; |
2168 } | 2155 } |
2169 return _json; | 2156 return _json; |
2170 } | 2157 } |
2171 } | 2158 } |
2172 | 2159 |
2173 /** | 2160 /// A `Constraint` that is either enforced or not. |
2174 * A `Constraint` that is either enforced or not. | 2161 /// |
2175 * | 2162 /// For example a constraint `constraints/compute.disableSerialPortAccess`. |
2176 * For example a constraint `constraints/compute.disableSerialPortAccess`. | 2163 /// If it is enforced on a VM instance, serial port connections will not be |
2177 * If it is enforced on a VM instance, serial port connections will not be | 2164 /// opened to that instance. |
2178 * opened to that instance. | |
2179 */ | |
2180 class BooleanConstraint { | 2165 class BooleanConstraint { |
2181 | |
2182 BooleanConstraint(); | 2166 BooleanConstraint(); |
2183 | 2167 |
2184 BooleanConstraint.fromJson(core.Map _json) { | 2168 BooleanConstraint.fromJson(core.Map _json) {} |
2185 } | |
2186 | 2169 |
2187 core.Map<core.String, core.Object> toJson() { | 2170 core.Map<core.String, core.Object> toJson() { |
2188 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2171 final core.Map<core.String, core.Object> _json = |
| 2172 new core.Map<core.String, core.Object>(); |
2189 return _json; | 2173 return _json; |
2190 } | 2174 } |
2191 } | 2175 } |
2192 | 2176 |
2193 /** | 2177 /// Used in `policy_type` to specify how `boolean_policy` will behave at this |
2194 * Used in `policy_type` to specify how `boolean_policy` will behave at this | 2178 /// resource. |
2195 * resource. | |
2196 */ | |
2197 class BooleanPolicy { | 2179 class BooleanPolicy { |
2198 /** | 2180 /// If `true`, then the `Policy` is enforced. If `false`, then any |
2199 * If `true`, then the `Policy` is enforced. If `false`, then any | 2181 /// configuration is acceptable. |
2200 * configuration is acceptable. | 2182 /// |
2201 * | 2183 /// Suppose you have a `Constraint` |
2202 * Suppose you have a `Constraint` | 2184 /// `constraints/compute.disableSerialPortAccess` |
2203 * `constraints/compute.disableSerialPortAccess` | 2185 /// with `constraint_default` set to `ALLOW`. A `Policy` for that |
2204 * with `constraint_default` set to `ALLOW`. A `Policy` for that | 2186 /// `Constraint` exhibits the following behavior: |
2205 * `Constraint` exhibits the following behavior: | 2187 /// - If the `Policy` at this resource has enforced set to `false`, serial |
2206 * - If the `Policy` at this resource has enforced set to `false`, serial | 2188 /// port connection attempts will be allowed. |
2207 * port connection attempts will be allowed. | 2189 /// - If the `Policy` at this resource has enforced set to `true`, serial |
2208 * - If the `Policy` at this resource has enforced set to `true`, serial | 2190 /// port connection attempts will be refused. |
2209 * port connection attempts will be refused. | 2191 /// - If the `Policy` at this resource is `RestoreDefault`, serial port |
2210 * - If the `Policy` at this resource is `RestoreDefault`, serial port | 2192 /// connection attempts will be allowed. |
2211 * connection attempts will be allowed. | 2193 /// - If no `Policy` is set at this resource or anywhere higher in the |
2212 * - If no `Policy` is set at this resource or anywhere higher in the | 2194 /// resource hierarchy, serial port connection attempts will be allowed. |
2213 * resource hierarchy, serial port connection attempts will be allowed. | 2195 /// - If no `Policy` is set at this resource, but one exists higher in the |
2214 * - If no `Policy` is set at this resource, but one exists higher in the | 2196 /// resource hierarchy, the behavior is as if the`Policy` were set at |
2215 * resource hierarchy, the behavior is as if the`Policy` were set at | 2197 /// this resource. |
2216 * this resource. | 2198 /// |
2217 * | 2199 /// The following examples demonstrate the different possible layerings: |
2218 * The following examples demonstrate the different possible layerings: | 2200 /// |
2219 * | 2201 /// Example 1 (nearest `Constraint` wins): |
2220 * Example 1 (nearest `Constraint` wins): | 2202 /// `organizations/foo` has a `Policy` with: |
2221 * `organizations/foo` has a `Policy` with: | 2203 /// {enforced: false} |
2222 * {enforced: false} | 2204 /// `projects/bar` has no `Policy` set. |
2223 * `projects/bar` has no `Policy` set. | 2205 /// The constraint at `projects/bar` and `organizations/foo` will not be |
2224 * The constraint at `projects/bar` and `organizations/foo` will not be | 2206 /// enforced. |
2225 * enforced. | 2207 /// |
2226 * | 2208 /// Example 2 (enforcement gets replaced): |
2227 * Example 2 (enforcement gets replaced): | 2209 /// `organizations/foo` has a `Policy` with: |
2228 * `organizations/foo` has a `Policy` with: | 2210 /// {enforced: false} |
2229 * {enforced: false} | 2211 /// `projects/bar` has a `Policy` with: |
2230 * `projects/bar` has a `Policy` with: | 2212 /// {enforced: true} |
2231 * {enforced: true} | 2213 /// The constraint at `organizations/foo` is not enforced. |
2232 * The constraint at `organizations/foo` is not enforced. | 2214 /// The constraint at `projects/bar` is enforced. |
2233 * The constraint at `projects/bar` is enforced. | 2215 /// |
2234 * | 2216 /// Example 3 (RestoreDefault): |
2235 * Example 3 (RestoreDefault): | 2217 /// `organizations/foo` has a `Policy` with: |
2236 * `organizations/foo` has a `Policy` with: | 2218 /// {enforced: true} |
2237 * {enforced: true} | 2219 /// `projects/bar` has a `Policy` with: |
2238 * `projects/bar` has a `Policy` with: | 2220 /// {RestoreDefault: {}} |
2239 * {RestoreDefault: {}} | 2221 /// The constraint at `organizations/foo` is enforced. |
2240 * The constraint at `organizations/foo` is enforced. | 2222 /// The constraint at `projects/bar` is not enforced, because |
2241 * The constraint at `projects/bar` is not enforced, because | 2223 /// `constraint_default` for the `Constraint` is `ALLOW`. |
2242 * `constraint_default` for the `Constraint` is `ALLOW`. | |
2243 */ | |
2244 core.bool enforced; | 2224 core.bool enforced; |
2245 | 2225 |
2246 BooleanPolicy(); | 2226 BooleanPolicy(); |
2247 | 2227 |
2248 BooleanPolicy.fromJson(core.Map _json) { | 2228 BooleanPolicy.fromJson(core.Map _json) { |
2249 if (_json.containsKey("enforced")) { | 2229 if (_json.containsKey("enforced")) { |
2250 enforced = _json["enforced"]; | 2230 enforced = _json["enforced"]; |
2251 } | 2231 } |
2252 } | 2232 } |
2253 | 2233 |
2254 core.Map<core.String, core.Object> toJson() { | 2234 core.Map<core.String, core.Object> toJson() { |
2255 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2235 final core.Map<core.String, core.Object> _json = |
| 2236 new core.Map<core.String, core.Object>(); |
2256 if (enforced != null) { | 2237 if (enforced != null) { |
2257 _json["enforced"] = enforced; | 2238 _json["enforced"] = enforced; |
2258 } | 2239 } |
2259 return _json; | 2240 return _json; |
2260 } | 2241 } |
2261 } | 2242 } |
2262 | 2243 |
2263 /** The request sent to the ClearOrgPolicy method. */ | 2244 /// The request sent to the ClearOrgPolicy method. |
2264 class ClearOrgPolicyRequest { | 2245 class ClearOrgPolicyRequest { |
2265 /** Name of the `Constraint` of the `Policy` to clear. */ | 2246 /// Name of the `Constraint` of the `Policy` to clear. |
2266 core.String constraint; | 2247 core.String constraint; |
2267 /** | 2248 |
2268 * The current version, for concurrency control. Not sending an `etag` | 2249 /// The current version, for concurrency control. Not sending an `etag` |
2269 * will cause the `Policy` to be cleared blindly. | 2250 /// will cause the `Policy` to be cleared blindly. |
2270 */ | |
2271 core.String etag; | 2251 core.String etag; |
2272 core.List<core.int> get etagAsBytes { | 2252 core.List<core.int> get etagAsBytes { |
2273 return convert.BASE64.decode(etag); | 2253 return convert.BASE64.decode(etag); |
2274 } | 2254 } |
2275 | 2255 |
2276 void set etagAsBytes(core.List<core.int> _bytes) { | 2256 void set etagAsBytes(core.List<core.int> _bytes) { |
2277 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 2257 etag = |
| 2258 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
2278 } | 2259 } |
2279 | 2260 |
2280 ClearOrgPolicyRequest(); | 2261 ClearOrgPolicyRequest(); |
2281 | 2262 |
2282 ClearOrgPolicyRequest.fromJson(core.Map _json) { | 2263 ClearOrgPolicyRequest.fromJson(core.Map _json) { |
2283 if (_json.containsKey("constraint")) { | 2264 if (_json.containsKey("constraint")) { |
2284 constraint = _json["constraint"]; | 2265 constraint = _json["constraint"]; |
2285 } | 2266 } |
2286 if (_json.containsKey("etag")) { | 2267 if (_json.containsKey("etag")) { |
2287 etag = _json["etag"]; | 2268 etag = _json["etag"]; |
2288 } | 2269 } |
2289 } | 2270 } |
2290 | 2271 |
2291 core.Map<core.String, core.Object> toJson() { | 2272 core.Map<core.String, core.Object> toJson() { |
2292 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2273 final core.Map<core.String, core.Object> _json = |
| 2274 new core.Map<core.String, core.Object>(); |
2293 if (constraint != null) { | 2275 if (constraint != null) { |
2294 _json["constraint"] = constraint; | 2276 _json["constraint"] = constraint; |
2295 } | 2277 } |
2296 if (etag != null) { | 2278 if (etag != null) { |
2297 _json["etag"] = etag; | 2279 _json["etag"] = etag; |
2298 } | 2280 } |
2299 return _json; | 2281 return _json; |
2300 } | 2282 } |
2301 } | 2283 } |
2302 | 2284 |
2303 /** | 2285 /// A `Constraint` describes a way in which a resource's configuration can be |
2304 * A `Constraint` describes a way in which a resource's configuration can be | 2286 /// restricted. For example, it controls which cloud services can be activated |
2305 * restricted. For example, it controls which cloud services can be activated | 2287 /// across an organization, or whether a Compute Engine instance can have |
2306 * across an organization, or whether a Compute Engine instance can have | 2288 /// serial port connections established. `Constraints` can be configured by the |
2307 * serial port connections established. `Constraints` can be configured by the | 2289 /// organization's policy adminstrator to fit the needs of the organzation by |
2308 * organization's policy adminstrator to fit the needs of the organzation by | 2290 /// setting Policies for `Constraints` at different locations in the |
2309 * setting Policies for `Constraints` at different locations in the | 2291 /// organization's resource hierarchy. Policies are inherited down the resource |
2310 * organization's resource hierarchy. Policies are inherited down the resource | 2292 /// hierarchy from higher levels, but can also be overridden. For details about |
2311 * hierarchy from higher levels, but can also be overridden. For details about | 2293 /// the inheritance rules please read about |
2312 * the inheritance rules please read about | 2294 /// Policies. |
2313 * Policies. | 2295 /// |
2314 * | 2296 /// `Constraints` have a default behavior determined by the |
2315 * `Constraints` have a default behavior determined by the `constraint_default` | 2297 /// `constraint_default` |
2316 * field, which is the enforcement behavior that is used in the absence of a | 2298 /// field, which is the enforcement behavior that is used in the absence of a |
2317 * `Policy` being defined or inherited for the resource in question. | 2299 /// `Policy` being defined or inherited for the resource in question. |
2318 */ | |
2319 class Constraint { | 2300 class Constraint { |
2320 /** Defines this constraint as being a BooleanConstraint. */ | 2301 /// Defines this constraint as being a BooleanConstraint. |
2321 BooleanConstraint booleanConstraint; | 2302 BooleanConstraint booleanConstraint; |
2322 /** | 2303 |
2323 * The evaluation behavior of this constraint in the absense of 'Policy'. | 2304 /// The evaluation behavior of this constraint in the absense of 'Policy'. |
2324 * Possible string values are: | 2305 /// Possible string values are: |
2325 * - "CONSTRAINT_DEFAULT_UNSPECIFIED" : This is only used for distinguishing | 2306 /// - "CONSTRAINT_DEFAULT_UNSPECIFIED" : This is only used for distinguishing |
2326 * unset values and should never be | 2307 /// unset values and should never be |
2327 * used. | 2308 /// used. |
2328 * - "ALLOW" : Indicate that all values are allowed for list constraints. | 2309 /// - "ALLOW" : Indicate that all values are allowed for list constraints. |
2329 * Indicate that enforcement is off for boolean constraints. | 2310 /// Indicate that enforcement is off for boolean constraints. |
2330 * - "DENY" : Indicate that all values are denied for list constraints. | 2311 /// - "DENY" : Indicate that all values are denied for list constraints. |
2331 * Indicate that enforcement is on for boolean constraints. | 2312 /// Indicate that enforcement is on for boolean constraints. |
2332 */ | |
2333 core.String constraintDefault; | 2313 core.String constraintDefault; |
2334 /** | 2314 |
2335 * Detailed description of what this `Constraint` controls as well as how and | 2315 /// Detailed description of what this `Constraint` controls as well as how |
2336 * where it is enforced. | 2316 /// and |
2337 * | 2317 /// where it is enforced. |
2338 * Mutable. | 2318 /// |
2339 */ | 2319 /// Mutable. |
2340 core.String description; | 2320 core.String description; |
2341 /** | 2321 |
2342 * The human readable name. | 2322 /// The human readable name. |
2343 * | 2323 /// |
2344 * Mutable. | 2324 /// Mutable. |
2345 */ | |
2346 core.String displayName; | 2325 core.String displayName; |
2347 /** Defines this constraint as being a ListConstraint. */ | 2326 |
| 2327 /// Defines this constraint as being a ListConstraint. |
2348 ListConstraint listConstraint; | 2328 ListConstraint listConstraint; |
2349 /** | 2329 |
2350 * Immutable value, required to globally be unique. For example, | 2330 /// Immutable value, required to globally be unique. For example, |
2351 * `constraints/serviceuser.services` | 2331 /// `constraints/serviceuser.services` |
2352 */ | |
2353 core.String name; | 2332 core.String name; |
2354 /** Version of the `Constraint`. Default version is 0; */ | 2333 |
| 2334 /// Version of the `Constraint`. Default version is 0; |
2355 core.int version; | 2335 core.int version; |
2356 | 2336 |
2357 Constraint(); | 2337 Constraint(); |
2358 | 2338 |
2359 Constraint.fromJson(core.Map _json) { | 2339 Constraint.fromJson(core.Map _json) { |
2360 if (_json.containsKey("booleanConstraint")) { | 2340 if (_json.containsKey("booleanConstraint")) { |
2361 booleanConstraint = new BooleanConstraint.fromJson(_json["booleanConstrain
t"]); | 2341 booleanConstraint = |
| 2342 new BooleanConstraint.fromJson(_json["booleanConstraint"]); |
2362 } | 2343 } |
2363 if (_json.containsKey("constraintDefault")) { | 2344 if (_json.containsKey("constraintDefault")) { |
2364 constraintDefault = _json["constraintDefault"]; | 2345 constraintDefault = _json["constraintDefault"]; |
2365 } | 2346 } |
2366 if (_json.containsKey("description")) { | 2347 if (_json.containsKey("description")) { |
2367 description = _json["description"]; | 2348 description = _json["description"]; |
2368 } | 2349 } |
2369 if (_json.containsKey("displayName")) { | 2350 if (_json.containsKey("displayName")) { |
2370 displayName = _json["displayName"]; | 2351 displayName = _json["displayName"]; |
2371 } | 2352 } |
2372 if (_json.containsKey("listConstraint")) { | 2353 if (_json.containsKey("listConstraint")) { |
2373 listConstraint = new ListConstraint.fromJson(_json["listConstraint"]); | 2354 listConstraint = new ListConstraint.fromJson(_json["listConstraint"]); |
2374 } | 2355 } |
2375 if (_json.containsKey("name")) { | 2356 if (_json.containsKey("name")) { |
2376 name = _json["name"]; | 2357 name = _json["name"]; |
2377 } | 2358 } |
2378 if (_json.containsKey("version")) { | 2359 if (_json.containsKey("version")) { |
2379 version = _json["version"]; | 2360 version = _json["version"]; |
2380 } | 2361 } |
2381 } | 2362 } |
2382 | 2363 |
2383 core.Map<core.String, core.Object> toJson() { | 2364 core.Map<core.String, core.Object> toJson() { |
2384 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2365 final core.Map<core.String, core.Object> _json = |
| 2366 new core.Map<core.String, core.Object>(); |
2385 if (booleanConstraint != null) { | 2367 if (booleanConstraint != null) { |
2386 _json["booleanConstraint"] = (booleanConstraint).toJson(); | 2368 _json["booleanConstraint"] = (booleanConstraint).toJson(); |
2387 } | 2369 } |
2388 if (constraintDefault != null) { | 2370 if (constraintDefault != null) { |
2389 _json["constraintDefault"] = constraintDefault; | 2371 _json["constraintDefault"] = constraintDefault; |
2390 } | 2372 } |
2391 if (description != null) { | 2373 if (description != null) { |
2392 _json["description"] = description; | 2374 _json["description"] = description; |
2393 } | 2375 } |
2394 if (displayName != null) { | 2376 if (displayName != null) { |
2395 _json["displayName"] = displayName; | 2377 _json["displayName"] = displayName; |
2396 } | 2378 } |
2397 if (listConstraint != null) { | 2379 if (listConstraint != null) { |
2398 _json["listConstraint"] = (listConstraint).toJson(); | 2380 _json["listConstraint"] = (listConstraint).toJson(); |
2399 } | 2381 } |
2400 if (name != null) { | 2382 if (name != null) { |
2401 _json["name"] = name; | 2383 _json["name"] = name; |
2402 } | 2384 } |
2403 if (version != null) { | 2385 if (version != null) { |
2404 _json["version"] = version; | 2386 _json["version"] = version; |
2405 } | 2387 } |
2406 return _json; | 2388 return _json; |
2407 } | 2389 } |
2408 } | 2390 } |
2409 | 2391 |
2410 /** | 2392 /// A generic empty message that you can re-use to avoid defining duplicated |
2411 * A generic empty message that you can re-use to avoid defining duplicated | 2393 /// empty messages in your APIs. A typical example is to use it as the request |
2412 * empty messages in your APIs. A typical example is to use it as the request | 2394 /// or the response type of an API method. For instance: |
2413 * or the response type of an API method. For instance: | 2395 /// |
2414 * | 2396 /// service Foo { |
2415 * service Foo { | 2397 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
2416 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 2398 /// } |
2417 * } | 2399 /// |
2418 * | 2400 /// The JSON representation for `Empty` is empty JSON object `{}`. |
2419 * The JSON representation for `Empty` is empty JSON object `{}`. | |
2420 */ | |
2421 class Empty { | 2401 class Empty { |
2422 | |
2423 Empty(); | 2402 Empty(); |
2424 | 2403 |
2425 Empty.fromJson(core.Map _json) { | 2404 Empty.fromJson(core.Map _json) {} |
2426 } | |
2427 | 2405 |
2428 core.Map<core.String, core.Object> toJson() { | 2406 core.Map<core.String, core.Object> toJson() { |
2429 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2407 final core.Map<core.String, core.Object> _json = |
| 2408 new core.Map<core.String, core.Object>(); |
2430 return _json; | 2409 return _json; |
2431 } | 2410 } |
2432 } | 2411 } |
2433 | 2412 |
2434 /** Metadata describing a long running folder operation */ | 2413 /// Metadata describing a long running folder operation |
2435 class FolderOperation { | 2414 class FolderOperation { |
2436 /** | 2415 /// The resource name of the folder or organization we are either creating |
2437 * The resource name of the folder or organization we are either creating | 2416 /// the folder under or moving the folder to. |
2438 * the folder under or moving the folder to. | |
2439 */ | |
2440 core.String destinationParent; | 2417 core.String destinationParent; |
2441 /** The display name of the folder. */ | 2418 |
| 2419 /// The display name of the folder. |
2442 core.String displayName; | 2420 core.String displayName; |
2443 /** | 2421 |
2444 * The type of this operation. | 2422 /// The type of this operation. |
2445 * Possible string values are: | 2423 /// Possible string values are: |
2446 * - "OPERATION_TYPE_UNSPECIFIED" : Operation type not specified. | 2424 /// - "OPERATION_TYPE_UNSPECIFIED" : Operation type not specified. |
2447 * - "CREATE" : A create folder operation. | 2425 /// - "CREATE" : A create folder operation. |
2448 * - "MOVE" : A move folder operation. | 2426 /// - "MOVE" : A move folder operation. |
2449 */ | |
2450 core.String operationType; | 2427 core.String operationType; |
2451 /** | 2428 |
2452 * The resource name of the folder's parent. | 2429 /// The resource name of the folder's parent. |
2453 * Only applicable when the operation_type is MOVE. | 2430 /// Only applicable when the operation_type is MOVE. |
2454 */ | |
2455 core.String sourceParent; | 2431 core.String sourceParent; |
2456 | 2432 |
2457 FolderOperation(); | 2433 FolderOperation(); |
2458 | 2434 |
2459 FolderOperation.fromJson(core.Map _json) { | 2435 FolderOperation.fromJson(core.Map _json) { |
2460 if (_json.containsKey("destinationParent")) { | 2436 if (_json.containsKey("destinationParent")) { |
2461 destinationParent = _json["destinationParent"]; | 2437 destinationParent = _json["destinationParent"]; |
2462 } | 2438 } |
2463 if (_json.containsKey("displayName")) { | 2439 if (_json.containsKey("displayName")) { |
2464 displayName = _json["displayName"]; | 2440 displayName = _json["displayName"]; |
2465 } | 2441 } |
2466 if (_json.containsKey("operationType")) { | 2442 if (_json.containsKey("operationType")) { |
2467 operationType = _json["operationType"]; | 2443 operationType = _json["operationType"]; |
2468 } | 2444 } |
2469 if (_json.containsKey("sourceParent")) { | 2445 if (_json.containsKey("sourceParent")) { |
2470 sourceParent = _json["sourceParent"]; | 2446 sourceParent = _json["sourceParent"]; |
2471 } | 2447 } |
2472 } | 2448 } |
2473 | 2449 |
2474 core.Map<core.String, core.Object> toJson() { | 2450 core.Map<core.String, core.Object> toJson() { |
2475 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2451 final core.Map<core.String, core.Object> _json = |
| 2452 new core.Map<core.String, core.Object>(); |
2476 if (destinationParent != null) { | 2453 if (destinationParent != null) { |
2477 _json["destinationParent"] = destinationParent; | 2454 _json["destinationParent"] = destinationParent; |
2478 } | 2455 } |
2479 if (displayName != null) { | 2456 if (displayName != null) { |
2480 _json["displayName"] = displayName; | 2457 _json["displayName"] = displayName; |
2481 } | 2458 } |
2482 if (operationType != null) { | 2459 if (operationType != null) { |
2483 _json["operationType"] = operationType; | 2460 _json["operationType"] = operationType; |
2484 } | 2461 } |
2485 if (sourceParent != null) { | 2462 if (sourceParent != null) { |
2486 _json["sourceParent"] = sourceParent; | 2463 _json["sourceParent"] = sourceParent; |
2487 } | 2464 } |
2488 return _json; | 2465 return _json; |
2489 } | 2466 } |
2490 } | 2467 } |
2491 | 2468 |
2492 /** A classification of the Folder Operation error. */ | 2469 /// A classification of the Folder Operation error. |
2493 class FolderOperationError { | 2470 class FolderOperationError { |
2494 /** | 2471 /// The type of operation error experienced. |
2495 * The type of operation error experienced. | 2472 /// Possible string values are: |
2496 * Possible string values are: | 2473 /// - "ERROR_TYPE_UNSPECIFIED" : The error type was unrecognized or |
2497 * - "ERROR_TYPE_UNSPECIFIED" : The error type was unrecognized or | 2474 /// unspecified. |
2498 * unspecified. | 2475 /// - "ACTIVE_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate |
2499 * - "ACTIVE_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate the | 2476 /// the max folder depth constraint. |
2500 * max folder depth constraint. | 2477 /// - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the |
2501 * - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the | 2478 /// max child folders constraint. |
2502 * max child folders constraint. | 2479 /// - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate |
2503 * - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate | 2480 /// the locally-unique folder |
2504 * the locally-unique folder | 2481 /// display_name constraint. |
2505 * display_name constraint. | 2482 /// - "RESOURCE_DELETED_VIOLATION" : The resource being moved has been |
2506 * - "RESOURCE_DELETED_VIOLATION" : The resource being moved has been deleted. | 2483 /// deleted. |
2507 * - "PARENT_DELETED_VIOLATION" : The resource a folder was being added to has | 2484 /// - "PARENT_DELETED_VIOLATION" : The resource a folder was being added to |
2508 * been deleted. | 2485 /// has been deleted. |
2509 * - "CYCLE_INTRODUCED_VIOLATION" : The attempted action would introduce cycle | 2486 /// - "CYCLE_INTRODUCED_VIOLATION" : The attempted action would introduce |
2510 * in resource path. | 2487 /// cycle in resource path. |
2511 * - "FOLDER_BEING_MOVED_VIOLATION" : The attempted action would move a folder | 2488 /// - "FOLDER_BEING_MOVED_VIOLATION" : The attempted action would move a |
2512 * that is already being moved. | 2489 /// folder that is already being moved. |
2513 * - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" : The folder the caller is trying | 2490 /// - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" : The folder the caller is |
2514 * to delete contains active resources. | 2491 /// trying to delete contains active resources. |
2515 * - "DELETED_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate | 2492 /// - "DELETED_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate |
2516 * the max deleted folder depth | 2493 /// the max deleted folder depth |
2517 * constraint. | 2494 /// constraint. |
2518 */ | |
2519 core.String errorMessageId; | 2495 core.String errorMessageId; |
2520 | 2496 |
2521 FolderOperationError(); | 2497 FolderOperationError(); |
2522 | 2498 |
2523 FolderOperationError.fromJson(core.Map _json) { | 2499 FolderOperationError.fromJson(core.Map _json) { |
2524 if (_json.containsKey("errorMessageId")) { | 2500 if (_json.containsKey("errorMessageId")) { |
2525 errorMessageId = _json["errorMessageId"]; | 2501 errorMessageId = _json["errorMessageId"]; |
2526 } | 2502 } |
2527 } | 2503 } |
2528 | 2504 |
2529 core.Map<core.String, core.Object> toJson() { | 2505 core.Map<core.String, core.Object> toJson() { |
2530 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2506 final core.Map<core.String, core.Object> _json = |
| 2507 new core.Map<core.String, core.Object>(); |
2531 if (errorMessageId != null) { | 2508 if (errorMessageId != null) { |
2532 _json["errorMessageId"] = errorMessageId; | 2509 _json["errorMessageId"] = errorMessageId; |
2533 } | 2510 } |
2534 return _json; | 2511 return _json; |
2535 } | 2512 } |
2536 } | 2513 } |
2537 | 2514 |
2538 /** | 2515 /// The request sent to the |
2539 * The request sent to the | 2516 /// GetAncestry |
2540 * GetAncestry | 2517 /// method. |
2541 * method. | |
2542 */ | |
2543 class GetAncestryRequest { | 2518 class GetAncestryRequest { |
2544 | |
2545 GetAncestryRequest(); | 2519 GetAncestryRequest(); |
2546 | 2520 |
2547 GetAncestryRequest.fromJson(core.Map _json) { | 2521 GetAncestryRequest.fromJson(core.Map _json) {} |
2548 } | |
2549 | 2522 |
2550 core.Map<core.String, core.Object> toJson() { | 2523 core.Map<core.String, core.Object> toJson() { |
2551 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2524 final core.Map<core.String, core.Object> _json = |
| 2525 new core.Map<core.String, core.Object>(); |
2552 return _json; | 2526 return _json; |
2553 } | 2527 } |
2554 } | 2528 } |
2555 | 2529 |
2556 /** Response from the GetAncestry method. */ | 2530 /// Response from the GetAncestry method. |
2557 class GetAncestryResponse { | 2531 class GetAncestryResponse { |
2558 /** | 2532 /// Ancestors are ordered from bottom to top of the resource hierarchy. The |
2559 * Ancestors are ordered from bottom to top of the resource hierarchy. The | 2533 /// first ancestor is the project itself, followed by the project's parent, |
2560 * first ancestor is the project itself, followed by the project's parent, | 2534 /// etc. |
2561 * etc. | |
2562 */ | |
2563 core.List<Ancestor> ancestor; | 2535 core.List<Ancestor> ancestor; |
2564 | 2536 |
2565 GetAncestryResponse(); | 2537 GetAncestryResponse(); |
2566 | 2538 |
2567 GetAncestryResponse.fromJson(core.Map _json) { | 2539 GetAncestryResponse.fromJson(core.Map _json) { |
2568 if (_json.containsKey("ancestor")) { | 2540 if (_json.containsKey("ancestor")) { |
2569 ancestor = _json["ancestor"].map((value) => new Ancestor.fromJson(value)).
toList(); | 2541 ancestor = _json["ancestor"] |
| 2542 .map((value) => new Ancestor.fromJson(value)) |
| 2543 .toList(); |
2570 } | 2544 } |
2571 } | 2545 } |
2572 | 2546 |
2573 core.Map<core.String, core.Object> toJson() { | 2547 core.Map<core.String, core.Object> toJson() { |
2574 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2548 final core.Map<core.String, core.Object> _json = |
| 2549 new core.Map<core.String, core.Object>(); |
2575 if (ancestor != null) { | 2550 if (ancestor != null) { |
2576 _json["ancestor"] = ancestor.map((value) => (value).toJson()).toList(); | 2551 _json["ancestor"] = ancestor.map((value) => (value).toJson()).toList(); |
2577 } | 2552 } |
2578 return _json; | 2553 return _json; |
2579 } | 2554 } |
2580 } | 2555 } |
2581 | 2556 |
2582 /** The request sent to the GetEffectiveOrgPolicy method. */ | 2557 /// The request sent to the GetEffectiveOrgPolicy method. |
2583 class GetEffectiveOrgPolicyRequest { | 2558 class GetEffectiveOrgPolicyRequest { |
2584 /** The name of the `Constraint` to compute the effective `Policy`. */ | 2559 /// The name of the `Constraint` to compute the effective `Policy`. |
2585 core.String constraint; | 2560 core.String constraint; |
2586 | 2561 |
2587 GetEffectiveOrgPolicyRequest(); | 2562 GetEffectiveOrgPolicyRequest(); |
2588 | 2563 |
2589 GetEffectiveOrgPolicyRequest.fromJson(core.Map _json) { | 2564 GetEffectiveOrgPolicyRequest.fromJson(core.Map _json) { |
2590 if (_json.containsKey("constraint")) { | 2565 if (_json.containsKey("constraint")) { |
2591 constraint = _json["constraint"]; | 2566 constraint = _json["constraint"]; |
2592 } | 2567 } |
2593 } | 2568 } |
2594 | 2569 |
2595 core.Map<core.String, core.Object> toJson() { | 2570 core.Map<core.String, core.Object> toJson() { |
2596 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2571 final core.Map<core.String, core.Object> _json = |
| 2572 new core.Map<core.String, core.Object>(); |
2597 if (constraint != null) { | 2573 if (constraint != null) { |
2598 _json["constraint"] = constraint; | 2574 _json["constraint"] = constraint; |
2599 } | 2575 } |
2600 return _json; | 2576 return _json; |
2601 } | 2577 } |
2602 } | 2578 } |
2603 | 2579 |
2604 /** Request message for `GetIamPolicy` method. */ | 2580 /// Request message for `GetIamPolicy` method. |
2605 class GetIamPolicyRequest { | 2581 class GetIamPolicyRequest { |
2606 | |
2607 GetIamPolicyRequest(); | 2582 GetIamPolicyRequest(); |
2608 | 2583 |
2609 GetIamPolicyRequest.fromJson(core.Map _json) { | 2584 GetIamPolicyRequest.fromJson(core.Map _json) {} |
2610 } | |
2611 | 2585 |
2612 core.Map<core.String, core.Object> toJson() { | 2586 core.Map<core.String, core.Object> toJson() { |
2613 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2587 final core.Map<core.String, core.Object> _json = |
| 2588 new core.Map<core.String, core.Object>(); |
2614 return _json; | 2589 return _json; |
2615 } | 2590 } |
2616 } | 2591 } |
2617 | 2592 |
2618 /** The request sent to the GetOrgPolicy method. */ | 2593 /// The request sent to the GetOrgPolicy method. |
2619 class GetOrgPolicyRequest { | 2594 class GetOrgPolicyRequest { |
2620 /** Name of the `Constraint` to get the `Policy`. */ | 2595 /// Name of the `Constraint` to get the `Policy`. |
2621 core.String constraint; | 2596 core.String constraint; |
2622 | 2597 |
2623 GetOrgPolicyRequest(); | 2598 GetOrgPolicyRequest(); |
2624 | 2599 |
2625 GetOrgPolicyRequest.fromJson(core.Map _json) { | 2600 GetOrgPolicyRequest.fromJson(core.Map _json) { |
2626 if (_json.containsKey("constraint")) { | 2601 if (_json.containsKey("constraint")) { |
2627 constraint = _json["constraint"]; | 2602 constraint = _json["constraint"]; |
2628 } | 2603 } |
2629 } | 2604 } |
2630 | 2605 |
2631 core.Map<core.String, core.Object> toJson() { | 2606 core.Map<core.String, core.Object> toJson() { |
2632 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2607 final core.Map<core.String, core.Object> _json = |
| 2608 new core.Map<core.String, core.Object>(); |
2633 if (constraint != null) { | 2609 if (constraint != null) { |
2634 _json["constraint"] = constraint; | 2610 _json["constraint"] = constraint; |
2635 } | 2611 } |
2636 return _json; | 2612 return _json; |
2637 } | 2613 } |
2638 } | 2614 } |
2639 | 2615 |
2640 /** | 2616 /// A Lien represents an encumbrance on the actions that can be performed on a |
2641 * A Lien represents an encumbrance on the actions that can be performed on a | 2617 /// resource. |
2642 * resource. | |
2643 */ | |
2644 class Lien { | 2618 class Lien { |
2645 /** The creation time of this Lien. */ | 2619 /// The creation time of this Lien. |
2646 core.String createTime; | 2620 core.String createTime; |
2647 /** | 2621 |
2648 * A system-generated unique identifier for this Lien. | 2622 /// A system-generated unique identifier for this Lien. |
2649 * | 2623 /// |
2650 * Example: `liens/1234abcd` | 2624 /// Example: `liens/1234abcd` |
2651 */ | |
2652 core.String name; | 2625 core.String name; |
2653 /** | 2626 |
2654 * A stable, user-visible/meaningful string identifying the origin of the | 2627 /// A stable, user-visible/meaningful string identifying the origin of the |
2655 * Lien, intended to be inspected programmatically. Maximum length of 200 | 2628 /// Lien, intended to be inspected programmatically. Maximum length of 200 |
2656 * characters. | 2629 /// characters. |
2657 * | 2630 /// |
2658 * Example: 'compute.googleapis.com' | 2631 /// Example: 'compute.googleapis.com' |
2659 */ | |
2660 core.String origin; | 2632 core.String origin; |
2661 /** | 2633 |
2662 * A reference to the resource this Lien is attached to. The server will | 2634 /// A reference to the resource this Lien is attached to. The server will |
2663 * validate the parent against those for which Liens are supported. | 2635 /// validate the parent against those for which Liens are supported. |
2664 * | 2636 /// |
2665 * Example: `projects/1234` | 2637 /// Example: `projects/1234` |
2666 */ | |
2667 core.String parent; | 2638 core.String parent; |
2668 /** | 2639 |
2669 * Concise user-visible strings indicating why an action cannot be performed | 2640 /// Concise user-visible strings indicating why an action cannot be performed |
2670 * on a resource. Maximum lenth of 200 characters. | 2641 /// on a resource. Maximum lenth of 200 characters. |
2671 * | 2642 /// |
2672 * Example: 'Holds production API key' | 2643 /// Example: 'Holds production API key' |
2673 */ | |
2674 core.String reason; | 2644 core.String reason; |
2675 /** | 2645 |
2676 * The types of operations which should be blocked as a result of this Lien. | 2646 /// The types of operations which should be blocked as a result of this Lien. |
2677 * Each value should correspond to an IAM permission. The server will | 2647 /// Each value should correspond to an IAM permission. The server will |
2678 * validate the permissions against those for which Liens are supported. | 2648 /// validate the permissions against those for which Liens are supported. |
2679 * | 2649 /// |
2680 * An empty list is meaningless and will be rejected. | 2650 /// An empty list is meaningless and will be rejected. |
2681 * | 2651 /// |
2682 * Example: ['resourcemanager.projects.delete'] | 2652 /// Example: ['resourcemanager.projects.delete'] |
2683 */ | |
2684 core.List<core.String> restrictions; | 2653 core.List<core.String> restrictions; |
2685 | 2654 |
2686 Lien(); | 2655 Lien(); |
2687 | 2656 |
2688 Lien.fromJson(core.Map _json) { | 2657 Lien.fromJson(core.Map _json) { |
2689 if (_json.containsKey("createTime")) { | 2658 if (_json.containsKey("createTime")) { |
2690 createTime = _json["createTime"]; | 2659 createTime = _json["createTime"]; |
2691 } | 2660 } |
2692 if (_json.containsKey("name")) { | 2661 if (_json.containsKey("name")) { |
2693 name = _json["name"]; | 2662 name = _json["name"]; |
2694 } | 2663 } |
2695 if (_json.containsKey("origin")) { | 2664 if (_json.containsKey("origin")) { |
2696 origin = _json["origin"]; | 2665 origin = _json["origin"]; |
2697 } | 2666 } |
2698 if (_json.containsKey("parent")) { | 2667 if (_json.containsKey("parent")) { |
2699 parent = _json["parent"]; | 2668 parent = _json["parent"]; |
2700 } | 2669 } |
2701 if (_json.containsKey("reason")) { | 2670 if (_json.containsKey("reason")) { |
2702 reason = _json["reason"]; | 2671 reason = _json["reason"]; |
2703 } | 2672 } |
2704 if (_json.containsKey("restrictions")) { | 2673 if (_json.containsKey("restrictions")) { |
2705 restrictions = _json["restrictions"]; | 2674 restrictions = _json["restrictions"]; |
2706 } | 2675 } |
2707 } | 2676 } |
2708 | 2677 |
2709 core.Map<core.String, core.Object> toJson() { | 2678 core.Map<core.String, core.Object> toJson() { |
2710 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2679 final core.Map<core.String, core.Object> _json = |
| 2680 new core.Map<core.String, core.Object>(); |
2711 if (createTime != null) { | 2681 if (createTime != null) { |
2712 _json["createTime"] = createTime; | 2682 _json["createTime"] = createTime; |
2713 } | 2683 } |
2714 if (name != null) { | 2684 if (name != null) { |
2715 _json["name"] = name; | 2685 _json["name"] = name; |
2716 } | 2686 } |
2717 if (origin != null) { | 2687 if (origin != null) { |
2718 _json["origin"] = origin; | 2688 _json["origin"] = origin; |
2719 } | 2689 } |
2720 if (parent != null) { | 2690 if (parent != null) { |
2721 _json["parent"] = parent; | 2691 _json["parent"] = parent; |
2722 } | 2692 } |
2723 if (reason != null) { | 2693 if (reason != null) { |
2724 _json["reason"] = reason; | 2694 _json["reason"] = reason; |
2725 } | 2695 } |
2726 if (restrictions != null) { | 2696 if (restrictions != null) { |
2727 _json["restrictions"] = restrictions; | 2697 _json["restrictions"] = restrictions; |
2728 } | 2698 } |
2729 return _json; | 2699 return _json; |
2730 } | 2700 } |
2731 } | 2701 } |
2732 | 2702 |
2733 /** | 2703 /// The request sent to the [ListAvailableOrgPolicyConstraints] |
2734 * The request sent to the [ListAvailableOrgPolicyConstraints] | 2704 /// google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. |
2735 * google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. | |
2736 */ | |
2737 class ListAvailableOrgPolicyConstraintsRequest { | 2705 class ListAvailableOrgPolicyConstraintsRequest { |
2738 /** | 2706 /// Size of the pages to be returned. This is currently unsupported and will |
2739 * Size of the pages to be returned. This is currently unsupported and will | 2707 /// be ignored. The server may at any point start using this field to limit |
2740 * be ignored. The server may at any point start using this field to limit | 2708 /// page size. |
2741 * page size. | |
2742 */ | |
2743 core.int pageSize; | 2709 core.int pageSize; |
2744 /** | 2710 |
2745 * Page token used to retrieve the next page. This is currently unsupported | 2711 /// Page token used to retrieve the next page. This is currently unsupported |
2746 * and will be ignored. The server may at any point start using this field. | 2712 /// and will be ignored. The server may at any point start using this field. |
2747 */ | |
2748 core.String pageToken; | 2713 core.String pageToken; |
2749 | 2714 |
2750 ListAvailableOrgPolicyConstraintsRequest(); | 2715 ListAvailableOrgPolicyConstraintsRequest(); |
2751 | 2716 |
2752 ListAvailableOrgPolicyConstraintsRequest.fromJson(core.Map _json) { | 2717 ListAvailableOrgPolicyConstraintsRequest.fromJson(core.Map _json) { |
2753 if (_json.containsKey("pageSize")) { | 2718 if (_json.containsKey("pageSize")) { |
2754 pageSize = _json["pageSize"]; | 2719 pageSize = _json["pageSize"]; |
2755 } | 2720 } |
2756 if (_json.containsKey("pageToken")) { | 2721 if (_json.containsKey("pageToken")) { |
2757 pageToken = _json["pageToken"]; | 2722 pageToken = _json["pageToken"]; |
2758 } | 2723 } |
2759 } | 2724 } |
2760 | 2725 |
2761 core.Map<core.String, core.Object> toJson() { | 2726 core.Map<core.String, core.Object> toJson() { |
2762 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2727 final core.Map<core.String, core.Object> _json = |
| 2728 new core.Map<core.String, core.Object>(); |
2763 if (pageSize != null) { | 2729 if (pageSize != null) { |
2764 _json["pageSize"] = pageSize; | 2730 _json["pageSize"] = pageSize; |
2765 } | 2731 } |
2766 if (pageToken != null) { | 2732 if (pageToken != null) { |
2767 _json["pageToken"] = pageToken; | 2733 _json["pageToken"] = pageToken; |
2768 } | 2734 } |
2769 return _json; | 2735 return _json; |
2770 } | 2736 } |
2771 } | 2737 } |
2772 | 2738 |
2773 /** | 2739 /// The response returned from the ListAvailableOrgPolicyConstraints method. |
2774 * The response returned from the ListAvailableOrgPolicyConstraints method. | 2740 /// Returns all `Constraints` that could be set at this level of the hierarchy |
2775 * Returns all `Constraints` that could be set at this level of the hierarchy | 2741 /// (contrast with the response from `ListPolicies`, which returns all policies |
2776 * (contrast with the response from `ListPolicies`, which returns all policies | 2742 /// which are set). |
2777 * which are set). | |
2778 */ | |
2779 class ListAvailableOrgPolicyConstraintsResponse { | 2743 class ListAvailableOrgPolicyConstraintsResponse { |
2780 /** | 2744 /// The collection of constraints that are settable on the request resource. |
2781 * The collection of constraints that are settable on the request resource. | |
2782 */ | |
2783 core.List<Constraint> constraints; | 2745 core.List<Constraint> constraints; |
2784 /** Page token used to retrieve the next page. This is currently not used. */ | 2746 |
| 2747 /// Page token used to retrieve the next page. This is currently not used. |
2785 core.String nextPageToken; | 2748 core.String nextPageToken; |
2786 | 2749 |
2787 ListAvailableOrgPolicyConstraintsResponse(); | 2750 ListAvailableOrgPolicyConstraintsResponse(); |
2788 | 2751 |
2789 ListAvailableOrgPolicyConstraintsResponse.fromJson(core.Map _json) { | 2752 ListAvailableOrgPolicyConstraintsResponse.fromJson(core.Map _json) { |
2790 if (_json.containsKey("constraints")) { | 2753 if (_json.containsKey("constraints")) { |
2791 constraints = _json["constraints"].map((value) => new Constraint.fromJson(
value)).toList(); | 2754 constraints = _json["constraints"] |
| 2755 .map((value) => new Constraint.fromJson(value)) |
| 2756 .toList(); |
2792 } | 2757 } |
2793 if (_json.containsKey("nextPageToken")) { | 2758 if (_json.containsKey("nextPageToken")) { |
2794 nextPageToken = _json["nextPageToken"]; | 2759 nextPageToken = _json["nextPageToken"]; |
2795 } | 2760 } |
2796 } | 2761 } |
2797 | 2762 |
2798 core.Map<core.String, core.Object> toJson() { | 2763 core.Map<core.String, core.Object> toJson() { |
2799 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2764 final core.Map<core.String, core.Object> _json = |
| 2765 new core.Map<core.String, core.Object>(); |
2800 if (constraints != null) { | 2766 if (constraints != null) { |
2801 _json["constraints"] = constraints.map((value) => (value).toJson()).toList
(); | 2767 _json["constraints"] = |
| 2768 constraints.map((value) => (value).toJson()).toList(); |
2802 } | 2769 } |
2803 if (nextPageToken != null) { | 2770 if (nextPageToken != null) { |
2804 _json["nextPageToken"] = nextPageToken; | 2771 _json["nextPageToken"] = nextPageToken; |
2805 } | 2772 } |
2806 return _json; | 2773 return _json; |
2807 } | 2774 } |
2808 } | 2775 } |
2809 | 2776 |
2810 /** | 2777 /// A `Constraint` that allows or disallows a list of string values, which are |
2811 * A `Constraint` that allows or disallows a list of string values, which are | 2778 /// configured by an Organization's policy administrator with a `Policy`. |
2812 * configured by an Organization's policy administrator with a `Policy`. | |
2813 */ | |
2814 class ListConstraint { | 2779 class ListConstraint { |
2815 /** | 2780 /// Optional. The Google Cloud Console will try to default to a configuration |
2816 * Optional. The Google Cloud Console will try to default to a configuration | 2781 /// that matches the value specified in this `Constraint`. |
2817 * that matches the value specified in this `Constraint`. | |
2818 */ | |
2819 core.String suggestedValue; | 2782 core.String suggestedValue; |
2820 | 2783 |
2821 ListConstraint(); | 2784 ListConstraint(); |
2822 | 2785 |
2823 ListConstraint.fromJson(core.Map _json) { | 2786 ListConstraint.fromJson(core.Map _json) { |
2824 if (_json.containsKey("suggestedValue")) { | 2787 if (_json.containsKey("suggestedValue")) { |
2825 suggestedValue = _json["suggestedValue"]; | 2788 suggestedValue = _json["suggestedValue"]; |
2826 } | 2789 } |
2827 } | 2790 } |
2828 | 2791 |
2829 core.Map<core.String, core.Object> toJson() { | 2792 core.Map<core.String, core.Object> toJson() { |
2830 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2793 final core.Map<core.String, core.Object> _json = |
| 2794 new core.Map<core.String, core.Object>(); |
2831 if (suggestedValue != null) { | 2795 if (suggestedValue != null) { |
2832 _json["suggestedValue"] = suggestedValue; | 2796 _json["suggestedValue"] = suggestedValue; |
2833 } | 2797 } |
2834 return _json; | 2798 return _json; |
2835 } | 2799 } |
2836 } | 2800 } |
2837 | 2801 |
2838 /** The response message for Liens.ListLiens. */ | 2802 /// The response message for Liens.ListLiens. |
2839 class ListLiensResponse { | 2803 class ListLiensResponse { |
2840 /** A list of Liens. */ | 2804 /// A list of Liens. |
2841 core.List<Lien> liens; | 2805 core.List<Lien> liens; |
2842 /** | 2806 |
2843 * Token to retrieve the next page of results, or empty if there are no more | 2807 /// Token to retrieve the next page of results, or empty if there are no more |
2844 * results in the list. | 2808 /// results in the list. |
2845 */ | |
2846 core.String nextPageToken; | 2809 core.String nextPageToken; |
2847 | 2810 |
2848 ListLiensResponse(); | 2811 ListLiensResponse(); |
2849 | 2812 |
2850 ListLiensResponse.fromJson(core.Map _json) { | 2813 ListLiensResponse.fromJson(core.Map _json) { |
2851 if (_json.containsKey("liens")) { | 2814 if (_json.containsKey("liens")) { |
2852 liens = _json["liens"].map((value) => new Lien.fromJson(value)).toList(); | 2815 liens = _json["liens"].map((value) => new Lien.fromJson(value)).toList(); |
2853 } | 2816 } |
2854 if (_json.containsKey("nextPageToken")) { | 2817 if (_json.containsKey("nextPageToken")) { |
2855 nextPageToken = _json["nextPageToken"]; | 2818 nextPageToken = _json["nextPageToken"]; |
2856 } | 2819 } |
2857 } | 2820 } |
2858 | 2821 |
2859 core.Map<core.String, core.Object> toJson() { | 2822 core.Map<core.String, core.Object> toJson() { |
2860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2823 final core.Map<core.String, core.Object> _json = |
| 2824 new core.Map<core.String, core.Object>(); |
2861 if (liens != null) { | 2825 if (liens != null) { |
2862 _json["liens"] = liens.map((value) => (value).toJson()).toList(); | 2826 _json["liens"] = liens.map((value) => (value).toJson()).toList(); |
2863 } | 2827 } |
2864 if (nextPageToken != null) { | 2828 if (nextPageToken != null) { |
2865 _json["nextPageToken"] = nextPageToken; | 2829 _json["nextPageToken"] = nextPageToken; |
2866 } | 2830 } |
2867 return _json; | 2831 return _json; |
2868 } | 2832 } |
2869 } | 2833 } |
2870 | 2834 |
2871 /** The request sent to the ListOrgPolicies method. */ | 2835 /// The request sent to the ListOrgPolicies method. |
2872 class ListOrgPoliciesRequest { | 2836 class ListOrgPoliciesRequest { |
2873 /** | 2837 /// Size of the pages to be returned. This is currently unsupported and will |
2874 * Size of the pages to be returned. This is currently unsupported and will | 2838 /// be ignored. The server may at any point start using this field to limit |
2875 * be ignored. The server may at any point start using this field to limit | 2839 /// page size. |
2876 * page size. | |
2877 */ | |
2878 core.int pageSize; | 2840 core.int pageSize; |
2879 /** | 2841 |
2880 * Page token used to retrieve the next page. This is currently unsupported | 2842 /// Page token used to retrieve the next page. This is currently unsupported |
2881 * and will be ignored. The server may at any point start using this field. | 2843 /// and will be ignored. The server may at any point start using this field. |
2882 */ | |
2883 core.String pageToken; | 2844 core.String pageToken; |
2884 | 2845 |
2885 ListOrgPoliciesRequest(); | 2846 ListOrgPoliciesRequest(); |
2886 | 2847 |
2887 ListOrgPoliciesRequest.fromJson(core.Map _json) { | 2848 ListOrgPoliciesRequest.fromJson(core.Map _json) { |
2888 if (_json.containsKey("pageSize")) { | 2849 if (_json.containsKey("pageSize")) { |
2889 pageSize = _json["pageSize"]; | 2850 pageSize = _json["pageSize"]; |
2890 } | 2851 } |
2891 if (_json.containsKey("pageToken")) { | 2852 if (_json.containsKey("pageToken")) { |
2892 pageToken = _json["pageToken"]; | 2853 pageToken = _json["pageToken"]; |
2893 } | 2854 } |
2894 } | 2855 } |
2895 | 2856 |
2896 core.Map<core.String, core.Object> toJson() { | 2857 core.Map<core.String, core.Object> toJson() { |
2897 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2858 final core.Map<core.String, core.Object> _json = |
| 2859 new core.Map<core.String, core.Object>(); |
2898 if (pageSize != null) { | 2860 if (pageSize != null) { |
2899 _json["pageSize"] = pageSize; | 2861 _json["pageSize"] = pageSize; |
2900 } | 2862 } |
2901 if (pageToken != null) { | 2863 if (pageToken != null) { |
2902 _json["pageToken"] = pageToken; | 2864 _json["pageToken"] = pageToken; |
2903 } | 2865 } |
2904 return _json; | 2866 return _json; |
2905 } | 2867 } |
2906 } | 2868 } |
2907 | 2869 |
2908 /** | 2870 /// The response returned from the ListOrgPolicies method. It will be empty |
2909 * The response returned from the ListOrgPolicies method. It will be empty | 2871 /// if no `Policies` are set on the resource. |
2910 * if no `Policies` are set on the resource. | |
2911 */ | |
2912 class ListOrgPoliciesResponse { | 2872 class ListOrgPoliciesResponse { |
2913 /** | 2873 /// Page token used to retrieve the next page. This is currently not used, |
2914 * Page token used to retrieve the next page. This is currently not used, but | 2874 /// but |
2915 * the server may at any point start supplying a valid token. | 2875 /// the server may at any point start supplying a valid token. |
2916 */ | |
2917 core.String nextPageToken; | 2876 core.String nextPageToken; |
2918 /** | 2877 |
2919 * The `Policies` that are set on the resource. It will be empty if no | 2878 /// The `Policies` that are set on the resource. It will be empty if no |
2920 * `Policies` are set. | 2879 /// `Policies` are set. |
2921 */ | |
2922 core.List<OrgPolicy> policies; | 2880 core.List<OrgPolicy> policies; |
2923 | 2881 |
2924 ListOrgPoliciesResponse(); | 2882 ListOrgPoliciesResponse(); |
2925 | 2883 |
2926 ListOrgPoliciesResponse.fromJson(core.Map _json) { | 2884 ListOrgPoliciesResponse.fromJson(core.Map _json) { |
2927 if (_json.containsKey("nextPageToken")) { | 2885 if (_json.containsKey("nextPageToken")) { |
2928 nextPageToken = _json["nextPageToken"]; | 2886 nextPageToken = _json["nextPageToken"]; |
2929 } | 2887 } |
2930 if (_json.containsKey("policies")) { | 2888 if (_json.containsKey("policies")) { |
2931 policies = _json["policies"].map((value) => new OrgPolicy.fromJson(value))
.toList(); | 2889 policies = _json["policies"] |
| 2890 .map((value) => new OrgPolicy.fromJson(value)) |
| 2891 .toList(); |
2932 } | 2892 } |
2933 } | 2893 } |
2934 | 2894 |
2935 core.Map<core.String, core.Object> toJson() { | 2895 core.Map<core.String, core.Object> toJson() { |
2936 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2896 final core.Map<core.String, core.Object> _json = |
| 2897 new core.Map<core.String, core.Object>(); |
2937 if (nextPageToken != null) { | 2898 if (nextPageToken != null) { |
2938 _json["nextPageToken"] = nextPageToken; | 2899 _json["nextPageToken"] = nextPageToken; |
2939 } | 2900 } |
2940 if (policies != null) { | 2901 if (policies != null) { |
2941 _json["policies"] = policies.map((value) => (value).toJson()).toList(); | 2902 _json["policies"] = policies.map((value) => (value).toJson()).toList(); |
2942 } | 2903 } |
2943 return _json; | 2904 return _json; |
2944 } | 2905 } |
2945 } | 2906 } |
2946 | 2907 |
2947 /** | 2908 /// Used in `policy_type` to specify how `list_policy` behaves at this |
2948 * Used in `policy_type` to specify how `list_policy` behaves at this | 2909 /// resource. |
2949 * resource. | 2910 /// |
2950 * | 2911 /// A `ListPolicy` can define specific values that are allowed or denied by |
2951 * A `ListPolicy` can define specific values that are allowed or denied by | 2912 /// setting either the `allowed_values` or `denied_values` fields. It can also |
2952 * setting either the `allowed_values` or `denied_values` fields. It can also | 2913 /// be used to allow or deny all values, by setting the `all_values` field. If |
2953 * be used to allow or deny all values, by setting the `all_values` field. If | 2914 /// `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` |
2954 * `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` | 2915 /// or `denied_values` must be set (attempting to set both or neither will |
2955 * or `denied_values` must be set (attempting to set both or neither will | 2916 /// result in a failed request). If `all_values` is set to either `ALLOW` or |
2956 * result in a failed request). If `all_values` is set to either `ALLOW` or | 2917 /// `DENY`, `allowed_values` and `denied_values` must be unset. |
2957 * `DENY`, `allowed_values` and `denied_values` must be unset. | |
2958 */ | |
2959 class ListPolicy { | 2918 class ListPolicy { |
2960 /** | 2919 /// The policy all_values state. |
2961 * The policy all_values state. | 2920 /// Possible string values are: |
2962 * Possible string values are: | 2921 /// - "ALL_VALUES_UNSPECIFIED" : Indicates that either allowed_values or |
2963 * - "ALL_VALUES_UNSPECIFIED" : Indicates that either allowed_values or | 2922 /// denied_values must be set. |
2964 * denied_values must be set. | 2923 /// - "ALLOW" : A policy with this set allows all values. |
2965 * - "ALLOW" : A policy with this set allows all values. | 2924 /// - "DENY" : A policy with this set denies all values. |
2966 * - "DENY" : A policy with this set denies all values. | |
2967 */ | |
2968 core.String allValues; | 2925 core.String allValues; |
2969 /** | 2926 |
2970 * List of values allowed at this resource. Can only be set if no values | 2927 /// List of values allowed at this resource. Can only be set if no values |
2971 * are set for `denied_values` and `all_values` is set to | 2928 /// are set for `denied_values` and `all_values` is set to |
2972 * `ALL_VALUES_UNSPECIFIED`. | 2929 /// `ALL_VALUES_UNSPECIFIED`. |
2973 */ | |
2974 core.List<core.String> allowedValues; | 2930 core.List<core.String> allowedValues; |
2975 /** | 2931 |
2976 * List of values denied at this resource. Can only be set if no values are | 2932 /// List of values denied at this resource. Can only be set if no values are |
2977 * set for `allowed_values` and `all_values` is set to | 2933 /// set for `allowed_values` and `all_values` is set to |
2978 * `ALL_VALUES_UNSPECIFIED`. | 2934 /// `ALL_VALUES_UNSPECIFIED`. |
2979 */ | |
2980 core.List<core.String> deniedValues; | 2935 core.List<core.String> deniedValues; |
2981 /** | 2936 |
2982 * Determines the inheritance behavior for this `Policy`. | 2937 /// Determines the inheritance behavior for this `Policy`. |
2983 * | 2938 /// |
2984 * By default, a `ListPolicy` set at a resource supercedes any `Policy` set | 2939 /// By default, a `ListPolicy` set at a resource supercedes any `Policy` set |
2985 * anywhere up the resource hierarchy. However, if `inherit_from_parent` is | 2940 /// anywhere up the resource hierarchy. However, if `inherit_from_parent` is |
2986 * set to `true`, then the values from the effective `Policy` of the parent | 2941 /// set to `true`, then the values from the effective `Policy` of the parent |
2987 * resource are inherited, meaning the values set in this `Policy` are | 2942 /// resource are inherited, meaning the values set in this `Policy` are |
2988 * added to the values inherited up the hierarchy. | 2943 /// added to the values inherited up the hierarchy. |
2989 * | 2944 /// |
2990 * Setting `Policy` hierarchies that inherit both allowed values and denied | 2945 /// Setting `Policy` hierarchies that inherit both allowed values and denied |
2991 * values isn't recommended in most circumstances to keep the configuration | 2946 /// values isn't recommended in most circumstances to keep the configuration |
2992 * simple and understandable. However, it is possible to set a `Policy` with | 2947 /// simple and understandable. However, it is possible to set a `Policy` with |
2993 * `allowed_values` set that inherits a `Policy` with `denied_values` set. | 2948 /// `allowed_values` set that inherits a `Policy` with `denied_values` set. |
2994 * In this case, the values that are allowed must be in `allowed_values` and | 2949 /// In this case, the values that are allowed must be in `allowed_values` and |
2995 * not present in `denied_values`. | 2950 /// not present in `denied_values`. |
2996 * | 2951 /// |
2997 * For example, suppose you have a `Constraint` | 2952 /// For example, suppose you have a `Constraint` |
2998 * `constraints/serviceuser.services`, which has a `constraint_type` of | 2953 /// `constraints/serviceuser.services`, which has a `constraint_type` of |
2999 * `list_constraint`, and with `constraint_default` set to `ALLOW`. | 2954 /// `list_constraint`, and with `constraint_default` set to `ALLOW`. |
3000 * Suppose that at the Organization level, a `Policy` is applied that | 2955 /// Suppose that at the Organization level, a `Policy` is applied that |
3001 * restricts the allowed API activations to {`E1`, `E2`}. Then, if a | 2956 /// restricts the allowed API activations to {`E1`, `E2`}. Then, if a |
3002 * `Policy` is applied to a project below the Organization that has | 2957 /// `Policy` is applied to a project below the Organization that has |
3003 * `inherit_from_parent` set to `false` and field all_values set to DENY, | 2958 /// `inherit_from_parent` set to `false` and field all_values set to DENY, |
3004 * then an attempt to activate any API will be denied. | 2959 /// then an attempt to activate any API will be denied. |
3005 * | 2960 /// |
3006 * The following examples demonstrate different possible layerings: | 2961 /// The following examples demonstrate different possible layerings: |
3007 * | 2962 /// |
3008 * Example 1 (no inherited values): | 2963 /// Example 1 (no inherited values): |
3009 * `organizations/foo` has a `Policy` with values: | 2964 /// `organizations/foo` has a `Policy` with values: |
3010 * {allowed_values: “E1” allowed_values:”E2”} | 2965 /// {allowed_values: “E1” allowed_values:”E2”} |
3011 * ``projects/bar`` has `inherit_from_parent` `false` and values: | 2966 /// ``projects/bar`` has `inherit_from_parent` `false` and values: |
3012 * {allowed_values: "E3" allowed_values: "E4"} | 2967 /// {allowed_values: "E3" allowed_values: "E4"} |
3013 * The accepted values at `organizations/foo` are `E1`, `E2`. | 2968 /// The accepted values at `organizations/foo` are `E1`, `E2`. |
3014 * The accepted values at `projects/bar` are `E3`, and `E4`. | 2969 /// The accepted values at `projects/bar` are `E3`, and `E4`. |
3015 * | 2970 /// |
3016 * Example 2 (inherited values): | 2971 /// Example 2 (inherited values): |
3017 * `organizations/foo` has a `Policy` with values: | 2972 /// `organizations/foo` has a `Policy` with values: |
3018 * {allowed_values: “E1” allowed_values:”E2”} | 2973 /// {allowed_values: “E1” allowed_values:”E2”} |
3019 * `projects/bar` has a `Policy` with values: | 2974 /// `projects/bar` has a `Policy` with values: |
3020 * {value: “E3” value: ”E4” inherit_from_parent: true} | 2975 /// {value: “E3” value: ”E4” inherit_from_parent: true} |
3021 * The accepted values at `organizations/foo` are `E1`, `E2`. | 2976 /// The accepted values at `organizations/foo` are `E1`, `E2`. |
3022 * The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. | 2977 /// The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. |
3023 * | 2978 /// |
3024 * Example 3 (inheriting both allowed and denied values): | 2979 /// Example 3 (inheriting both allowed and denied values): |
3025 * `organizations/foo` has a `Policy` with values: | 2980 /// `organizations/foo` has a `Policy` with values: |
3026 * {allowed_values: "E1" allowed_values: "E2"} | 2981 /// {allowed_values: "E1" allowed_values: "E2"} |
3027 * `projects/bar` has a `Policy` with: | 2982 /// `projects/bar` has a `Policy` with: |
3028 * {denied_values: "E1"} | 2983 /// {denied_values: "E1"} |
3029 * The accepted values at `organizations/foo` are `E1`, `E2`. | 2984 /// The accepted values at `organizations/foo` are `E1`, `E2`. |
3030 * The value accepted at `projects/bar` is `E2`. | 2985 /// The value accepted at `projects/bar` is `E2`. |
3031 * | 2986 /// |
3032 * Example 4 (RestoreDefault): | 2987 /// Example 4 (RestoreDefault): |
3033 * `organizations/foo` has a `Policy` with values: | 2988 /// `organizations/foo` has a `Policy` with values: |
3034 * {allowed_values: “E1” allowed_values:”E2”} | 2989 /// {allowed_values: “E1” allowed_values:”E2”} |
3035 * `projects/bar` has a `Policy` with values: | 2990 /// `projects/bar` has a `Policy` with values: |
3036 * {RestoreDefault: {}} | 2991 /// {RestoreDefault: {}} |
3037 * The accepted values at `organizations/foo` are `E1`, `E2`. | 2992 /// The accepted values at `organizations/foo` are `E1`, `E2`. |
3038 * The accepted values at `projects/bar` are either all or none depending on | 2993 /// The accepted values at `projects/bar` are either all or none depending on |
3039 * the value of `constraint_default` (if `ALLOW`, all; if | 2994 /// the value of `constraint_default` (if `ALLOW`, all; if |
3040 * `DENY`, none). | 2995 /// `DENY`, none). |
3041 * | 2996 /// |
3042 * Example 5 (no policy inherits parent policy): | 2997 /// Example 5 (no policy inherits parent policy): |
3043 * `organizations/foo` has no `Policy` set. | 2998 /// `organizations/foo` has no `Policy` set. |
3044 * `projects/bar` has no `Policy` set. | 2999 /// `projects/bar` has no `Policy` set. |
3045 * The accepted values at both levels are either all or none depending on | 3000 /// The accepted values at both levels are either all or none depending on |
3046 * the value of `constraint_default` (if `ALLOW`, all; if | 3001 /// the value of `constraint_default` (if `ALLOW`, all; if |
3047 * `DENY`, none). | 3002 /// `DENY`, none). |
3048 * | 3003 /// |
3049 * Example 6 (ListConstraint allowing all): | 3004 /// Example 6 (ListConstraint allowing all): |
3050 * `organizations/foo` has a `Policy` with values: | 3005 /// `organizations/foo` has a `Policy` with values: |
3051 * {allowed_values: “E1” allowed_values: ”E2”} | 3006 /// {allowed_values: “E1” allowed_values: ”E2”} |
3052 * `projects/bar` has a `Policy` with: | 3007 /// `projects/bar` has a `Policy` with: |
3053 * {all: ALLOW} | 3008 /// {all: ALLOW} |
3054 * The accepted values at `organizations/foo` are `E1`, E2`. | 3009 /// The accepted values at `organizations/foo` are `E1`, E2`. |
3055 * Any value is accepted at `projects/bar`. | 3010 /// Any value is accepted at `projects/bar`. |
3056 * | 3011 /// |
3057 * Example 7 (ListConstraint allowing none): | 3012 /// Example 7 (ListConstraint allowing none): |
3058 * `organizations/foo` has a `Policy` with values: | 3013 /// `organizations/foo` has a `Policy` with values: |
3059 * {allowed_values: “E1” allowed_values: ”E2”} | 3014 /// {allowed_values: “E1” allowed_values: ”E2”} |
3060 * `projects/bar` has a `Policy` with: | 3015 /// `projects/bar` has a `Policy` with: |
3061 * {all: DENY} | 3016 /// {all: DENY} |
3062 * The accepted values at `organizations/foo` are `E1`, E2`. | 3017 /// The accepted values at `organizations/foo` are `E1`, E2`. |
3063 * No value is accepted at `projects/bar`. | 3018 /// No value is accepted at `projects/bar`. |
3064 */ | |
3065 core.bool inheritFromParent; | 3019 core.bool inheritFromParent; |
3066 /** | 3020 |
3067 * Optional. The Google Cloud Console will try to default to a configuration | 3021 /// Optional. The Google Cloud Console will try to default to a configuration |
3068 * that matches the value specified in this `Policy`. If `suggested_value` | 3022 /// that matches the value specified in this `Policy`. If `suggested_value` |
3069 * is not set, it will inherit the value specified higher in the hierarchy, | 3023 /// is not set, it will inherit the value specified higher in the hierarchy, |
3070 * unless `inherit_from_parent` is `false`. | 3024 /// unless `inherit_from_parent` is `false`. |
3071 */ | |
3072 core.String suggestedValue; | 3025 core.String suggestedValue; |
3073 | 3026 |
3074 ListPolicy(); | 3027 ListPolicy(); |
3075 | 3028 |
3076 ListPolicy.fromJson(core.Map _json) { | 3029 ListPolicy.fromJson(core.Map _json) { |
3077 if (_json.containsKey("allValues")) { | 3030 if (_json.containsKey("allValues")) { |
3078 allValues = _json["allValues"]; | 3031 allValues = _json["allValues"]; |
3079 } | 3032 } |
3080 if (_json.containsKey("allowedValues")) { | 3033 if (_json.containsKey("allowedValues")) { |
3081 allowedValues = _json["allowedValues"]; | 3034 allowedValues = _json["allowedValues"]; |
3082 } | 3035 } |
3083 if (_json.containsKey("deniedValues")) { | 3036 if (_json.containsKey("deniedValues")) { |
3084 deniedValues = _json["deniedValues"]; | 3037 deniedValues = _json["deniedValues"]; |
3085 } | 3038 } |
3086 if (_json.containsKey("inheritFromParent")) { | 3039 if (_json.containsKey("inheritFromParent")) { |
3087 inheritFromParent = _json["inheritFromParent"]; | 3040 inheritFromParent = _json["inheritFromParent"]; |
3088 } | 3041 } |
3089 if (_json.containsKey("suggestedValue")) { | 3042 if (_json.containsKey("suggestedValue")) { |
3090 suggestedValue = _json["suggestedValue"]; | 3043 suggestedValue = _json["suggestedValue"]; |
3091 } | 3044 } |
3092 } | 3045 } |
3093 | 3046 |
3094 core.Map<core.String, core.Object> toJson() { | 3047 core.Map<core.String, core.Object> toJson() { |
3095 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3048 final core.Map<core.String, core.Object> _json = |
| 3049 new core.Map<core.String, core.Object>(); |
3096 if (allValues != null) { | 3050 if (allValues != null) { |
3097 _json["allValues"] = allValues; | 3051 _json["allValues"] = allValues; |
3098 } | 3052 } |
3099 if (allowedValues != null) { | 3053 if (allowedValues != null) { |
3100 _json["allowedValues"] = allowedValues; | 3054 _json["allowedValues"] = allowedValues; |
3101 } | 3055 } |
3102 if (deniedValues != null) { | 3056 if (deniedValues != null) { |
3103 _json["deniedValues"] = deniedValues; | 3057 _json["deniedValues"] = deniedValues; |
3104 } | 3058 } |
3105 if (inheritFromParent != null) { | 3059 if (inheritFromParent != null) { |
3106 _json["inheritFromParent"] = inheritFromParent; | 3060 _json["inheritFromParent"] = inheritFromParent; |
3107 } | 3061 } |
3108 if (suggestedValue != null) { | 3062 if (suggestedValue != null) { |
3109 _json["suggestedValue"] = suggestedValue; | 3063 _json["suggestedValue"] = suggestedValue; |
3110 } | 3064 } |
3111 return _json; | 3065 return _json; |
3112 } | 3066 } |
3113 } | 3067 } |
3114 | 3068 |
3115 /** | 3069 /// A page of the response received from the |
3116 * A page of the response received from the | 3070 /// ListProjects |
3117 * ListProjects | 3071 /// method. |
3118 * method. | 3072 /// |
3119 * | 3073 /// A paginated response where more pages are available has |
3120 * A paginated response where more pages are available has | 3074 /// `next_page_token` set. This token can be used in a subsequent request to |
3121 * `next_page_token` set. This token can be used in a subsequent request to | 3075 /// retrieve the next request page. |
3122 * retrieve the next request page. | |
3123 */ | |
3124 class ListProjectsResponse { | 3076 class ListProjectsResponse { |
3125 /** | 3077 /// Pagination token. |
3126 * Pagination token. | 3078 /// |
3127 * | 3079 /// If the result set is too large to fit in a single response, this token |
3128 * If the result set is too large to fit in a single response, this token | 3080 /// is returned. It encodes the position of the current result cursor. |
3129 * is returned. It encodes the position of the current result cursor. | 3081 /// Feeding this value into a new list request with the `page_token` |
3130 * Feeding this value into a new list request with the `page_token` parameter | 3082 /// parameter |
3131 * gives the next page of the results. | 3083 /// gives the next page of the results. |
3132 * | 3084 /// |
3133 * When `next_page_token` is not filled in, there is no next page and | 3085 /// When `next_page_token` is not filled in, there is no next page and |
3134 * the list returned is the last page in the result set. | 3086 /// the list returned is the last page in the result set. |
3135 * | 3087 /// |
3136 * Pagination tokens have a limited lifetime. | 3088 /// Pagination tokens have a limited lifetime. |
3137 */ | |
3138 core.String nextPageToken; | 3089 core.String nextPageToken; |
3139 /** | 3090 |
3140 * The list of Projects that matched the list filter. This list can | 3091 /// The list of Projects that matched the list filter. This list can |
3141 * be paginated. | 3092 /// be paginated. |
3142 */ | |
3143 core.List<Project> projects; | 3093 core.List<Project> projects; |
3144 | 3094 |
3145 ListProjectsResponse(); | 3095 ListProjectsResponse(); |
3146 | 3096 |
3147 ListProjectsResponse.fromJson(core.Map _json) { | 3097 ListProjectsResponse.fromJson(core.Map _json) { |
3148 if (_json.containsKey("nextPageToken")) { | 3098 if (_json.containsKey("nextPageToken")) { |
3149 nextPageToken = _json["nextPageToken"]; | 3099 nextPageToken = _json["nextPageToken"]; |
3150 } | 3100 } |
3151 if (_json.containsKey("projects")) { | 3101 if (_json.containsKey("projects")) { |
3152 projects = _json["projects"].map((value) => new Project.fromJson(value)).t
oList(); | 3102 projects = _json["projects"] |
| 3103 .map((value) => new Project.fromJson(value)) |
| 3104 .toList(); |
3153 } | 3105 } |
3154 } | 3106 } |
3155 | 3107 |
3156 core.Map<core.String, core.Object> toJson() { | 3108 core.Map<core.String, core.Object> toJson() { |
3157 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3109 final core.Map<core.String, core.Object> _json = |
| 3110 new core.Map<core.String, core.Object>(); |
3158 if (nextPageToken != null) { | 3111 if (nextPageToken != null) { |
3159 _json["nextPageToken"] = nextPageToken; | 3112 _json["nextPageToken"] = nextPageToken; |
3160 } | 3113 } |
3161 if (projects != null) { | 3114 if (projects != null) { |
3162 _json["projects"] = projects.map((value) => (value).toJson()).toList(); | 3115 _json["projects"] = projects.map((value) => (value).toJson()).toList(); |
3163 } | 3116 } |
3164 return _json; | 3117 return _json; |
3165 } | 3118 } |
3166 } | 3119 } |
3167 | 3120 |
3168 /** | 3121 /// This resource represents a long-running operation that is the result of a |
3169 * This resource represents a long-running operation that is the result of a | 3122 /// network API call. |
3170 * network API call. | |
3171 */ | |
3172 class Operation { | 3123 class Operation { |
3173 /** | 3124 /// If the value is `false`, it means the operation is still in progress. |
3174 * If the value is `false`, it means the operation is still in progress. | 3125 /// If `true`, the operation is completed, and either `error` or `response` |
3175 * If true, the operation is completed, and either `error` or `response` is | 3126 /// is |
3176 * available. | 3127 /// available. |
3177 */ | |
3178 core.bool done; | 3128 core.bool done; |
3179 /** The error result of the operation in case of failure or cancellation. */ | 3129 |
| 3130 /// The error result of the operation in case of failure or cancellation. |
3180 Status error; | 3131 Status error; |
3181 /** | 3132 |
3182 * Service-specific metadata associated with the operation. It typically | 3133 /// Service-specific metadata associated with the operation. It typically |
3183 * contains progress information and common metadata such as create time. | 3134 /// contains progress information and common metadata such as create time. |
3184 * Some services might not provide such metadata. Any method that returns a | 3135 /// Some services might not provide such metadata. Any method that returns a |
3185 * long-running operation should document the metadata type, if any. | 3136 /// long-running operation should document the metadata type, if any. |
3186 * | 3137 /// |
3187 * The values for Object must be JSON objects. It can consist of `num`, | 3138 /// The values for Object must be JSON objects. It can consist of `num`, |
3188 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3139 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3189 */ | |
3190 core.Map<core.String, core.Object> metadata; | 3140 core.Map<core.String, core.Object> metadata; |
3191 /** | 3141 |
3192 * The server-assigned name, which is only unique within the same service that | 3142 /// The server-assigned name, which is only unique within the same service |
3193 * originally returns it. If you use the default HTTP mapping, the | 3143 /// that |
3194 * `name` should have the format of `operations/some/unique/name`. | 3144 /// originally returns it. If you use the default HTTP mapping, the |
3195 */ | 3145 /// `name` should have the format of `operations/some/unique/name`. |
3196 core.String name; | 3146 core.String name; |
3197 /** | 3147 |
3198 * The normal response of the operation in case of success. If the original | 3148 /// The normal response of the operation in case of success. If the original |
3199 * method returns no data on success, such as `Delete`, the response is | 3149 /// method returns no data on success, such as `Delete`, the response is |
3200 * `google.protobuf.Empty`. If the original method is standard | 3150 /// `google.protobuf.Empty`. If the original method is standard |
3201 * `Get`/`Create`/`Update`, the response should be the resource. For other | 3151 /// `Get`/`Create`/`Update`, the response should be the resource. For other |
3202 * methods, the response should have the type `XxxResponse`, where `Xxx` | 3152 /// methods, the response should have the type `XxxResponse`, where `Xxx` |
3203 * is the original method name. For example, if the original method name | 3153 /// is the original method name. For example, if the original method name |
3204 * is `TakeSnapshot()`, the inferred response type is | 3154 /// is `TakeSnapshot()`, the inferred response type is |
3205 * `TakeSnapshotResponse`. | 3155 /// `TakeSnapshotResponse`. |
3206 * | 3156 /// |
3207 * The values for Object must be JSON objects. It can consist of `num`, | 3157 /// The values for Object must be JSON objects. It can consist of `num`, |
3208 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3158 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3209 */ | |
3210 core.Map<core.String, core.Object> response; | 3159 core.Map<core.String, core.Object> response; |
3211 | 3160 |
3212 Operation(); | 3161 Operation(); |
3213 | 3162 |
3214 Operation.fromJson(core.Map _json) { | 3163 Operation.fromJson(core.Map _json) { |
3215 if (_json.containsKey("done")) { | 3164 if (_json.containsKey("done")) { |
3216 done = _json["done"]; | 3165 done = _json["done"]; |
3217 } | 3166 } |
3218 if (_json.containsKey("error")) { | 3167 if (_json.containsKey("error")) { |
3219 error = new Status.fromJson(_json["error"]); | 3168 error = new Status.fromJson(_json["error"]); |
3220 } | 3169 } |
3221 if (_json.containsKey("metadata")) { | 3170 if (_json.containsKey("metadata")) { |
3222 metadata = _json["metadata"]; | 3171 metadata = _json["metadata"]; |
3223 } | 3172 } |
3224 if (_json.containsKey("name")) { | 3173 if (_json.containsKey("name")) { |
3225 name = _json["name"]; | 3174 name = _json["name"]; |
3226 } | 3175 } |
3227 if (_json.containsKey("response")) { | 3176 if (_json.containsKey("response")) { |
3228 response = _json["response"]; | 3177 response = _json["response"]; |
3229 } | 3178 } |
3230 } | 3179 } |
3231 | 3180 |
3232 core.Map<core.String, core.Object> toJson() { | 3181 core.Map<core.String, core.Object> toJson() { |
3233 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3182 final core.Map<core.String, core.Object> _json = |
| 3183 new core.Map<core.String, core.Object>(); |
3234 if (done != null) { | 3184 if (done != null) { |
3235 _json["done"] = done; | 3185 _json["done"] = done; |
3236 } | 3186 } |
3237 if (error != null) { | 3187 if (error != null) { |
3238 _json["error"] = (error).toJson(); | 3188 _json["error"] = (error).toJson(); |
3239 } | 3189 } |
3240 if (metadata != null) { | 3190 if (metadata != null) { |
3241 _json["metadata"] = metadata; | 3191 _json["metadata"] = metadata; |
3242 } | 3192 } |
3243 if (name != null) { | 3193 if (name != null) { |
3244 _json["name"] = name; | 3194 _json["name"] = name; |
3245 } | 3195 } |
3246 if (response != null) { | 3196 if (response != null) { |
3247 _json["response"] = response; | 3197 _json["response"] = response; |
3248 } | 3198 } |
3249 return _json; | 3199 return _json; |
3250 } | 3200 } |
3251 } | 3201 } |
3252 | 3202 |
3253 /** | 3203 /// Defines a Cloud Organization `Policy` which is used to specify |
3254 * Defines a Cloud Organization `Policy` which is used to specify `Constraints` | 3204 /// `Constraints` |
3255 * for configurations of Cloud Platform resources. | 3205 /// for configurations of Cloud Platform resources. |
3256 */ | |
3257 class OrgPolicy { | 3206 class OrgPolicy { |
3258 /** For boolean `Constraints`, whether to enforce the `Constraint` or not. */ | 3207 /// For boolean `Constraints`, whether to enforce the `Constraint` or not. |
3259 BooleanPolicy booleanPolicy; | 3208 BooleanPolicy booleanPolicy; |
3260 /** | 3209 |
3261 * The name of the `Constraint` the `Policy` is configuring, for example, | 3210 /// The name of the `Constraint` the `Policy` is configuring, for example, |
3262 * `constraints/serviceuser.services`. | 3211 /// `constraints/serviceuser.services`. |
3263 * | 3212 /// |
3264 * Immutable after creation. | 3213 /// Immutable after creation. |
3265 */ | |
3266 core.String constraint; | 3214 core.String constraint; |
3267 /** | 3215 |
3268 * An opaque tag indicating the current version of the `Policy`, used for | 3216 /// An opaque tag indicating the current version of the `Policy`, used for |
3269 * concurrency control. | 3217 /// concurrency control. |
3270 * | 3218 /// |
3271 * When the `Policy` is returned from either a `GetPolicy` or a | 3219 /// When the `Policy` is returned from either a `GetPolicy` or a |
3272 * `ListOrgPolicy` request, this `etag` indicates the version of the current | 3220 /// `ListOrgPolicy` request, this `etag` indicates the version of the current |
3273 * `Policy` to use when executing a read-modify-write loop. | 3221 /// `Policy` to use when executing a read-modify-write loop. |
3274 * | 3222 /// |
3275 * When the `Policy` is returned from a `GetEffectivePolicy` request, the | 3223 /// When the `Policy` is returned from a `GetEffectivePolicy` request, the |
3276 * `etag` will be unset. | 3224 /// `etag` will be unset. |
3277 * | 3225 /// |
3278 * When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value | 3226 /// When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` |
3279 * that was returned from a `GetOrgPolicy` request as part of a | 3227 /// value |
3280 * read-modify-write loop for concurrency control. Not setting the `etag`in a | 3228 /// that was returned from a `GetOrgPolicy` request as part of a |
3281 * `SetOrgPolicy` request will result in an unconditional write of the | 3229 /// read-modify-write loop for concurrency control. Not setting the `etag`in |
3282 * `Policy`. | 3230 /// a |
3283 */ | 3231 /// `SetOrgPolicy` request will result in an unconditional write of the |
| 3232 /// `Policy`. |
3284 core.String etag; | 3233 core.String etag; |
3285 core.List<core.int> get etagAsBytes { | 3234 core.List<core.int> get etagAsBytes { |
3286 return convert.BASE64.decode(etag); | 3235 return convert.BASE64.decode(etag); |
3287 } | 3236 } |
3288 | 3237 |
3289 void set etagAsBytes(core.List<core.int> _bytes) { | 3238 void set etagAsBytes(core.List<core.int> _bytes) { |
3290 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 3239 etag = |
| 3240 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
3291 } | 3241 } |
3292 /** List of values either allowed or disallowed. */ | 3242 |
| 3243 /// List of values either allowed or disallowed. |
3293 ListPolicy listPolicy; | 3244 ListPolicy listPolicy; |
3294 /** | 3245 |
3295 * Restores the default behavior of the constraint; independent of | 3246 /// Restores the default behavior of the constraint; independent of |
3296 * `Constraint` type. | 3247 /// `Constraint` type. |
3297 */ | |
3298 RestoreDefault restoreDefault; | 3248 RestoreDefault restoreDefault; |
3299 /** | 3249 |
3300 * The time stamp the `Policy` was previously updated. This is set by the | 3250 /// The time stamp the `Policy` was previously updated. This is set by the |
3301 * server, not specified by the caller, and represents the last time a call to | 3251 /// server, not specified by the caller, and represents the last time a call |
3302 * `SetOrgPolicy` was made for that `Policy`. Any value set by the client will | 3252 /// to |
3303 * be ignored. | 3253 /// `SetOrgPolicy` was made for that `Policy`. Any value set by the client |
3304 */ | 3254 /// will |
| 3255 /// be ignored. |
3305 core.String updateTime; | 3256 core.String updateTime; |
3306 /** Version of the `Policy`. Default version is 0; */ | 3257 |
| 3258 /// Version of the `Policy`. Default version is 0; |
3307 core.int version; | 3259 core.int version; |
3308 | 3260 |
3309 OrgPolicy(); | 3261 OrgPolicy(); |
3310 | 3262 |
3311 OrgPolicy.fromJson(core.Map _json) { | 3263 OrgPolicy.fromJson(core.Map _json) { |
3312 if (_json.containsKey("booleanPolicy")) { | 3264 if (_json.containsKey("booleanPolicy")) { |
3313 booleanPolicy = new BooleanPolicy.fromJson(_json["booleanPolicy"]); | 3265 booleanPolicy = new BooleanPolicy.fromJson(_json["booleanPolicy"]); |
3314 } | 3266 } |
3315 if (_json.containsKey("constraint")) { | 3267 if (_json.containsKey("constraint")) { |
3316 constraint = _json["constraint"]; | 3268 constraint = _json["constraint"]; |
3317 } | 3269 } |
3318 if (_json.containsKey("etag")) { | 3270 if (_json.containsKey("etag")) { |
3319 etag = _json["etag"]; | 3271 etag = _json["etag"]; |
3320 } | 3272 } |
3321 if (_json.containsKey("listPolicy")) { | 3273 if (_json.containsKey("listPolicy")) { |
3322 listPolicy = new ListPolicy.fromJson(_json["listPolicy"]); | 3274 listPolicy = new ListPolicy.fromJson(_json["listPolicy"]); |
3323 } | 3275 } |
3324 if (_json.containsKey("restoreDefault")) { | 3276 if (_json.containsKey("restoreDefault")) { |
3325 restoreDefault = new RestoreDefault.fromJson(_json["restoreDefault"]); | 3277 restoreDefault = new RestoreDefault.fromJson(_json["restoreDefault"]); |
3326 } | 3278 } |
3327 if (_json.containsKey("updateTime")) { | 3279 if (_json.containsKey("updateTime")) { |
3328 updateTime = _json["updateTime"]; | 3280 updateTime = _json["updateTime"]; |
3329 } | 3281 } |
3330 if (_json.containsKey("version")) { | 3282 if (_json.containsKey("version")) { |
3331 version = _json["version"]; | 3283 version = _json["version"]; |
3332 } | 3284 } |
3333 } | 3285 } |
3334 | 3286 |
3335 core.Map<core.String, core.Object> toJson() { | 3287 core.Map<core.String, core.Object> toJson() { |
3336 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3288 final core.Map<core.String, core.Object> _json = |
| 3289 new core.Map<core.String, core.Object>(); |
3337 if (booleanPolicy != null) { | 3290 if (booleanPolicy != null) { |
3338 _json["booleanPolicy"] = (booleanPolicy).toJson(); | 3291 _json["booleanPolicy"] = (booleanPolicy).toJson(); |
3339 } | 3292 } |
3340 if (constraint != null) { | 3293 if (constraint != null) { |
3341 _json["constraint"] = constraint; | 3294 _json["constraint"] = constraint; |
3342 } | 3295 } |
3343 if (etag != null) { | 3296 if (etag != null) { |
3344 _json["etag"] = etag; | 3297 _json["etag"] = etag; |
3345 } | 3298 } |
3346 if (listPolicy != null) { | 3299 if (listPolicy != null) { |
3347 _json["listPolicy"] = (listPolicy).toJson(); | 3300 _json["listPolicy"] = (listPolicy).toJson(); |
3348 } | 3301 } |
3349 if (restoreDefault != null) { | 3302 if (restoreDefault != null) { |
3350 _json["restoreDefault"] = (restoreDefault).toJson(); | 3303 _json["restoreDefault"] = (restoreDefault).toJson(); |
3351 } | 3304 } |
3352 if (updateTime != null) { | 3305 if (updateTime != null) { |
3353 _json["updateTime"] = updateTime; | 3306 _json["updateTime"] = updateTime; |
3354 } | 3307 } |
3355 if (version != null) { | 3308 if (version != null) { |
3356 _json["version"] = version; | 3309 _json["version"] = version; |
3357 } | 3310 } |
3358 return _json; | 3311 return _json; |
3359 } | 3312 } |
3360 } | 3313 } |
3361 | 3314 |
3362 /** | 3315 /// The root node in the resource hierarchy to which a particular entity's |
3363 * The root node in the resource hierarchy to which a particular entity's | 3316 /// (e.g., company) resources belong. |
3364 * (e.g., company) resources belong. | |
3365 */ | |
3366 class Organization { | 3317 class Organization { |
3367 /** | 3318 /// Timestamp when the Organization was created. Assigned by the server. |
3368 * Timestamp when the Organization was created. Assigned by the server. | 3319 /// @OutputOnly |
3369 * @OutputOnly | |
3370 */ | |
3371 core.String creationTime; | 3320 core.String creationTime; |
3372 /** | 3321 |
3373 * A friendly string to be used to refer to the Organization in the UI. | 3322 /// A friendly string to be used to refer to the Organization in the UI. |
3374 * Assigned by the server, set to the primary domain of the G Suite | 3323 /// Assigned by the server, set to the primary domain of the G Suite |
3375 * customer that owns the organization. | 3324 /// customer that owns the organization. |
3376 * @OutputOnly | 3325 /// @OutputOnly |
3377 */ | |
3378 core.String displayName; | 3326 core.String displayName; |
3379 /** | 3327 |
3380 * The organization's current lifecycle state. Assigned by the server. | 3328 /// The organization's current lifecycle state. Assigned by the server. |
3381 * @OutputOnly | 3329 /// @OutputOnly |
3382 * Possible string values are: | 3330 /// Possible string values are: |
3383 * - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. This is only useful | 3331 /// - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. This is only useful |
3384 * for distinguishing unset values. | 3332 /// for distinguishing unset values. |
3385 * - "ACTIVE" : The normal and active state. | 3333 /// - "ACTIVE" : The normal and active state. |
3386 * - "DELETE_REQUESTED" : The organization has been marked for deletion by the | 3334 /// - "DELETE_REQUESTED" : The organization has been marked for deletion by |
3387 * user. | 3335 /// the user. |
3388 */ | |
3389 core.String lifecycleState; | 3336 core.String lifecycleState; |
3390 /** | 3337 |
3391 * Output Only. The resource name of the organization. This is the | 3338 /// Output Only. The resource name of the organization. This is the |
3392 * organization's relative path in the API. Its format is | 3339 /// organization's relative path in the API. Its format is |
3393 * "organizations/[organization_id]". For example, "organizations/1234". | 3340 /// "organizations/[organization_id]". For example, "organizations/1234". |
3394 */ | |
3395 core.String name; | 3341 core.String name; |
3396 /** | 3342 |
3397 * The owner of this Organization. The owner should be specified on | 3343 /// The owner of this Organization. The owner should be specified on |
3398 * creation. Once set, it cannot be changed. | 3344 /// creation. Once set, it cannot be changed. |
3399 * This field is required. | 3345 /// This field is required. |
3400 */ | |
3401 OrganizationOwner owner; | 3346 OrganizationOwner owner; |
3402 | 3347 |
3403 Organization(); | 3348 Organization(); |
3404 | 3349 |
3405 Organization.fromJson(core.Map _json) { | 3350 Organization.fromJson(core.Map _json) { |
3406 if (_json.containsKey("creationTime")) { | 3351 if (_json.containsKey("creationTime")) { |
3407 creationTime = _json["creationTime"]; | 3352 creationTime = _json["creationTime"]; |
3408 } | 3353 } |
3409 if (_json.containsKey("displayName")) { | 3354 if (_json.containsKey("displayName")) { |
3410 displayName = _json["displayName"]; | 3355 displayName = _json["displayName"]; |
3411 } | 3356 } |
3412 if (_json.containsKey("lifecycleState")) { | 3357 if (_json.containsKey("lifecycleState")) { |
3413 lifecycleState = _json["lifecycleState"]; | 3358 lifecycleState = _json["lifecycleState"]; |
3414 } | 3359 } |
3415 if (_json.containsKey("name")) { | 3360 if (_json.containsKey("name")) { |
3416 name = _json["name"]; | 3361 name = _json["name"]; |
3417 } | 3362 } |
3418 if (_json.containsKey("owner")) { | 3363 if (_json.containsKey("owner")) { |
3419 owner = new OrganizationOwner.fromJson(_json["owner"]); | 3364 owner = new OrganizationOwner.fromJson(_json["owner"]); |
3420 } | 3365 } |
3421 } | 3366 } |
3422 | 3367 |
3423 core.Map<core.String, core.Object> toJson() { | 3368 core.Map<core.String, core.Object> toJson() { |
3424 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3369 final core.Map<core.String, core.Object> _json = |
| 3370 new core.Map<core.String, core.Object>(); |
3425 if (creationTime != null) { | 3371 if (creationTime != null) { |
3426 _json["creationTime"] = creationTime; | 3372 _json["creationTime"] = creationTime; |
3427 } | 3373 } |
3428 if (displayName != null) { | 3374 if (displayName != null) { |
3429 _json["displayName"] = displayName; | 3375 _json["displayName"] = displayName; |
3430 } | 3376 } |
3431 if (lifecycleState != null) { | 3377 if (lifecycleState != null) { |
3432 _json["lifecycleState"] = lifecycleState; | 3378 _json["lifecycleState"] = lifecycleState; |
3433 } | 3379 } |
3434 if (name != null) { | 3380 if (name != null) { |
3435 _json["name"] = name; | 3381 _json["name"] = name; |
3436 } | 3382 } |
3437 if (owner != null) { | 3383 if (owner != null) { |
3438 _json["owner"] = (owner).toJson(); | 3384 _json["owner"] = (owner).toJson(); |
3439 } | 3385 } |
3440 return _json; | 3386 return _json; |
3441 } | 3387 } |
3442 } | 3388 } |
3443 | 3389 |
3444 /** | 3390 /// The entity that owns an Organization. The lifetime of the Organization and |
3445 * The entity that owns an Organization. The lifetime of the Organization and | 3391 /// all of its descendants are bound to the `OrganizationOwner`. If the |
3446 * all of its descendants are bound to the `OrganizationOwner`. If the | 3392 /// `OrganizationOwner` is deleted, the Organization and all its descendants |
3447 * `OrganizationOwner` is deleted, the Organization and all its descendants will | 3393 /// will |
3448 * be deleted. | 3394 /// be deleted. |
3449 */ | |
3450 class OrganizationOwner { | 3395 class OrganizationOwner { |
3451 /** The Google for Work customer id used in the Directory API. */ | 3396 /// The Google for Work customer id used in the Directory API. |
3452 core.String directoryCustomerId; | 3397 core.String directoryCustomerId; |
3453 | 3398 |
3454 OrganizationOwner(); | 3399 OrganizationOwner(); |
3455 | 3400 |
3456 OrganizationOwner.fromJson(core.Map _json) { | 3401 OrganizationOwner.fromJson(core.Map _json) { |
3457 if (_json.containsKey("directoryCustomerId")) { | 3402 if (_json.containsKey("directoryCustomerId")) { |
3458 directoryCustomerId = _json["directoryCustomerId"]; | 3403 directoryCustomerId = _json["directoryCustomerId"]; |
3459 } | 3404 } |
3460 } | 3405 } |
3461 | 3406 |
3462 core.Map<core.String, core.Object> toJson() { | 3407 core.Map<core.String, core.Object> toJson() { |
3463 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3408 final core.Map<core.String, core.Object> _json = |
| 3409 new core.Map<core.String, core.Object>(); |
3464 if (directoryCustomerId != null) { | 3410 if (directoryCustomerId != null) { |
3465 _json["directoryCustomerId"] = directoryCustomerId; | 3411 _json["directoryCustomerId"] = directoryCustomerId; |
3466 } | 3412 } |
3467 return _json; | 3413 return _json; |
3468 } | 3414 } |
3469 } | 3415 } |
3470 | 3416 |
3471 /** | 3417 /// Defines an Identity and Access Management (IAM) policy. It is used to |
3472 * Defines an Identity and Access Management (IAM) policy. It is used to | 3418 /// specify access control policies for Cloud Platform resources. |
3473 * specify access control policies for Cloud Platform resources. | 3419 /// |
3474 * | 3420 /// |
3475 * | 3421 /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
3476 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of | 3422 /// `members` to a `role`, where the members can be user accounts, Google |
3477 * `members` to a `role`, where the members can be user accounts, Google groups, | 3423 /// groups, |
3478 * Google domains, and service accounts. A `role` is a named list of permissions | 3424 /// Google domains, and service accounts. A `role` is a named list of |
3479 * defined by IAM. | 3425 /// permissions |
3480 * | 3426 /// defined by IAM. |
3481 * **Example** | 3427 /// |
3482 * | 3428 /// **Example** |
3483 * { | 3429 /// |
3484 * "bindings": [ | 3430 /// { |
3485 * { | 3431 /// "bindings": [ |
3486 * "role": "roles/owner", | 3432 /// { |
3487 * "members": [ | 3433 /// "role": "roles/owner", |
3488 * "user:mike@example.com", | 3434 /// "members": [ |
3489 * "group:admins@example.com", | 3435 /// "user:mike@example.com", |
3490 * "domain:google.com", | 3436 /// "group:admins@example.com", |
3491 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", | 3437 /// "domain:google.com", |
3492 * ] | 3438 /// "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
3493 * }, | 3439 /// ] |
3494 * { | 3440 /// }, |
3495 * "role": "roles/viewer", | 3441 /// { |
3496 * "members": ["user:sean@example.com"] | 3442 /// "role": "roles/viewer", |
3497 * } | 3443 /// "members": ["user:sean@example.com"] |
3498 * ] | 3444 /// } |
3499 * } | 3445 /// ] |
3500 * | 3446 /// } |
3501 * For a description of IAM and its features, see the | 3447 /// |
3502 * [IAM developer's guide](https://cloud.google.com/iam). | 3448 /// For a description of IAM and its features, see the |
3503 */ | 3449 /// [IAM developer's guide](https://cloud.google.com/iam). |
3504 class Policy { | 3450 class Policy { |
3505 /** Specifies cloud audit logging configuration for this policy. */ | 3451 /// Specifies cloud audit logging configuration for this policy. |
3506 core.List<AuditConfig> auditConfigs; | 3452 core.List<AuditConfig> auditConfigs; |
3507 /** | 3453 |
3508 * Associates a list of `members` to a `role`. | 3454 /// Associates a list of `members` to a `role`. |
3509 * `bindings` with no members will result in an error. | 3455 /// `bindings` with no members will result in an error. |
3510 */ | |
3511 core.List<Binding> bindings; | 3456 core.List<Binding> bindings; |
3512 /** | 3457 |
3513 * `etag` is used for optimistic concurrency control as a way to help | 3458 /// `etag` is used for optimistic concurrency control as a way to help |
3514 * prevent simultaneous updates of a policy from overwriting each other. | 3459 /// prevent simultaneous updates of a policy from overwriting each other. |
3515 * It is strongly suggested that systems make use of the `etag` in the | 3460 /// It is strongly suggested that systems make use of the `etag` in the |
3516 * read-modify-write cycle to perform policy updates in order to avoid race | 3461 /// read-modify-write cycle to perform policy updates in order to avoid race |
3517 * conditions: An `etag` is returned in the response to `getIamPolicy`, and | 3462 /// conditions: An `etag` is returned in the response to `getIamPolicy`, and |
3518 * systems are expected to put that etag in the request to `setIamPolicy` to | 3463 /// systems are expected to put that etag in the request to `setIamPolicy` to |
3519 * ensure that their change will be applied to the same version of the policy. | 3464 /// ensure that their change will be applied to the same version of the |
3520 * | 3465 /// policy. |
3521 * If no `etag` is provided in the call to `setIamPolicy`, then the existing | 3466 /// |
3522 * policy is overwritten blindly. | 3467 /// If no `etag` is provided in the call to `setIamPolicy`, then the existing |
3523 */ | 3468 /// policy is overwritten blindly. |
3524 core.String etag; | 3469 core.String etag; |
3525 core.List<core.int> get etagAsBytes { | 3470 core.List<core.int> get etagAsBytes { |
3526 return convert.BASE64.decode(etag); | 3471 return convert.BASE64.decode(etag); |
3527 } | 3472 } |
3528 | 3473 |
3529 void set etagAsBytes(core.List<core.int> _bytes) { | 3474 void set etagAsBytes(core.List<core.int> _bytes) { |
3530 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 3475 etag = |
| 3476 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
3531 } | 3477 } |
3532 /** Version of the `Policy`. The default version is 0. */ | 3478 |
| 3479 /// Version of the `Policy`. The default version is 0. |
3533 core.int version; | 3480 core.int version; |
3534 | 3481 |
3535 Policy(); | 3482 Policy(); |
3536 | 3483 |
3537 Policy.fromJson(core.Map _json) { | 3484 Policy.fromJson(core.Map _json) { |
3538 if (_json.containsKey("auditConfigs")) { | 3485 if (_json.containsKey("auditConfigs")) { |
3539 auditConfigs = _json["auditConfigs"].map((value) => new AuditConfig.fromJs
on(value)).toList(); | 3486 auditConfigs = _json["auditConfigs"] |
| 3487 .map((value) => new AuditConfig.fromJson(value)) |
| 3488 .toList(); |
3540 } | 3489 } |
3541 if (_json.containsKey("bindings")) { | 3490 if (_json.containsKey("bindings")) { |
3542 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); | 3491 bindings = _json["bindings"] |
| 3492 .map((value) => new Binding.fromJson(value)) |
| 3493 .toList(); |
3543 } | 3494 } |
3544 if (_json.containsKey("etag")) { | 3495 if (_json.containsKey("etag")) { |
3545 etag = _json["etag"]; | 3496 etag = _json["etag"]; |
3546 } | 3497 } |
3547 if (_json.containsKey("version")) { | 3498 if (_json.containsKey("version")) { |
3548 version = _json["version"]; | 3499 version = _json["version"]; |
3549 } | 3500 } |
3550 } | 3501 } |
3551 | 3502 |
3552 core.Map<core.String, core.Object> toJson() { | 3503 core.Map<core.String, core.Object> toJson() { |
3553 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3504 final core.Map<core.String, core.Object> _json = |
| 3505 new core.Map<core.String, core.Object>(); |
3554 if (auditConfigs != null) { | 3506 if (auditConfigs != null) { |
3555 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi
st(); | 3507 _json["auditConfigs"] = |
| 3508 auditConfigs.map((value) => (value).toJson()).toList(); |
3556 } | 3509 } |
3557 if (bindings != null) { | 3510 if (bindings != null) { |
3558 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); | 3511 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
3559 } | 3512 } |
3560 if (etag != null) { | 3513 if (etag != null) { |
3561 _json["etag"] = etag; | 3514 _json["etag"] = etag; |
3562 } | 3515 } |
3563 if (version != null) { | 3516 if (version != null) { |
3564 _json["version"] = version; | 3517 _json["version"] = version; |
3565 } | 3518 } |
3566 return _json; | 3519 return _json; |
3567 } | 3520 } |
3568 } | 3521 } |
3569 | 3522 |
3570 /** | 3523 /// A Project is a high-level Google Cloud Platform entity. It is a |
3571 * A Project is a high-level Google Cloud Platform entity. It is a | 3524 /// container for ACLs, APIs, App Engine Apps, VMs, and other |
3572 * container for ACLs, APIs, App Engine Apps, VMs, and other | 3525 /// Google Cloud Platform resources. |
3573 * Google Cloud Platform resources. | |
3574 */ | |
3575 class Project { | 3526 class Project { |
3576 /** | 3527 /// Creation time. |
3577 * Creation time. | 3528 /// |
3578 * | 3529 /// Read-only. |
3579 * Read-only. | |
3580 */ | |
3581 core.String createTime; | 3530 core.String createTime; |
3582 /** | 3531 |
3583 * The labels associated with this Project. | 3532 /// The labels associated with this Project. |
3584 * | 3533 /// |
3585 * Label keys must be between 1 and 63 characters long and must conform | 3534 /// Label keys must be between 1 and 63 characters long and must conform |
3586 * to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. | 3535 /// to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. |
3587 * | 3536 /// |
3588 * Label values must be between 0 and 63 characters long and must conform | 3537 /// Label values must be between 0 and 63 characters long and must conform |
3589 * to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. | 3538 /// to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. |
3590 * | 3539 /// |
3591 * No more than 256 labels can be associated with a given resource. | 3540 /// No more than 256 labels can be associated with a given resource. |
3592 * | 3541 /// |
3593 * Clients should store labels in a representation such as JSON that does not | 3542 /// Clients should store labels in a representation such as JSON that does |
3594 * depend on specific characters being disallowed. | 3543 /// not |
3595 * | 3544 /// depend on specific characters being disallowed. |
3596 * Example: <code>"environment" : "dev"</code> | 3545 /// |
3597 * Read-write. | 3546 /// Example: <code>"environment" : "dev"</code> |
3598 */ | 3547 /// Read-write. |
3599 core.Map<core.String, core.String> labels; | 3548 core.Map<core.String, core.String> labels; |
3600 /** | 3549 |
3601 * The Project lifecycle state. | 3550 /// The Project lifecycle state. |
3602 * | 3551 /// |
3603 * Read-only. | 3552 /// Read-only. |
3604 * Possible string values are: | 3553 /// Possible string values are: |
3605 * - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. This is only | 3554 /// - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. This is only |
3606 * used/useful for distinguishing | 3555 /// used/useful for distinguishing |
3607 * unset values. | 3556 /// unset values. |
3608 * - "ACTIVE" : The normal and active state. | 3557 /// - "ACTIVE" : The normal and active state. |
3609 * - "DELETE_REQUESTED" : The project has been marked for deletion by the user | 3558 /// - "DELETE_REQUESTED" : The project has been marked for deletion by the |
3610 * (by invoking | 3559 /// user |
3611 * DeleteProject) | 3560 /// (by invoking |
3612 * or by the system (Google Cloud Platform). | 3561 /// DeleteProject) |
3613 * This can generally be reversed by invoking UndeleteProject. | 3562 /// or by the system (Google Cloud Platform). |
3614 * - "DELETE_IN_PROGRESS" : This lifecycle state is no longer used and not | 3563 /// This can generally be reversed by invoking UndeleteProject. |
3615 * returned by the API. | 3564 /// - "DELETE_IN_PROGRESS" : This lifecycle state is no longer used and not |
3616 */ | 3565 /// returned by the API. |
3617 core.String lifecycleState; | 3566 core.String lifecycleState; |
3618 /** | 3567 |
3619 * The user-assigned display name of the Project. | 3568 /// The user-assigned display name of the Project. |
3620 * It must be 4 to 30 characters. | 3569 /// It must be 4 to 30 characters. |
3621 * Allowed characters are: lowercase and uppercase letters, numbers, | 3570 /// Allowed characters are: lowercase and uppercase letters, numbers, |
3622 * hyphen, single-quote, double-quote, space, and exclamation point. | 3571 /// hyphen, single-quote, double-quote, space, and exclamation point. |
3623 * | 3572 /// |
3624 * Example: <code>My Project</code> | 3573 /// Example: <code>My Project</code> |
3625 * Read-write. | 3574 /// Read-write. |
3626 */ | |
3627 core.String name; | 3575 core.String name; |
3628 /** | 3576 |
3629 * An optional reference to a parent Resource. | 3577 /// An optional reference to a parent Resource. |
3630 * | 3578 /// |
3631 * The only supported parent type is "organization". Once set, the parent | 3579 /// The only supported parent type is "organization". Once set, the parent |
3632 * cannot be modified. The `parent` can be set on creation or using the | 3580 /// cannot be modified. The `parent` can be set on creation or using the |
3633 * `UpdateProject` method; the end user must have the | 3581 /// `UpdateProject` method; the end user must have the |
3634 * `resourcemanager.projects.create` permission on the parent. | 3582 /// `resourcemanager.projects.create` permission on the parent. |
3635 * | 3583 /// |
3636 * Read-write. | 3584 /// Read-write. |
3637 */ | |
3638 ResourceId parent; | 3585 ResourceId parent; |
3639 /** | 3586 |
3640 * The unique, user-assigned ID of the Project. | 3587 /// The unique, user-assigned ID of the Project. |
3641 * It must be 6 to 30 lowercase letters, digits, or hyphens. | 3588 /// It must be 6 to 30 lowercase letters, digits, or hyphens. |
3642 * It must start with a letter. | 3589 /// It must start with a letter. |
3643 * Trailing hyphens are prohibited. | 3590 /// Trailing hyphens are prohibited. |
3644 * | 3591 /// |
3645 * Example: <code>tokyo-rain-123</code> | 3592 /// Example: <code>tokyo-rain-123</code> |
3646 * Read-only after creation. | 3593 /// Read-only after creation. |
3647 */ | |
3648 core.String projectId; | 3594 core.String projectId; |
3649 /** | 3595 |
3650 * The number uniquely identifying the project. | 3596 /// The number uniquely identifying the project. |
3651 * | 3597 /// |
3652 * Example: <code>415104041262</code> | 3598 /// Example: <code>415104041262</code> |
3653 * Read-only. | 3599 /// Read-only. |
3654 */ | |
3655 core.String projectNumber; | 3600 core.String projectNumber; |
3656 | 3601 |
3657 Project(); | 3602 Project(); |
3658 | 3603 |
3659 Project.fromJson(core.Map _json) { | 3604 Project.fromJson(core.Map _json) { |
3660 if (_json.containsKey("createTime")) { | 3605 if (_json.containsKey("createTime")) { |
3661 createTime = _json["createTime"]; | 3606 createTime = _json["createTime"]; |
3662 } | 3607 } |
3663 if (_json.containsKey("labels")) { | 3608 if (_json.containsKey("labels")) { |
3664 labels = _json["labels"]; | 3609 labels = _json["labels"]; |
3665 } | 3610 } |
3666 if (_json.containsKey("lifecycleState")) { | 3611 if (_json.containsKey("lifecycleState")) { |
3667 lifecycleState = _json["lifecycleState"]; | 3612 lifecycleState = _json["lifecycleState"]; |
3668 } | 3613 } |
3669 if (_json.containsKey("name")) { | 3614 if (_json.containsKey("name")) { |
3670 name = _json["name"]; | 3615 name = _json["name"]; |
3671 } | 3616 } |
3672 if (_json.containsKey("parent")) { | 3617 if (_json.containsKey("parent")) { |
3673 parent = new ResourceId.fromJson(_json["parent"]); | 3618 parent = new ResourceId.fromJson(_json["parent"]); |
3674 } | 3619 } |
3675 if (_json.containsKey("projectId")) { | 3620 if (_json.containsKey("projectId")) { |
3676 projectId = _json["projectId"]; | 3621 projectId = _json["projectId"]; |
3677 } | 3622 } |
3678 if (_json.containsKey("projectNumber")) { | 3623 if (_json.containsKey("projectNumber")) { |
3679 projectNumber = _json["projectNumber"]; | 3624 projectNumber = _json["projectNumber"]; |
3680 } | 3625 } |
3681 } | 3626 } |
3682 | 3627 |
3683 core.Map<core.String, core.Object> toJson() { | 3628 core.Map<core.String, core.Object> toJson() { |
3684 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3629 final core.Map<core.String, core.Object> _json = |
| 3630 new core.Map<core.String, core.Object>(); |
3685 if (createTime != null) { | 3631 if (createTime != null) { |
3686 _json["createTime"] = createTime; | 3632 _json["createTime"] = createTime; |
3687 } | 3633 } |
3688 if (labels != null) { | 3634 if (labels != null) { |
3689 _json["labels"] = labels; | 3635 _json["labels"] = labels; |
3690 } | 3636 } |
3691 if (lifecycleState != null) { | 3637 if (lifecycleState != null) { |
3692 _json["lifecycleState"] = lifecycleState; | 3638 _json["lifecycleState"] = lifecycleState; |
3693 } | 3639 } |
3694 if (name != null) { | 3640 if (name != null) { |
3695 _json["name"] = name; | 3641 _json["name"] = name; |
3696 } | 3642 } |
3697 if (parent != null) { | 3643 if (parent != null) { |
3698 _json["parent"] = (parent).toJson(); | 3644 _json["parent"] = (parent).toJson(); |
3699 } | 3645 } |
3700 if (projectId != null) { | 3646 if (projectId != null) { |
3701 _json["projectId"] = projectId; | 3647 _json["projectId"] = projectId; |
3702 } | 3648 } |
3703 if (projectNumber != null) { | 3649 if (projectNumber != null) { |
3704 _json["projectNumber"] = projectNumber; | 3650 _json["projectNumber"] = projectNumber; |
3705 } | 3651 } |
3706 return _json; | 3652 return _json; |
3707 } | 3653 } |
3708 } | 3654 } |
3709 | 3655 |
3710 /** | 3656 /// A status object which is used as the `metadata` field for the Operation |
3711 * A status object which is used as the `metadata` field for the Operation | 3657 /// returned by CreateProject. It provides insight for when significant phases |
3712 * returned by CreateProject. It provides insight for when significant phases of | 3658 /// of |
3713 * Project creation have completed. | 3659 /// Project creation have completed. |
3714 */ | |
3715 class ProjectCreationStatus { | 3660 class ProjectCreationStatus { |
3716 /** Creation time of the project creation workflow. */ | 3661 /// Creation time of the project creation workflow. |
3717 core.String createTime; | 3662 core.String createTime; |
3718 /** | 3663 |
3719 * True if the project can be retrieved using GetProject. No other operations | 3664 /// True if the project can be retrieved using GetProject. No other |
3720 * on the project are guaranteed to work until the project creation is | 3665 /// operations |
3721 * complete. | 3666 /// on the project are guaranteed to work until the project creation is |
3722 */ | 3667 /// complete. |
3723 core.bool gettable; | 3668 core.bool gettable; |
3724 /** True if the project creation process is complete. */ | 3669 |
| 3670 /// True if the project creation process is complete. |
3725 core.bool ready; | 3671 core.bool ready; |
3726 | 3672 |
3727 ProjectCreationStatus(); | 3673 ProjectCreationStatus(); |
3728 | 3674 |
3729 ProjectCreationStatus.fromJson(core.Map _json) { | 3675 ProjectCreationStatus.fromJson(core.Map _json) { |
3730 if (_json.containsKey("createTime")) { | 3676 if (_json.containsKey("createTime")) { |
3731 createTime = _json["createTime"]; | 3677 createTime = _json["createTime"]; |
3732 } | 3678 } |
3733 if (_json.containsKey("gettable")) { | 3679 if (_json.containsKey("gettable")) { |
3734 gettable = _json["gettable"]; | 3680 gettable = _json["gettable"]; |
3735 } | 3681 } |
3736 if (_json.containsKey("ready")) { | 3682 if (_json.containsKey("ready")) { |
3737 ready = _json["ready"]; | 3683 ready = _json["ready"]; |
3738 } | 3684 } |
3739 } | 3685 } |
3740 | 3686 |
3741 core.Map<core.String, core.Object> toJson() { | 3687 core.Map<core.String, core.Object> toJson() { |
3742 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3688 final core.Map<core.String, core.Object> _json = |
| 3689 new core.Map<core.String, core.Object>(); |
3743 if (createTime != null) { | 3690 if (createTime != null) { |
3744 _json["createTime"] = createTime; | 3691 _json["createTime"] = createTime; |
3745 } | 3692 } |
3746 if (gettable != null) { | 3693 if (gettable != null) { |
3747 _json["gettable"] = gettable; | 3694 _json["gettable"] = gettable; |
3748 } | 3695 } |
3749 if (ready != null) { | 3696 if (ready != null) { |
3750 _json["ready"] = ready; | 3697 _json["ready"] = ready; |
3751 } | 3698 } |
3752 return _json; | 3699 return _json; |
3753 } | 3700 } |
3754 } | 3701 } |
3755 | 3702 |
3756 /** | 3703 /// A container to reference an id for any resource type. A `resource` in |
3757 * A container to reference an id for any resource type. A `resource` in Google | 3704 /// Google |
3758 * Cloud Platform is a generic term for something you (a developer) may want to | 3705 /// Cloud Platform is a generic term for something you (a developer) may want |
3759 * interact with through one of our API's. Some examples are an App Engine app, | 3706 /// to |
3760 * a Compute Engine instance, a Cloud SQL database, and so on. | 3707 /// interact with through one of our API's. Some examples are an App Engine |
3761 */ | 3708 /// app, |
| 3709 /// a Compute Engine instance, a Cloud SQL database, and so on. |
3762 class ResourceId { | 3710 class ResourceId { |
3763 /** | 3711 /// Required field for the type-specific id. This should correspond to the id |
3764 * Required field for the type-specific id. This should correspond to the id | 3712 /// used in the type-specific API's. |
3765 * used in the type-specific API's. | |
3766 */ | |
3767 core.String id; | 3713 core.String id; |
3768 /** | 3714 |
3769 * Required field representing the resource type this id is for. | 3715 /// Required field representing the resource type this id is for. |
3770 * At present, the valid types are: "organization" | 3716 /// At present, the valid types are: "organization" |
3771 */ | |
3772 core.String type; | 3717 core.String type; |
3773 | 3718 |
3774 ResourceId(); | 3719 ResourceId(); |
3775 | 3720 |
3776 ResourceId.fromJson(core.Map _json) { | 3721 ResourceId.fromJson(core.Map _json) { |
3777 if (_json.containsKey("id")) { | 3722 if (_json.containsKey("id")) { |
3778 id = _json["id"]; | 3723 id = _json["id"]; |
3779 } | 3724 } |
3780 if (_json.containsKey("type")) { | 3725 if (_json.containsKey("type")) { |
3781 type = _json["type"]; | 3726 type = _json["type"]; |
3782 } | 3727 } |
3783 } | 3728 } |
3784 | 3729 |
3785 core.Map<core.String, core.Object> toJson() { | 3730 core.Map<core.String, core.Object> toJson() { |
3786 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3731 final core.Map<core.String, core.Object> _json = |
| 3732 new core.Map<core.String, core.Object>(); |
3787 if (id != null) { | 3733 if (id != null) { |
3788 _json["id"] = id; | 3734 _json["id"] = id; |
3789 } | 3735 } |
3790 if (type != null) { | 3736 if (type != null) { |
3791 _json["type"] = type; | 3737 _json["type"] = type; |
3792 } | 3738 } |
3793 return _json; | 3739 return _json; |
3794 } | 3740 } |
3795 } | 3741 } |
3796 | 3742 |
3797 /** | 3743 /// Ignores policies set above this resource and restores the |
3798 * Ignores policies set above this resource and restores the | 3744 /// `constraint_default` enforcement behavior of the specific `Constraint` at |
3799 * `constraint_default` enforcement behavior of the specific `Constraint` at | 3745 /// this resource. |
3800 * this resource. | 3746 /// |
3801 * | 3747 /// Suppose that `constraint_default` is set to `ALLOW` for the |
3802 * Suppose that `constraint_default` is set to `ALLOW` for the | 3748 /// `Constraint` `constraints/serviceuser.services`. Suppose that organization |
3803 * `Constraint` `constraints/serviceuser.services`. Suppose that organization | 3749 /// foo.com sets a `Policy` at their Organization resource node that restricts |
3804 * foo.com sets a `Policy` at their Organization resource node that restricts | 3750 /// the allowed service activations to deny all service activations. They |
3805 * the allowed service activations to deny all service activations. They | 3751 /// could then set a `Policy` with the `policy_type` `restore_default` on |
3806 * could then set a `Policy` with the `policy_type` `restore_default` on | 3752 /// several experimental projects, restoring the `constraint_default` |
3807 * several experimental projects, restoring the `constraint_default` | 3753 /// enforcement of the `Constraint` for only those projects, allowing those |
3808 * enforcement of the `Constraint` for only those projects, allowing those | 3754 /// projects to have all services activated. |
3809 * projects to have all services activated. | |
3810 */ | |
3811 class RestoreDefault { | 3755 class RestoreDefault { |
3812 | |
3813 RestoreDefault(); | 3756 RestoreDefault(); |
3814 | 3757 |
3815 RestoreDefault.fromJson(core.Map _json) { | 3758 RestoreDefault.fromJson(core.Map _json) {} |
3816 } | |
3817 | 3759 |
3818 core.Map<core.String, core.Object> toJson() { | 3760 core.Map<core.String, core.Object> toJson() { |
3819 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3761 final core.Map<core.String, core.Object> _json = |
| 3762 new core.Map<core.String, core.Object>(); |
3820 return _json; | 3763 return _json; |
3821 } | 3764 } |
3822 } | 3765 } |
3823 | 3766 |
3824 /** The request sent to the `SearchOrganizations` method. */ | 3767 /// The request sent to the `SearchOrganizations` method. |
3825 class SearchOrganizationsRequest { | 3768 class SearchOrganizationsRequest { |
3826 /** | 3769 /// An optional query string used to filter the Organizations to return in |
3827 * An optional query string used to filter the Organizations to return in | 3770 /// the response. Filter rules are case-insensitive. |
3828 * the response. Filter rules are case-insensitive. | 3771 /// |
3829 * | 3772 /// |
3830 * | 3773 /// Organizations may be filtered by `owner.directoryCustomerId` or by |
3831 * Organizations may be filtered by `owner.directoryCustomerId` or by | 3774 /// `domain`, where the domain is a Google for Work domain, for example: |
3832 * `domain`, where the domain is a Google for Work domain, for example: | 3775 /// |
3833 * | 3776 /// |Filter|Description| |
3834 * |Filter|Description| | 3777 /// |------|-----------| |
3835 * |------|-----------| | 3778 /// |owner.directorycustomerid:123456789|Organizations with |
3836 * |owner.directorycustomerid:123456789|Organizations with | 3779 /// `owner.directory_customer_id` equal to `123456789`.| |
3837 * `owner.directory_customer_id` equal to `123456789`.| | 3780 /// |domain:google.com|Organizations corresponding to the domain |
3838 * |domain:google.com|Organizations corresponding to the domain `google.com`.| | 3781 /// `google.com`.| |
3839 * | 3782 /// |
3840 * This field is optional. | 3783 /// This field is optional. |
3841 */ | |
3842 core.String filter; | 3784 core.String filter; |
3843 /** | 3785 |
3844 * The maximum number of Organizations to return in the response. | 3786 /// The maximum number of Organizations to return in the response. |
3845 * This field is optional. | 3787 /// This field is optional. |
3846 */ | |
3847 core.int pageSize; | 3788 core.int pageSize; |
3848 /** | 3789 |
3849 * A pagination token returned from a previous call to `SearchOrganizations` | 3790 /// A pagination token returned from a previous call to `SearchOrganizations` |
3850 * that indicates from where listing should continue. | 3791 /// that indicates from where listing should continue. |
3851 * This field is optional. | 3792 /// This field is optional. |
3852 */ | |
3853 core.String pageToken; | 3793 core.String pageToken; |
3854 | 3794 |
3855 SearchOrganizationsRequest(); | 3795 SearchOrganizationsRequest(); |
3856 | 3796 |
3857 SearchOrganizationsRequest.fromJson(core.Map _json) { | 3797 SearchOrganizationsRequest.fromJson(core.Map _json) { |
3858 if (_json.containsKey("filter")) { | 3798 if (_json.containsKey("filter")) { |
3859 filter = _json["filter"]; | 3799 filter = _json["filter"]; |
3860 } | 3800 } |
3861 if (_json.containsKey("pageSize")) { | 3801 if (_json.containsKey("pageSize")) { |
3862 pageSize = _json["pageSize"]; | 3802 pageSize = _json["pageSize"]; |
3863 } | 3803 } |
3864 if (_json.containsKey("pageToken")) { | 3804 if (_json.containsKey("pageToken")) { |
3865 pageToken = _json["pageToken"]; | 3805 pageToken = _json["pageToken"]; |
3866 } | 3806 } |
3867 } | 3807 } |
3868 | 3808 |
3869 core.Map<core.String, core.Object> toJson() { | 3809 core.Map<core.String, core.Object> toJson() { |
3870 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3810 final core.Map<core.String, core.Object> _json = |
| 3811 new core.Map<core.String, core.Object>(); |
3871 if (filter != null) { | 3812 if (filter != null) { |
3872 _json["filter"] = filter; | 3813 _json["filter"] = filter; |
3873 } | 3814 } |
3874 if (pageSize != null) { | 3815 if (pageSize != null) { |
3875 _json["pageSize"] = pageSize; | 3816 _json["pageSize"] = pageSize; |
3876 } | 3817 } |
3877 if (pageToken != null) { | 3818 if (pageToken != null) { |
3878 _json["pageToken"] = pageToken; | 3819 _json["pageToken"] = pageToken; |
3879 } | 3820 } |
3880 return _json; | 3821 return _json; |
3881 } | 3822 } |
3882 } | 3823 } |
3883 | 3824 |
3884 /** The response returned from the `SearchOrganizations` method. */ | 3825 /// The response returned from the `SearchOrganizations` method. |
3885 class SearchOrganizationsResponse { | 3826 class SearchOrganizationsResponse { |
3886 /** | 3827 /// A pagination token to be used to retrieve the next page of results. If |
3887 * A pagination token to be used to retrieve the next page of results. If the | 3828 /// the |
3888 * result is too large to fit within the page size specified in the request, | 3829 /// result is too large to fit within the page size specified in the request, |
3889 * this field will be set with a token that can be used to fetch the next page | 3830 /// this field will be set with a token that can be used to fetch the next |
3890 * of results. If this field is empty, it indicates that this response | 3831 /// page |
3891 * contains the last page of results. | 3832 /// of results. If this field is empty, it indicates that this response |
3892 */ | 3833 /// contains the last page of results. |
3893 core.String nextPageToken; | 3834 core.String nextPageToken; |
3894 /** | 3835 |
3895 * The list of Organizations that matched the search query, possibly | 3836 /// The list of Organizations that matched the search query, possibly |
3896 * paginated. | 3837 /// paginated. |
3897 */ | |
3898 core.List<Organization> organizations; | 3838 core.List<Organization> organizations; |
3899 | 3839 |
3900 SearchOrganizationsResponse(); | 3840 SearchOrganizationsResponse(); |
3901 | 3841 |
3902 SearchOrganizationsResponse.fromJson(core.Map _json) { | 3842 SearchOrganizationsResponse.fromJson(core.Map _json) { |
3903 if (_json.containsKey("nextPageToken")) { | 3843 if (_json.containsKey("nextPageToken")) { |
3904 nextPageToken = _json["nextPageToken"]; | 3844 nextPageToken = _json["nextPageToken"]; |
3905 } | 3845 } |
3906 if (_json.containsKey("organizations")) { | 3846 if (_json.containsKey("organizations")) { |
3907 organizations = _json["organizations"].map((value) => new Organization.fro
mJson(value)).toList(); | 3847 organizations = _json["organizations"] |
| 3848 .map((value) => new Organization.fromJson(value)) |
| 3849 .toList(); |
3908 } | 3850 } |
3909 } | 3851 } |
3910 | 3852 |
3911 core.Map<core.String, core.Object> toJson() { | 3853 core.Map<core.String, core.Object> toJson() { |
3912 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3854 final core.Map<core.String, core.Object> _json = |
| 3855 new core.Map<core.String, core.Object>(); |
3913 if (nextPageToken != null) { | 3856 if (nextPageToken != null) { |
3914 _json["nextPageToken"] = nextPageToken; | 3857 _json["nextPageToken"] = nextPageToken; |
3915 } | 3858 } |
3916 if (organizations != null) { | 3859 if (organizations != null) { |
3917 _json["organizations"] = organizations.map((value) => (value).toJson()).to
List(); | 3860 _json["organizations"] = |
| 3861 organizations.map((value) => (value).toJson()).toList(); |
3918 } | 3862 } |
3919 return _json; | 3863 return _json; |
3920 } | 3864 } |
3921 } | 3865 } |
3922 | 3866 |
3923 /** Request message for `SetIamPolicy` method. */ | 3867 /// Request message for `SetIamPolicy` method. |
3924 class SetIamPolicyRequest { | 3868 class SetIamPolicyRequest { |
3925 /** | 3869 /// REQUIRED: The complete policy to be applied to the `resource`. The size |
3926 * REQUIRED: The complete policy to be applied to the `resource`. The size of | 3870 /// of |
3927 * the policy is limited to a few 10s of KB. An empty policy is a | 3871 /// the policy is limited to a few 10s of KB. An empty policy is a |
3928 * valid policy but certain Cloud Platform services (such as Projects) | 3872 /// valid policy but certain Cloud Platform services (such as Projects) |
3929 * might reject them. | 3873 /// might reject them. |
3930 */ | |
3931 Policy policy; | 3874 Policy policy; |
3932 /** | 3875 |
3933 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only | 3876 /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. |
3934 * the fields in the mask will be modified. If no mask is provided, the | 3877 /// Only |
3935 * following default mask is used: | 3878 /// the fields in the mask will be modified. If no mask is provided, the |
3936 * paths: "bindings, etag" | 3879 /// following default mask is used: |
3937 * This field is only used by Cloud IAM. | 3880 /// paths: "bindings, etag" |
3938 */ | 3881 /// This field is only used by Cloud IAM. |
3939 core.String updateMask; | 3882 core.String updateMask; |
3940 | 3883 |
3941 SetIamPolicyRequest(); | 3884 SetIamPolicyRequest(); |
3942 | 3885 |
3943 SetIamPolicyRequest.fromJson(core.Map _json) { | 3886 SetIamPolicyRequest.fromJson(core.Map _json) { |
3944 if (_json.containsKey("policy")) { | 3887 if (_json.containsKey("policy")) { |
3945 policy = new Policy.fromJson(_json["policy"]); | 3888 policy = new Policy.fromJson(_json["policy"]); |
3946 } | 3889 } |
3947 if (_json.containsKey("updateMask")) { | 3890 if (_json.containsKey("updateMask")) { |
3948 updateMask = _json["updateMask"]; | 3891 updateMask = _json["updateMask"]; |
3949 } | 3892 } |
3950 } | 3893 } |
3951 | 3894 |
3952 core.Map<core.String, core.Object> toJson() { | 3895 core.Map<core.String, core.Object> toJson() { |
3953 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3896 final core.Map<core.String, core.Object> _json = |
| 3897 new core.Map<core.String, core.Object>(); |
3954 if (policy != null) { | 3898 if (policy != null) { |
3955 _json["policy"] = (policy).toJson(); | 3899 _json["policy"] = (policy).toJson(); |
3956 } | 3900 } |
3957 if (updateMask != null) { | 3901 if (updateMask != null) { |
3958 _json["updateMask"] = updateMask; | 3902 _json["updateMask"] = updateMask; |
3959 } | 3903 } |
3960 return _json; | 3904 return _json; |
3961 } | 3905 } |
3962 } | 3906 } |
3963 | 3907 |
3964 /** The request sent to the SetOrgPolicyRequest method. */ | 3908 /// The request sent to the SetOrgPolicyRequest method. |
3965 class SetOrgPolicyRequest { | 3909 class SetOrgPolicyRequest { |
3966 /** `Policy` to set on the resource. */ | 3910 /// `Policy` to set on the resource. |
3967 OrgPolicy policy; | 3911 OrgPolicy policy; |
3968 | 3912 |
3969 SetOrgPolicyRequest(); | 3913 SetOrgPolicyRequest(); |
3970 | 3914 |
3971 SetOrgPolicyRequest.fromJson(core.Map _json) { | 3915 SetOrgPolicyRequest.fromJson(core.Map _json) { |
3972 if (_json.containsKey("policy")) { | 3916 if (_json.containsKey("policy")) { |
3973 policy = new OrgPolicy.fromJson(_json["policy"]); | 3917 policy = new OrgPolicy.fromJson(_json["policy"]); |
3974 } | 3918 } |
3975 } | 3919 } |
3976 | 3920 |
3977 core.Map<core.String, core.Object> toJson() { | 3921 core.Map<core.String, core.Object> toJson() { |
3978 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3922 final core.Map<core.String, core.Object> _json = |
| 3923 new core.Map<core.String, core.Object>(); |
3979 if (policy != null) { | 3924 if (policy != null) { |
3980 _json["policy"] = (policy).toJson(); | 3925 _json["policy"] = (policy).toJson(); |
3981 } | 3926 } |
3982 return _json; | 3927 return _json; |
3983 } | 3928 } |
3984 } | 3929 } |
3985 | 3930 |
3986 /** | 3931 /// The `Status` type defines a logical error model that is suitable for |
3987 * The `Status` type defines a logical error model that is suitable for | 3932 /// different |
3988 * different | 3933 /// programming environments, including REST APIs and RPC APIs. It is used by |
3989 * programming environments, including REST APIs and RPC APIs. It is used by | 3934 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
3990 * [gRPC](https://github.com/grpc). The error model is designed to be: | 3935 /// |
3991 * | 3936 /// - Simple to use and understand for most users |
3992 * - Simple to use and understand for most users | 3937 /// - Flexible enough to meet unexpected needs |
3993 * - Flexible enough to meet unexpected needs | 3938 /// |
3994 * | 3939 /// # Overview |
3995 * # Overview | 3940 /// |
3996 * | 3941 /// The `Status` message contains three pieces of data: error code, error |
3997 * The `Status` message contains three pieces of data: error code, error | 3942 /// message, |
3998 * message, | 3943 /// and error details. The error code should be an enum value of |
3999 * and error details. The error code should be an enum value of | 3944 /// google.rpc.Code, but it may accept additional error codes if needed. The |
4000 * google.rpc.Code, but it may accept additional error codes if needed. The | 3945 /// error message should be a developer-facing English message that helps |
4001 * error message should be a developer-facing English message that helps | 3946 /// developers *understand* and *resolve* the error. If a localized user-facing |
4002 * developers *understand* and *resolve* the error. If a localized user-facing | 3947 /// error message is needed, put the localized message in the error details or |
4003 * error message is needed, put the localized message in the error details or | 3948 /// localize it in the client. The optional error details may contain arbitrary |
4004 * localize it in the client. The optional error details may contain arbitrary | 3949 /// information about the error. There is a predefined set of error detail |
4005 * information about the error. There is a predefined set of error detail types | 3950 /// types |
4006 * in the package `google.rpc` that can be used for common error conditions. | 3951 /// in the package `google.rpc` that can be used for common error conditions. |
4007 * | 3952 /// |
4008 * # Language mapping | 3953 /// # Language mapping |
4009 * | 3954 /// |
4010 * The `Status` message is the logical representation of the error model, but it | 3955 /// The `Status` message is the logical representation of the error model, but |
4011 * is not necessarily the actual wire format. When the `Status` message is | 3956 /// it |
4012 * exposed in different client libraries and different wire protocols, it can be | 3957 /// is not necessarily the actual wire format. When the `Status` message is |
4013 * mapped differently. For example, it will likely be mapped to some exceptions | 3958 /// exposed in different client libraries and different wire protocols, it can |
4014 * in Java, but more likely mapped to some error codes in C. | 3959 /// be |
4015 * | 3960 /// mapped differently. For example, it will likely be mapped to some |
4016 * # Other uses | 3961 /// exceptions |
4017 * | 3962 /// in Java, but more likely mapped to some error codes in C. |
4018 * The error model and the `Status` message can be used in a variety of | 3963 /// |
4019 * environments, either with or without APIs, to provide a | 3964 /// # Other uses |
4020 * consistent developer experience across different environments. | 3965 /// |
4021 * | 3966 /// The error model and the `Status` message can be used in a variety of |
4022 * Example uses of this error model include: | 3967 /// environments, either with or without APIs, to provide a |
4023 * | 3968 /// consistent developer experience across different environments. |
4024 * - Partial errors. If a service needs to return partial errors to the client, | 3969 /// |
4025 * it may embed the `Status` in the normal response to indicate the partial | 3970 /// Example uses of this error model include: |
4026 * errors. | 3971 /// |
4027 * | 3972 /// - Partial errors. If a service needs to return partial errors to the |
4028 * - Workflow errors. A typical workflow has multiple steps. Each step may | 3973 /// client, |
4029 * have a `Status` message for error reporting. | 3974 /// it may embed the `Status` in the normal response to indicate the partial |
4030 * | 3975 /// errors. |
4031 * - Batch operations. If a client uses batch request and batch response, the | 3976 /// |
4032 * `Status` message should be used directly inside batch response, one for | 3977 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
4033 * each error sub-response. | 3978 /// have a `Status` message for error reporting. |
4034 * | 3979 /// |
4035 * - Asynchronous operations. If an API call embeds asynchronous operation | 3980 /// - Batch operations. If a client uses batch request and batch response, the |
4036 * results in its response, the status of those operations should be | 3981 /// `Status` message should be used directly inside batch response, one for |
4037 * represented directly using the `Status` message. | 3982 /// each error sub-response. |
4038 * | 3983 /// |
4039 * - Logging. If some API errors are stored in logs, the message `Status` could | 3984 /// - Asynchronous operations. If an API call embeds asynchronous operation |
4040 * be used directly after any stripping needed for security/privacy reasons. | 3985 /// results in its response, the status of those operations should be |
4041 */ | 3986 /// represented directly using the `Status` message. |
| 3987 /// |
| 3988 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 3989 /// could |
| 3990 /// be used directly after any stripping needed for security/privacy reasons. |
4042 class Status { | 3991 class Status { |
4043 /** The status code, which should be an enum value of google.rpc.Code. */ | 3992 /// The status code, which should be an enum value of google.rpc.Code. |
4044 core.int code; | 3993 core.int code; |
4045 /** | 3994 |
4046 * A list of messages that carry the error details. There is a common set of | 3995 /// A list of messages that carry the error details. There is a common set |
4047 * message types for APIs to use. | 3996 /// of |
4048 * | 3997 /// message types for APIs to use. |
4049 * The values for Object must be JSON objects. It can consist of `num`, | 3998 /// |
4050 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3999 /// The values for Object must be JSON objects. It can consist of `num`, |
4051 */ | 4000 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
4052 core.List<core.Map<core.String, core.Object>> details; | 4001 core.List<core.Map<core.String, core.Object>> details; |
4053 /** | 4002 |
4054 * A developer-facing error message, which should be in English. Any | 4003 /// A developer-facing error message, which should be in English. Any |
4055 * user-facing error message should be localized and sent in the | 4004 /// user-facing error message should be localized and sent in the |
4056 * google.rpc.Status.details field, or localized by the client. | 4005 /// google.rpc.Status.details field, or localized by the client. |
4057 */ | |
4058 core.String message; | 4006 core.String message; |
4059 | 4007 |
4060 Status(); | 4008 Status(); |
4061 | 4009 |
4062 Status.fromJson(core.Map _json) { | 4010 Status.fromJson(core.Map _json) { |
4063 if (_json.containsKey("code")) { | 4011 if (_json.containsKey("code")) { |
4064 code = _json["code"]; | 4012 code = _json["code"]; |
4065 } | 4013 } |
4066 if (_json.containsKey("details")) { | 4014 if (_json.containsKey("details")) { |
4067 details = _json["details"]; | 4015 details = _json["details"]; |
4068 } | 4016 } |
4069 if (_json.containsKey("message")) { | 4017 if (_json.containsKey("message")) { |
4070 message = _json["message"]; | 4018 message = _json["message"]; |
4071 } | 4019 } |
4072 } | 4020 } |
4073 | 4021 |
4074 core.Map<core.String, core.Object> toJson() { | 4022 core.Map<core.String, core.Object> toJson() { |
4075 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4023 final core.Map<core.String, core.Object> _json = |
| 4024 new core.Map<core.String, core.Object>(); |
4076 if (code != null) { | 4025 if (code != null) { |
4077 _json["code"] = code; | 4026 _json["code"] = code; |
4078 } | 4027 } |
4079 if (details != null) { | 4028 if (details != null) { |
4080 _json["details"] = details; | 4029 _json["details"] = details; |
4081 } | 4030 } |
4082 if (message != null) { | 4031 if (message != null) { |
4083 _json["message"] = message; | 4032 _json["message"] = message; |
4084 } | 4033 } |
4085 return _json; | 4034 return _json; |
4086 } | 4035 } |
4087 } | 4036 } |
4088 | 4037 |
4089 /** Request message for `TestIamPermissions` method. */ | 4038 /// Request message for `TestIamPermissions` method. |
4090 class TestIamPermissionsRequest { | 4039 class TestIamPermissionsRequest { |
4091 /** | 4040 /// The set of permissions to check for the `resource`. Permissions with |
4092 * The set of permissions to check for the `resource`. Permissions with | 4041 /// wildcards (such as '*' or 'storage.*') are not allowed. For more |
4093 * wildcards (such as '*' or 'storage.*') are not allowed. For more | 4042 /// information see |
4094 * information see | 4043 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
4095 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). | |
4096 */ | |
4097 core.List<core.String> permissions; | 4044 core.List<core.String> permissions; |
4098 | 4045 |
4099 TestIamPermissionsRequest(); | 4046 TestIamPermissionsRequest(); |
4100 | 4047 |
4101 TestIamPermissionsRequest.fromJson(core.Map _json) { | 4048 TestIamPermissionsRequest.fromJson(core.Map _json) { |
4102 if (_json.containsKey("permissions")) { | 4049 if (_json.containsKey("permissions")) { |
4103 permissions = _json["permissions"]; | 4050 permissions = _json["permissions"]; |
4104 } | 4051 } |
4105 } | 4052 } |
4106 | 4053 |
4107 core.Map<core.String, core.Object> toJson() { | 4054 core.Map<core.String, core.Object> toJson() { |
4108 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4055 final core.Map<core.String, core.Object> _json = |
| 4056 new core.Map<core.String, core.Object>(); |
4109 if (permissions != null) { | 4057 if (permissions != null) { |
4110 _json["permissions"] = permissions; | 4058 _json["permissions"] = permissions; |
4111 } | 4059 } |
4112 return _json; | 4060 return _json; |
4113 } | 4061 } |
4114 } | 4062 } |
4115 | 4063 |
4116 /** Response message for `TestIamPermissions` method. */ | 4064 /// Response message for `TestIamPermissions` method. |
4117 class TestIamPermissionsResponse { | 4065 class TestIamPermissionsResponse { |
4118 /** | 4066 /// A subset of `TestPermissionsRequest.permissions` that the caller is |
4119 * A subset of `TestPermissionsRequest.permissions` that the caller is | 4067 /// allowed. |
4120 * allowed. | |
4121 */ | |
4122 core.List<core.String> permissions; | 4068 core.List<core.String> permissions; |
4123 | 4069 |
4124 TestIamPermissionsResponse(); | 4070 TestIamPermissionsResponse(); |
4125 | 4071 |
4126 TestIamPermissionsResponse.fromJson(core.Map _json) { | 4072 TestIamPermissionsResponse.fromJson(core.Map _json) { |
4127 if (_json.containsKey("permissions")) { | 4073 if (_json.containsKey("permissions")) { |
4128 permissions = _json["permissions"]; | 4074 permissions = _json["permissions"]; |
4129 } | 4075 } |
4130 } | 4076 } |
4131 | 4077 |
4132 core.Map<core.String, core.Object> toJson() { | 4078 core.Map<core.String, core.Object> toJson() { |
4133 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4079 final core.Map<core.String, core.Object> _json = |
| 4080 new core.Map<core.String, core.Object>(); |
4134 if (permissions != null) { | 4081 if (permissions != null) { |
4135 _json["permissions"] = permissions; | 4082 _json["permissions"] = permissions; |
4136 } | 4083 } |
4137 return _json; | 4084 return _json; |
4138 } | 4085 } |
4139 } | 4086 } |
4140 | 4087 |
4141 /** | 4088 /// The request sent to the UndeleteProject |
4142 * The request sent to the UndeleteProject | 4089 /// method. |
4143 * method. | |
4144 */ | |
4145 class UndeleteProjectRequest { | 4090 class UndeleteProjectRequest { |
4146 | |
4147 UndeleteProjectRequest(); | 4091 UndeleteProjectRequest(); |
4148 | 4092 |
4149 UndeleteProjectRequest.fromJson(core.Map _json) { | 4093 UndeleteProjectRequest.fromJson(core.Map _json) {} |
4150 } | |
4151 | 4094 |
4152 core.Map<core.String, core.Object> toJson() { | 4095 core.Map<core.String, core.Object> toJson() { |
4153 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4096 final core.Map<core.String, core.Object> _json = |
| 4097 new core.Map<core.String, core.Object>(); |
4154 return _json; | 4098 return _json; |
4155 } | 4099 } |
4156 } | 4100 } |
OLD | NEW |