[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\GoogleFirebaseAppcheckV1BatchGetSafetyNetConfigsResponse;
|
---|
| 21 | use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1SafetyNetConfig;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "safetyNetConfig" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
|
---|
| 28 | * $safetyNetConfig = $firebaseappcheckService->projects_apps_safetyNetConfig;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ProjectsAppsSafetyNetConfig extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Atomically gets the SafetyNetConfigs for the specified list of apps.
|
---|
| 35 | * (safetyNetConfig.batchGet)
|
---|
| 36 | *
|
---|
| 37 | * @param string $parent Required. The parent project name shared by all
|
---|
| 38 | * SafetyNetConfigs being retrieved, in the format ``` projects/{project_number}
|
---|
| 39 | * ``` The parent collection in the `name` field of any resource being retrieved
|
---|
| 40 | * must match this field, or the entire batch fails.
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | *
|
---|
| 43 | * @opt_param string names Required. The relative resource names of the
|
---|
| 44 | * SafetyNetConfigs to retrieve, in the format ```
|
---|
| 45 | * projects/{project_number}/apps/{app_id}/safetyNetConfig ``` A maximum of 100
|
---|
| 46 | * objects can be retrieved in a batch.
|
---|
| 47 | * @return GoogleFirebaseAppcheckV1BatchGetSafetyNetConfigsResponse
|
---|
| 48 | * @throws \Google\Service\Exception
|
---|
| 49 | */
|
---|
| 50 | public function batchGet($parent, $optParams = [])
|
---|
| 51 | {
|
---|
| 52 | $params = ['parent' => $parent];
|
---|
| 53 | $params = array_merge($params, $optParams);
|
---|
| 54 | return $this->call('batchGet', [$params], GoogleFirebaseAppcheckV1BatchGetSafetyNetConfigsResponse::class);
|
---|
| 55 | }
|
---|
| 56 | /**
|
---|
| 57 | * Gets the SafetyNetConfig for the specified app. (safetyNetConfig.get)
|
---|
| 58 | *
|
---|
| 59 | * @param string $name Required. The relative resource name of the
|
---|
| 60 | * SafetyNetConfig, in the format: ```
|
---|
| 61 | * projects/{project_number}/apps/{app_id}/safetyNetConfig ```
|
---|
| 62 | * @param array $optParams Optional parameters.
|
---|
| 63 | * @return GoogleFirebaseAppcheckV1SafetyNetConfig
|
---|
| 64 | * @throws \Google\Service\Exception
|
---|
| 65 | */
|
---|
| 66 | public function get($name, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['name' => $name];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('get', [$params], GoogleFirebaseAppcheckV1SafetyNetConfig::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Updates the SafetyNetConfig for the specified app. While this configuration
|
---|
| 74 | * is incomplete or invalid, the app will be unable to exchange SafetyNet tokens
|
---|
| 75 | * for App Check tokens. (safetyNetConfig.patch)
|
---|
| 76 | *
|
---|
| 77 | * @param string $name Required. The relative resource name of the SafetyNet
|
---|
| 78 | * configuration object, in the format: ```
|
---|
| 79 | * projects/{project_number}/apps/{app_id}/safetyNetConfig ```
|
---|
| 80 | * @param GoogleFirebaseAppcheckV1SafetyNetConfig $postBody
|
---|
| 81 | * @param array $optParams Optional parameters.
|
---|
| 82 | *
|
---|
| 83 | * @opt_param string updateMask Required. A comma-separated list of names of
|
---|
| 84 | * fields in the SafetyNetConfig to update. Example: `token_ttl`.
|
---|
| 85 | * @return GoogleFirebaseAppcheckV1SafetyNetConfig
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function patch($name, GoogleFirebaseAppcheckV1SafetyNetConfig $postBody, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('patch', [$params], GoogleFirebaseAppcheckV1SafetyNetConfig::class);
|
---|
| 93 | }
|
---|
| 94 | }
|
---|
| 95 |
|
---|
| 96 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 97 | class_alias(ProjectsAppsSafetyNetConfig::class, 'Google_Service_Firebaseappcheck_Resource_ProjectsAppsSafetyNetConfig');
|
---|