[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\Firebaseappcheck\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesRequest;
|
---|
| 21 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesResponse;
|
---|
| 22 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ListResourcePoliciesResponse;
|
---|
| 23 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ResourcePolicy;
|
---|
| 24 | use Google\Service\Firebaseappcheck\GoogleProtobufEmpty;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "resourcePolicies" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
|
---|
| 31 | * $resourcePolicies = $firebaseappcheckService->projects_services_resourcePolicies;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class ProjectsServicesResourcePolicies extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Atomically updates the specified ResourcePolicy configurations.
|
---|
| 38 | * (resourcePolicies.batchUpdate)
|
---|
| 39 | *
|
---|
| 40 | * @param string $parent Required. The parent service name, in the format ```
|
---|
| 41 | * projects/{project_number}/services/{service_id} ``` The parent collection in
|
---|
| 42 | * the `name` field of any resource being updated must match this field, or the
|
---|
| 43 | * entire batch fails.
|
---|
| 44 | * @param GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesRequest $postBody
|
---|
| 45 | * @param array $optParams Optional parameters.
|
---|
| 46 | * @return GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesResponse
|
---|
| 47 | * @throws \Google\Service\Exception
|
---|
| 48 | */
|
---|
| 49 | public function batchUpdate($parent, GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesRequest $postBody, $optParams = [])
|
---|
| 50 | {
|
---|
| 51 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 52 | $params = array_merge($params, $optParams);
|
---|
| 53 | return $this->call('batchUpdate', [$params], GoogleFirebaseAppcheckV1BatchUpdateResourcePoliciesResponse::class);
|
---|
| 54 | }
|
---|
| 55 | /**
|
---|
| 56 | * Creates the specified ResourcePolicy configuration. (resourcePolicies.create)
|
---|
| 57 | *
|
---|
| 58 | * @param string $parent Required. The relative resource name of the parent
|
---|
| 59 | * Service in which the specified ResourcePolicy will be created, in the format:
|
---|
| 60 | * ``` projects/{project_number}/services/{service_id} ``` Note that the
|
---|
| 61 | * `service_id` element must be a supported service ID. Currently, the following
|
---|
| 62 | * service IDs are supported: * `oauth2.googleapis.com` (Google Identity for
|
---|
| 63 | * iOS)
|
---|
| 64 | * @param GoogleFirebaseAppcheckV1ResourcePolicy $postBody
|
---|
| 65 | * @param array $optParams Optional parameters.
|
---|
| 66 | * @return GoogleFirebaseAppcheckV1ResourcePolicy
|
---|
| 67 | * @throws \Google\Service\Exception
|
---|
| 68 | */
|
---|
| 69 | public function create($parent, GoogleFirebaseAppcheckV1ResourcePolicy $postBody, $optParams = [])
|
---|
| 70 | {
|
---|
| 71 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 72 | $params = array_merge($params, $optParams);
|
---|
| 73 | return $this->call('create', [$params], GoogleFirebaseAppcheckV1ResourcePolicy::class);
|
---|
| 74 | }
|
---|
| 75 | /**
|
---|
| 76 | * Deletes the specified ResourcePolicy configuration. (resourcePolicies.delete)
|
---|
| 77 | *
|
---|
| 78 | * @param string $name Required. The relative resource name of the
|
---|
| 79 | * ResourcePolicy to delete, in the format: ``` projects/{project_number}/servic
|
---|
| 80 | * es/{service_id}/resourcePolicies/{resource_policy_id} ```
|
---|
| 81 | * @param array $optParams Optional parameters.
|
---|
| 82 | *
|
---|
| 83 | * @opt_param string etag The checksum to be validated against the current
|
---|
| 84 | * ResourcePolicy, to ensure the client has an up-to-date value before
|
---|
| 85 | * proceeding. This checksum is computed by the server based on the values of
|
---|
| 86 | * fields in the ResourcePolicy object, and can be obtained from the
|
---|
| 87 | * ResourcePolicy object received from the last CreateResourcePolicy,
|
---|
| 88 | * GetResourcePolicy, ListResourcePolicies, UpdateResourcePolicy, or
|
---|
| 89 | * BatchUpdateResourcePolicies call. This etag is strongly validated as defined
|
---|
| 90 | * by RFC 7232.
|
---|
| 91 | * @return GoogleProtobufEmpty
|
---|
| 92 | * @throws \Google\Service\Exception
|
---|
| 93 | */
|
---|
| 94 | public function delete($name, $optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = ['name' => $name];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Gets the requested ResourcePolicy configuration. (resourcePolicies.get)
|
---|
| 102 | *
|
---|
| 103 | * @param string $name Required. The relative resource name of the
|
---|
| 104 | * ResourcePolicy to retrieve, in the format: ``` projects/{project_number}/serv
|
---|
| 105 | * ices/{service_id}/resourcePolicies/{resource_policy_id} ``` Note that the
|
---|
| 106 | * `service_id` element must be a supported service ID. Currently, the following
|
---|
| 107 | * service IDs are supported: * `oauth2.googleapis.com` (Google Identity for
|
---|
| 108 | * iOS)
|
---|
| 109 | * @param array $optParams Optional parameters.
|
---|
| 110 | * @return GoogleFirebaseAppcheckV1ResourcePolicy
|
---|
| 111 | * @throws \Google\Service\Exception
|
---|
| 112 | */
|
---|
| 113 | public function get($name, $optParams = [])
|
---|
| 114 | {
|
---|
| 115 | $params = ['name' => $name];
|
---|
| 116 | $params = array_merge($params, $optParams);
|
---|
| 117 | return $this->call('get', [$params], GoogleFirebaseAppcheckV1ResourcePolicy::class);
|
---|
| 118 | }
|
---|
| 119 | /**
|
---|
| 120 | * Lists all ResourcePolicy configurations for the specified project and
|
---|
| 121 | * service. (resourcePolicies.listProjectsServicesResourcePolicies)
|
---|
| 122 | *
|
---|
| 123 | * @param string $parent Required. The relative resource name of the parent
|
---|
| 124 | * Service for which to list each associated ResourcePolicy, in the format: ```
|
---|
| 125 | * projects/{project_number}/services/{service_id} ``` Note that the
|
---|
| 126 | * `service_id` element must be a supported service ID. Currently, the following
|
---|
| 127 | * service IDs are supported: * `oauth2.googleapis.com` (Google Identity for
|
---|
| 128 | * iOS)
|
---|
| 129 | * @param array $optParams Optional parameters.
|
---|
| 130 | *
|
---|
| 131 | * @opt_param string filter Optional. Filters the results by the specified rule.
|
---|
| 132 | * For the exact syntax of this field, please consult the
|
---|
| 133 | * [AIP-160](https://google.aip.dev/160) standard. Currently, since the only
|
---|
| 134 | * fields in the ResourcePolicy resource are the scalar fields
|
---|
| 135 | * `enforcement_mode` and `target_resource`, this method does not support the
|
---|
| 136 | * traversal operator (`.`) or the has operator (`:`). Here are some examples of
|
---|
| 137 | * valid filters: * `enforcement_mode = ENFORCED` * `target_resource =
|
---|
| 138 | * "//oauth2.googleapis.com/projects/12345/oauthClients/"` * `enforcement_mode =
|
---|
| 139 | * ENFORCED AND target_resource =
|
---|
| 140 | * "//oauth2.googleapis.com/projects/12345/oauthClients/"`
|
---|
| 141 | * @opt_param int pageSize The maximum number of ResourcePolicy objects to
|
---|
| 142 | * return in the response. The server may return fewer than this at its own
|
---|
| 143 | * discretion. If no value is specified (or too large a value is specified), the
|
---|
| 144 | * server will impose its own limit.
|
---|
| 145 | * @opt_param string pageToken Token returned from a previous call to
|
---|
| 146 | * ListResourcePolicies indicating where in the set of ResourcePolicy objects to
|
---|
| 147 | * resume listing. Provide this to retrieve the subsequent page. When
|
---|
| 148 | * paginating, all other parameters provided to ListResourcePolicies must match
|
---|
| 149 | * the call that provided the page token; if they do not match, the result is
|
---|
| 150 | * undefined.
|
---|
| 151 | * @return GoogleFirebaseAppcheckV1ListResourcePoliciesResponse
|
---|
| 152 | * @throws \Google\Service\Exception
|
---|
| 153 | */
|
---|
| 154 | public function listProjectsServicesResourcePolicies($parent, $optParams = [])
|
---|
| 155 | {
|
---|
| 156 | $params = ['parent' => $parent];
|
---|
| 157 | $params = array_merge($params, $optParams);
|
---|
| 158 | return $this->call('list', [$params], GoogleFirebaseAppcheckV1ListResourcePoliciesResponse::class);
|
---|
| 159 | }
|
---|
| 160 | /**
|
---|
| 161 | * Updates the specified ResourcePolicy configuration. (resourcePolicies.patch)
|
---|
| 162 | *
|
---|
| 163 | * @param string $name Required. Identifier. The relative name of the resource
|
---|
| 164 | * policy object, in the format: ``` projects/{project_number}/services/{service
|
---|
| 165 | * _id}/resourcePolicies/{resource_policy_id} ``` Note that the `service_id`
|
---|
| 166 | * element must be a supported service ID. Currently, the following service IDs
|
---|
| 167 | * are supported: * `oauth2.googleapis.com` (Google Identity for iOS)
|
---|
| 168 | * `resource_policy_id` is a system-generated UID.
|
---|
| 169 | * @param GoogleFirebaseAppcheckV1ResourcePolicy $postBody
|
---|
| 170 | * @param array $optParams Optional parameters.
|
---|
| 171 | *
|
---|
| 172 | * @opt_param string updateMask Required. A comma-separated list of names of
|
---|
| 173 | * fields in the ResourcePolicy to update. Example: `enforcement_mode`.
|
---|
| 174 | * @return GoogleFirebaseAppcheckV1ResourcePolicy
|
---|
| 175 | * @throws \Google\Service\Exception
|
---|
| 176 | */
|
---|
| 177 | public function patch($name, GoogleFirebaseAppcheckV1ResourcePolicy $postBody, $optParams = [])
|
---|
| 178 | {
|
---|
| 179 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 180 | $params = array_merge($params, $optParams);
|
---|
| 181 | return $this->call('patch', [$params], GoogleFirebaseAppcheckV1ResourcePolicy::class);
|
---|
| 182 | }
|
---|
| 183 | }
|
---|
| 184 |
|
---|
| 185 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 186 | class_alias(ProjectsServicesResourcePolicies::class, 'Google_Service_Firebaseappcheck_Resource_ProjectsServicesResourcePolicies');
|
---|