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