[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\AccessApproval\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AccessApproval\AccessApprovalServiceAccount;
|
---|
| 21 | use Google\Service\AccessApproval\AccessApprovalSettings;
|
---|
| 22 | use Google\Service\AccessApproval\AccessapprovalEmpty;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "projects" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $accessapprovalService = new Google\Service\AccessApproval(...);
|
---|
| 29 | * $projects = $accessapprovalService->projects;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class Projects extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Deletes the settings associated with a project, folder, or organization. This
|
---|
| 36 | * will have the effect of disabling Access Approval for the project, folder, or
|
---|
| 37 | * organization, but only if all ancestors also have Access Approval disabled.
|
---|
| 38 | * If Access Approval is enabled at a higher level of the hierarchy, then Access
|
---|
| 39 | * Approval will still be enabled at this level as the settings are inherited.
|
---|
| 40 | * (projects.deleteAccessApprovalSettings)
|
---|
| 41 | *
|
---|
| 42 | * @param string $name Name of the AccessApprovalSettings to delete.
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return AccessapprovalEmpty
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function deleteAccessApprovalSettings($name, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('deleteAccessApprovalSettings', [$params], AccessapprovalEmpty::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Gets the settings associated with a project, folder, or organization.
|
---|
| 55 | * (projects.getAccessApprovalSettings)
|
---|
| 56 | *
|
---|
| 57 | * @param string $name The name of the AccessApprovalSettings to retrieve.
|
---|
| 58 | * Format: "{projects|folders|organizations}/{id}/accessApprovalSettings"
|
---|
| 59 | * @param array $optParams Optional parameters.
|
---|
| 60 | * @return AccessApprovalSettings
|
---|
| 61 | * @throws \Google\Service\Exception
|
---|
| 62 | */
|
---|
| 63 | public function getAccessApprovalSettings($name, $optParams = [])
|
---|
| 64 | {
|
---|
| 65 | $params = ['name' => $name];
|
---|
| 66 | $params = array_merge($params, $optParams);
|
---|
| 67 | return $this->call('getAccessApprovalSettings', [$params], AccessApprovalSettings::class);
|
---|
| 68 | }
|
---|
| 69 | /**
|
---|
| 70 | * Retrieves the service account that is used by Access Approval to access KMS
|
---|
| 71 | * keys for signing approved approval requests. (projects.getServiceAccount)
|
---|
| 72 | *
|
---|
| 73 | * @param string $name Name of the AccessApprovalServiceAccount to retrieve.
|
---|
| 74 | * @param array $optParams Optional parameters.
|
---|
| 75 | * @return AccessApprovalServiceAccount
|
---|
| 76 | * @throws \Google\Service\Exception
|
---|
| 77 | */
|
---|
| 78 | public function getServiceAccount($name, $optParams = [])
|
---|
| 79 | {
|
---|
| 80 | $params = ['name' => $name];
|
---|
| 81 | $params = array_merge($params, $optParams);
|
---|
| 82 | return $this->call('getServiceAccount', [$params], AccessApprovalServiceAccount::class);
|
---|
| 83 | }
|
---|
| 84 | /**
|
---|
| 85 | * Updates the settings associated with a project, folder, or organization.
|
---|
| 86 | * Settings to update are determined by the value of field_mask.
|
---|
| 87 | * (projects.updateAccessApprovalSettings)
|
---|
| 88 | *
|
---|
| 89 | * @param string $name The resource name of the settings. Format is one of: *
|
---|
| 90 | * "projects/{project}/accessApprovalSettings" *
|
---|
| 91 | * "folders/{folder}/accessApprovalSettings" *
|
---|
| 92 | * "organizations/{organization}/accessApprovalSettings"
|
---|
| 93 | * @param AccessApprovalSettings $postBody
|
---|
| 94 | * @param array $optParams Optional parameters.
|
---|
| 95 | *
|
---|
| 96 | * @opt_param string updateMask The update mask applies to the settings. Only
|
---|
| 97 | * the top level fields of AccessApprovalSettings (notification_emails &
|
---|
| 98 | * enrolled_services) are supported. For each field, if it is included, the
|
---|
| 99 | * currently stored value will be entirely overwritten with the value of the
|
---|
| 100 | * field passed in this request. For the `FieldMask` definition, see
|
---|
| 101 | * https://developers.google.com/protocol-
|
---|
| 102 | * buffers/docs/reference/google.protobuf#fieldmask If this field is left unset,
|
---|
| 103 | * only the notification_emails field will be updated.
|
---|
| 104 | * @return AccessApprovalSettings
|
---|
| 105 | * @throws \Google\Service\Exception
|
---|
| 106 | */
|
---|
| 107 | public function updateAccessApprovalSettings($name, AccessApprovalSettings $postBody, $optParams = [])
|
---|
| 108 | {
|
---|
| 109 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 110 | $params = array_merge($params, $optParams);
|
---|
| 111 | return $this->call('updateAccessApprovalSettings', [$params], AccessApprovalSettings::class);
|
---|
| 112 | }
|
---|
| 113 | }
|
---|
| 114 |
|
---|
| 115 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 116 | class_alias(Projects::class, 'Google_Service_AccessApproval_Resource_Projects');
|
---|