| 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.v2beta1; | 3 library googleapis.cloudresourcemanager.v2beta1; |
| 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/v2beta1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudresourcemanager/v2beta1'; |
| 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 | 31 |
| 33 CloudresourcemanagerApi(http.Client client, {core.String rootUrl: "https://clo
udresourcemanager.googleapis.com/", core.String servicePath: ""}) : | 32 CloudresourcemanagerApi(http.Client client, |
| 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 33 {core.String rootUrl: "https://cloudresourcemanager.googleapis.com/", |
| 34 core.String servicePath: ""}) |
| 35 : _requester = |
| 36 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
| 35 } | 37 } |
| 36 | 38 |
| 37 | |
| 38 class FoldersResourceApi { | 39 class FoldersResourceApi { |
| 39 final commons.ApiRequester _requester; | 40 final commons.ApiRequester _requester; |
| 40 | 41 |
| 41 FoldersResourceApi(commons.ApiRequester client) : | 42 FoldersResourceApi(commons.ApiRequester client) : _requester = client; |
| 42 _requester = client; | |
| 43 | 43 |
| 44 /** | 44 /// Creates a Folder in the resource hierarchy. |
| 45 * Creates a Folder in the resource hierarchy. | 45 /// Returns an Operation which can be used to track the progress of the |
| 46 * Returns an Operation which can be used to track the progress of the | 46 /// folder creation workflow. |
| 47 * folder creation workflow. | 47 /// Upon success the Operation.response field will be populated with the |
| 48 * Upon success the Operation.response field will be populated with the | 48 /// created Folder. |
| 49 * created Folder. | 49 /// |
| 50 * | 50 /// In order to succeed, the addition of this new Folder must not violate |
| 51 * In order to succeed, the addition of this new Folder must not violate | 51 /// the Folder naming, height or fanout constraints. |
| 52 * the Folder naming, height or fanout constraints. | 52 /// + The Folder's display_name must be distinct from all other Folder's that |
| 53 * + The Folder's display_name must be distinct from all other Folder's that | 53 /// share its parent. |
| 54 * share its parent. | 54 /// + The addition of the Folder must not cause the active Folder hierarchy |
| 55 * + The addition of the Folder must not cause the active Folder hierarchy | 55 /// to exceed a height of 4. Note, the full active + deleted Folder hierarchy |
| 56 * to exceed a height of 4. Note, the full active + deleted Folder hierarchy | 56 /// is allowed to reach a height of 8; this provides additional headroom when |
| 57 * is allowed to reach a height of 8; this provides additional headroom when | 57 /// moving folders that contain deleted folders. |
| 58 * moving folders that contain deleted folders. | 58 /// + The addition of the Folder must not cause the total number of Folders |
| 59 * + The addition of the Folder must not cause the total number of Folders | 59 /// under its parent to exceed 100. |
| 60 * under its parent to exceed 100. | 60 /// |
| 61 * | 61 /// If the operation fails due to a folder constraint violation, |
| 62 * If the operation fails due to a folder constraint violation, | 62 /// a PreconditionFailure explaining the violation will be returned. |
| 63 * a PreconditionFailure explaining the violation will be returned. | 63 /// If the failure occurs synchronously then the PreconditionFailure |
| 64 * If the failure occurs synchronously then the PreconditionFailure | 64 /// will be returned via the Status.details field and if it occurs |
| 65 * will be returned via the Status.details field and if it occurs | 65 /// asynchronously then the PreconditionFailure will be returned |
| 66 * asynchronously then the PreconditionFailure will be returned | 66 /// via the the Operation.error field. |
| 67 * via the the Operation.error field. | 67 /// |
| 68 * | 68 /// The caller must have `resourcemanager.folders.create` permission on the |
| 69 * The caller must have `resourcemanager.folders.create` permission on the | 69 /// identified parent. |
| 70 * identified parent. | 70 /// |
| 71 * | 71 /// [request] - The metadata request object. |
| 72 * [request] - The metadata request object. | 72 /// |
| 73 * | 73 /// Request parameters: |
| 74 * Request parameters: | 74 /// |
| 75 * | 75 /// [parent] - The resource name of the new Folder's parent. |
| 76 * [parent] - The resource name of the new Folder's parent. | 76 /// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. |
| 77 * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. | 77 /// |
| 78 * | 78 /// Completes with a [Operation]. |
| 79 * Completes with a [Operation]. | 79 /// |
| 80 * | 80 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 81 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 81 /// an error. |
| 82 * error. | 82 /// |
| 83 * | 83 /// If the used [http.Client] completes with an error when making a REST |
| 84 * If the used [http.Client] completes with an error when making a REST call, | 84 /// call, this method will complete with the same error. |
| 85 * this method will complete with the same error. | |
| 86 */ | |
| 87 async.Future<Operation> create(Folder request, {core.String parent}) { | 85 async.Future<Operation> create(Folder request, {core.String parent}) { |
| 88 var _url = null; | 86 var _url = null; |
| 89 var _queryParams = new core.Map(); | 87 var _queryParams = new core.Map(); |
| 90 var _uploadMedia = null; | 88 var _uploadMedia = null; |
| 91 var _uploadOptions = null; | 89 var _uploadOptions = null; |
| 92 var _downloadOptions = commons.DownloadOptions.Metadata; | 90 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 93 var _body = null; | 91 var _body = null; |
| 94 | 92 |
| 95 if (request != null) { | 93 if (request != null) { |
| 96 _body = convert.JSON.encode((request).toJson()); | 94 _body = convert.JSON.encode((request).toJson()); |
| 97 } | 95 } |
| 98 if (parent != null) { | 96 if (parent != null) { |
| 99 _queryParams["parent"] = [parent]; | 97 _queryParams["parent"] = [parent]; |
| 100 } | 98 } |
| 101 | 99 |
| 102 _url = 'v2beta1/folders'; | 100 _url = 'v2beta1/folders'; |
| 103 | 101 |
| 104 var _response = _requester.request(_url, | 102 var _response = _requester.request(_url, "POST", |
| 105 "POST", | 103 body: _body, |
| 106 body: _body, | 104 queryParams: _queryParams, |
| 107 queryParams: _queryParams, | 105 uploadOptions: _uploadOptions, |
| 108 uploadOptions: _uploadOptions, | 106 uploadMedia: _uploadMedia, |
| 109 uploadMedia: _uploadMedia, | 107 downloadOptions: _downloadOptions); |
| 110 downloadOptions: _downloadOptions); | |
| 111 return _response.then((data) => new Operation.fromJson(data)); | 108 return _response.then((data) => new Operation.fromJson(data)); |
| 112 } | 109 } |
| 113 | 110 |
| 114 /** | 111 /// Requests deletion of a Folder. The Folder is moved into the |
| 115 * Requests deletion of a Folder. The Folder is moved into the | 112 /// [DELETE_REQUESTED] state immediately, and is deleted approximately 30 |
| 116 * [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days | 113 /// days |
| 117 * later. This method may only be called on an empty Folder in the [ACTIVE] | 114 /// later. This method may only be called on an empty Folder in the [ACTIVE] |
| 118 * state, where a Folder is empty if it doesn't contain any Folders or | 115 /// state, where a Folder is empty if it doesn't contain any Folders or |
| 119 * Projects in the [ACTIVE] state. | 116 /// Projects in the [ACTIVE] state. |
| 120 * The caller must have `resourcemanager.folders.delete` permission on the | 117 /// The caller must have `resourcemanager.folders.delete` permission on the |
| 121 * identified folder. | 118 /// identified folder. |
| 122 * | 119 /// |
| 123 * Request parameters: | 120 /// Request parameters: |
| 124 * | 121 /// |
| 125 * [name] - the resource name of the Folder to be deleted. | 122 /// [name] - the resource name of the Folder to be deleted. |
| 126 * Must be of the form `folders/{folder_id}`. | 123 /// Must be of the form `folders/{folder_id}`. |
| 127 * Value must have pattern "^folders/[^/]+$". | 124 /// Value must have pattern "^folders/[^/]+$". |
| 128 * | 125 /// |
| 129 * Completes with a [Folder]. | 126 /// Completes with a [Folder]. |
| 130 * | 127 /// |
| 131 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 128 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 132 * error. | 129 /// an error. |
| 133 * | 130 /// |
| 134 * If the used [http.Client] completes with an error when making a REST call, | 131 /// If the used [http.Client] completes with an error when making a REST |
| 135 * this method will complete with the same error. | 132 /// call, this method will complete with the same error. |
| 136 */ | |
| 137 async.Future<Folder> delete(core.String name) { | 133 async.Future<Folder> delete(core.String name) { |
| 138 var _url = null; | 134 var _url = null; |
| 139 var _queryParams = new core.Map(); | 135 var _queryParams = new core.Map(); |
| 140 var _uploadMedia = null; | 136 var _uploadMedia = null; |
| 141 var _uploadOptions = null; | 137 var _uploadOptions = null; |
| 142 var _downloadOptions = commons.DownloadOptions.Metadata; | 138 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 143 var _body = null; | 139 var _body = null; |
| 144 | 140 |
| 145 if (name == null) { | 141 if (name == null) { |
| 146 throw new core.ArgumentError("Parameter name is required."); | 142 throw new core.ArgumentError("Parameter name is required."); |
| 147 } | 143 } |
| 148 | 144 |
| 149 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 145 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 150 | 146 |
| 151 var _response = _requester.request(_url, | 147 var _response = _requester.request(_url, "DELETE", |
| 152 "DELETE", | 148 body: _body, |
| 153 body: _body, | 149 queryParams: _queryParams, |
| 154 queryParams: _queryParams, | 150 uploadOptions: _uploadOptions, |
| 155 uploadOptions: _uploadOptions, | 151 uploadMedia: _uploadMedia, |
| 156 uploadMedia: _uploadMedia, | 152 downloadOptions: _downloadOptions); |
| 157 downloadOptions: _downloadOptions); | |
| 158 return _response.then((data) => new Folder.fromJson(data)); | 153 return _response.then((data) => new Folder.fromJson(data)); |
| 159 } | 154 } |
| 160 | 155 |
| 161 /** | 156 /// Retrieves a Folder identified by the supplied resource name. |
| 162 * Retrieves a Folder identified by the supplied resource name. | 157 /// Valid Folder resource names have the format `folders/{folder_id}` |
| 163 * Valid Folder resource names have the format `folders/{folder_id}` | 158 /// (for example, `folders/1234`). |
| 164 * (for example, `folders/1234`). | 159 /// The caller must have `resourcemanager.folders.get` permission on the |
| 165 * The caller must have `resourcemanager.folders.get` permission on the | 160 /// identified folder. |
| 166 * identified folder. | 161 /// |
| 167 * | 162 /// Request parameters: |
| 168 * Request parameters: | 163 /// |
| 169 * | 164 /// [name] - The resource name of the Folder to retrieve. |
| 170 * [name] - The resource name of the Folder to retrieve. | 165 /// Must be of the form `folders/{folder_id}`. |
| 171 * Must be of the form `folders/{folder_id}`. | 166 /// Value must have pattern "^folders/[^/]+$". |
| 172 * Value must have pattern "^folders/[^/]+$". | 167 /// |
| 173 * | 168 /// Completes with a [Folder]. |
| 174 * Completes with a [Folder]. | 169 /// |
| 175 * | 170 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 176 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 171 /// an error. |
| 177 * error. | 172 /// |
| 178 * | 173 /// If the used [http.Client] completes with an error when making a REST |
| 179 * If the used [http.Client] completes with an error when making a REST call, | 174 /// call, this method will complete with the same error. |
| 180 * this method will complete with the same error. | |
| 181 */ | |
| 182 async.Future<Folder> get(core.String name) { | 175 async.Future<Folder> get(core.String name) { |
| 183 var _url = null; | 176 var _url = null; |
| 184 var _queryParams = new core.Map(); | 177 var _queryParams = new core.Map(); |
| 185 var _uploadMedia = null; | 178 var _uploadMedia = null; |
| 186 var _uploadOptions = null; | 179 var _uploadOptions = null; |
| 187 var _downloadOptions = commons.DownloadOptions.Metadata; | 180 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 188 var _body = null; | 181 var _body = null; |
| 189 | 182 |
| 190 if (name == null) { | 183 if (name == null) { |
| 191 throw new core.ArgumentError("Parameter name is required."); | 184 throw new core.ArgumentError("Parameter name is required."); |
| 192 } | 185 } |
| 193 | 186 |
| 194 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 187 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 195 | 188 |
| 196 var _response = _requester.request(_url, | 189 var _response = _requester.request(_url, "GET", |
| 197 "GET", | 190 body: _body, |
| 198 body: _body, | 191 queryParams: _queryParams, |
| 199 queryParams: _queryParams, | 192 uploadOptions: _uploadOptions, |
| 200 uploadOptions: _uploadOptions, | 193 uploadMedia: _uploadMedia, |
| 201 uploadMedia: _uploadMedia, | 194 downloadOptions: _downloadOptions); |
| 202 downloadOptions: _downloadOptions); | |
| 203 return _response.then((data) => new Folder.fromJson(data)); | 195 return _response.then((data) => new Folder.fromJson(data)); |
| 204 } | 196 } |
| 205 | 197 |
| 206 /** | 198 /// Gets the access control policy for a Folder. The returned policy may be |
| 207 * Gets the access control policy for a Folder. The returned policy may be | 199 /// empty if no such policy or resource exists. The `resource` field should |
| 208 * empty if no such policy or resource exists. The `resource` field should | 200 /// be the Folder's resource name, e.g. "folders/1234". |
| 209 * be the Folder's resource name, e.g. "folders/1234". | 201 /// The caller must have `resourcemanager.folders.getIamPolicy` permission |
| 210 * The caller must have `resourcemanager.folders.getIamPolicy` permission | 202 /// on the identified folder. |
| 211 * on the identified folder. | 203 /// |
| 212 * | 204 /// [request] - The metadata request object. |
| 213 * [request] - The metadata request object. | 205 /// |
| 214 * | 206 /// Request parameters: |
| 215 * Request parameters: | 207 /// |
| 216 * | 208 /// [resource] - REQUIRED: The resource for which the policy is being |
| 217 * [resource] - REQUIRED: The resource for which the policy is being | 209 /// requested. |
| 218 * requested. | 210 /// See the operation documentation for the appropriate value for this field. |
| 219 * See the operation documentation for the appropriate value for this field. | 211 /// Value must have pattern "^folders/[^/]+$". |
| 220 * Value must have pattern "^folders/[^/]+$". | 212 /// |
| 221 * | 213 /// Completes with a [Policy]. |
| 222 * Completes with a [Policy]. | 214 /// |
| 223 * | 215 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 224 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 216 /// an error. |
| 225 * error. | 217 /// |
| 226 * | 218 /// If the used [http.Client] completes with an error when making a REST |
| 227 * If the used [http.Client] completes with an error when making a REST call, | 219 /// call, this method will complete with the same error. |
| 228 * this method will complete with the same error. | 220 async.Future<Policy> getIamPolicy( |
| 229 */ | 221 GetIamPolicyRequest request, core.String resource) { |
| 230 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res
ource) { | |
| 231 var _url = null; | 222 var _url = null; |
| 232 var _queryParams = new core.Map(); | 223 var _queryParams = new core.Map(); |
| 233 var _uploadMedia = null; | 224 var _uploadMedia = null; |
| 234 var _uploadOptions = null; | 225 var _uploadOptions = null; |
| 235 var _downloadOptions = commons.DownloadOptions.Metadata; | 226 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 236 var _body = null; | 227 var _body = null; |
| 237 | 228 |
| 238 if (request != null) { | 229 if (request != null) { |
| 239 _body = convert.JSON.encode((request).toJson()); | 230 _body = convert.JSON.encode((request).toJson()); |
| 240 } | 231 } |
| 241 if (resource == null) { | 232 if (resource == null) { |
| 242 throw new core.ArgumentError("Parameter resource is required."); | 233 throw new core.ArgumentError("Parameter resource is required."); |
| 243 } | 234 } |
| 244 | 235 |
| 245 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g
etIamPolicy'; | 236 _url = 'v2beta1/' + |
| 237 commons.Escaper.ecapeVariableReserved('$resource') + |
| 238 ':getIamPolicy'; |
| 246 | 239 |
| 247 var _response = _requester.request(_url, | 240 var _response = _requester.request(_url, "POST", |
| 248 "POST", | 241 body: _body, |
| 249 body: _body, | 242 queryParams: _queryParams, |
| 250 queryParams: _queryParams, | 243 uploadOptions: _uploadOptions, |
| 251 uploadOptions: _uploadOptions, | 244 uploadMedia: _uploadMedia, |
| 252 uploadMedia: _uploadMedia, | 245 downloadOptions: _downloadOptions); |
| 253 downloadOptions: _downloadOptions); | |
| 254 return _response.then((data) => new Policy.fromJson(data)); | 246 return _response.then((data) => new Policy.fromJson(data)); |
| 255 } | 247 } |
| 256 | 248 |
| 257 /** | 249 /// Lists the Folders that are direct descendants of supplied parent |
| 258 * Lists the Folders that are direct descendants of supplied parent resource. | 250 /// resource. |
| 259 * List provides a strongly consistent view of the Folders underneath | 251 /// List provides a strongly consistent view of the Folders underneath |
| 260 * the specified parent resource. | 252 /// the specified parent resource. |
| 261 * List returns Folders sorted based upon the (ascending) lexical ordering | 253 /// List returns Folders sorted based upon the (ascending) lexical ordering |
| 262 * of their display_name. | 254 /// of their display_name. |
| 263 * The caller must have `resourcemanager.folders.list` permission on the | 255 /// The caller must have `resourcemanager.folders.list` permission on the |
| 264 * identified parent. | 256 /// identified parent. |
| 265 * | 257 /// |
| 266 * Request parameters: | 258 /// Request parameters: |
| 267 * | 259 /// |
| 268 * [showDeleted] - Controls whether Folders in the [DELETE_REQUESTED} state | 260 /// [pageSize] - The maximum number of Folders to return in the response. |
| 269 * should | 261 /// This field is optional. |
| 270 * be returned. | 262 /// |
| 271 * | 263 /// [parent] - The resource name of the Organization or Folder whose Folders |
| 272 * [pageToken] - A pagination token returned from a previous call to | 264 /// are |
| 273 * `ListFolders` | 265 /// being listed. |
| 274 * that indicates where this listing should continue from. | 266 /// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. |
| 275 * This field is optional. | 267 /// Access to this method is controlled by checking the |
| 276 * | 268 /// `resourcemanager.folders.list` permission on the `parent`. |
| 277 * [pageSize] - The maximum number of Folders to return in the response. | 269 /// |
| 278 * This field is optional. | 270 /// [showDeleted] - Controls whether Folders in the [DELETE_REQUESTED} state |
| 279 * | 271 /// should |
| 280 * [parent] - The resource name of the Organization or Folder whose Folders | 272 /// be returned. |
| 281 * are | 273 /// |
| 282 * being listed. | 274 /// [pageToken] - A pagination token returned from a previous call to |
| 283 * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. | 275 /// `ListFolders` |
| 284 * Access to this method is controlled by checking the | 276 /// that indicates where this listing should continue from. |
| 285 * `resourcemanager.folders.list` permission on the `parent`. | 277 /// This field is optional. |
| 286 * | 278 /// |
| 287 * Completes with a [ListFoldersResponse]. | 279 /// Completes with a [ListFoldersResponse]. |
| 288 * | 280 /// |
| 289 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 281 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 290 * error. | 282 /// an error. |
| 291 * | 283 /// |
| 292 * If the used [http.Client] completes with an error when making a REST call, | 284 /// If the used [http.Client] completes with an error when making a REST |
| 293 * this method will complete with the same error. | 285 /// call, this method will complete with the same error. |
| 294 */ | 286 async.Future<ListFoldersResponse> list( |
| 295 async.Future<ListFoldersResponse> list({core.bool showDeleted, core.String pag
eToken, core.int pageSize, core.String parent}) { | 287 {core.int pageSize, |
| 288 core.String parent, |
| 289 core.bool showDeleted, |
| 290 core.String pageToken}) { |
| 296 var _url = null; | 291 var _url = null; |
| 297 var _queryParams = new core.Map(); | 292 var _queryParams = new core.Map(); |
| 298 var _uploadMedia = null; | 293 var _uploadMedia = null; |
| 299 var _uploadOptions = null; | 294 var _uploadOptions = null; |
| 300 var _downloadOptions = commons.DownloadOptions.Metadata; | 295 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 301 var _body = null; | 296 var _body = null; |
| 302 | 297 |
| 298 if (pageSize != null) { |
| 299 _queryParams["pageSize"] = ["${pageSize}"]; |
| 300 } |
| 301 if (parent != null) { |
| 302 _queryParams["parent"] = [parent]; |
| 303 } |
| 303 if (showDeleted != null) { | 304 if (showDeleted != null) { |
| 304 _queryParams["showDeleted"] = ["${showDeleted}"]; | 305 _queryParams["showDeleted"] = ["${showDeleted}"]; |
| 305 } | 306 } |
| 306 if (pageToken != null) { | 307 if (pageToken != null) { |
| 307 _queryParams["pageToken"] = [pageToken]; | 308 _queryParams["pageToken"] = [pageToken]; |
| 308 } | 309 } |
| 309 if (pageSize != null) { | |
| 310 _queryParams["pageSize"] = ["${pageSize}"]; | |
| 311 } | |
| 312 if (parent != null) { | |
| 313 _queryParams["parent"] = [parent]; | |
| 314 } | |
| 315 | 310 |
| 316 _url = 'v2beta1/folders'; | 311 _url = 'v2beta1/folders'; |
| 317 | 312 |
| 318 var _response = _requester.request(_url, | 313 var _response = _requester.request(_url, "GET", |
| 319 "GET", | 314 body: _body, |
| 320 body: _body, | 315 queryParams: _queryParams, |
| 321 queryParams: _queryParams, | 316 uploadOptions: _uploadOptions, |
| 322 uploadOptions: _uploadOptions, | 317 uploadMedia: _uploadMedia, |
| 323 uploadMedia: _uploadMedia, | 318 downloadOptions: _downloadOptions); |
| 324 downloadOptions: _downloadOptions); | |
| 325 return _response.then((data) => new ListFoldersResponse.fromJson(data)); | 319 return _response.then((data) => new ListFoldersResponse.fromJson(data)); |
| 326 } | 320 } |
| 327 | 321 |
| 328 /** | 322 /// Moves a Folder under a new resource parent. |
| 329 * Moves a Folder under a new resource parent. | 323 /// Returns an Operation which can be used to track the progress of the |
| 330 * Returns an Operation which can be used to track the progress of the | 324 /// folder move workflow. |
| 331 * folder move workflow. | 325 /// Upon success the Operation.response field will be populated with the |
| 332 * Upon success the Operation.response field will be populated with the | 326 /// moved Folder. |
| 333 * moved Folder. | 327 /// Upon failure, a FolderOperationError categorizing the failure cause will |
| 334 * Upon failure, a FolderOperationError categorizing the failure cause will | 328 /// be returned - if the failure occurs synchronously then the |
| 335 * be returned - if the failure occurs synchronously then the | 329 /// FolderOperationError will be returned via the Status.details field |
| 336 * FolderOperationError will be returned via the Status.details field | 330 /// and if it occurs asynchronously then the FolderOperation will be returned |
| 337 * and if it occurs asynchronously then the FolderOperation will be returned | 331 /// via the the Operation.error field. |
| 338 * via the the Operation.error field. | 332 /// In addition, the Operation.metadata field will be populated with a |
| 339 * In addition, the Operation.metadata field will be populated with a | 333 /// FolderOperation message as an aid to stateless clients. |
| 340 * FolderOperation message as an aid to stateless clients. | 334 /// Folder moves will be rejected if they violate either the naming, height |
| 341 * Folder moves will be rejected if they violate either the naming, height | 335 /// or fanout constraints described in the [CreateFolder] documentation. |
| 342 * or fanout constraints described in the [CreateFolder] documentation. | 336 /// The caller must have `resourcemanager.folders.move` permission on the |
| 343 * The caller must have `resourcemanager.folders.move` permission on the | 337 /// folder's current and proposed new parent. |
| 344 * folder's current and proposed new parent. | 338 /// |
| 345 * | 339 /// [request] - The metadata request object. |
| 346 * [request] - The metadata request object. | 340 /// |
| 347 * | 341 /// Request parameters: |
| 348 * Request parameters: | 342 /// |
| 349 * | 343 /// [name] - The resource name of the Folder to move. |
| 350 * [name] - The resource name of the Folder to move. | 344 /// Must be of the form folders/{folder_id} |
| 351 * Must be of the form folders/{folder_id} | 345 /// Value must have pattern "^folders/[^/]+$". |
| 352 * Value must have pattern "^folders/[^/]+$". | 346 /// |
| 353 * | 347 /// Completes with a [Operation]. |
| 354 * Completes with a [Operation]. | 348 /// |
| 355 * | 349 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 356 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 350 /// an error. |
| 357 * error. | 351 /// |
| 358 * | 352 /// If the used [http.Client] completes with an error when making a REST |
| 359 * If the used [http.Client] completes with an error when making a REST call, | 353 /// call, this method will complete with the same error. |
| 360 * this method will complete with the same error. | |
| 361 */ | |
| 362 async.Future<Operation> move(MoveFolderRequest request, core.String name) { | 354 async.Future<Operation> move(MoveFolderRequest request, core.String name) { |
| 363 var _url = null; | 355 var _url = null; |
| 364 var _queryParams = new core.Map(); | 356 var _queryParams = new core.Map(); |
| 365 var _uploadMedia = null; | 357 var _uploadMedia = null; |
| 366 var _uploadOptions = null; | 358 var _uploadOptions = null; |
| 367 var _downloadOptions = commons.DownloadOptions.Metadata; | 359 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 368 var _body = null; | 360 var _body = null; |
| 369 | 361 |
| 370 if (request != null) { | 362 if (request != null) { |
| 371 _body = convert.JSON.encode((request).toJson()); | 363 _body = convert.JSON.encode((request).toJson()); |
| 372 } | 364 } |
| 373 if (name == null) { | 365 if (name == null) { |
| 374 throw new core.ArgumentError("Parameter name is required."); | 366 throw new core.ArgumentError("Parameter name is required."); |
| 375 } | 367 } |
| 376 | 368 |
| 377 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':move'
; | 369 _url = |
| 370 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':move'; |
| 378 | 371 |
| 379 var _response = _requester.request(_url, | 372 var _response = _requester.request(_url, "POST", |
| 380 "POST", | 373 body: _body, |
| 381 body: _body, | 374 queryParams: _queryParams, |
| 382 queryParams: _queryParams, | 375 uploadOptions: _uploadOptions, |
| 383 uploadOptions: _uploadOptions, | 376 uploadMedia: _uploadMedia, |
| 384 uploadMedia: _uploadMedia, | 377 downloadOptions: _downloadOptions); |
| 385 downloadOptions: _downloadOptions); | |
| 386 return _response.then((data) => new Operation.fromJson(data)); | 378 return _response.then((data) => new Operation.fromJson(data)); |
| 387 } | 379 } |
| 388 | 380 |
| 389 /** | 381 /// Updates a Folder, changing its display_name. |
| 390 * Updates a Folder, changing its display_name. | 382 /// Changes to the folder display_name will be rejected if they violate |
| 391 * Changes to the folder display_name will be rejected if they violate either | 383 /// either |
| 392 * the display_name formatting rules or naming constraints described in | 384 /// the display_name formatting rules or naming constraints described in |
| 393 * the [CreateFolder] documentation. | 385 /// the [CreateFolder] documentation. |
| 394 * + The Folder's display name must start and end with a letter or digit, | 386 /// + The Folder's display name must start and end with a letter or digit, |
| 395 * may contain letters, digits, spaces, hyphens and underscores and can be | 387 /// may contain letters, digits, spaces, hyphens and underscores and can be |
| 396 * no longer than 30 characters. This is captured by the regular expression: | 388 /// no longer than 30 characters. This is captured by the regular expression: |
| 397 * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. | 389 /// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. |
| 398 * The caller must have `resourcemanager.folders.update` permission on the | 390 /// The caller must have `resourcemanager.folders.update` permission on the |
| 399 * identified folder. | 391 /// identified folder. |
| 400 * | 392 /// |
| 401 * If the update fails due to the unique name constraint then a | 393 /// If the update fails due to the unique name constraint then a |
| 402 * PreconditionFailure explaining this violation will be returned | 394 /// PreconditionFailure explaining this violation will be returned |
| 403 * in the Status.details field. | 395 /// in the Status.details field. |
| 404 * | 396 /// |
| 405 * [request] - The metadata request object. | 397 /// [request] - The metadata request object. |
| 406 * | 398 /// |
| 407 * Request parameters: | 399 /// Request parameters: |
| 408 * | 400 /// |
| 409 * [name] - Output only. The resource name of the Folder. | 401 /// [name] - Output only. The resource name of the Folder. |
| 410 * Its format is `folders/{folder_id}`, for example: "folders/1234". | 402 /// Its format is `folders/{folder_id}`, for example: "folders/1234". |
| 411 * Value must have pattern "^folders/[^/]+$". | 403 /// Value must have pattern "^folders/[^/]+$". |
| 412 * | 404 /// |
| 413 * [updateMask] - Fields to be updated. | 405 /// [updateMask] - Fields to be updated. |
| 414 * Only the `display_name` can be updated. | 406 /// Only the `display_name` can be updated. |
| 415 * | 407 /// |
| 416 * Completes with a [Folder]. | 408 /// Completes with a [Folder]. |
| 417 * | 409 /// |
| 418 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 410 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 419 * error. | 411 /// an error. |
| 420 * | 412 /// |
| 421 * If the used [http.Client] completes with an error when making a REST call, | 413 /// If the used [http.Client] completes with an error when making a REST |
| 422 * this method will complete with the same error. | 414 /// call, this method will complete with the same error. |
| 423 */ | 415 async.Future<Folder> patch(Folder request, core.String name, |
| 424 async.Future<Folder> patch(Folder request, core.String name, {core.String upda
teMask}) { | 416 {core.String updateMask}) { |
| 425 var _url = null; | 417 var _url = null; |
| 426 var _queryParams = new core.Map(); | 418 var _queryParams = new core.Map(); |
| 427 var _uploadMedia = null; | 419 var _uploadMedia = null; |
| 428 var _uploadOptions = null; | 420 var _uploadOptions = null; |
| 429 var _downloadOptions = commons.DownloadOptions.Metadata; | 421 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 430 var _body = null; | 422 var _body = null; |
| 431 | 423 |
| 432 if (request != null) { | 424 if (request != null) { |
| 433 _body = convert.JSON.encode((request).toJson()); | 425 _body = convert.JSON.encode((request).toJson()); |
| 434 } | 426 } |
| 435 if (name == null) { | 427 if (name == null) { |
| 436 throw new core.ArgumentError("Parameter name is required."); | 428 throw new core.ArgumentError("Parameter name is required."); |
| 437 } | 429 } |
| 438 if (updateMask != null) { | 430 if (updateMask != null) { |
| 439 _queryParams["updateMask"] = [updateMask]; | 431 _queryParams["updateMask"] = [updateMask]; |
| 440 } | 432 } |
| 441 | 433 |
| 442 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); | 434 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 443 | 435 |
| 444 var _response = _requester.request(_url, | 436 var _response = _requester.request(_url, "PATCH", |
| 445 "PATCH", | 437 body: _body, |
| 446 body: _body, | 438 queryParams: _queryParams, |
| 447 queryParams: _queryParams, | 439 uploadOptions: _uploadOptions, |
| 448 uploadOptions: _uploadOptions, | 440 uploadMedia: _uploadMedia, |
| 449 uploadMedia: _uploadMedia, | 441 downloadOptions: _downloadOptions); |
| 450 downloadOptions: _downloadOptions); | |
| 451 return _response.then((data) => new Folder.fromJson(data)); | 442 return _response.then((data) => new Folder.fromJson(data)); |
| 452 } | 443 } |
| 453 | 444 |
| 454 /** | 445 /// Search for folders that match specific filter criteria. |
| 455 * Search for folders that match specific filter criteria. | 446 /// Search provides an eventually consistent view of the folders a user has |
| 456 * Search provides an eventually consistent view of the folders a user has | 447 /// access to which meet the specified filter criteria. |
| 457 * access to which meet the specified filter criteria. | 448 /// |
| 458 * | 449 /// This will only return folders on which the caller has the |
| 459 * This will only return folders on which the caller has the | 450 /// permission `resourcemanager.folders.get`. |
| 460 * permission `resourcemanager.folders.get`. | 451 /// |
| 461 * | 452 /// [request] - The metadata request object. |
| 462 * [request] - The metadata request object. | 453 /// |
| 463 * | 454 /// Request parameters: |
| 464 * Request parameters: | 455 /// |
| 465 * | 456 /// Completes with a [SearchFoldersResponse]. |
| 466 * Completes with a [SearchFoldersResponse]. | 457 /// |
| 467 * | 458 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 459 /// an error. |
| 469 * error. | 460 /// |
| 470 * | 461 /// If the used [http.Client] completes with an error when making a REST |
| 471 * If the used [http.Client] completes with an error when making a REST call, | 462 /// call, this method will complete with the same error. |
| 472 * this method will complete with the same error. | |
| 473 */ | |
| 474 async.Future<SearchFoldersResponse> search(SearchFoldersRequest request) { | 463 async.Future<SearchFoldersResponse> search(SearchFoldersRequest request) { |
| 475 var _url = null; | 464 var _url = null; |
| 476 var _queryParams = new core.Map(); | 465 var _queryParams = new core.Map(); |
| 477 var _uploadMedia = null; | 466 var _uploadMedia = null; |
| 478 var _uploadOptions = null; | 467 var _uploadOptions = null; |
| 479 var _downloadOptions = commons.DownloadOptions.Metadata; | 468 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 480 var _body = null; | 469 var _body = null; |
| 481 | 470 |
| 482 if (request != null) { | 471 if (request != null) { |
| 483 _body = convert.JSON.encode((request).toJson()); | 472 _body = convert.JSON.encode((request).toJson()); |
| 484 } | 473 } |
| 485 | 474 |
| 486 _url = 'v2beta1/folders:search'; | 475 _url = 'v2beta1/folders:search'; |
| 487 | 476 |
| 488 var _response = _requester.request(_url, | 477 var _response = _requester.request(_url, "POST", |
| 489 "POST", | 478 body: _body, |
| 490 body: _body, | 479 queryParams: _queryParams, |
| 491 queryParams: _queryParams, | 480 uploadOptions: _uploadOptions, |
| 492 uploadOptions: _uploadOptions, | 481 uploadMedia: _uploadMedia, |
| 493 uploadMedia: _uploadMedia, | 482 downloadOptions: _downloadOptions); |
| 494 downloadOptions: _downloadOptions); | |
| 495 return _response.then((data) => new SearchFoldersResponse.fromJson(data)); | 483 return _response.then((data) => new SearchFoldersResponse.fromJson(data)); |
| 496 } | 484 } |
| 497 | 485 |
| 498 /** | 486 /// Sets the access control policy on a Folder, replacing any existing |
| 499 * Sets the access control policy on a Folder, replacing any existing policy. | 487 /// policy. |
| 500 * The `resource` field should be the Folder's resource name, e.g. | 488 /// The `resource` field should be the Folder's resource name, e.g. |
| 501 * "folders/1234". | 489 /// "folders/1234". |
| 502 * The caller must have `resourcemanager.folders.setIamPolicy` permission | 490 /// The caller must have `resourcemanager.folders.setIamPolicy` permission |
| 503 * on the identified folder. | 491 /// on the identified folder. |
| 504 * | 492 /// |
| 505 * [request] - The metadata request object. | 493 /// [request] - The metadata request object. |
| 506 * | 494 /// |
| 507 * Request parameters: | 495 /// Request parameters: |
| 508 * | 496 /// |
| 509 * [resource] - REQUIRED: The resource for which the policy is being | 497 /// [resource] - REQUIRED: The resource for which the policy is being |
| 510 * specified. | 498 /// specified. |
| 511 * See the operation documentation for the appropriate value for this field. | 499 /// See the operation documentation for the appropriate value for this field. |
| 512 * Value must have pattern "^folders/[^/]+$". | 500 /// Value must have pattern "^folders/[^/]+$". |
| 513 * | 501 /// |
| 514 * Completes with a [Policy]. | 502 /// Completes with a [Policy]. |
| 515 * | 503 /// |
| 516 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 504 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 517 * error. | 505 /// an error. |
| 518 * | 506 /// |
| 519 * If the used [http.Client] completes with an error when making a REST call, | 507 /// If the used [http.Client] completes with an error when making a REST |
| 520 * this method will complete with the same error. | 508 /// call, this method will complete with the same error. |
| 521 */ | 509 async.Future<Policy> setIamPolicy( |
| 522 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { | 510 SetIamPolicyRequest request, core.String resource) { |
| 523 var _url = null; | 511 var _url = null; |
| 524 var _queryParams = new core.Map(); | 512 var _queryParams = new core.Map(); |
| 525 var _uploadMedia = null; | 513 var _uploadMedia = null; |
| 526 var _uploadOptions = null; | 514 var _uploadOptions = null; |
| 527 var _downloadOptions = commons.DownloadOptions.Metadata; | 515 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 528 var _body = null; | 516 var _body = null; |
| 529 | 517 |
| 530 if (request != null) { | 518 if (request != null) { |
| 531 _body = convert.JSON.encode((request).toJson()); | 519 _body = convert.JSON.encode((request).toJson()); |
| 532 } | 520 } |
| 533 if (resource == null) { | 521 if (resource == null) { |
| 534 throw new core.ArgumentError("Parameter resource is required."); | 522 throw new core.ArgumentError("Parameter resource is required."); |
| 535 } | 523 } |
| 536 | 524 |
| 537 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s
etIamPolicy'; | 525 _url = 'v2beta1/' + |
| 526 commons.Escaper.ecapeVariableReserved('$resource') + |
| 527 ':setIamPolicy'; |
| 538 | 528 |
| 539 var _response = _requester.request(_url, | 529 var _response = _requester.request(_url, "POST", |
| 540 "POST", | 530 body: _body, |
| 541 body: _body, | 531 queryParams: _queryParams, |
| 542 queryParams: _queryParams, | 532 uploadOptions: _uploadOptions, |
| 543 uploadOptions: _uploadOptions, | 533 uploadMedia: _uploadMedia, |
| 544 uploadMedia: _uploadMedia, | 534 downloadOptions: _downloadOptions); |
| 545 downloadOptions: _downloadOptions); | |
| 546 return _response.then((data) => new Policy.fromJson(data)); | 535 return _response.then((data) => new Policy.fromJson(data)); |
| 547 } | 536 } |
| 548 | 537 |
| 549 /** | 538 /// Returns permissions that a caller has on the specified Folder. |
| 550 * Returns permissions that a caller has on the specified Folder. | 539 /// The `resource` field should be the Folder's resource name, |
| 551 * The `resource` field should be the Folder's resource name, | 540 /// e.g. "folders/1234". |
| 552 * e.g. "folders/1234". | 541 /// |
| 553 * | 542 /// There are no permissions required for making this API call. |
| 554 * There are no permissions required for making this API call. | 543 /// |
| 555 * | 544 /// [request] - The metadata request object. |
| 556 * [request] - The metadata request object. | 545 /// |
| 557 * | 546 /// Request parameters: |
| 558 * Request parameters: | 547 /// |
| 559 * | 548 /// [resource] - REQUIRED: The resource for which the policy detail is being |
| 560 * [resource] - REQUIRED: The resource for which the policy detail is being | 549 /// requested. |
| 561 * requested. | 550 /// See the operation documentation for the appropriate value for this field. |
| 562 * See the operation documentation for the appropriate value for this field. | 551 /// Value must have pattern "^folders/[^/]+$". |
| 563 * Value must have pattern "^folders/[^/]+$". | 552 /// |
| 564 * | 553 /// Completes with a [TestIamPermissionsResponse]. |
| 565 * Completes with a [TestIamPermissionsResponse]. | 554 /// |
| 566 * | 555 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 567 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 556 /// an error. |
| 568 * error. | 557 /// |
| 569 * | 558 /// If the used [http.Client] completes with an error when making a REST |
| 570 * If the used [http.Client] completes with an error when making a REST call, | 559 /// call, this method will complete with the same error. |
| 571 * this method will complete with the same error. | 560 async.Future<TestIamPermissionsResponse> testIamPermissions( |
| 572 */ | 561 TestIamPermissionsRequest request, core.String resource) { |
| 573 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { | |
| 574 var _url = null; | 562 var _url = null; |
| 575 var _queryParams = new core.Map(); | 563 var _queryParams = new core.Map(); |
| 576 var _uploadMedia = null; | 564 var _uploadMedia = null; |
| 577 var _uploadOptions = null; | 565 var _uploadOptions = null; |
| 578 var _downloadOptions = commons.DownloadOptions.Metadata; | 566 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 579 var _body = null; | 567 var _body = null; |
| 580 | 568 |
| 581 if (request != null) { | 569 if (request != null) { |
| 582 _body = convert.JSON.encode((request).toJson()); | 570 _body = convert.JSON.encode((request).toJson()); |
| 583 } | 571 } |
| 584 if (resource == null) { | 572 if (resource == null) { |
| 585 throw new core.ArgumentError("Parameter resource is required."); | 573 throw new core.ArgumentError("Parameter resource is required."); |
| 586 } | 574 } |
| 587 | 575 |
| 588 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':t
estIamPermissions'; | 576 _url = 'v2beta1/' + |
| 577 commons.Escaper.ecapeVariableReserved('$resource') + |
| 578 ':testIamPermissions'; |
| 589 | 579 |
| 590 var _response = _requester.request(_url, | 580 var _response = _requester.request(_url, "POST", |
| 591 "POST", | 581 body: _body, |
| 592 body: _body, | 582 queryParams: _queryParams, |
| 593 queryParams: _queryParams, | 583 uploadOptions: _uploadOptions, |
| 594 uploadOptions: _uploadOptions, | 584 uploadMedia: _uploadMedia, |
| 595 uploadMedia: _uploadMedia, | 585 downloadOptions: _downloadOptions); |
| 596 downloadOptions: _downloadOptions); | 586 return _response |
| 597 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); | 587 .then((data) => new TestIamPermissionsResponse.fromJson(data)); |
| 598 } | 588 } |
| 599 | 589 |
| 600 /** | 590 /// Cancels the deletion request for a Folder. This method may only be |
| 601 * Cancels the deletion request for a Folder. This method may only be | 591 /// called on a Folder in the [DELETE_REQUESTED] state. |
| 602 * called on a Folder in the [DELETE_REQUESTED] state. | 592 /// In order to succeed, the Folder's parent must be in the [ACTIVE] state. |
| 603 * In order to succeed, the Folder's parent must be in the [ACTIVE] state. | 593 /// In addition, reintroducing the folder into the tree must not violate |
| 604 * In addition, reintroducing the folder into the tree must not violate | 594 /// folder naming, height and fanout constraints described in the |
| 605 * folder naming, height and fanout constraints described in the | 595 /// [CreateFolder] documentation. |
| 606 * [CreateFolder] documentation. | 596 /// The caller must have `resourcemanager.folders.undelete` permission on the |
| 607 * The caller must have `resourcemanager.folders.undelete` permission on the | 597 /// identified folder. |
| 608 * identified folder. | 598 /// |
| 609 * | 599 /// [request] - The metadata request object. |
| 610 * [request] - The metadata request object. | 600 /// |
| 611 * | 601 /// Request parameters: |
| 612 * Request parameters: | 602 /// |
| 613 * | 603 /// [name] - The resource name of the Folder to undelete. |
| 614 * [name] - The resource name of the Folder to undelete. | 604 /// Must be of the form `folders/{folder_id}`. |
| 615 * Must be of the form `folders/{folder_id}`. | 605 /// Value must have pattern "^folders/[^/]+$". |
| 616 * Value must have pattern "^folders/[^/]+$". | 606 /// |
| 617 * | 607 /// Completes with a [Folder]. |
| 618 * Completes with a [Folder]. | 608 /// |
| 619 * | 609 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
| 620 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 610 /// an error. |
| 621 * error. | 611 /// |
| 622 * | 612 /// If the used [http.Client] completes with an error when making a REST |
| 623 * If the used [http.Client] completes with an error when making a REST call, | 613 /// call, this method will complete with the same error. |
| 624 * this method will complete with the same error. | 614 async.Future<Folder> undelete( |
| 625 */ | 615 UndeleteFolderRequest request, core.String name) { |
| 626 async.Future<Folder> undelete(UndeleteFolderRequest request, core.String name)
{ | |
| 627 var _url = null; | 616 var _url = null; |
| 628 var _queryParams = new core.Map(); | 617 var _queryParams = new core.Map(); |
| 629 var _uploadMedia = null; | 618 var _uploadMedia = null; |
| 630 var _uploadOptions = null; | 619 var _uploadOptions = null; |
| 631 var _downloadOptions = commons.DownloadOptions.Metadata; | 620 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 632 var _body = null; | 621 var _body = null; |
| 633 | 622 |
| 634 if (request != null) { | 623 if (request != null) { |
| 635 _body = convert.JSON.encode((request).toJson()); | 624 _body = convert.JSON.encode((request).toJson()); |
| 636 } | 625 } |
| 637 if (name == null) { | 626 if (name == null) { |
| 638 throw new core.ArgumentError("Parameter name is required."); | 627 throw new core.ArgumentError("Parameter name is required."); |
| 639 } | 628 } |
| 640 | 629 |
| 641 _url = 'v2beta1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undel
ete'; | 630 _url = 'v2beta1/' + |
| 631 commons.Escaper.ecapeVariableReserved('$name') + |
| 632 ':undelete'; |
| 642 | 633 |
| 643 var _response = _requester.request(_url, | 634 var _response = _requester.request(_url, "POST", |
| 644 "POST", | 635 body: _body, |
| 645 body: _body, | 636 queryParams: _queryParams, |
| 646 queryParams: _queryParams, | 637 uploadOptions: _uploadOptions, |
| 647 uploadOptions: _uploadOptions, | 638 uploadMedia: _uploadMedia, |
| 648 uploadMedia: _uploadMedia, | 639 downloadOptions: _downloadOptions); |
| 649 downloadOptions: _downloadOptions); | |
| 650 return _response.then((data) => new Folder.fromJson(data)); | 640 return _response.then((data) => new Folder.fromJson(data)); |
| 651 } | 641 } |
| 652 | |
| 653 } | 642 } |
| 654 | 643 |
| 644 /// Specifies the audit configuration for a service. |
| 645 /// The configuration determines which permission types are logged, and what |
| 646 /// identities, if any, are exempted from logging. |
| 647 /// An AuditConfig must have one or more AuditLogConfigs. |
| 648 /// |
| 649 /// If there are AuditConfigs for both `allServices` and a specific service, |
| 650 /// the union of the two AuditConfigs is used for that service: the log_types |
| 651 /// specified in each AuditConfig are enabled, and the exempted_members in each |
| 652 /// AuditConfig are exempted. |
| 653 /// |
| 654 /// Example Policy with multiple AuditConfigs: |
| 655 /// |
| 656 /// { |
| 657 /// "audit_configs": [ |
| 658 /// { |
| 659 /// "service": "allServices" |
| 660 /// "audit_log_configs": [ |
| 661 /// { |
| 662 /// "log_type": "DATA_READ", |
| 663 /// "exempted_members": [ |
| 664 /// "user:foo@gmail.com" |
| 665 /// ] |
| 666 /// }, |
| 667 /// { |
| 668 /// "log_type": "DATA_WRITE", |
| 669 /// }, |
| 670 /// { |
| 671 /// "log_type": "ADMIN_READ", |
| 672 /// } |
| 673 /// ] |
| 674 /// }, |
| 675 /// { |
| 676 /// "service": "fooservice.googleapis.com" |
| 677 /// "audit_log_configs": [ |
| 678 /// { |
| 679 /// "log_type": "DATA_READ", |
| 680 /// }, |
| 681 /// { |
| 682 /// "log_type": "DATA_WRITE", |
| 683 /// "exempted_members": [ |
| 684 /// "user:bar@gmail.com" |
| 685 /// ] |
| 686 /// } |
| 687 /// ] |
| 688 /// } |
| 689 /// ] |
| 690 /// } |
| 691 /// |
| 692 /// For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 693 /// logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 694 /// bar@gmail.com from DATA_WRITE logging. |
| 695 class AuditConfig { |
| 696 /// The configuration for logging of each type of permission. |
| 697 /// Next ID: 4 |
| 698 core.List<AuditLogConfig> auditLogConfigs; |
| 655 | 699 |
| 656 | 700 /// Specifies a service that will be enabled for audit logging. |
| 657 /** | 701 /// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 658 * Specifies the audit configuration for a service. | 702 /// `allServices` is a special value that covers all services. |
| 659 * The configuration determines which permission types are logged, and what | |
| 660 * identities, if any, are exempted from logging. | |
| 661 * An AuditConfig must have one or more AuditLogConfigs. | |
| 662 * | |
| 663 * If there are AuditConfigs for both `allServices` and a specific service, | |
| 664 * the union of the two AuditConfigs is used for that service: the log_types | |
| 665 * specified in each AuditConfig are enabled, and the exempted_members in each | |
| 666 * AuditConfig are exempted. | |
| 667 * | |
| 668 * Example Policy with multiple AuditConfigs: | |
| 669 * | |
| 670 * { | |
| 671 * "audit_configs": [ | |
| 672 * { | |
| 673 * "service": "allServices" | |
| 674 * "audit_log_configs": [ | |
| 675 * { | |
| 676 * "log_type": "DATA_READ", | |
| 677 * "exempted_members": [ | |
| 678 * "user:foo@gmail.com" | |
| 679 * ] | |
| 680 * }, | |
| 681 * { | |
| 682 * "log_type": "DATA_WRITE", | |
| 683 * }, | |
| 684 * { | |
| 685 * "log_type": "ADMIN_READ", | |
| 686 * } | |
| 687 * ] | |
| 688 * }, | |
| 689 * { | |
| 690 * "service": "fooservice.googleapis.com" | |
| 691 * "audit_log_configs": [ | |
| 692 * { | |
| 693 * "log_type": "DATA_READ", | |
| 694 * }, | |
| 695 * { | |
| 696 * "log_type": "DATA_WRITE", | |
| 697 * "exempted_members": [ | |
| 698 * "user:bar@gmail.com" | |
| 699 * ] | |
| 700 * } | |
| 701 * ] | |
| 702 * } | |
| 703 * ] | |
| 704 * } | |
| 705 * | |
| 706 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ | |
| 707 * logging. It also exempts foo@gmail.com from DATA_READ logging, and | |
| 708 * bar@gmail.com from DATA_WRITE logging. | |
| 709 */ | |
| 710 class AuditConfig { | |
| 711 /** | |
| 712 * The configuration for logging of each type of permission. | |
| 713 * Next ID: 4 | |
| 714 */ | |
| 715 core.List<AuditLogConfig> auditLogConfigs; | |
| 716 /** | |
| 717 * Specifies a service that will be enabled for audit logging. | |
| 718 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. | |
| 719 * `allServices` is a special value that covers all services. | |
| 720 */ | |
| 721 core.String service; | 703 core.String service; |
| 722 | 704 |
| 723 AuditConfig(); | 705 AuditConfig(); |
| 724 | 706 |
| 725 AuditConfig.fromJson(core.Map _json) { | 707 AuditConfig.fromJson(core.Map _json) { |
| 726 if (_json.containsKey("auditLogConfigs")) { | 708 if (_json.containsKey("auditLogConfigs")) { |
| 727 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); | 709 auditLogConfigs = _json["auditLogConfigs"] |
| 710 .map((value) => new AuditLogConfig.fromJson(value)) |
| 711 .toList(); |
| 728 } | 712 } |
| 729 if (_json.containsKey("service")) { | 713 if (_json.containsKey("service")) { |
| 730 service = _json["service"]; | 714 service = _json["service"]; |
| 731 } | 715 } |
| 732 } | 716 } |
| 733 | 717 |
| 734 core.Map<core.String, core.Object> toJson() { | 718 core.Map<core.String, core.Object> toJson() { |
| 735 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 719 final core.Map<core.String, core.Object> _json = |
| 720 new core.Map<core.String, core.Object>(); |
| 736 if (auditLogConfigs != null) { | 721 if (auditLogConfigs != null) { |
| 737 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson()
).toList(); | 722 _json["auditLogConfigs"] = |
| 723 auditLogConfigs.map((value) => (value).toJson()).toList(); |
| 738 } | 724 } |
| 739 if (service != null) { | 725 if (service != null) { |
| 740 _json["service"] = service; | 726 _json["service"] = service; |
| 741 } | 727 } |
| 742 return _json; | 728 return _json; |
| 743 } | 729 } |
| 744 } | 730 } |
| 745 | 731 |
| 746 /** | 732 /// Provides the configuration for logging a type of permissions. |
| 747 * Provides the configuration for logging a type of permissions. | 733 /// Example: |
| 748 * Example: | 734 /// |
| 749 * | 735 /// { |
| 750 * { | 736 /// "audit_log_configs": [ |
| 751 * "audit_log_configs": [ | 737 /// { |
| 752 * { | 738 /// "log_type": "DATA_READ", |
| 753 * "log_type": "DATA_READ", | 739 /// "exempted_members": [ |
| 754 * "exempted_members": [ | 740 /// "user:foo@gmail.com" |
| 755 * "user:foo@gmail.com" | 741 /// ] |
| 756 * ] | 742 /// }, |
| 757 * }, | 743 /// { |
| 758 * { | 744 /// "log_type": "DATA_WRITE", |
| 759 * "log_type": "DATA_WRITE", | 745 /// } |
| 760 * } | 746 /// ] |
| 761 * ] | 747 /// } |
| 762 * } | 748 /// |
| 763 * | 749 /// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 764 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting | 750 /// foo@gmail.com from DATA_READ logging. |
| 765 * foo@gmail.com from DATA_READ logging. | |
| 766 */ | |
| 767 class AuditLogConfig { | 751 class AuditLogConfig { |
| 768 /** | 752 /// Specifies the identities that do not cause logging for this type of |
| 769 * Specifies the identities that do not cause logging for this type of | 753 /// permission. |
| 770 * permission. | 754 /// Follows the same format of Binding.members. |
| 771 * Follows the same format of Binding.members. | |
| 772 */ | |
| 773 core.List<core.String> exemptedMembers; | 755 core.List<core.String> exemptedMembers; |
| 774 /** | 756 |
| 775 * The log type that this config enables. | 757 /// The log type that this config enables. |
| 776 * Possible string values are: | 758 /// Possible string values are: |
| 777 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. | 759 /// - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. |
| 778 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy | 760 /// - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy |
| 779 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create | 761 /// - "DATA_WRITE" : Data writes. Example: CloudSQL Users create |
| 780 * - "DATA_READ" : Data reads. Example: CloudSQL Users list | 762 /// - "DATA_READ" : Data reads. Example: CloudSQL Users list |
| 781 */ | |
| 782 core.String logType; | 763 core.String logType; |
| 783 | 764 |
| 784 AuditLogConfig(); | 765 AuditLogConfig(); |
| 785 | 766 |
| 786 AuditLogConfig.fromJson(core.Map _json) { | 767 AuditLogConfig.fromJson(core.Map _json) { |
| 787 if (_json.containsKey("exemptedMembers")) { | 768 if (_json.containsKey("exemptedMembers")) { |
| 788 exemptedMembers = _json["exemptedMembers"]; | 769 exemptedMembers = _json["exemptedMembers"]; |
| 789 } | 770 } |
| 790 if (_json.containsKey("logType")) { | 771 if (_json.containsKey("logType")) { |
| 791 logType = _json["logType"]; | 772 logType = _json["logType"]; |
| 792 } | 773 } |
| 793 } | 774 } |
| 794 | 775 |
| 795 core.Map<core.String, core.Object> toJson() { | 776 core.Map<core.String, core.Object> toJson() { |
| 796 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 777 final core.Map<core.String, core.Object> _json = |
| 778 new core.Map<core.String, core.Object>(); |
| 797 if (exemptedMembers != null) { | 779 if (exemptedMembers != null) { |
| 798 _json["exemptedMembers"] = exemptedMembers; | 780 _json["exemptedMembers"] = exemptedMembers; |
| 799 } | 781 } |
| 800 if (logType != null) { | 782 if (logType != null) { |
| 801 _json["logType"] = logType; | 783 _json["logType"] = logType; |
| 802 } | 784 } |
| 803 return _json; | 785 return _json; |
| 804 } | 786 } |
| 805 } | 787 } |
| 806 | 788 |
| 807 /** Associates `members` with a `role`. */ | 789 /// Associates `members` with a `role`. |
| 808 class Binding { | 790 class Binding { |
| 809 /** | 791 /// Specifies the identities requesting access for a Cloud Platform resource. |
| 810 * Specifies the identities requesting access for a Cloud Platform resource. | 792 /// `members` can have the following values: |
| 811 * `members` can have the following values: | 793 /// |
| 812 * | 794 /// * `allUsers`: A special identifier that represents anyone who is |
| 813 * * `allUsers`: A special identifier that represents anyone who is | 795 /// on the internet; with or without a Google account. |
| 814 * on the internet; with or without a Google account. | 796 /// |
| 815 * | 797 /// * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 816 * * `allAuthenticatedUsers`: A special identifier that represents anyone | 798 /// who is authenticated with a Google account or a service account. |
| 817 * who is authenticated with a Google account or a service account. | 799 /// |
| 818 * | 800 /// * `user:{emailid}`: An email address that represents a specific Google |
| 819 * * `user:{emailid}`: An email address that represents a specific Google | 801 /// account. For example, `alice@gmail.com` or `joe@example.com`. |
| 820 * account. For example, `alice@gmail.com` or `joe@example.com`. | 802 /// |
| 821 * | 803 /// |
| 822 * | 804 /// * `serviceAccount:{emailid}`: An email address that represents a service |
| 823 * * `serviceAccount:{emailid}`: An email address that represents a service | 805 /// account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 824 * account. For example, `my-other-app@appspot.gserviceaccount.com`. | 806 /// |
| 825 * | 807 /// * `group:{emailid}`: An email address that represents a Google group. |
| 826 * * `group:{emailid}`: An email address that represents a Google group. | 808 /// For example, `admins@example.com`. |
| 827 * For example, `admins@example.com`. | 809 /// |
| 828 * | 810 /// |
| 829 * | 811 /// * `domain:{domain}`: A Google Apps domain name that represents all the |
| 830 * * `domain:{domain}`: A Google Apps domain name that represents all the | 812 /// users of that domain. For example, `google.com` or `example.com`. |
| 831 * users of that domain. For example, `google.com` or `example.com`. | |
| 832 */ | |
| 833 core.List<core.String> members; | 813 core.List<core.String> members; |
| 834 /** | 814 |
| 835 * Role that is assigned to `members`. | 815 /// Role that is assigned to `members`. |
| 836 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. | 816 /// For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 837 * Required | 817 /// Required |
| 838 */ | |
| 839 core.String role; | 818 core.String role; |
| 840 | 819 |
| 841 Binding(); | 820 Binding(); |
| 842 | 821 |
| 843 Binding.fromJson(core.Map _json) { | 822 Binding.fromJson(core.Map _json) { |
| 844 if (_json.containsKey("members")) { | 823 if (_json.containsKey("members")) { |
| 845 members = _json["members"]; | 824 members = _json["members"]; |
| 846 } | 825 } |
| 847 if (_json.containsKey("role")) { | 826 if (_json.containsKey("role")) { |
| 848 role = _json["role"]; | 827 role = _json["role"]; |
| 849 } | 828 } |
| 850 } | 829 } |
| 851 | 830 |
| 852 core.Map<core.String, core.Object> toJson() { | 831 core.Map<core.String, core.Object> toJson() { |
| 853 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 832 final core.Map<core.String, core.Object> _json = |
| 833 new core.Map<core.String, core.Object>(); |
| 854 if (members != null) { | 834 if (members != null) { |
| 855 _json["members"] = members; | 835 _json["members"] = members; |
| 856 } | 836 } |
| 857 if (role != null) { | 837 if (role != null) { |
| 858 _json["role"] = role; | 838 _json["role"] = role; |
| 859 } | 839 } |
| 860 return _json; | 840 return _json; |
| 861 } | 841 } |
| 862 } | 842 } |
| 863 | 843 |
| 864 /** | 844 /// A Folder in an Organization's resource hierarchy, used to |
| 865 * A Folder in an Organization's resource hierarchy, used to | 845 /// organize that Organization's resources. |
| 866 * organize that Organization's resources. | |
| 867 */ | |
| 868 class Folder { | 846 class Folder { |
| 869 /** | 847 /// Output only. Timestamp when the Folder was created. Assigned by the |
| 870 * Output only. Timestamp when the Folder was created. Assigned by the server. | 848 /// server. |
| 871 */ | |
| 872 core.String createTime; | 849 core.String createTime; |
| 873 /** | 850 |
| 874 * The folder’s display name. | 851 /// The folder’s display name. |
| 875 * A folder’s display name must be unique amongst its siblings, e.g. | 852 /// A folder’s display name must be unique amongst its siblings, e.g. |
| 876 * no two folders with the same parent can share the same display name. | 853 /// no two folders with the same parent can share the same display name. |
| 877 * The display name must start and end with a letter or digit, may contain | 854 /// The display name must start and end with a letter or digit, may contain |
| 878 * letters, digits, spaces, hyphens and underscores and can be no longer | 855 /// letters, digits, spaces, hyphens and underscores and can be no longer |
| 879 * than 30 characters. This is captured by the regular expression: | 856 /// than 30 characters. This is captured by the regular expression: |
| 880 * [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. | 857 /// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?. |
| 881 */ | |
| 882 core.String displayName; | 858 core.String displayName; |
| 883 /** | 859 |
| 884 * Output only. The lifecycle state of the folder. | 860 /// Output only. The lifecycle state of the folder. |
| 885 * Updates to the lifecycle_state must be performed via | 861 /// Updates to the lifecycle_state must be performed via |
| 886 * [DeleteFolder] and [UndeleteFolder]. | 862 /// [DeleteFolder] and [UndeleteFolder]. |
| 887 * Possible string values are: | 863 /// Possible string values are: |
| 888 * - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. | 864 /// - "LIFECYCLE_STATE_UNSPECIFIED" : Unspecified state. |
| 889 * - "ACTIVE" : The normal and active state. | 865 /// - "ACTIVE" : The normal and active state. |
| 890 * - "DELETE_REQUESTED" : The folder has been marked for deletion by the user. | 866 /// - "DELETE_REQUESTED" : The folder has been marked for deletion by the |
| 891 */ | 867 /// user. |
| 892 core.String lifecycleState; | 868 core.String lifecycleState; |
| 893 /** | 869 |
| 894 * Output only. The resource name of the Folder. | 870 /// Output only. The resource name of the Folder. |
| 895 * Its format is `folders/{folder_id}`, for example: "folders/1234". | 871 /// Its format is `folders/{folder_id}`, for example: "folders/1234". |
| 896 */ | |
| 897 core.String name; | 872 core.String name; |
| 898 /** | 873 |
| 899 * The Folder’s parent's resource name. | 874 /// The Folder’s parent's resource name. |
| 900 * Updates to the folder's parent must be performed via [MoveFolders]. | 875 /// Updates to the folder's parent must be performed via [MoveFolders]. |
| 901 */ | |
| 902 core.String parent; | 876 core.String parent; |
| 903 | 877 |
| 904 Folder(); | 878 Folder(); |
| 905 | 879 |
| 906 Folder.fromJson(core.Map _json) { | 880 Folder.fromJson(core.Map _json) { |
| 907 if (_json.containsKey("createTime")) { | 881 if (_json.containsKey("createTime")) { |
| 908 createTime = _json["createTime"]; | 882 createTime = _json["createTime"]; |
| 909 } | 883 } |
| 910 if (_json.containsKey("displayName")) { | 884 if (_json.containsKey("displayName")) { |
| 911 displayName = _json["displayName"]; | 885 displayName = _json["displayName"]; |
| 912 } | 886 } |
| 913 if (_json.containsKey("lifecycleState")) { | 887 if (_json.containsKey("lifecycleState")) { |
| 914 lifecycleState = _json["lifecycleState"]; | 888 lifecycleState = _json["lifecycleState"]; |
| 915 } | 889 } |
| 916 if (_json.containsKey("name")) { | 890 if (_json.containsKey("name")) { |
| 917 name = _json["name"]; | 891 name = _json["name"]; |
| 918 } | 892 } |
| 919 if (_json.containsKey("parent")) { | 893 if (_json.containsKey("parent")) { |
| 920 parent = _json["parent"]; | 894 parent = _json["parent"]; |
| 921 } | 895 } |
| 922 } | 896 } |
| 923 | 897 |
| 924 core.Map<core.String, core.Object> toJson() { | 898 core.Map<core.String, core.Object> toJson() { |
| 925 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 899 final core.Map<core.String, core.Object> _json = |
| 900 new core.Map<core.String, core.Object>(); |
| 926 if (createTime != null) { | 901 if (createTime != null) { |
| 927 _json["createTime"] = createTime; | 902 _json["createTime"] = createTime; |
| 928 } | 903 } |
| 929 if (displayName != null) { | 904 if (displayName != null) { |
| 930 _json["displayName"] = displayName; | 905 _json["displayName"] = displayName; |
| 931 } | 906 } |
| 932 if (lifecycleState != null) { | 907 if (lifecycleState != null) { |
| 933 _json["lifecycleState"] = lifecycleState; | 908 _json["lifecycleState"] = lifecycleState; |
| 934 } | 909 } |
| 935 if (name != null) { | 910 if (name != null) { |
| 936 _json["name"] = name; | 911 _json["name"] = name; |
| 937 } | 912 } |
| 938 if (parent != null) { | 913 if (parent != null) { |
| 939 _json["parent"] = parent; | 914 _json["parent"] = parent; |
| 940 } | 915 } |
| 941 return _json; | 916 return _json; |
| 942 } | 917 } |
| 943 } | 918 } |
| 944 | 919 |
| 945 /** Metadata describing a long running folder operation */ | 920 /// Metadata describing a long running folder operation |
| 946 class FolderOperation { | 921 class FolderOperation { |
| 947 /** | 922 /// The resource name of the folder or organization we are either creating |
| 948 * The resource name of the folder or organization we are either creating | 923 /// the folder under or moving the folder to. |
| 949 * the folder under or moving the folder to. | |
| 950 */ | |
| 951 core.String destinationParent; | 924 core.String destinationParent; |
| 952 /** The display name of the folder. */ | 925 |
| 926 /// The display name of the folder. |
| 953 core.String displayName; | 927 core.String displayName; |
| 954 /** | 928 |
| 955 * The type of this operation. | 929 /// The type of this operation. |
| 956 * Possible string values are: | 930 /// Possible string values are: |
| 957 * - "OPERATION_TYPE_UNSPECIFIED" : Operation type not specified. | 931 /// - "OPERATION_TYPE_UNSPECIFIED" : Operation type not specified. |
| 958 * - "CREATE" : A create folder operation. | 932 /// - "CREATE" : A create folder operation. |
| 959 * - "MOVE" : A move folder operation. | 933 /// - "MOVE" : A move folder operation. |
| 960 */ | |
| 961 core.String operationType; | 934 core.String operationType; |
| 962 /** | 935 |
| 963 * The resource name of the folder's parent. | 936 /// The resource name of the folder's parent. |
| 964 * Only applicable when the operation_type is MOVE. | 937 /// Only applicable when the operation_type is MOVE. |
| 965 */ | |
| 966 core.String sourceParent; | 938 core.String sourceParent; |
| 967 | 939 |
| 968 FolderOperation(); | 940 FolderOperation(); |
| 969 | 941 |
| 970 FolderOperation.fromJson(core.Map _json) { | 942 FolderOperation.fromJson(core.Map _json) { |
| 971 if (_json.containsKey("destinationParent")) { | 943 if (_json.containsKey("destinationParent")) { |
| 972 destinationParent = _json["destinationParent"]; | 944 destinationParent = _json["destinationParent"]; |
| 973 } | 945 } |
| 974 if (_json.containsKey("displayName")) { | 946 if (_json.containsKey("displayName")) { |
| 975 displayName = _json["displayName"]; | 947 displayName = _json["displayName"]; |
| 976 } | 948 } |
| 977 if (_json.containsKey("operationType")) { | 949 if (_json.containsKey("operationType")) { |
| 978 operationType = _json["operationType"]; | 950 operationType = _json["operationType"]; |
| 979 } | 951 } |
| 980 if (_json.containsKey("sourceParent")) { | 952 if (_json.containsKey("sourceParent")) { |
| 981 sourceParent = _json["sourceParent"]; | 953 sourceParent = _json["sourceParent"]; |
| 982 } | 954 } |
| 983 } | 955 } |
| 984 | 956 |
| 985 core.Map<core.String, core.Object> toJson() { | 957 core.Map<core.String, core.Object> toJson() { |
| 986 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 958 final core.Map<core.String, core.Object> _json = |
| 959 new core.Map<core.String, core.Object>(); |
| 987 if (destinationParent != null) { | 960 if (destinationParent != null) { |
| 988 _json["destinationParent"] = destinationParent; | 961 _json["destinationParent"] = destinationParent; |
| 989 } | 962 } |
| 990 if (displayName != null) { | 963 if (displayName != null) { |
| 991 _json["displayName"] = displayName; | 964 _json["displayName"] = displayName; |
| 992 } | 965 } |
| 993 if (operationType != null) { | 966 if (operationType != null) { |
| 994 _json["operationType"] = operationType; | 967 _json["operationType"] = operationType; |
| 995 } | 968 } |
| 996 if (sourceParent != null) { | 969 if (sourceParent != null) { |
| 997 _json["sourceParent"] = sourceParent; | 970 _json["sourceParent"] = sourceParent; |
| 998 } | 971 } |
| 999 return _json; | 972 return _json; |
| 1000 } | 973 } |
| 1001 } | 974 } |
| 1002 | 975 |
| 1003 /** A classification of the Folder Operation error. */ | 976 /// A classification of the Folder Operation error. |
| 1004 class FolderOperationError { | 977 class FolderOperationError { |
| 1005 /** | 978 /// The type of operation error experienced. |
| 1006 * The type of operation error experienced. | 979 /// Possible string values are: |
| 1007 * Possible string values are: | 980 /// - "ERROR_TYPE_UNSPECIFIED" : The error type was unrecognized or |
| 1008 * - "ERROR_TYPE_UNSPECIFIED" : The error type was unrecognized or | 981 /// unspecified. |
| 1009 * unspecified. | 982 /// - "ACTIVE_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate |
| 1010 * - "ACTIVE_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate the | 983 /// the max folder depth constraint. |
| 1011 * max folder depth constraint. | 984 /// - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the |
| 1012 * - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the | 985 /// max child folders constraint. |
| 1013 * max child folders constraint. | 986 /// - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate |
| 1014 * - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate | 987 /// the locally-unique folder |
| 1015 * the locally-unique folder | 988 /// display_name constraint. |
| 1016 * display_name constraint. | 989 /// - "RESOURCE_DELETED_VIOLATION" : The resource being moved has been |
| 1017 * - "RESOURCE_DELETED_VIOLATION" : The resource being moved has been deleted. | 990 /// deleted. |
| 1018 * - "PARENT_DELETED_VIOLATION" : The resource a folder was being added to has | 991 /// - "PARENT_DELETED_VIOLATION" : The resource a folder was being added to |
| 1019 * been deleted. | 992 /// has been deleted. |
| 1020 * - "CYCLE_INTRODUCED_VIOLATION" : The attempted action would introduce cycle | 993 /// - "CYCLE_INTRODUCED_VIOLATION" : The attempted action would introduce |
| 1021 * in resource path. | 994 /// cycle in resource path. |
| 1022 * - "FOLDER_BEING_MOVED_VIOLATION" : The attempted action would move a folder | 995 /// - "FOLDER_BEING_MOVED_VIOLATION" : The attempted action would move a |
| 1023 * that is already being moved. | 996 /// folder that is already being moved. |
| 1024 * - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" : The folder the caller is trying | 997 /// - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" : The folder the caller is |
| 1025 * to delete contains active resources. | 998 /// trying to delete contains active resources. |
| 1026 * - "DELETED_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate | 999 /// - "DELETED_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate |
| 1027 * the max deleted folder depth | 1000 /// the max deleted folder depth |
| 1028 * constraint. | 1001 /// constraint. |
| 1029 */ | |
| 1030 core.String errorMessageId; | 1002 core.String errorMessageId; |
| 1031 | 1003 |
| 1032 FolderOperationError(); | 1004 FolderOperationError(); |
| 1033 | 1005 |
| 1034 FolderOperationError.fromJson(core.Map _json) { | 1006 FolderOperationError.fromJson(core.Map _json) { |
| 1035 if (_json.containsKey("errorMessageId")) { | 1007 if (_json.containsKey("errorMessageId")) { |
| 1036 errorMessageId = _json["errorMessageId"]; | 1008 errorMessageId = _json["errorMessageId"]; |
| 1037 } | 1009 } |
| 1038 } | 1010 } |
| 1039 | 1011 |
| 1040 core.Map<core.String, core.Object> toJson() { | 1012 core.Map<core.String, core.Object> toJson() { |
| 1041 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1013 final core.Map<core.String, core.Object> _json = |
| 1014 new core.Map<core.String, core.Object>(); |
| 1042 if (errorMessageId != null) { | 1015 if (errorMessageId != null) { |
| 1043 _json["errorMessageId"] = errorMessageId; | 1016 _json["errorMessageId"] = errorMessageId; |
| 1044 } | 1017 } |
| 1045 return _json; | 1018 return _json; |
| 1046 } | 1019 } |
| 1047 } | 1020 } |
| 1048 | 1021 |
| 1049 /** Request message for `GetIamPolicy` method. */ | 1022 /// Request message for `GetIamPolicy` method. |
| 1050 class GetIamPolicyRequest { | 1023 class GetIamPolicyRequest { |
| 1051 | |
| 1052 GetIamPolicyRequest(); | 1024 GetIamPolicyRequest(); |
| 1053 | 1025 |
| 1054 GetIamPolicyRequest.fromJson(core.Map _json) { | 1026 GetIamPolicyRequest.fromJson(core.Map _json) {} |
| 1055 } | |
| 1056 | 1027 |
| 1057 core.Map<core.String, core.Object> toJson() { | 1028 core.Map<core.String, core.Object> toJson() { |
| 1058 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1029 final core.Map<core.String, core.Object> _json = |
| 1030 new core.Map<core.String, core.Object>(); |
| 1059 return _json; | 1031 return _json; |
| 1060 } | 1032 } |
| 1061 } | 1033 } |
| 1062 | 1034 |
| 1063 /** The ListFolders response message. */ | 1035 /// The ListFolders response message. |
| 1064 class ListFoldersResponse { | 1036 class ListFoldersResponse { |
| 1065 /** | 1037 /// A possibly paginated list of Folders that are direct descendants of |
| 1066 * A possibly paginated list of Folders that are direct descendants of | 1038 /// the specified parent resource. |
| 1067 * the specified parent resource. | |
| 1068 */ | |
| 1069 core.List<Folder> folders; | 1039 core.List<Folder> folders; |
| 1070 /** | 1040 |
| 1071 * A pagination token returned from a previous call to `ListFolders` | 1041 /// A pagination token returned from a previous call to `ListFolders` |
| 1072 * that indicates from where listing should continue. | 1042 /// that indicates from where listing should continue. |
| 1073 * This field is optional. | 1043 /// This field is optional. |
| 1074 */ | |
| 1075 core.String nextPageToken; | 1044 core.String nextPageToken; |
| 1076 | 1045 |
| 1077 ListFoldersResponse(); | 1046 ListFoldersResponse(); |
| 1078 | 1047 |
| 1079 ListFoldersResponse.fromJson(core.Map _json) { | 1048 ListFoldersResponse.fromJson(core.Map _json) { |
| 1080 if (_json.containsKey("folders")) { | 1049 if (_json.containsKey("folders")) { |
| 1081 folders = _json["folders"].map((value) => new Folder.fromJson(value)).toLi
st(); | 1050 folders = |
| 1051 _json["folders"].map((value) => new Folder.fromJson(value)).toList(); |
| 1082 } | 1052 } |
| 1083 if (_json.containsKey("nextPageToken")) { | 1053 if (_json.containsKey("nextPageToken")) { |
| 1084 nextPageToken = _json["nextPageToken"]; | 1054 nextPageToken = _json["nextPageToken"]; |
| 1085 } | 1055 } |
| 1086 } | 1056 } |
| 1087 | 1057 |
| 1088 core.Map<core.String, core.Object> toJson() { | 1058 core.Map<core.String, core.Object> toJson() { |
| 1089 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1059 final core.Map<core.String, core.Object> _json = |
| 1060 new core.Map<core.String, core.Object>(); |
| 1090 if (folders != null) { | 1061 if (folders != null) { |
| 1091 _json["folders"] = folders.map((value) => (value).toJson()).toList(); | 1062 _json["folders"] = folders.map((value) => (value).toJson()).toList(); |
| 1092 } | 1063 } |
| 1093 if (nextPageToken != null) { | 1064 if (nextPageToken != null) { |
| 1094 _json["nextPageToken"] = nextPageToken; | 1065 _json["nextPageToken"] = nextPageToken; |
| 1095 } | 1066 } |
| 1096 return _json; | 1067 return _json; |
| 1097 } | 1068 } |
| 1098 } | 1069 } |
| 1099 | 1070 |
| 1100 /** The MoveFolder request message. */ | 1071 /// The MoveFolder request message. |
| 1101 class MoveFolderRequest { | 1072 class MoveFolderRequest { |
| 1102 /** | 1073 /// The resource name of the Folder or Organization to reparent |
| 1103 * The resource name of the Folder or Organization to reparent | 1074 /// the folder under. |
| 1104 * the folder under. | 1075 /// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. |
| 1105 * Must be of the form `folders/{folder_id}` or `organizations/{org_id}`. | |
| 1106 */ | |
| 1107 core.String destinationParent; | 1076 core.String destinationParent; |
| 1108 | 1077 |
| 1109 MoveFolderRequest(); | 1078 MoveFolderRequest(); |
| 1110 | 1079 |
| 1111 MoveFolderRequest.fromJson(core.Map _json) { | 1080 MoveFolderRequest.fromJson(core.Map _json) { |
| 1112 if (_json.containsKey("destinationParent")) { | 1081 if (_json.containsKey("destinationParent")) { |
| 1113 destinationParent = _json["destinationParent"]; | 1082 destinationParent = _json["destinationParent"]; |
| 1114 } | 1083 } |
| 1115 } | 1084 } |
| 1116 | 1085 |
| 1117 core.Map<core.String, core.Object> toJson() { | 1086 core.Map<core.String, core.Object> toJson() { |
| 1118 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1087 final core.Map<core.String, core.Object> _json = |
| 1088 new core.Map<core.String, core.Object>(); |
| 1119 if (destinationParent != null) { | 1089 if (destinationParent != null) { |
| 1120 _json["destinationParent"] = destinationParent; | 1090 _json["destinationParent"] = destinationParent; |
| 1121 } | 1091 } |
| 1122 return _json; | 1092 return _json; |
| 1123 } | 1093 } |
| 1124 } | 1094 } |
| 1125 | 1095 |
| 1126 /** | 1096 /// This resource represents a long-running operation that is the result of a |
| 1127 * This resource represents a long-running operation that is the result of a | 1097 /// network API call. |
| 1128 * network API call. | |
| 1129 */ | |
| 1130 class Operation { | 1098 class Operation { |
| 1131 /** | 1099 /// If the value is `false`, it means the operation is still in progress. |
| 1132 * If the value is `false`, it means the operation is still in progress. | 1100 /// If `true`, the operation is completed, and either `error` or `response` |
| 1133 * If true, the operation is completed, and either `error` or `response` is | 1101 /// is |
| 1134 * available. | 1102 /// available. |
| 1135 */ | |
| 1136 core.bool done; | 1103 core.bool done; |
| 1137 /** The error result of the operation in case of failure or cancellation. */ | 1104 |
| 1105 /// The error result of the operation in case of failure or cancellation. |
| 1138 Status error; | 1106 Status error; |
| 1139 /** | 1107 |
| 1140 * Service-specific metadata associated with the operation. It typically | 1108 /// Service-specific metadata associated with the operation. It typically |
| 1141 * contains progress information and common metadata such as create time. | 1109 /// contains progress information and common metadata such as create time. |
| 1142 * Some services might not provide such metadata. Any method that returns a | 1110 /// Some services might not provide such metadata. Any method that returns a |
| 1143 * long-running operation should document the metadata type, if any. | 1111 /// long-running operation should document the metadata type, if any. |
| 1144 * | 1112 /// |
| 1145 * The values for Object must be JSON objects. It can consist of `num`, | 1113 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1146 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1114 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1147 */ | |
| 1148 core.Map<core.String, core.Object> metadata; | 1115 core.Map<core.String, core.Object> metadata; |
| 1149 /** | 1116 |
| 1150 * The server-assigned name, which is only unique within the same service that | 1117 /// The server-assigned name, which is only unique within the same service |
| 1151 * originally returns it. If you use the default HTTP mapping, the | 1118 /// that |
| 1152 * `name` should have the format of `operations/some/unique/name`. | 1119 /// originally returns it. If you use the default HTTP mapping, the |
| 1153 */ | 1120 /// `name` should have the format of `operations/some/unique/name`. |
| 1154 core.String name; | 1121 core.String name; |
| 1155 /** | 1122 |
| 1156 * The normal response of the operation in case of success. If the original | 1123 /// The normal response of the operation in case of success. If the original |
| 1157 * method returns no data on success, such as `Delete`, the response is | 1124 /// method returns no data on success, such as `Delete`, the response is |
| 1158 * `google.protobuf.Empty`. If the original method is standard | 1125 /// `google.protobuf.Empty`. If the original method is standard |
| 1159 * `Get`/`Create`/`Update`, the response should be the resource. For other | 1126 /// `Get`/`Create`/`Update`, the response should be the resource. For other |
| 1160 * methods, the response should have the type `XxxResponse`, where `Xxx` | 1127 /// methods, the response should have the type `XxxResponse`, where `Xxx` |
| 1161 * is the original method name. For example, if the original method name | 1128 /// is the original method name. For example, if the original method name |
| 1162 * is `TakeSnapshot()`, the inferred response type is | 1129 /// is `TakeSnapshot()`, the inferred response type is |
| 1163 * `TakeSnapshotResponse`. | 1130 /// `TakeSnapshotResponse`. |
| 1164 * | 1131 /// |
| 1165 * The values for Object must be JSON objects. It can consist of `num`, | 1132 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1166 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1133 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1167 */ | |
| 1168 core.Map<core.String, core.Object> response; | 1134 core.Map<core.String, core.Object> response; |
| 1169 | 1135 |
| 1170 Operation(); | 1136 Operation(); |
| 1171 | 1137 |
| 1172 Operation.fromJson(core.Map _json) { | 1138 Operation.fromJson(core.Map _json) { |
| 1173 if (_json.containsKey("done")) { | 1139 if (_json.containsKey("done")) { |
| 1174 done = _json["done"]; | 1140 done = _json["done"]; |
| 1175 } | 1141 } |
| 1176 if (_json.containsKey("error")) { | 1142 if (_json.containsKey("error")) { |
| 1177 error = new Status.fromJson(_json["error"]); | 1143 error = new Status.fromJson(_json["error"]); |
| 1178 } | 1144 } |
| 1179 if (_json.containsKey("metadata")) { | 1145 if (_json.containsKey("metadata")) { |
| 1180 metadata = _json["metadata"]; | 1146 metadata = _json["metadata"]; |
| 1181 } | 1147 } |
| 1182 if (_json.containsKey("name")) { | 1148 if (_json.containsKey("name")) { |
| 1183 name = _json["name"]; | 1149 name = _json["name"]; |
| 1184 } | 1150 } |
| 1185 if (_json.containsKey("response")) { | 1151 if (_json.containsKey("response")) { |
| 1186 response = _json["response"]; | 1152 response = _json["response"]; |
| 1187 } | 1153 } |
| 1188 } | 1154 } |
| 1189 | 1155 |
| 1190 core.Map<core.String, core.Object> toJson() { | 1156 core.Map<core.String, core.Object> toJson() { |
| 1191 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1157 final core.Map<core.String, core.Object> _json = |
| 1158 new core.Map<core.String, core.Object>(); |
| 1192 if (done != null) { | 1159 if (done != null) { |
| 1193 _json["done"] = done; | 1160 _json["done"] = done; |
| 1194 } | 1161 } |
| 1195 if (error != null) { | 1162 if (error != null) { |
| 1196 _json["error"] = (error).toJson(); | 1163 _json["error"] = (error).toJson(); |
| 1197 } | 1164 } |
| 1198 if (metadata != null) { | 1165 if (metadata != null) { |
| 1199 _json["metadata"] = metadata; | 1166 _json["metadata"] = metadata; |
| 1200 } | 1167 } |
| 1201 if (name != null) { | 1168 if (name != null) { |
| 1202 _json["name"] = name; | 1169 _json["name"] = name; |
| 1203 } | 1170 } |
| 1204 if (response != null) { | 1171 if (response != null) { |
| 1205 _json["response"] = response; | 1172 _json["response"] = response; |
| 1206 } | 1173 } |
| 1207 return _json; | 1174 return _json; |
| 1208 } | 1175 } |
| 1209 } | 1176 } |
| 1210 | 1177 |
| 1211 /** | 1178 /// Defines an Identity and Access Management (IAM) policy. It is used to |
| 1212 * Defines an Identity and Access Management (IAM) policy. It is used to | 1179 /// specify access control policies for Cloud Platform resources. |
| 1213 * specify access control policies for Cloud Platform resources. | 1180 /// |
| 1214 * | 1181 /// |
| 1215 * | 1182 /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 1216 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of | 1183 /// `members` to a `role`, where the members can be user accounts, Google |
| 1217 * `members` to a `role`, where the members can be user accounts, Google groups, | 1184 /// groups, |
| 1218 * Google domains, and service accounts. A `role` is a named list of permissions | 1185 /// Google domains, and service accounts. A `role` is a named list of |
| 1219 * defined by IAM. | 1186 /// permissions |
| 1220 * | 1187 /// defined by IAM. |
| 1221 * **Example** | 1188 /// |
| 1222 * | 1189 /// **Example** |
| 1223 * { | 1190 /// |
| 1224 * "bindings": [ | 1191 /// { |
| 1225 * { | 1192 /// "bindings": [ |
| 1226 * "role": "roles/owner", | 1193 /// { |
| 1227 * "members": [ | 1194 /// "role": "roles/owner", |
| 1228 * "user:mike@example.com", | 1195 /// "members": [ |
| 1229 * "group:admins@example.com", | 1196 /// "user:mike@example.com", |
| 1230 * "domain:google.com", | 1197 /// "group:admins@example.com", |
| 1231 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", | 1198 /// "domain:google.com", |
| 1232 * ] | 1199 /// "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 1233 * }, | 1200 /// ] |
| 1234 * { | 1201 /// }, |
| 1235 * "role": "roles/viewer", | 1202 /// { |
| 1236 * "members": ["user:sean@example.com"] | 1203 /// "role": "roles/viewer", |
| 1237 * } | 1204 /// "members": ["user:sean@example.com"] |
| 1238 * ] | 1205 /// } |
| 1239 * } | 1206 /// ] |
| 1240 * | 1207 /// } |
| 1241 * For a description of IAM and its features, see the | 1208 /// |
| 1242 * [IAM developer's guide](https://cloud.google.com/iam). | 1209 /// For a description of IAM and its features, see the |
| 1243 */ | 1210 /// [IAM developer's guide](https://cloud.google.com/iam). |
| 1244 class Policy { | 1211 class Policy { |
| 1245 /** Specifies cloud audit logging configuration for this policy. */ | 1212 /// Specifies cloud audit logging configuration for this policy. |
| 1246 core.List<AuditConfig> auditConfigs; | 1213 core.List<AuditConfig> auditConfigs; |
| 1247 /** | 1214 |
| 1248 * Associates a list of `members` to a `role`. | 1215 /// Associates a list of `members` to a `role`. |
| 1249 * `bindings` with no members will result in an error. | 1216 /// `bindings` with no members will result in an error. |
| 1250 */ | |
| 1251 core.List<Binding> bindings; | 1217 core.List<Binding> bindings; |
| 1252 /** | 1218 |
| 1253 * `etag` is used for optimistic concurrency control as a way to help | 1219 /// `etag` is used for optimistic concurrency control as a way to help |
| 1254 * prevent simultaneous updates of a policy from overwriting each other. | 1220 /// prevent simultaneous updates of a policy from overwriting each other. |
| 1255 * It is strongly suggested that systems make use of the `etag` in the | 1221 /// It is strongly suggested that systems make use of the `etag` in the |
| 1256 * read-modify-write cycle to perform policy updates in order to avoid race | 1222 /// read-modify-write cycle to perform policy updates in order to avoid race |
| 1257 * conditions: An `etag` is returned in the response to `getIamPolicy`, and | 1223 /// conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 1258 * systems are expected to put that etag in the request to `setIamPolicy` to | 1224 /// systems are expected to put that etag in the request to `setIamPolicy` to |
| 1259 * ensure that their change will be applied to the same version of the policy. | 1225 /// ensure that their change will be applied to the same version of the |
| 1260 * | 1226 /// policy. |
| 1261 * If no `etag` is provided in the call to `setIamPolicy`, then the existing | 1227 /// |
| 1262 * policy is overwritten blindly. | 1228 /// If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 1263 */ | 1229 /// policy is overwritten blindly. |
| 1264 core.String etag; | 1230 core.String etag; |
| 1265 core.List<core.int> get etagAsBytes { | 1231 core.List<core.int> get etagAsBytes { |
| 1266 return convert.BASE64.decode(etag); | 1232 return convert.BASE64.decode(etag); |
| 1267 } | 1233 } |
| 1268 | 1234 |
| 1269 void set etagAsBytes(core.List<core.int> _bytes) { | 1235 void set etagAsBytes(core.List<core.int> _bytes) { |
| 1270 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); | 1236 etag = |
| 1237 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
| 1271 } | 1238 } |
| 1272 /** Version of the `Policy`. The default version is 0. */ | 1239 |
| 1240 /// Version of the `Policy`. The default version is 0. |
| 1273 core.int version; | 1241 core.int version; |
| 1274 | 1242 |
| 1275 Policy(); | 1243 Policy(); |
| 1276 | 1244 |
| 1277 Policy.fromJson(core.Map _json) { | 1245 Policy.fromJson(core.Map _json) { |
| 1278 if (_json.containsKey("auditConfigs")) { | 1246 if (_json.containsKey("auditConfigs")) { |
| 1279 auditConfigs = _json["auditConfigs"].map((value) => new AuditConfig.fromJs
on(value)).toList(); | 1247 auditConfigs = _json["auditConfigs"] |
| 1248 .map((value) => new AuditConfig.fromJson(value)) |
| 1249 .toList(); |
| 1280 } | 1250 } |
| 1281 if (_json.containsKey("bindings")) { | 1251 if (_json.containsKey("bindings")) { |
| 1282 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); | 1252 bindings = _json["bindings"] |
| 1253 .map((value) => new Binding.fromJson(value)) |
| 1254 .toList(); |
| 1283 } | 1255 } |
| 1284 if (_json.containsKey("etag")) { | 1256 if (_json.containsKey("etag")) { |
| 1285 etag = _json["etag"]; | 1257 etag = _json["etag"]; |
| 1286 } | 1258 } |
| 1287 if (_json.containsKey("version")) { | 1259 if (_json.containsKey("version")) { |
| 1288 version = _json["version"]; | 1260 version = _json["version"]; |
| 1289 } | 1261 } |
| 1290 } | 1262 } |
| 1291 | 1263 |
| 1292 core.Map<core.String, core.Object> toJson() { | 1264 core.Map<core.String, core.Object> toJson() { |
| 1293 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1265 final core.Map<core.String, core.Object> _json = |
| 1266 new core.Map<core.String, core.Object>(); |
| 1294 if (auditConfigs != null) { | 1267 if (auditConfigs != null) { |
| 1295 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi
st(); | 1268 _json["auditConfigs"] = |
| 1269 auditConfigs.map((value) => (value).toJson()).toList(); |
| 1296 } | 1270 } |
| 1297 if (bindings != null) { | 1271 if (bindings != null) { |
| 1298 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); | 1272 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 1299 } | 1273 } |
| 1300 if (etag != null) { | 1274 if (etag != null) { |
| 1301 _json["etag"] = etag; | 1275 _json["etag"] = etag; |
| 1302 } | 1276 } |
| 1303 if (version != null) { | 1277 if (version != null) { |
| 1304 _json["version"] = version; | 1278 _json["version"] = version; |
| 1305 } | 1279 } |
| 1306 return _json; | 1280 return _json; |
| 1307 } | 1281 } |
| 1308 } | 1282 } |
| 1309 | 1283 |
| 1310 /** | 1284 /// A status object which is used as the `metadata` field for the Operation |
| 1311 * A status object which is used as the `metadata` field for the Operation | 1285 /// returned by CreateProject. It provides insight for when significant phases |
| 1312 * returned by CreateProject. It provides insight for when significant phases of | 1286 /// of |
| 1313 * Project creation have completed. | 1287 /// Project creation have completed. |
| 1314 */ | |
| 1315 class ProjectCreationStatus { | 1288 class ProjectCreationStatus { |
| 1316 /** Creation time of the project creation workflow. */ | 1289 /// Creation time of the project creation workflow. |
| 1317 core.String createTime; | 1290 core.String createTime; |
| 1318 /** | 1291 |
| 1319 * True if the project can be retrieved using GetProject. No other operations | 1292 /// True if the project can be retrieved using GetProject. No other |
| 1320 * on the project are guaranteed to work until the project creation is | 1293 /// operations |
| 1321 * complete. | 1294 /// on the project are guaranteed to work until the project creation is |
| 1322 */ | 1295 /// complete. |
| 1323 core.bool gettable; | 1296 core.bool gettable; |
| 1324 /** True if the project creation process is complete. */ | 1297 |
| 1298 /// True if the project creation process is complete. |
| 1325 core.bool ready; | 1299 core.bool ready; |
| 1326 | 1300 |
| 1327 ProjectCreationStatus(); | 1301 ProjectCreationStatus(); |
| 1328 | 1302 |
| 1329 ProjectCreationStatus.fromJson(core.Map _json) { | 1303 ProjectCreationStatus.fromJson(core.Map _json) { |
| 1330 if (_json.containsKey("createTime")) { | 1304 if (_json.containsKey("createTime")) { |
| 1331 createTime = _json["createTime"]; | 1305 createTime = _json["createTime"]; |
| 1332 } | 1306 } |
| 1333 if (_json.containsKey("gettable")) { | 1307 if (_json.containsKey("gettable")) { |
| 1334 gettable = _json["gettable"]; | 1308 gettable = _json["gettable"]; |
| 1335 } | 1309 } |
| 1336 if (_json.containsKey("ready")) { | 1310 if (_json.containsKey("ready")) { |
| 1337 ready = _json["ready"]; | 1311 ready = _json["ready"]; |
| 1338 } | 1312 } |
| 1339 } | 1313 } |
| 1340 | 1314 |
| 1341 core.Map<core.String, core.Object> toJson() { | 1315 core.Map<core.String, core.Object> toJson() { |
| 1342 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1316 final core.Map<core.String, core.Object> _json = |
| 1317 new core.Map<core.String, core.Object>(); |
| 1343 if (createTime != null) { | 1318 if (createTime != null) { |
| 1344 _json["createTime"] = createTime; | 1319 _json["createTime"] = createTime; |
| 1345 } | 1320 } |
| 1346 if (gettable != null) { | 1321 if (gettable != null) { |
| 1347 _json["gettable"] = gettable; | 1322 _json["gettable"] = gettable; |
| 1348 } | 1323 } |
| 1349 if (ready != null) { | 1324 if (ready != null) { |
| 1350 _json["ready"] = ready; | 1325 _json["ready"] = ready; |
| 1351 } | 1326 } |
| 1352 return _json; | 1327 return _json; |
| 1353 } | 1328 } |
| 1354 } | 1329 } |
| 1355 | 1330 |
| 1356 /** The request message for searching folders. */ | 1331 /// The request message for searching folders. |
| 1357 class SearchFoldersRequest { | 1332 class SearchFoldersRequest { |
| 1358 /** | 1333 /// The maximum number of folders to return in the response. |
| 1359 * The maximum number of folders to return in the response. | 1334 /// This field is optional. |
| 1360 * This field is optional. | |
| 1361 */ | |
| 1362 core.int pageSize; | 1335 core.int pageSize; |
| 1363 /** | 1336 |
| 1364 * A pagination token returned from a previous call to `SearchFolders` | 1337 /// A pagination token returned from a previous call to `SearchFolders` |
| 1365 * that indicates from where search should continue. | 1338 /// that indicates from where search should continue. |
| 1366 * This field is optional. | 1339 /// This field is optional. |
| 1367 */ | |
| 1368 core.String pageToken; | 1340 core.String pageToken; |
| 1369 /** | 1341 |
| 1370 * Search criteria used to select the Folders to return. | 1342 /// Search criteria used to select the Folders to return. |
| 1371 * If no search criteria is specified then all accessible folders will be | 1343 /// If no search criteria is specified then all accessible folders will be |
| 1372 * returned. | 1344 /// returned. |
| 1373 * | 1345 /// |
| 1374 * Query expressions can be used to restrict results based upon displayName, | 1346 /// Query expressions can be used to restrict results based upon displayName, |
| 1375 * lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` | 1347 /// lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR` |
| 1376 * can be used along with the suffix wildcard symbol `*`. | 1348 /// can be used along with the suffix wildcard symbol `*`. |
| 1377 * | 1349 /// |
| 1378 * Some example queries are: | 1350 /// Some example queries are: |
| 1379 * |Query|Description| | 1351 /// |Query|Description| |
| 1380 * |------|-----------| | 1352 /// |------|-----------| |
| 1381 * |displayName=Test*|Folders whose display name starts with "Test".| | 1353 /// |displayName=Test*|Folders whose display name starts with "Test".| |
| 1382 * |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| | 1354 /// |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.| |
| 1383 * |parent=folders/123|Folders whose parent is "folders/123".| | 1355 /// |parent=folders/123|Folders whose parent is "folders/123".| |
| 1384 * |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose | 1356 /// |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose |
| 1385 * parent is "folders/123".| | 1357 /// parent is "folders/123".| |
| 1386 */ | |
| 1387 core.String query; | 1358 core.String query; |
| 1388 | 1359 |
| 1389 SearchFoldersRequest(); | 1360 SearchFoldersRequest(); |
| 1390 | 1361 |
| 1391 SearchFoldersRequest.fromJson(core.Map _json) { | 1362 SearchFoldersRequest.fromJson(core.Map _json) { |
| 1392 if (_json.containsKey("pageSize")) { | 1363 if (_json.containsKey("pageSize")) { |
| 1393 pageSize = _json["pageSize"]; | 1364 pageSize = _json["pageSize"]; |
| 1394 } | 1365 } |
| 1395 if (_json.containsKey("pageToken")) { | 1366 if (_json.containsKey("pageToken")) { |
| 1396 pageToken = _json["pageToken"]; | 1367 pageToken = _json["pageToken"]; |
| 1397 } | 1368 } |
| 1398 if (_json.containsKey("query")) { | 1369 if (_json.containsKey("query")) { |
| 1399 query = _json["query"]; | 1370 query = _json["query"]; |
| 1400 } | 1371 } |
| 1401 } | 1372 } |
| 1402 | 1373 |
| 1403 core.Map<core.String, core.Object> toJson() { | 1374 core.Map<core.String, core.Object> toJson() { |
| 1404 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1375 final core.Map<core.String, core.Object> _json = |
| 1376 new core.Map<core.String, core.Object>(); |
| 1405 if (pageSize != null) { | 1377 if (pageSize != null) { |
| 1406 _json["pageSize"] = pageSize; | 1378 _json["pageSize"] = pageSize; |
| 1407 } | 1379 } |
| 1408 if (pageToken != null) { | 1380 if (pageToken != null) { |
| 1409 _json["pageToken"] = pageToken; | 1381 _json["pageToken"] = pageToken; |
| 1410 } | 1382 } |
| 1411 if (query != null) { | 1383 if (query != null) { |
| 1412 _json["query"] = query; | 1384 _json["query"] = query; |
| 1413 } | 1385 } |
| 1414 return _json; | 1386 return _json; |
| 1415 } | 1387 } |
| 1416 } | 1388 } |
| 1417 | 1389 |
| 1418 /** The response message for searching folders. */ | 1390 /// The response message for searching folders. |
| 1419 class SearchFoldersResponse { | 1391 class SearchFoldersResponse { |
| 1420 /** | 1392 /// A possibly paginated folder search results. |
| 1421 * A possibly paginated folder search results. | 1393 /// the specified parent resource. |
| 1422 * the specified parent resource. | |
| 1423 */ | |
| 1424 core.List<Folder> folders; | 1394 core.List<Folder> folders; |
| 1425 /** | 1395 |
| 1426 * A pagination token returned from a previous call to `SearchFolders` | 1396 /// A pagination token returned from a previous call to `SearchFolders` |
| 1427 * that indicates from where searching should continue. | 1397 /// that indicates from where searching should continue. |
| 1428 * This field is optional. | 1398 /// This field is optional. |
| 1429 */ | |
| 1430 core.String nextPageToken; | 1399 core.String nextPageToken; |
| 1431 | 1400 |
| 1432 SearchFoldersResponse(); | 1401 SearchFoldersResponse(); |
| 1433 | 1402 |
| 1434 SearchFoldersResponse.fromJson(core.Map _json) { | 1403 SearchFoldersResponse.fromJson(core.Map _json) { |
| 1435 if (_json.containsKey("folders")) { | 1404 if (_json.containsKey("folders")) { |
| 1436 folders = _json["folders"].map((value) => new Folder.fromJson(value)).toLi
st(); | 1405 folders = |
| 1406 _json["folders"].map((value) => new Folder.fromJson(value)).toList(); |
| 1437 } | 1407 } |
| 1438 if (_json.containsKey("nextPageToken")) { | 1408 if (_json.containsKey("nextPageToken")) { |
| 1439 nextPageToken = _json["nextPageToken"]; | 1409 nextPageToken = _json["nextPageToken"]; |
| 1440 } | 1410 } |
| 1441 } | 1411 } |
| 1442 | 1412 |
| 1443 core.Map<core.String, core.Object> toJson() { | 1413 core.Map<core.String, core.Object> toJson() { |
| 1444 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1414 final core.Map<core.String, core.Object> _json = |
| 1415 new core.Map<core.String, core.Object>(); |
| 1445 if (folders != null) { | 1416 if (folders != null) { |
| 1446 _json["folders"] = folders.map((value) => (value).toJson()).toList(); | 1417 _json["folders"] = folders.map((value) => (value).toJson()).toList(); |
| 1447 } | 1418 } |
| 1448 if (nextPageToken != null) { | 1419 if (nextPageToken != null) { |
| 1449 _json["nextPageToken"] = nextPageToken; | 1420 _json["nextPageToken"] = nextPageToken; |
| 1450 } | 1421 } |
| 1451 return _json; | 1422 return _json; |
| 1452 } | 1423 } |
| 1453 } | 1424 } |
| 1454 | 1425 |
| 1455 /** Request message for `SetIamPolicy` method. */ | 1426 /// Request message for `SetIamPolicy` method. |
| 1456 class SetIamPolicyRequest { | 1427 class SetIamPolicyRequest { |
| 1457 /** | 1428 /// REQUIRED: The complete policy to be applied to the `resource`. The size |
| 1458 * REQUIRED: The complete policy to be applied to the `resource`. The size of | 1429 /// of |
| 1459 * the policy is limited to a few 10s of KB. An empty policy is a | 1430 /// the policy is limited to a few 10s of KB. An empty policy is a |
| 1460 * valid policy but certain Cloud Platform services (such as Projects) | 1431 /// valid policy but certain Cloud Platform services (such as Projects) |
| 1461 * might reject them. | 1432 /// might reject them. |
| 1462 */ | |
| 1463 Policy policy; | 1433 Policy policy; |
| 1464 /** | 1434 |
| 1465 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only | 1435 /// OPTIONAL: A FieldMask specifying which fields of the policy to modify. |
| 1466 * the fields in the mask will be modified. If no mask is provided, the | 1436 /// Only |
| 1467 * following default mask is used: | 1437 /// the fields in the mask will be modified. If no mask is provided, the |
| 1468 * paths: "bindings, etag" | 1438 /// following default mask is used: |
| 1469 * This field is only used by Cloud IAM. | 1439 /// paths: "bindings, etag" |
| 1470 */ | 1440 /// This field is only used by Cloud IAM. |
| 1471 core.String updateMask; | 1441 core.String updateMask; |
| 1472 | 1442 |
| 1473 SetIamPolicyRequest(); | 1443 SetIamPolicyRequest(); |
| 1474 | 1444 |
| 1475 SetIamPolicyRequest.fromJson(core.Map _json) { | 1445 SetIamPolicyRequest.fromJson(core.Map _json) { |
| 1476 if (_json.containsKey("policy")) { | 1446 if (_json.containsKey("policy")) { |
| 1477 policy = new Policy.fromJson(_json["policy"]); | 1447 policy = new Policy.fromJson(_json["policy"]); |
| 1478 } | 1448 } |
| 1479 if (_json.containsKey("updateMask")) { | 1449 if (_json.containsKey("updateMask")) { |
| 1480 updateMask = _json["updateMask"]; | 1450 updateMask = _json["updateMask"]; |
| 1481 } | 1451 } |
| 1482 } | 1452 } |
| 1483 | 1453 |
| 1484 core.Map<core.String, core.Object> toJson() { | 1454 core.Map<core.String, core.Object> toJson() { |
| 1485 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1455 final core.Map<core.String, core.Object> _json = |
| 1456 new core.Map<core.String, core.Object>(); |
| 1486 if (policy != null) { | 1457 if (policy != null) { |
| 1487 _json["policy"] = (policy).toJson(); | 1458 _json["policy"] = (policy).toJson(); |
| 1488 } | 1459 } |
| 1489 if (updateMask != null) { | 1460 if (updateMask != null) { |
| 1490 _json["updateMask"] = updateMask; | 1461 _json["updateMask"] = updateMask; |
| 1491 } | 1462 } |
| 1492 return _json; | 1463 return _json; |
| 1493 } | 1464 } |
| 1494 } | 1465 } |
| 1495 | 1466 |
| 1496 /** | 1467 /// The `Status` type defines a logical error model that is suitable for |
| 1497 * The `Status` type defines a logical error model that is suitable for | 1468 /// different |
| 1498 * different | 1469 /// programming environments, including REST APIs and RPC APIs. It is used by |
| 1499 * programming environments, including REST APIs and RPC APIs. It is used by | 1470 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
| 1500 * [gRPC](https://github.com/grpc). The error model is designed to be: | 1471 /// |
| 1501 * | 1472 /// - Simple to use and understand for most users |
| 1502 * - Simple to use and understand for most users | 1473 /// - Flexible enough to meet unexpected needs |
| 1503 * - Flexible enough to meet unexpected needs | 1474 /// |
| 1504 * | 1475 /// # Overview |
| 1505 * # Overview | 1476 /// |
| 1506 * | 1477 /// The `Status` message contains three pieces of data: error code, error |
| 1507 * The `Status` message contains three pieces of data: error code, error | 1478 /// message, |
| 1508 * message, | 1479 /// and error details. The error code should be an enum value of |
| 1509 * and error details. The error code should be an enum value of | 1480 /// google.rpc.Code, but it may accept additional error codes if needed. The |
| 1510 * google.rpc.Code, but it may accept additional error codes if needed. The | 1481 /// error message should be a developer-facing English message that helps |
| 1511 * error message should be a developer-facing English message that helps | 1482 /// developers *understand* and *resolve* the error. If a localized user-facing |
| 1512 * developers *understand* and *resolve* the error. If a localized user-facing | 1483 /// error message is needed, put the localized message in the error details or |
| 1513 * error message is needed, put the localized message in the error details or | 1484 /// localize it in the client. The optional error details may contain arbitrary |
| 1514 * localize it in the client. The optional error details may contain arbitrary | 1485 /// information about the error. There is a predefined set of error detail |
| 1515 * information about the error. There is a predefined set of error detail types | 1486 /// types |
| 1516 * in the package `google.rpc` that can be used for common error conditions. | 1487 /// in the package `google.rpc` that can be used for common error conditions. |
| 1517 * | 1488 /// |
| 1518 * # Language mapping | 1489 /// # Language mapping |
| 1519 * | 1490 /// |
| 1520 * The `Status` message is the logical representation of the error model, but it | 1491 /// The `Status` message is the logical representation of the error model, but |
| 1521 * is not necessarily the actual wire format. When the `Status` message is | 1492 /// it |
| 1522 * exposed in different client libraries and different wire protocols, it can be | 1493 /// is not necessarily the actual wire format. When the `Status` message is |
| 1523 * mapped differently. For example, it will likely be mapped to some exceptions | 1494 /// exposed in different client libraries and different wire protocols, it can |
| 1524 * in Java, but more likely mapped to some error codes in C. | 1495 /// be |
| 1525 * | 1496 /// mapped differently. For example, it will likely be mapped to some |
| 1526 * # Other uses | 1497 /// exceptions |
| 1527 * | 1498 /// in Java, but more likely mapped to some error codes in C. |
| 1528 * The error model and the `Status` message can be used in a variety of | 1499 /// |
| 1529 * environments, either with or without APIs, to provide a | 1500 /// # Other uses |
| 1530 * consistent developer experience across different environments. | 1501 /// |
| 1531 * | 1502 /// The error model and the `Status` message can be used in a variety of |
| 1532 * Example uses of this error model include: | 1503 /// environments, either with or without APIs, to provide a |
| 1533 * | 1504 /// consistent developer experience across different environments. |
| 1534 * - Partial errors. If a service needs to return partial errors to the client, | 1505 /// |
| 1535 * it may embed the `Status` in the normal response to indicate the partial | 1506 /// Example uses of this error model include: |
| 1536 * errors. | 1507 /// |
| 1537 * | 1508 /// - Partial errors. If a service needs to return partial errors to the |
| 1538 * - Workflow errors. A typical workflow has multiple steps. Each step may | 1509 /// client, |
| 1539 * have a `Status` message for error reporting. | 1510 /// it may embed the `Status` in the normal response to indicate the partial |
| 1540 * | 1511 /// errors. |
| 1541 * - Batch operations. If a client uses batch request and batch response, the | 1512 /// |
| 1542 * `Status` message should be used directly inside batch response, one for | 1513 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
| 1543 * each error sub-response. | 1514 /// have a `Status` message for error reporting. |
| 1544 * | 1515 /// |
| 1545 * - Asynchronous operations. If an API call embeds asynchronous operation | 1516 /// - Batch operations. If a client uses batch request and batch response, the |
| 1546 * results in its response, the status of those operations should be | 1517 /// `Status` message should be used directly inside batch response, one for |
| 1547 * represented directly using the `Status` message. | 1518 /// each error sub-response. |
| 1548 * | 1519 /// |
| 1549 * - Logging. If some API errors are stored in logs, the message `Status` could | 1520 /// - Asynchronous operations. If an API call embeds asynchronous operation |
| 1550 * be used directly after any stripping needed for security/privacy reasons. | 1521 /// results in its response, the status of those operations should be |
| 1551 */ | 1522 /// represented directly using the `Status` message. |
| 1523 /// |
| 1524 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 1525 /// could |
| 1526 /// be used directly after any stripping needed for security/privacy reasons. |
| 1552 class Status { | 1527 class Status { |
| 1553 /** The status code, which should be an enum value of google.rpc.Code. */ | 1528 /// The status code, which should be an enum value of google.rpc.Code. |
| 1554 core.int code; | 1529 core.int code; |
| 1555 /** | 1530 |
| 1556 * A list of messages that carry the error details. There is a common set of | 1531 /// A list of messages that carry the error details. There is a common set |
| 1557 * message types for APIs to use. | 1532 /// of |
| 1558 * | 1533 /// message types for APIs to use. |
| 1559 * The values for Object must be JSON objects. It can consist of `num`, | 1534 /// |
| 1560 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1535 /// The values for Object must be JSON objects. It can consist of `num`, |
| 1561 */ | 1536 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1562 core.List<core.Map<core.String, core.Object>> details; | 1537 core.List<core.Map<core.String, core.Object>> details; |
| 1563 /** | 1538 |
| 1564 * A developer-facing error message, which should be in English. Any | 1539 /// A developer-facing error message, which should be in English. Any |
| 1565 * user-facing error message should be localized and sent in the | 1540 /// user-facing error message should be localized and sent in the |
| 1566 * google.rpc.Status.details field, or localized by the client. | 1541 /// google.rpc.Status.details field, or localized by the client. |
| 1567 */ | |
| 1568 core.String message; | 1542 core.String message; |
| 1569 | 1543 |
| 1570 Status(); | 1544 Status(); |
| 1571 | 1545 |
| 1572 Status.fromJson(core.Map _json) { | 1546 Status.fromJson(core.Map _json) { |
| 1573 if (_json.containsKey("code")) { | 1547 if (_json.containsKey("code")) { |
| 1574 code = _json["code"]; | 1548 code = _json["code"]; |
| 1575 } | 1549 } |
| 1576 if (_json.containsKey("details")) { | 1550 if (_json.containsKey("details")) { |
| 1577 details = _json["details"]; | 1551 details = _json["details"]; |
| 1578 } | 1552 } |
| 1579 if (_json.containsKey("message")) { | 1553 if (_json.containsKey("message")) { |
| 1580 message = _json["message"]; | 1554 message = _json["message"]; |
| 1581 } | 1555 } |
| 1582 } | 1556 } |
| 1583 | 1557 |
| 1584 core.Map<core.String, core.Object> toJson() { | 1558 core.Map<core.String, core.Object> toJson() { |
| 1585 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1559 final core.Map<core.String, core.Object> _json = |
| 1560 new core.Map<core.String, core.Object>(); |
| 1586 if (code != null) { | 1561 if (code != null) { |
| 1587 _json["code"] = code; | 1562 _json["code"] = code; |
| 1588 } | 1563 } |
| 1589 if (details != null) { | 1564 if (details != null) { |
| 1590 _json["details"] = details; | 1565 _json["details"] = details; |
| 1591 } | 1566 } |
| 1592 if (message != null) { | 1567 if (message != null) { |
| 1593 _json["message"] = message; | 1568 _json["message"] = message; |
| 1594 } | 1569 } |
| 1595 return _json; | 1570 return _json; |
| 1596 } | 1571 } |
| 1597 } | 1572 } |
| 1598 | 1573 |
| 1599 /** Request message for `TestIamPermissions` method. */ | 1574 /// Request message for `TestIamPermissions` method. |
| 1600 class TestIamPermissionsRequest { | 1575 class TestIamPermissionsRequest { |
| 1601 /** | 1576 /// The set of permissions to check for the `resource`. Permissions with |
| 1602 * The set of permissions to check for the `resource`. Permissions with | 1577 /// wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1603 * wildcards (such as '*' or 'storage.*') are not allowed. For more | 1578 /// information see |
| 1604 * information see | 1579 /// [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 1605 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). | |
| 1606 */ | |
| 1607 core.List<core.String> permissions; | 1580 core.List<core.String> permissions; |
| 1608 | 1581 |
| 1609 TestIamPermissionsRequest(); | 1582 TestIamPermissionsRequest(); |
| 1610 | 1583 |
| 1611 TestIamPermissionsRequest.fromJson(core.Map _json) { | 1584 TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 1612 if (_json.containsKey("permissions")) { | 1585 if (_json.containsKey("permissions")) { |
| 1613 permissions = _json["permissions"]; | 1586 permissions = _json["permissions"]; |
| 1614 } | 1587 } |
| 1615 } | 1588 } |
| 1616 | 1589 |
| 1617 core.Map<core.String, core.Object> toJson() { | 1590 core.Map<core.String, core.Object> toJson() { |
| 1618 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1591 final core.Map<core.String, core.Object> _json = |
| 1592 new core.Map<core.String, core.Object>(); |
| 1619 if (permissions != null) { | 1593 if (permissions != null) { |
| 1620 _json["permissions"] = permissions; | 1594 _json["permissions"] = permissions; |
| 1621 } | 1595 } |
| 1622 return _json; | 1596 return _json; |
| 1623 } | 1597 } |
| 1624 } | 1598 } |
| 1625 | 1599 |
| 1626 /** Response message for `TestIamPermissions` method. */ | 1600 /// Response message for `TestIamPermissions` method. |
| 1627 class TestIamPermissionsResponse { | 1601 class TestIamPermissionsResponse { |
| 1628 /** | 1602 /// A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1629 * A subset of `TestPermissionsRequest.permissions` that the caller is | 1603 /// allowed. |
| 1630 * allowed. | |
| 1631 */ | |
| 1632 core.List<core.String> permissions; | 1604 core.List<core.String> permissions; |
| 1633 | 1605 |
| 1634 TestIamPermissionsResponse(); | 1606 TestIamPermissionsResponse(); |
| 1635 | 1607 |
| 1636 TestIamPermissionsResponse.fromJson(core.Map _json) { | 1608 TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 1637 if (_json.containsKey("permissions")) { | 1609 if (_json.containsKey("permissions")) { |
| 1638 permissions = _json["permissions"]; | 1610 permissions = _json["permissions"]; |
| 1639 } | 1611 } |
| 1640 } | 1612 } |
| 1641 | 1613 |
| 1642 core.Map<core.String, core.Object> toJson() { | 1614 core.Map<core.String, core.Object> toJson() { |
| 1643 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1615 final core.Map<core.String, core.Object> _json = |
| 1616 new core.Map<core.String, core.Object>(); |
| 1644 if (permissions != null) { | 1617 if (permissions != null) { |
| 1645 _json["permissions"] = permissions; | 1618 _json["permissions"] = permissions; |
| 1646 } | 1619 } |
| 1647 return _json; | 1620 return _json; |
| 1648 } | 1621 } |
| 1649 } | 1622 } |
| 1650 | 1623 |
| 1651 /** The UndeleteFolder request message. */ | 1624 /// The UndeleteFolder request message. |
| 1652 class UndeleteFolderRequest { | 1625 class UndeleteFolderRequest { |
| 1653 | |
| 1654 UndeleteFolderRequest(); | 1626 UndeleteFolderRequest(); |
| 1655 | 1627 |
| 1656 UndeleteFolderRequest.fromJson(core.Map _json) { | 1628 UndeleteFolderRequest.fromJson(core.Map _json) {} |
| 1657 } | |
| 1658 | 1629 |
| 1659 core.Map<core.String, core.Object> toJson() { | 1630 core.Map<core.String, core.Object> toJson() { |
| 1660 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1631 final core.Map<core.String, core.Object> _json = |
| 1632 new core.Map<core.String, core.Object>(); |
| 1661 return _json; | 1633 return _json; |
| 1662 } | 1634 } |
| 1663 } | 1635 } |
| OLD | NEW |