| 1 |
<?php |
| 2 |
/* |
| 3 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 |
* use this file except in compliance with the License. You may obtain a copy of |
| 5 |
* the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software |
| 10 |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 |
* License for the specific language governing permissions and limitations under |
| 13 |
* the License. |
| 14 |
*/ |
| 15 |
|
| 16 |
/** |
| 17 |
* Service definition for Cloudresourcemanager (v1beta1). |
| 18 |
* |
| 19 |
* <p> |
| 20 |
* The Google Cloud Resource Manager API provides methods for creating, reading, |
| 21 |
* and updating project metadata.</p> |
| 22 |
* |
| 23 |
* <p> |
| 24 |
* For more information about this service, see the API |
| 25 |
* <a href="https://cloud.google.com/resource-manager" target="_blank">Documentation</a> |
| 26 |
* </p> |
| 27 |
* |
| 28 |
* @author Google, Inc. |
| 29 |
*/ |
| 30 |
class Google_Service_Cloudresourcemanager extends Google_Service |
| 31 |
{ |
| 32 |
/** View and manage your data across Google Cloud Platform services. */ |
| 33 |
const CLOUD_PLATFORM = |
| 34 |
"https://www.googleapis.com/auth/cloud-platform"; |
| 35 |
/** View your data across Google Cloud Platform services. */ |
| 36 |
const CLOUD_PLATFORM_READ_ONLY = |
| 37 |
"https://www.googleapis.com/auth/cloud-platform.read-only"; |
| 38 |
|
| 39 |
public $organizations; |
| 40 |
public $projects; |
| 41 |
|
| 42 |
|
| 43 |
/** |
| 44 |
* Constructs the internal representation of the Cloudresourcemanager service. |
| 45 |
* |
| 46 |
* @param Google_Client $client |
| 47 |
*/ |
| 48 |
public function __construct(Google_Client $client) |
| 49 |
{ |
| 50 |
parent::__construct($client); |
| 51 |
$this->rootUrl = 'https://cloudresourcemanager.googleapis.com/'; |
| 52 |
$this->servicePath = ''; |
| 53 |
$this->version = 'v1beta1'; |
| 54 |
$this->serviceName = 'cloudresourcemanager'; |
| 55 |
|
| 56 |
$this->organizations = new Google_Service_Cloudresourcemanager_Organizations_Resource( |
| 57 |
$this, |
| 58 |
$this->serviceName, |
| 59 |
'organizations', |
| 60 |
array( |
| 61 |
'methods' => array( |
| 62 |
'get' => array( |
| 63 |
'path' => 'v1beta1/organizations/{organizationId}', |
| 64 |
'httpMethod' => 'GET', |
| 65 |
'parameters' => array( |
| 66 |
'organizationId' => array( |
| 67 |
'location' => 'path', |
| 68 |
'type' => 'string', |
| 69 |
'required' => true, |
| 70 |
), |
| 71 |
), |
| 72 |
),'getIamPolicy' => array( |
| 73 |
'path' => 'v1beta1/organizations/{resource}:getIamPolicy', |
| 74 |
'httpMethod' => 'POST', |
| 75 |
'parameters' => array( |
| 76 |
'resource' => array( |
| 77 |
'location' => 'path', |
| 78 |
'type' => 'string', |
| 79 |
'required' => true, |
| 80 |
), |
| 81 |
), |
| 82 |
),'list' => array( |
| 83 |
'path' => 'v1beta1/organizations', |
| 84 |
'httpMethod' => 'GET', |
| 85 |
'parameters' => array( |
| 86 |
'pageSize' => array( |
| 87 |
'location' => 'query', |
| 88 |
'type' => 'integer', |
| 89 |
), |
| 90 |
'pageToken' => array( |
| 91 |
'location' => 'query', |
| 92 |
'type' => 'string', |
| 93 |
), |
| 94 |
'filter' => array( |
| 95 |
'location' => 'query', |
| 96 |
'type' => 'string', |
| 97 |
), |
| 98 |
), |
| 99 |
),'setIamPolicy' => array( |
| 100 |
'path' => 'v1beta1/organizations/{resource}:setIamPolicy', |
| 101 |
'httpMethod' => 'POST', |
| 102 |
'parameters' => array( |
| 103 |
'resource' => array( |
| 104 |
'location' => 'path', |
| 105 |
'type' => 'string', |
| 106 |
'required' => true, |
| 107 |
), |
| 108 |
), |
| 109 |
),'testIamPermissions' => array( |
| 110 |
'path' => 'v1beta1/organizations/{resource}:testIamPermissions', |
| 111 |
'httpMethod' => 'POST', |
| 112 |
'parameters' => array( |
| 113 |
'resource' => array( |
| 114 |
'location' => 'path', |
| 115 |
'type' => 'string', |
| 116 |
'required' => true, |
| 117 |
), |
| 118 |
), |
| 119 |
),'update' => array( |
| 120 |
'path' => 'v1beta1/organizations/{organizationId}', |
| 121 |
'httpMethod' => 'PUT', |
| 122 |
'parameters' => array( |
| 123 |
'organizationId' => array( |
| 124 |
'location' => 'path', |
| 125 |
'type' => 'string', |
| 126 |
'required' => true, |
| 127 |
), |
| 128 |
), |
| 129 |
), |
| 130 |
) |
| 131 |
) |
| 132 |
); |
| 133 |
$this->projects = new Google_Service_Cloudresourcemanager_Projects_Resource( |
| 134 |
$this, |
| 135 |
$this->serviceName, |
| 136 |
'projects', |
| 137 |
array( |
| 138 |
'methods' => array( |
| 139 |
'create' => array( |
| 140 |
'path' => 'v1beta1/projects', |
| 141 |
'httpMethod' => 'POST', |
| 142 |
'parameters' => array(), |
| 143 |
),'delete' => array( |
| 144 |
'path' => 'v1beta1/projects/{projectId}', |
| 145 |
'httpMethod' => 'DELETE', |
| 146 |
'parameters' => array( |
| 147 |
'projectId' => array( |
| 148 |
'location' => 'path', |
| 149 |
'type' => 'string', |
| 150 |
'required' => true, |
| 151 |
), |
| 152 |
), |
| 153 |
),'get' => array( |
| 154 |
'path' => 'v1beta1/projects/{projectId}', |
| 155 |
'httpMethod' => 'GET', |
| 156 |
'parameters' => array( |
| 157 |
'projectId' => array( |
| 158 |
'location' => 'path', |
| 159 |
'type' => 'string', |
| 160 |
'required' => true, |
| 161 |
), |
| 162 |
), |
| 163 |
),'getIamPolicy' => array( |
| 164 |
'path' => 'v1beta1/projects/{resource}:getIamPolicy', |
| 165 |
'httpMethod' => 'POST', |
| 166 |
'parameters' => array( |
| 167 |
'resource' => array( |
| 168 |
'location' => 'path', |
| 169 |
'type' => 'string', |
| 170 |
'required' => true, |
| 171 |
), |
| 172 |
), |
| 173 |
),'list' => array( |
| 174 |
'path' => 'v1beta1/projects', |
| 175 |
'httpMethod' => 'GET', |
| 176 |
'parameters' => array( |
| 177 |
'pageToken' => array( |
| 178 |
'location' => 'query', |
| 179 |
'type' => 'string', |
| 180 |
), |
| 181 |
'pageSize' => array( |
| 182 |
'location' => 'query', |
| 183 |
'type' => 'integer', |
| 184 |
), |
| 185 |
'filter' => array( |
| 186 |
'location' => 'query', |
| 187 |
'type' => 'string', |
| 188 |
), |
| 189 |
), |
| 190 |
),'setIamPolicy' => array( |
| 191 |
'path' => 'v1beta1/projects/{resource}:setIamPolicy', |
| 192 |
'httpMethod' => 'POST', |
| 193 |
'parameters' => array( |
| 194 |
'resource' => array( |
| 195 |
'location' => 'path', |
| 196 |
'type' => 'string', |
| 197 |
'required' => true, |
| 198 |
), |
| 199 |
), |
| 200 |
),'testIamPermissions' => array( |
| 201 |
'path' => 'v1beta1/projects/{resource}:testIamPermissions', |
| 202 |
'httpMethod' => 'POST', |
| 203 |
'parameters' => array( |
| 204 |
'resource' => array( |
| 205 |
'location' => 'path', |
| 206 |
'type' => 'string', |
| 207 |
'required' => true, |
| 208 |
), |
| 209 |
), |
| 210 |
),'undelete' => array( |
| 211 |
'path' => 'v1beta1/projects/{projectId}:undelete', |
| 212 |
'httpMethod' => 'POST', |
| 213 |
'parameters' => array( |
| 214 |
'projectId' => array( |
| 215 |
'location' => 'path', |
| 216 |
'type' => 'string', |
| 217 |
'required' => true, |
| 218 |
), |
| 219 |
), |
| 220 |
),'update' => array( |
| 221 |
'path' => 'v1beta1/projects/{projectId}', |
| 222 |
'httpMethod' => 'PUT', |
| 223 |
'parameters' => array( |
| 224 |
'projectId' => array( |
| 225 |
'location' => 'path', |
| 226 |
'type' => 'string', |
| 227 |
'required' => true, |
| 228 |
), |
| 229 |
), |
| 230 |
), |
| 231 |
) |
| 232 |
) |
| 233 |
); |
| 234 |
} |
| 235 |
} |
| 236 |
|
| 237 |
|
| 238 |
/** |
| 239 |
* The "organizations" collection of methods. |
| 240 |
* Typical usage is: |
| 241 |
* <code> |
| 242 |
* $cloudresourcemanagerService = new Google_Service_Cloudresourcemanager(...); |
| 243 |
* $organizations = $cloudresourcemanagerService->organizations; |
| 244 |
* </code> |
| 245 |
*/ |
| 246 |
class Google_Service_Cloudresourcemanager_Organizations_Resource extends Google_Service_Resource |
| 247 |
{ |
| 248 |
|
| 249 |
/** |
| 250 |
* Fetches an Organization resource identified by the specified |
| 251 |
* `organization_id`. (organizations.get) |
| 252 |
* |
| 253 |
* @param string $organizationId The id of the Organization resource to fetch. |
| 254 |
* @param array $optParams Optional parameters. |
| 255 |
* @return Google_Service_Cloudresourcemanager_Organization |
| 256 |
*/ |
| 257 |
public function get($organizationId, $optParams = array()) |
| 258 |
{ |
| 259 |
$params = array('organizationId' => $organizationId); |
| 260 |
$params = array_merge($params, $optParams); |
| 261 |
return $this->call('get', array($params), "Google_Service_Cloudresourcemanager_Organization"); |
| 262 |
} |
| 263 |
|
| 264 |
/** |
| 265 |
* Gets the access control policy for an Organization resource. May be empty if |
| 266 |
* no such policy or resource exists. (organizations.getIamPolicy) |
| 267 |
* |
| 268 |
* @param string $resource REQUIRED: The resource for which the policy is being |
| 269 |
* requested. `resource` is usually specified as a path, such as |
| 270 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 271 |
* this value is resource specific and is specified in the `getIamPolicy` |
| 272 |
* documentation. |
| 273 |
* @param Google_GetIamPolicyRequest $postBody |
| 274 |
* @param array $optParams Optional parameters. |
| 275 |
* @return Google_Service_Cloudresourcemanager_Policy |
| 276 |
*/ |
| 277 |
public function getIamPolicy($resource, Google_Service_Cloudresourcemanager_GetIamPolicyRequest $postBody, $optParams = array()) |
| 278 |
{ |
| 279 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 280 |
$params = array_merge($params, $optParams); |
| 281 |
return $this->call('getIamPolicy', array($params), "Google_Service_Cloudresourcemanager_Policy"); |
| 282 |
} |
| 283 |
|
| 284 |
/** |
| 285 |
* Lists Organization resources that are visible to the user and satisfy the |
| 286 |
* specified filter. This method returns Organizations in an unspecified order. |
| 287 |
* New Organizations do not necessarily appear at the end of the list. |
| 288 |
* (organizations.listOrganizations) |
| 289 |
* |
| 290 |
* @param array $optParams Optional parameters. |
| 291 |
* |
| 292 |
* @opt_param int pageSize The maximum number of Organizations to return in the |
| 293 |
* response. This field is optional. |
| 294 |
* @opt_param string pageToken A pagination token returned from a previous call |
| 295 |
* to `ListOrganizations` that indicates from where listing should continue. |
| 296 |
* This field is optional. |
| 297 |
* @opt_param string filter An optional query string used to filter the |
| 298 |
* Organizations to return in the response. Filter rules are case-insensitive. |
| 299 |
* Organizations may be filtered by `owner.directoryCustomerId` or by `domain`, |
| 300 |
* where the domain is a Google for Work domain, for example: |
| 301 |
* |Filter|Description| |------|-----------| |
| 302 |
* |owner.directorycustomerid:123456789|Organizations with |
| 303 |
* `owner.directory_customer_id` equal to `123456789`.| |
| 304 |
* |domain:google.com|Organizations corresponding to the domain `google.com`.| |
| 305 |
* This field is optional. |
| 306 |
* @return Google_Service_Cloudresourcemanager_ListOrganizationsResponse |
| 307 |
*/ |
| 308 |
public function listOrganizations($optParams = array()) |
| 309 |
{ |
| 310 |
$params = array(); |
| 311 |
$params = array_merge($params, $optParams); |
| 312 |
return $this->call('list', array($params), "Google_Service_Cloudresourcemanager_ListOrganizationsResponse"); |
| 313 |
} |
| 314 |
|
| 315 |
/** |
| 316 |
* Sets the access control policy on an Organization resource. Replaces any |
| 317 |
* existing policy. (organizations.setIamPolicy) |
| 318 |
* |
| 319 |
* @param string $resource REQUIRED: The resource for which the policy is being |
| 320 |
* specified. `resource` is usually specified as a path, such as |
| 321 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 322 |
* this value is resource specific and is specified in the `setIamPolicy` |
| 323 |
* documentation. |
| 324 |
* @param Google_SetIamPolicyRequest $postBody |
| 325 |
* @param array $optParams Optional parameters. |
| 326 |
* @return Google_Service_Cloudresourcemanager_Policy |
| 327 |
*/ |
| 328 |
public function setIamPolicy($resource, Google_Service_Cloudresourcemanager_SetIamPolicyRequest $postBody, $optParams = array()) |
| 329 |
{ |
| 330 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 331 |
$params = array_merge($params, $optParams); |
| 332 |
return $this->call('setIamPolicy', array($params), "Google_Service_Cloudresourcemanager_Policy"); |
| 333 |
} |
| 334 |
|
| 335 |
/** |
| 336 |
* Returns permissions that a caller has on the specified Organization. |
| 337 |
* (organizations.testIamPermissions) |
| 338 |
* |
| 339 |
* @param string $resource REQUIRED: The resource for which the policy detail is |
| 340 |
* being requested. `resource` is usually specified as a path, such as |
| 341 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 342 |
* this value is resource specific and is specified in the `testIamPermissions` |
| 343 |
* documentation. |
| 344 |
* @param Google_TestIamPermissionsRequest $postBody |
| 345 |
* @param array $optParams Optional parameters. |
| 346 |
* @return Google_Service_Cloudresourcemanager_TestIamPermissionsResponse |
| 347 |
*/ |
| 348 |
public function testIamPermissions($resource, Google_Service_Cloudresourcemanager_TestIamPermissionsRequest $postBody, $optParams = array()) |
| 349 |
{ |
| 350 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 351 |
$params = array_merge($params, $optParams); |
| 352 |
return $this->call('testIamPermissions', array($params), "Google_Service_Cloudresourcemanager_TestIamPermissionsResponse"); |
| 353 |
} |
| 354 |
|
| 355 |
/** |
| 356 |
* Updates an Organization resource identified by the specified |
| 357 |
* `organization_id`. (organizations.update) |
| 358 |
* |
| 359 |
* @param string $organizationId An immutable id for the Organization that is |
| 360 |
* assigned on creation. This should be omitted when creating a new |
| 361 |
* Organization. This field is read-only. |
| 362 |
* @param Google_Organization $postBody |
| 363 |
* @param array $optParams Optional parameters. |
| 364 |
* @return Google_Service_Cloudresourcemanager_Organization |
| 365 |
*/ |
| 366 |
public function update($organizationId, Google_Service_Cloudresourcemanager_Organization $postBody, $optParams = array()) |
| 367 |
{ |
| 368 |
$params = array('organizationId' => $organizationId, 'postBody' => $postBody); |
| 369 |
$params = array_merge($params, $optParams); |
| 370 |
return $this->call('update', array($params), "Google_Service_Cloudresourcemanager_Organization"); |
| 371 |
} |
| 372 |
} |
| 373 |
|
| 374 |
/** |
| 375 |
* The "projects" collection of methods. |
| 376 |
* Typical usage is: |
| 377 |
* <code> |
| 378 |
* $cloudresourcemanagerService = new Google_Service_Cloudresourcemanager(...); |
| 379 |
* $projects = $cloudresourcemanagerService->projects; |
| 380 |
* </code> |
| 381 |
*/ |
| 382 |
class Google_Service_Cloudresourcemanager_Projects_Resource extends Google_Service_Resource |
| 383 |
{ |
| 384 |
|
| 385 |
/** |
| 386 |
* Creates a Project resource. Initially, the Project resource is owned by its |
| 387 |
* creator exclusively. The creator can later grant permission to others to read |
| 388 |
* or update the Project. Several APIs are activated automatically for the |
| 389 |
* Project, including Google Cloud Storage. (projects.create) |
| 390 |
* |
| 391 |
* @param Google_Project $postBody |
| 392 |
* @param array $optParams Optional parameters. |
| 393 |
* @return Google_Service_Cloudresourcemanager_Project |
| 394 |
*/ |
| 395 |
public function create(Google_Service_Cloudresourcemanager_Project $postBody, $optParams = array()) |
| 396 |
{ |
| 397 |
$params = array('postBody' => $postBody); |
| 398 |
$params = array_merge($params, $optParams); |
| 399 |
return $this->call('create', array($params), "Google_Service_Cloudresourcemanager_Project"); |
| 400 |
} |
| 401 |
|
| 402 |
/** |
| 403 |
* Marks the Project identified by the specified `project_id` (for example, `my- |
| 404 |
* project-123`) for deletion. This method will only affect the Project if the |
| 405 |
* following criteria are met: + The Project does not have a billing account |
| 406 |
* associated with it. + The Project has a lifecycle state of ACTIVE. This |
| 407 |
* method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. |
| 408 |
* The deletion starts at an unspecified time, at which point the lifecycle |
| 409 |
* state changes to DELETE_IN_PROGRESS. Until the deletion completes, you can |
| 410 |
* check the lifecycle state checked by retrieving the Project with GetProject, |
| 411 |
* and the Project remains visible to ListProjects. However, you cannot update |
| 412 |
* the project. After the deletion completes, the Project is not retrievable by |
| 413 |
* the GetProject and ListProjects methods. The caller must have modify |
| 414 |
* permissions for this Project. (projects.delete) |
| 415 |
* |
| 416 |
* @param string $projectId The Project ID (for example, `foo-bar-123`). |
| 417 |
* Required. |
| 418 |
* @param array $optParams Optional parameters. |
| 419 |
* @return Google_Service_Cloudresourcemanager_Empty |
| 420 |
*/ |
| 421 |
public function delete($projectId, $optParams = array()) |
| 422 |
{ |
| 423 |
$params = array('projectId' => $projectId); |
| 424 |
$params = array_merge($params, $optParams); |
| 425 |
return $this->call('delete', array($params), "Google_Service_Cloudresourcemanager_Empty"); |
| 426 |
} |
| 427 |
|
| 428 |
/** |
| 429 |
* Retrieves the Project identified by the specified `project_id` (for example, |
| 430 |
* `my-project-123`). The caller must have read permissions for this Project. |
| 431 |
* (projects.get) |
| 432 |
* |
| 433 |
* @param string $projectId The Project ID (for example, `my-project-123`). |
| 434 |
* Required. |
| 435 |
* @param array $optParams Optional parameters. |
| 436 |
* @return Google_Service_Cloudresourcemanager_Project |
| 437 |
*/ |
| 438 |
public function get($projectId, $optParams = array()) |
| 439 |
{ |
| 440 |
$params = array('projectId' => $projectId); |
| 441 |
$params = array_merge($params, $optParams); |
| 442 |
return $this->call('get', array($params), "Google_Service_Cloudresourcemanager_Project"); |
| 443 |
} |
| 444 |
|
| 445 |
/** |
| 446 |
* Returns the IAM access control policy for the specified Project. Permission |
| 447 |
* is denied if the policy or the resource does not exist. |
| 448 |
* (projects.getIamPolicy) |
| 449 |
* |
| 450 |
* @param string $resource REQUIRED: The resource for which the policy is being |
| 451 |
* requested. `resource` is usually specified as a path, such as |
| 452 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 453 |
* this value is resource specific and is specified in the `getIamPolicy` |
| 454 |
* documentation. |
| 455 |
* @param Google_GetIamPolicyRequest $postBody |
| 456 |
* @param array $optParams Optional parameters. |
| 457 |
* @return Google_Service_Cloudresourcemanager_Policy |
| 458 |
*/ |
| 459 |
public function getIamPolicy($resource, Google_Service_Cloudresourcemanager_GetIamPolicyRequest $postBody, $optParams = array()) |
| 460 |
{ |
| 461 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 462 |
$params = array_merge($params, $optParams); |
| 463 |
return $this->call('getIamPolicy', array($params), "Google_Service_Cloudresourcemanager_Policy"); |
| 464 |
} |
| 465 |
|
| 466 |
/** |
| 467 |
* Lists Projects that are visible to the user and satisfy the specified filter. |
| 468 |
* This method returns Projects in an unspecified order. New Projects do not |
| 469 |
* necessarily appear at the end of the list. (projects.listProjects) |
| 470 |
* |
| 471 |
* @param array $optParams Optional parameters. |
| 472 |
* |
| 473 |
* @opt_param string pageToken A pagination token returned from a previous call |
| 474 |
* to ListProjects that indicates from where listing should continue. Optional. |
| 475 |
* @opt_param int pageSize The maximum number of Projects to return in the |
| 476 |
* response. The server can return fewer Projects than requested. If |
| 477 |
* unspecified, server picks an appropriate default. Optional. |
| 478 |
* @opt_param string filter An expression for filtering the results of the |
| 479 |
* request. Filter rules are case insensitive. The fields eligible for filtering |
| 480 |
* are: + `name` + `id` + labels.key where *key* is the name of a label Some |
| 481 |
* examples of using labels as filters: |Filter|Description| |
| 482 |
* |------|-----------| |name:*|The project has a name.| |name:Howl|The |
| 483 |
* project's name is `Howl` or `howl`.| |name:HOWL|Equivalent to above.| |
| 484 |
* |NAME:howl|Equivalent to above.| |labels.color:*|The project has the label |
| 485 |
* `color`.| |labels.color:red|The project's label `color` has the value `red`.| |
| 486 |
* |labels.color:red label.size:big|The project's label `color` has the value |
| 487 |
* `red` and its label `size` has the value `big`. Optional. |
| 488 |
* @return Google_Service_Cloudresourcemanager_ListProjectsResponse |
| 489 |
*/ |
| 490 |
public function listProjects($optParams = array()) |
| 491 |
{ |
| 492 |
$params = array(); |
| 493 |
$params = array_merge($params, $optParams); |
| 494 |
return $this->call('list', array($params), "Google_Service_Cloudresourcemanager_ListProjectsResponse"); |
| 495 |
} |
| 496 |
|
| 497 |
/** |
| 498 |
* Sets the IAM access control policy for the specified Project. Replaces any |
| 499 |
* existing policy. The following constraints apply when using `setIamPolicy()`: |
| 500 |
* + Project currently supports only `user:{emailid}` and |
| 501 |
* `serviceAccount:{emailid}` members in a `Binding` of a `Policy`. + To be |
| 502 |
* added as an `owner`, a user must be invited via Cloud Platform console and |
| 503 |
* must accept the invitation. + Members cannot be added to more than one role |
| 504 |
* in the same policy. + There must be at least one owner who has accepted the |
| 505 |
* Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to |
| 506 |
* to remove the last ToS-accepted owner from the policy will fail. + Calling |
| 507 |
* this method requires enabling the App Engine Admin API. Note: Removing |
| 508 |
* service accounts from policies or changing their roles can render services |
| 509 |
* completely inoperable. It is important to understand how the service account |
| 510 |
* is being used before removing or updating its roles. (projects.setIamPolicy) |
| 511 |
* |
| 512 |
* @param string $resource REQUIRED: The resource for which the policy is being |
| 513 |
* specified. `resource` is usually specified as a path, such as |
| 514 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 515 |
* this value is resource specific and is specified in the `setIamPolicy` |
| 516 |
* documentation. |
| 517 |
* @param Google_SetIamPolicyRequest $postBody |
| 518 |
* @param array $optParams Optional parameters. |
| 519 |
* @return Google_Service_Cloudresourcemanager_Policy |
| 520 |
*/ |
| 521 |
public function setIamPolicy($resource, Google_Service_Cloudresourcemanager_SetIamPolicyRequest $postBody, $optParams = array()) |
| 522 |
{ |
| 523 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 524 |
$params = array_merge($params, $optParams); |
| 525 |
return $this->call('setIamPolicy', array($params), "Google_Service_Cloudresourcemanager_Policy"); |
| 526 |
} |
| 527 |
|
| 528 |
/** |
| 529 |
* Returns permissions that a caller has on the specified Project. |
| 530 |
* (projects.testIamPermissions) |
| 531 |
* |
| 532 |
* @param string $resource REQUIRED: The resource for which the policy detail is |
| 533 |
* being requested. `resource` is usually specified as a path, such as |
| 534 |
* `projectsprojectzoneszonedisksdisk*`. The format for the path specified in |
| 535 |
* this value is resource specific and is specified in the `testIamPermissions` |
| 536 |
* documentation. |
| 537 |
* @param Google_TestIamPermissionsRequest $postBody |
| 538 |
* @param array $optParams Optional parameters. |
| 539 |
* @return Google_Service_Cloudresourcemanager_TestIamPermissionsResponse |
| 540 |
*/ |
| 541 |
public function testIamPermissions($resource, Google_Service_Cloudresourcemanager_TestIamPermissionsRequest $postBody, $optParams = array()) |
| 542 |
{ |
| 543 |
$params = array('resource' => $resource, 'postBody' => $postBody); |
| 544 |
$params = array_merge($params, $optParams); |
| 545 |
return $this->call('testIamPermissions', array($params), "Google_Service_Cloudresourcemanager_TestIamPermissionsResponse"); |
| 546 |
} |
| 547 |
|
| 548 |
/** |
| 549 |
* Restores the Project identified by the specified `project_id` (for example, |
| 550 |
* `my-project-123`). You can only use this method for a Project that has a |
| 551 |
* lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a |
| 552 |
* lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The |
| 553 |
* caller must have modify permissions for this Project. (projects.undelete) |
| 554 |
* |
| 555 |
* @param string $projectId The project ID (for example, `foo-bar-123`). |
| 556 |
* Required. |
| 557 |
* @param array $optParams Optional parameters. |
| 558 |
* @return Google_Service_Cloudresourcemanager_Empty |
| 559 |
*/ |
| 560 |
public function undelete($projectId, $optParams = array()) |
| 561 |
{ |
| 562 |
$params = array('projectId' => $projectId); |
| 563 |
$params = array_merge($params, $optParams); |
| 564 |
return $this->call('undelete', array($params), "Google_Service_Cloudresourcemanager_Empty"); |
| 565 |
} |
| 566 |
|
| 567 |
/** |
| 568 |
* Updates the attributes of the Project identified by the specified |
| 569 |
* `project_id` (for example, `my-project-123`). The caller must have modify |
| 570 |
* permissions for this Project. (projects.update) |
| 571 |
* |
| 572 |
* @param string $projectId The project ID (for example, `my-project-123`). |
| 573 |
* Required. |
| 574 |
* @param Google_Project $postBody |
| 575 |
* @param array $optParams Optional parameters. |
| 576 |
* @return Google_Service_Cloudresourcemanager_Project |
| 577 |
*/ |
| 578 |
public function update($projectId, Google_Service_Cloudresourcemanager_Project $postBody, $optParams = array()) |
| 579 |
{ |
| 580 |
$params = array('projectId' => $projectId, 'postBody' => $postBody); |
| 581 |
$params = array_merge($params, $optParams); |
| 582 |
return $this->call('update', array($params), "Google_Service_Cloudresourcemanager_Project"); |
| 583 |
} |
| 584 |
} |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
class Google_Service_Cloudresourcemanager_Binding extends Google_Collection |
| 590 |
{ |
| 591 |
protected $collection_key = 'members'; |
| 592 |
protected $internal_gapi_mappings = array( |
| 593 |
); |
| 594 |
public $members; |
| 595 |
public $role; |
| 596 |
|
| 597 |
|
| 598 |
public function setMembers($members) |
| 599 |
{ |
| 600 |
$this->members = $members; |
| 601 |
} |
| 602 |
public function getMembers() |
| 603 |
{ |
| 604 |
return $this->members; |
| 605 |
} |
| 606 |
public function setRole($role) |
| 607 |
{ |
| 608 |
$this->role = $role; |
| 609 |
} |
| 610 |
public function getRole() |
| 611 |
{ |
| 612 |
return $this->role; |
| 613 |
} |
| 614 |
} |
| 615 |
|
| 616 |
class Google_Service_Cloudresourcemanager_Empty extends Google_Model |
| 617 |
{ |
| 618 |
} |
| 619 |
|
| 620 |
class Google_Service_Cloudresourcemanager_GetIamPolicyRequest extends Google_Model |
| 621 |
{ |
| 622 |
} |
| 623 |
|
| 624 |
class Google_Service_Cloudresourcemanager_ListOrganizationsResponse extends Google_Collection |
| 625 |
{ |
| 626 |
protected $collection_key = 'organizations'; |
| 627 |
protected $internal_gapi_mappings = array( |
| 628 |
); |
| 629 |
public $nextPageToken; |
| 630 |
protected $organizationsType = 'Google_Service_Cloudresourcemanager_Organization'; |
| 631 |
protected $organizationsDataType = 'array'; |
| 632 |
|
| 633 |
|
| 634 |
public function setNextPageToken($nextPageToken) |
| 635 |
{ |
| 636 |
$this->nextPageToken = $nextPageToken; |
| 637 |
} |
| 638 |
public function getNextPageToken() |
| 639 |
{ |
| 640 |
return $this->nextPageToken; |
| 641 |
} |
| 642 |
public function setOrganizations($organizations) |
| 643 |
{ |
| 644 |
$this->organizations = $organizations; |
| 645 |
} |
| 646 |
public function getOrganizations() |
| 647 |
{ |
| 648 |
return $this->organizations; |
| 649 |
} |
| 650 |
} |
| 651 |
|
| 652 |
class Google_Service_Cloudresourcemanager_ListProjectsResponse extends Google_Collection |
| 653 |
{ |
| 654 |
protected $collection_key = 'projects'; |
| 655 |
protected $internal_gapi_mappings = array( |
| 656 |
); |
| 657 |
public $nextPageToken; |
| 658 |
protected $projectsType = 'Google_Service_Cloudresourcemanager_Project'; |
| 659 |
protected $projectsDataType = 'array'; |
| 660 |
|
| 661 |
|
| 662 |
public function setNextPageToken($nextPageToken) |
| 663 |
{ |
| 664 |
$this->nextPageToken = $nextPageToken; |
| 665 |
} |
| 666 |
public function getNextPageToken() |
| 667 |
{ |
| 668 |
return $this->nextPageToken; |
| 669 |
} |
| 670 |
public function setProjects($projects) |
| 671 |
{ |
| 672 |
$this->projects = $projects; |
| 673 |
} |
| 674 |
public function getProjects() |
| 675 |
{ |
| 676 |
return $this->projects; |
| 677 |
} |
| 678 |
} |
| 679 |
|
| 680 |
class Google_Service_Cloudresourcemanager_Organization extends Google_Model |
| 681 |
{ |
| 682 |
protected $internal_gapi_mappings = array( |
| 683 |
); |
| 684 |
public $creationTime; |
| 685 |
public $displayName; |
| 686 |
public $organizationId; |
| 687 |
protected $ownerType = 'Google_Service_Cloudresourcemanager_OrganizationOwner'; |
| 688 |
protected $ownerDataType = ''; |
| 689 |
|
| 690 |
|
| 691 |
public function setCreationTime($creationTime) |
| 692 |
{ |
| 693 |
$this->creationTime = $creationTime; |
| 694 |
} |
| 695 |
public function getCreationTime() |
| 696 |
{ |
| 697 |
return $this->creationTime; |
| 698 |
} |
| 699 |
public function setDisplayName($displayName) |
| 700 |
{ |
| 701 |
$this->displayName = $displayName; |
| 702 |
} |
| 703 |
public function getDisplayName() |
| 704 |
{ |
| 705 |
return $this->displayName; |
| 706 |
} |
| 707 |
public function setOrganizationId($organizationId) |
| 708 |
{ |
| 709 |
$this->organizationId = $organizationId; |
| 710 |
} |
| 711 |
public function getOrganizationId() |
| 712 |
{ |
| 713 |
return $this->organizationId; |
| 714 |
} |
| 715 |
public function setOwner(Google_Service_Cloudresourcemanager_OrganizationOwner $owner) |
| 716 |
{ |
| 717 |
$this->owner = $owner; |
| 718 |
} |
| 719 |
public function getOwner() |
| 720 |
{ |
| 721 |
return $this->owner; |
| 722 |
} |
| 723 |
} |
| 724 |
|
| 725 |
class Google_Service_Cloudresourcemanager_OrganizationOwner extends Google_Model |
| 726 |
{ |
| 727 |
protected $internal_gapi_mappings = array( |
| 728 |
); |
| 729 |
public $directoryCustomerId; |
| 730 |
|
| 731 |
|
| 732 |
public function setDirectoryCustomerId($directoryCustomerId) |
| 733 |
{ |
| 734 |
$this->directoryCustomerId = $directoryCustomerId; |
| 735 |
} |
| 736 |
public function getDirectoryCustomerId() |
| 737 |
{ |
| 738 |
return $this->directoryCustomerId; |
| 739 |
} |
| 740 |
} |
| 741 |
|
| 742 |
class Google_Service_Cloudresourcemanager_Policy extends Google_Collection |
| 743 |
{ |
| 744 |
protected $collection_key = 'bindings'; |
| 745 |
protected $internal_gapi_mappings = array( |
| 746 |
); |
| 747 |
protected $bindingsType = 'Google_Service_Cloudresourcemanager_Binding'; |
| 748 |
protected $bindingsDataType = 'array'; |
| 749 |
public $etag; |
| 750 |
public $version; |
| 751 |
|
| 752 |
|
| 753 |
public function setBindings($bindings) |
| 754 |
{ |
| 755 |
$this->bindings = $bindings; |
| 756 |
} |
| 757 |
public function getBindings() |
| 758 |
{ |
| 759 |
return $this->bindings; |
| 760 |
} |
| 761 |
public function setEtag($etag) |
| 762 |
{ |
| 763 |
$this->etag = $etag; |
| 764 |
} |
| 765 |
public function getEtag() |
| 766 |
{ |
| 767 |
return $this->etag; |
| 768 |
} |
| 769 |
public function setVersion($version) |
| 770 |
{ |
| 771 |
$this->version = $version; |
| 772 |
} |
| 773 |
public function getVersion() |
| 774 |
{ |
| 775 |
return $this->version; |
| 776 |
} |
| 777 |
} |
| 778 |
|
| 779 |
class Google_Service_Cloudresourcemanager_Project extends Google_Model |
| 780 |
{ |
| 781 |
protected $internal_gapi_mappings = array( |
| 782 |
); |
| 783 |
public $createTime; |
| 784 |
public $labels; |
| 785 |
public $lifecycleState; |
| 786 |
public $name; |
| 787 |
protected $parentType = 'Google_Service_Cloudresourcemanager_ResourceId'; |
| 788 |
protected $parentDataType = ''; |
| 789 |
public $projectId; |
| 790 |
public $projectNumber; |
| 791 |
|
| 792 |
|
| 793 |
public function setCreateTime($createTime) |
| 794 |
{ |
| 795 |
$this->createTime = $createTime; |
| 796 |
} |
| 797 |
public function getCreateTime() |
| 798 |
{ |
| 799 |
return $this->createTime; |
| 800 |
} |
| 801 |
public function setLabels($labels) |
| 802 |
{ |
| 803 |
$this->labels = $labels; |
| 804 |
} |
| 805 |
public function getLabels() |
| 806 |
{ |
| 807 |
return $this->labels; |
| 808 |
} |
| 809 |
public function setLifecycleState($lifecycleState) |
| 810 |
{ |
| 811 |
$this->lifecycleState = $lifecycleState; |
| 812 |
} |
| 813 |
public function getLifecycleState() |
| 814 |
{ |
| 815 |
return $this->lifecycleState; |
| 816 |
} |
| 817 |
public function setName($name) |
| 818 |
{ |
| 819 |
$this->name = $name; |
| 820 |
} |
| 821 |
public function getName() |
| 822 |
{ |
| 823 |
return $this->name; |
| 824 |
} |
| 825 |
public function setParent(Google_Service_Cloudresourcemanager_ResourceId $parent) |
| 826 |
{ |
| 827 |
$this->parent = $parent; |
| 828 |
} |
| 829 |
public function getParent() |
| 830 |
{ |
| 831 |
return $this->parent; |
| 832 |
} |
| 833 |
public function setProjectId($projectId) |
| 834 |
{ |
| 835 |
$this->projectId = $projectId; |
| 836 |
} |
| 837 |
public function getProjectId() |
| 838 |
{ |
| 839 |
return $this->projectId; |
| 840 |
} |
| 841 |
public function setProjectNumber($projectNumber) |
| 842 |
{ |
| 843 |
$this->projectNumber = $projectNumber; |
| 844 |
} |
| 845 |
public function getProjectNumber() |
| 846 |
{ |
| 847 |
return $this->projectNumber; |
| 848 |
} |
| 849 |
} |
| 850 |
|
| 851 |
class Google_Service_Cloudresourcemanager_ResourceId extends Google_Model |
| 852 |
{ |
| 853 |
protected $internal_gapi_mappings = array( |
| 854 |
); |
| 855 |
public $id; |
| 856 |
public $type; |
| 857 |
|
| 858 |
|
| 859 |
public function setId($id) |
| 860 |
{ |
| 861 |
$this->id = $id; |
| 862 |
} |
| 863 |
public function getId() |
| 864 |
{ |
| 865 |
return $this->id; |
| 866 |
} |
| 867 |
public function setType($type) |
| 868 |
{ |
| 869 |
$this->type = $type; |
| 870 |
} |
| 871 |
public function getType() |
| 872 |
{ |
| 873 |
return $this->type; |
| 874 |
} |
| 875 |
} |
| 876 |
|
| 877 |
class Google_Service_Cloudresourcemanager_SetIamPolicyRequest extends Google_Model |
| 878 |
{ |
| 879 |
protected $internal_gapi_mappings = array( |
| 880 |
); |
| 881 |
protected $policyType = 'Google_Service_Cloudresourcemanager_Policy'; |
| 882 |
protected $policyDataType = ''; |
| 883 |
|
| 884 |
|
| 885 |
public function setPolicy(Google_Service_Cloudresourcemanager_Policy $policy) |
| 886 |
{ |
| 887 |
$this->policy = $policy; |
| 888 |
} |
| 889 |
public function getPolicy() |
| 890 |
{ |
| 891 |
return $this->policy; |
| 892 |
} |
| 893 |
} |
| 894 |
|
| 895 |
class Google_Service_Cloudresourcemanager_TestIamPermissionsRequest extends Google_Collection |
| 896 |
{ |
| 897 |
protected $collection_key = 'permissions'; |
| 898 |
protected $internal_gapi_mappings = array( |
| 899 |
); |
| 900 |
public $permissions; |
| 901 |
|
| 902 |
|
| 903 |
public function setPermissions($permissions) |
| 904 |
{ |
| 905 |
$this->permissions = $permissions; |
| 906 |
} |
| 907 |
public function getPermissions() |
| 908 |
{ |
| 909 |
return $this->permissions; |
| 910 |
} |
| 911 |
} |
| 912 |
|
| 913 |
class Google_Service_Cloudresourcemanager_TestIamPermissionsResponse extends Google_Collection |
| 914 |
{ |
| 915 |
protected $collection_key = 'permissions'; |
| 916 |
protected $internal_gapi_mappings = array( |
| 917 |
); |
| 918 |
public $permissions; |
| 919 |
|
| 920 |
|
| 921 |
public function setPermissions($permissions) |
| 922 |
{ |
| 923 |
$this->permissions = $permissions; |
| 924 |
} |
| 925 |
public function getPermissions() |
| 926 |
{ |
| 927 |
return $this->permissions; |
| 928 |
} |
| 929 |
} |
| 930 |
|