[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\AccessContextManager\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\AccessContextManager\GcpUserAccessBinding;
|
---|
| 21 | use Google\Service\AccessContextManager\ListGcpUserAccessBindingsResponse;
|
---|
| 22 | use Google\Service\AccessContextManager\Operation;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "gcpUserAccessBindings" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $accesscontextmanagerService = new Google\Service\AccessContextManager(...);
|
---|
| 29 | * $gcpUserAccessBindings = $accesscontextmanagerService->organizations_gcpUserAccessBindings;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class OrganizationsGcpUserAccessBindings extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a GcpUserAccessBinding. If the client specifies a name, the server
|
---|
| 36 | * ignores it. Fails if a resource already exists with the same group_key.
|
---|
| 37 | * Completion of this long-running operation does not necessarily signify that
|
---|
| 38 | * the new binding is deployed onto all affected users, which may take more
|
---|
| 39 | * time. (gcpUserAccessBindings.create)
|
---|
| 40 | *
|
---|
| 41 | * @param string $parent Required. Example: "organizations/256"
|
---|
| 42 | * @param GcpUserAccessBinding $postBody
|
---|
| 43 | * @param array $optParams Optional parameters.
|
---|
| 44 | * @return Operation
|
---|
| 45 | * @throws \Google\Service\Exception
|
---|
| 46 | */
|
---|
| 47 | public function create($parent, GcpUserAccessBinding $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('create', [$params], Operation::class);
|
---|
| 52 | }
|
---|
| 53 | /**
|
---|
| 54 | * Deletes a GcpUserAccessBinding. Completion of this long-running operation
|
---|
| 55 | * does not necessarily signify that the binding deletion is deployed onto all
|
---|
| 56 | * affected users, which may take more time. (gcpUserAccessBindings.delete)
|
---|
| 57 | *
|
---|
| 58 | * @param string $name Required. Example:
|
---|
| 59 | * "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
---|
| 60 | * @param array $optParams Optional parameters.
|
---|
| 61 | * @return Operation
|
---|
| 62 | * @throws \Google\Service\Exception
|
---|
| 63 | */
|
---|
| 64 | public function delete($name, $optParams = [])
|
---|
| 65 | {
|
---|
| 66 | $params = ['name' => $name];
|
---|
| 67 | $params = array_merge($params, $optParams);
|
---|
| 68 | return $this->call('delete', [$params], Operation::class);
|
---|
| 69 | }
|
---|
| 70 | /**
|
---|
| 71 | * Gets the GcpUserAccessBinding with the given name.
|
---|
| 72 | * (gcpUserAccessBindings.get)
|
---|
| 73 | *
|
---|
| 74 | * @param string $name Required. Example:
|
---|
| 75 | * "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
---|
| 76 | * @param array $optParams Optional parameters.
|
---|
| 77 | * @return GcpUserAccessBinding
|
---|
| 78 | * @throws \Google\Service\Exception
|
---|
| 79 | */
|
---|
| 80 | public function get($name, $optParams = [])
|
---|
| 81 | {
|
---|
| 82 | $params = ['name' => $name];
|
---|
| 83 | $params = array_merge($params, $optParams);
|
---|
| 84 | return $this->call('get', [$params], GcpUserAccessBinding::class);
|
---|
| 85 | }
|
---|
| 86 | /**
|
---|
| 87 | * Lists all GcpUserAccessBindings for a Google Cloud organization.
|
---|
| 88 | * (gcpUserAccessBindings.listOrganizationsGcpUserAccessBindings)
|
---|
| 89 | *
|
---|
| 90 | * @param string $parent Required. Example: "organizations/256"
|
---|
| 91 | * @param array $optParams Optional parameters.
|
---|
| 92 | *
|
---|
| 93 | * @opt_param int pageSize Optional. Maximum number of items to return. The
|
---|
| 94 | * server may return fewer items. If left blank, the server may return any
|
---|
| 95 | * number of items.
|
---|
| 96 | * @opt_param string pageToken Optional. If left blank, returns the first page.
|
---|
| 97 | * To enumerate all items, use the next_page_token from your previous list
|
---|
| 98 | * operation.
|
---|
| 99 | * @return ListGcpUserAccessBindingsResponse
|
---|
| 100 | * @throws \Google\Service\Exception
|
---|
| 101 | */
|
---|
| 102 | public function listOrganizationsGcpUserAccessBindings($parent, $optParams = [])
|
---|
| 103 | {
|
---|
| 104 | $params = ['parent' => $parent];
|
---|
| 105 | $params = array_merge($params, $optParams);
|
---|
| 106 | return $this->call('list', [$params], ListGcpUserAccessBindingsResponse::class);
|
---|
| 107 | }
|
---|
| 108 | /**
|
---|
| 109 | * Updates a GcpUserAccessBinding. Completion of this long-running operation
|
---|
| 110 | * does not necessarily signify that the changed binding is deployed onto all
|
---|
| 111 | * affected users, which may take more time. (gcpUserAccessBindings.patch)
|
---|
| 112 | *
|
---|
| 113 | * @param string $name Immutable. Assigned by the server during creation. The
|
---|
| 114 | * last segment has an arbitrary length and has only URI unreserved characters
|
---|
| 115 | * (as defined by [RFC 3986 Section
|
---|
| 116 | * 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). Should not be
|
---|
| 117 | * specified by the client during creation. Example:
|
---|
| 118 | * "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N"
|
---|
| 119 | * @param GcpUserAccessBinding $postBody
|
---|
| 120 | * @param array $optParams Optional parameters.
|
---|
| 121 | *
|
---|
| 122 | * @opt_param bool append Optional. This field controls whether or not certain
|
---|
| 123 | * repeated settings in the update request overwrite or append to existing
|
---|
| 124 | * settings on the binding. If true, then append. Otherwise overwrite. So far,
|
---|
| 125 | * only scoped_access_settings with reauth_settings supports appending. Global
|
---|
| 126 | * access_levels, access_levels in scoped_access_settings,
|
---|
| 127 | * dry_run_access_levels, reauth_settings, and session_settings are not
|
---|
| 128 | * compatible with append functionality, and the request will return an error if
|
---|
| 129 | * append=true when these settings are in the update_mask. The request will also
|
---|
| 130 | * return an error if append=true when "scoped_access_settings" is not set in
|
---|
| 131 | * the update_mask.
|
---|
| 132 | * @opt_param string updateMask Required. Only the fields specified in this mask
|
---|
| 133 | * are updated. Because name and group_key cannot be changed, update_mask is
|
---|
| 134 | * required and may only contain the following fields: `access_levels`,
|
---|
| 135 | * `dry_run_access_levels`, `reauth_settings` `session_settings`,
|
---|
| 136 | * `scoped_access_settings`. update_mask { paths: "access_levels" }
|
---|
| 137 | * @return Operation
|
---|
| 138 | * @throws \Google\Service\Exception
|
---|
| 139 | */
|
---|
| 140 | public function patch($name, GcpUserAccessBinding $postBody, $optParams = [])
|
---|
| 141 | {
|
---|
| 142 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 143 | $params = array_merge($params, $optParams);
|
---|
| 144 | return $this->call('patch', [$params], Operation::class);
|
---|
| 145 | }
|
---|
| 146 | }
|
---|
| 147 |
|
---|
| 148 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 149 | class_alias(OrganizationsGcpUserAccessBindings::class, 'Google_Service_AccessContextManager_Resource_OrganizationsGcpUserAccessBindings');
|
---|