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