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\FirebaseManagement\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\FirebaseManagement\FirebaseEmpty;
|
---|
21 | use Google\Service\FirebaseManagement\ListShaCertificatesResponse;
|
---|
22 | use Google\Service\FirebaseManagement\ShaCertificate;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "sha" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $firebaseService = new Google\Service\FirebaseManagement(...);
|
---|
29 | * $sha = $firebaseService->projects_androidApps_sha;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsAndroidAppsSha extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Adds a ShaCertificate to the specified AndroidApp. (sha.create)
|
---|
36 | *
|
---|
37 | * @param string $parent The resource name of the parent AndroidApp to which to
|
---|
38 | * add a ShaCertificate, in the format: projects/PROJECT_IDENTIFIER/androidApps/
|
---|
39 | * APP_ID Since an APP_ID is a unique identifier, the Unique Resource from Sub-
|
---|
40 | * Collection access pattern may be used here, in the format:
|
---|
41 | * projects/-/androidApps/APP_ID Refer to the `AndroidApp`
|
---|
42 | * [`name`](../projects.androidApps#AndroidApp.FIELDS.name) field for details
|
---|
43 | * about PROJECT_IDENTIFIER and APP_ID values.
|
---|
44 | * @param ShaCertificate $postBody
|
---|
45 | * @param array $optParams Optional parameters.
|
---|
46 | * @return ShaCertificate
|
---|
47 | * @throws \Google\Service\Exception
|
---|
48 | */
|
---|
49 | public function create($parent, ShaCertificate $postBody, $optParams = [])
|
---|
50 | {
|
---|
51 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
52 | $params = array_merge($params, $optParams);
|
---|
53 | return $this->call('create', [$params], ShaCertificate::class);
|
---|
54 | }
|
---|
55 | /**
|
---|
56 | * Removes a ShaCertificate from the specified AndroidApp. (sha.delete)
|
---|
57 | *
|
---|
58 | * @param string $name The resource name of the ShaCertificate to remove from
|
---|
59 | * the parent AndroidApp, in the format:
|
---|
60 | * projects/PROJECT_IDENTIFIER/androidApps/APP_ID /sha/SHA_HASH Refer to the
|
---|
61 | * `ShaCertificate`
|
---|
62 | * [`name`](../projects.androidApps.sha#ShaCertificate.FIELDS.name) field for
|
---|
63 | * details about PROJECT_IDENTIFIER, APP_ID, and SHA_HASH values. You can obtain
|
---|
64 | * the full resource name of the `ShaCertificate` from the response of
|
---|
65 | * [`ListShaCertificates`](../projects.androidApps.sha/list) or the original
|
---|
66 | * [`CreateShaCertificate`](../projects.androidApps.sha/create).
|
---|
67 | * @param array $optParams Optional parameters.
|
---|
68 | * @return FirebaseEmpty
|
---|
69 | * @throws \Google\Service\Exception
|
---|
70 | */
|
---|
71 | public function delete($name, $optParams = [])
|
---|
72 | {
|
---|
73 | $params = ['name' => $name];
|
---|
74 | $params = array_merge($params, $optParams);
|
---|
75 | return $this->call('delete', [$params], FirebaseEmpty::class);
|
---|
76 | }
|
---|
77 | /**
|
---|
78 | * Lists the SHA-1 and SHA-256 certificates for the specified AndroidApp.
|
---|
79 | * (sha.listProjectsAndroidAppsSha)
|
---|
80 | *
|
---|
81 | * @param string $parent The resource name of the parent AndroidApp for which to
|
---|
82 | * list each associated ShaCertificate, in the format:
|
---|
83 | * projects/PROJECT_IDENTIFIER /androidApps/APP_ID Since an APP_ID is a unique
|
---|
84 | * identifier, the Unique Resource from Sub-Collection access pattern may be
|
---|
85 | * used here, in the format: projects/-/androidApps/APP_ID Refer to the
|
---|
86 | * `AndroidApp` [`name`](../projects.androidApps#AndroidApp.FIELDS.name) field
|
---|
87 | * for details about PROJECT_IDENTIFIER and APP_ID values.
|
---|
88 | * @param array $optParams Optional parameters.
|
---|
89 | * @return ListShaCertificatesResponse
|
---|
90 | * @throws \Google\Service\Exception
|
---|
91 | */
|
---|
92 | public function listProjectsAndroidAppsSha($parent, $optParams = [])
|
---|
93 | {
|
---|
94 | $params = ['parent' => $parent];
|
---|
95 | $params = array_merge($params, $optParams);
|
---|
96 | return $this->call('list', [$params], ListShaCertificatesResponse::class);
|
---|
97 | }
|
---|
98 | }
|
---|
99 |
|
---|
100 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
101 | class_alias(ProjectsAndroidAppsSha::class, 'Google_Service_FirebaseManagement_Resource_ProjectsAndroidAppsSha');
|
---|