source: vendor/google/apiclient-services/src/Firebaseappcheck/Resource/ProjectsAppsDebugTokens.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload project files

  • Property mode set to 100644
File size: 6.3 KB
Line 
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\GoogleFirebaseAppcheckV1DebugToken;
21use Google\Service\Firebaseappcheck\GoogleFirebaseAppcheckV1ListDebugTokensResponse;
22use Google\Service\Firebaseappcheck\GoogleProtobufEmpty;
23
24/**
25 * The "debugTokens" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $firebaseappcheckService = new Google\Service\Firebaseappcheck(...);
29 * $debugTokens = $firebaseappcheckService->projects_apps_debugTokens;
30 * </code>
31 */
32class ProjectsAppsDebugTokens extends \Google\Service\Resource
33{
34 /**
35 * Creates a new DebugToken for the specified app. For security reasons, after
36 * the creation operation completes, the `token` field cannot be updated or
37 * retrieved, but you can revoke the debug token using DeleteDebugToken. Each
38 * app can have a maximum of 20 debug tokens. (debugTokens.create)
39 *
40 * @param string $parent Required. The relative resource name of the parent app
41 * in which the specified DebugToken will be created, in the format: ```
42 * projects/{project_number}/apps/{app_id} ```
43 * @param GoogleFirebaseAppcheckV1DebugToken $postBody
44 * @param array $optParams Optional parameters.
45 * @return GoogleFirebaseAppcheckV1DebugToken
46 * @throws \Google\Service\Exception
47 */
48 public function create($parent, GoogleFirebaseAppcheckV1DebugToken $postBody, $optParams = [])
49 {
50 $params = ['parent' => $parent, 'postBody' => $postBody];
51 $params = array_merge($params, $optParams);
52 return $this->call('create', [$params], GoogleFirebaseAppcheckV1DebugToken::class);
53 }
54 /**
55 * Deletes the specified DebugToken. A deleted debug token cannot be used to
56 * exchange for an App Check token. Use this method when you suspect the secret
57 * `token` has been compromised or when you no longer need the debug token.
58 * (debugTokens.delete)
59 *
60 * @param string $name Required. The relative resource name of the DebugToken to
61 * delete, in the format: ```
62 * projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} ```
63 * @param array $optParams Optional parameters.
64 * @return GoogleProtobufEmpty
65 * @throws \Google\Service\Exception
66 */
67 public function delete($name, $optParams = [])
68 {
69 $params = ['name' => $name];
70 $params = array_merge($params, $optParams);
71 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
72 }
73 /**
74 * Gets the specified DebugToken. For security reasons, the `token` field is
75 * never populated in the response. (debugTokens.get)
76 *
77 * @param string $name Required. The relative resource name of the debug token,
78 * in the format: ```
79 * projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} ```
80 * @param array $optParams Optional parameters.
81 * @return GoogleFirebaseAppcheckV1DebugToken
82 * @throws \Google\Service\Exception
83 */
84 public function get($name, $optParams = [])
85 {
86 $params = ['name' => $name];
87 $params = array_merge($params, $optParams);
88 return $this->call('get', [$params], GoogleFirebaseAppcheckV1DebugToken::class);
89 }
90 /**
91 * Lists all DebugTokens for the specified app. For security reasons, the
92 * `token` field is never populated in the response.
93 * (debugTokens.listProjectsAppsDebugTokens)
94 *
95 * @param string $parent Required. The relative resource name of the parent app
96 * for which to list each associated DebugToken, in the format: ```
97 * projects/{project_number}/apps/{app_id} ```
98 * @param array $optParams Optional parameters.
99 *
100 * @opt_param int pageSize The maximum number of DebugTokens to return in the
101 * response. Note that an app can have at most 20 debug tokens. The server may
102 * return fewer than this at its own discretion. If no value is specified (or
103 * too large a value is specified), the server will impose its own limit.
104 * @opt_param string pageToken Token returned from a previous call to
105 * ListDebugTokens indicating where in the set of DebugTokens to resume listing.
106 * Provide this to retrieve the subsequent page. When paginating, all other
107 * parameters provided to ListDebugTokens must match the call that provided the
108 * page token; if they do not match, the result is undefined.
109 * @return GoogleFirebaseAppcheckV1ListDebugTokensResponse
110 * @throws \Google\Service\Exception
111 */
112 public function listProjectsAppsDebugTokens($parent, $optParams = [])
113 {
114 $params = ['parent' => $parent];
115 $params = array_merge($params, $optParams);
116 return $this->call('list', [$params], GoogleFirebaseAppcheckV1ListDebugTokensResponse::class);
117 }
118 /**
119 * Updates the specified DebugToken. For security reasons, the `token` field
120 * cannot be updated, nor will it be populated in the response, but you can
121 * revoke the debug token using DeleteDebugToken. (debugTokens.patch)
122 *
123 * @param string $name Required. The relative resource name of the debug token,
124 * in the format: ```
125 * projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} ```
126 * @param GoogleFirebaseAppcheckV1DebugToken $postBody
127 * @param array $optParams Optional parameters.
128 *
129 * @opt_param string updateMask Required. A comma-separated list of names of
130 * fields in the DebugToken to update. Example: `display_name`.
131 * @return GoogleFirebaseAppcheckV1DebugToken
132 * @throws \Google\Service\Exception
133 */
134 public function patch($name, GoogleFirebaseAppcheckV1DebugToken $postBody, $optParams = [])
135 {
136 $params = ['name' => $name, 'postBody' => $postBody];
137 $params = array_merge($params, $optParams);
138 return $this->call('patch', [$params], GoogleFirebaseAppcheckV1DebugToken::class);
139 }
140}
141
142// Adding a class alias for backwards compatibility with the previous class name.
143class_alias(ProjectsAppsDebugTokens::class, 'Google_Service_Firebaseappcheck_Resource_ProjectsAppsDebugTokens');
Note: See TracBrowser for help on using the repository browser.