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\FirebaseAppDistribution\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\FirebaseAppDistribution\GoogleFirebaseAppdistroV1BatchJoinGroupRequest;
|
---|
21 | use Google\Service\FirebaseAppDistribution\GoogleFirebaseAppdistroV1BatchLeaveGroupRequest;
|
---|
22 | use Google\Service\FirebaseAppDistribution\GoogleFirebaseAppdistroV1Group;
|
---|
23 | use Google\Service\FirebaseAppDistribution\GoogleFirebaseAppdistroV1ListGroupsResponse;
|
---|
24 | use Google\Service\FirebaseAppDistribution\GoogleProtobufEmpty;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "groups" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $firebaseappdistributionService = new Google\Service\FirebaseAppDistribution(...);
|
---|
31 | * $groups = $firebaseappdistributionService->projects_groups;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsGroups extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Batch adds members to a group. The testers will gain access to all releases
|
---|
38 | * that the groups have access to. (groups.batchJoin)
|
---|
39 | *
|
---|
40 | * @param string $group Required. The name of the group resource to which
|
---|
41 | * testers are added. Format: `projects/{project_number}/groups/{group_alias}`
|
---|
42 | * @param GoogleFirebaseAppdistroV1BatchJoinGroupRequest $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | * @return GoogleProtobufEmpty
|
---|
45 | * @throws \Google\Service\Exception
|
---|
46 | */
|
---|
47 | public function batchJoin($group, GoogleFirebaseAppdistroV1BatchJoinGroupRequest $postBody, $optParams = [])
|
---|
48 | {
|
---|
49 | $params = ['group' => $group, 'postBody' => $postBody];
|
---|
50 | $params = array_merge($params, $optParams);
|
---|
51 | return $this->call('batchJoin', [$params], GoogleProtobufEmpty::class);
|
---|
52 | }
|
---|
53 | /**
|
---|
54 | * Batch removed members from a group. The testers will lose access to all
|
---|
55 | * releases that the groups have access to. (groups.batchLeave)
|
---|
56 | *
|
---|
57 | * @param string $group Required. The name of the group resource from which
|
---|
58 | * testers are removed. Format: `projects/{project_number}/groups/{group_alias}`
|
---|
59 | * @param GoogleFirebaseAppdistroV1BatchLeaveGroupRequest $postBody
|
---|
60 | * @param array $optParams Optional parameters.
|
---|
61 | * @return GoogleProtobufEmpty
|
---|
62 | * @throws \Google\Service\Exception
|
---|
63 | */
|
---|
64 | public function batchLeave($group, GoogleFirebaseAppdistroV1BatchLeaveGroupRequest $postBody, $optParams = [])
|
---|
65 | {
|
---|
66 | $params = ['group' => $group, 'postBody' => $postBody];
|
---|
67 | $params = array_merge($params, $optParams);
|
---|
68 | return $this->call('batchLeave', [$params], GoogleProtobufEmpty::class);
|
---|
69 | }
|
---|
70 | /**
|
---|
71 | * Create a group. (groups.create)
|
---|
72 | *
|
---|
73 | * @param string $parent Required. The name of the project resource, which is
|
---|
74 | * the parent of the group resource. Format: `projects/{project_number}`
|
---|
75 | * @param GoogleFirebaseAppdistroV1Group $postBody
|
---|
76 | * @param array $optParams Optional parameters.
|
---|
77 | *
|
---|
78 | * @opt_param string groupId Optional. The "alias" to use for the group, which
|
---|
79 | * will become the final component of the group's resource name. This value must
|
---|
80 | * be unique per project. The field is named `groupId` to comply with AIP
|
---|
81 | * guidance for user-specified IDs. This value should be 4-63 characters, and
|
---|
82 | * valid characters are `/a-z-/`. If not set, it will be generated based on the
|
---|
83 | * display name.
|
---|
84 | * @return GoogleFirebaseAppdistroV1Group
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function create($parent, GoogleFirebaseAppdistroV1Group $postBody, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('create', [$params], GoogleFirebaseAppdistroV1Group::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Delete a group. (groups.delete)
|
---|
95 | *
|
---|
96 | * @param string $name Required. The name of the group resource. Format:
|
---|
97 | * `projects/{project_number}/groups/{group_alias}`
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | * @return GoogleProtobufEmpty
|
---|
100 | * @throws \Google\Service\Exception
|
---|
101 | */
|
---|
102 | public function delete($name, $optParams = [])
|
---|
103 | {
|
---|
104 | $params = ['name' => $name];
|
---|
105 | $params = array_merge($params, $optParams);
|
---|
106 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
107 | }
|
---|
108 | /**
|
---|
109 | * Get a group. (groups.get)
|
---|
110 | *
|
---|
111 | * @param string $name Required. The name of the group resource to retrieve.
|
---|
112 | * Format: `projects/{project_number}/groups/{group_alias}`
|
---|
113 | * @param array $optParams Optional parameters.
|
---|
114 | * @return GoogleFirebaseAppdistroV1Group
|
---|
115 | * @throws \Google\Service\Exception
|
---|
116 | */
|
---|
117 | public function get($name, $optParams = [])
|
---|
118 | {
|
---|
119 | $params = ['name' => $name];
|
---|
120 | $params = array_merge($params, $optParams);
|
---|
121 | return $this->call('get', [$params], GoogleFirebaseAppdistroV1Group::class);
|
---|
122 | }
|
---|
123 | /**
|
---|
124 | * List groups. (groups.listProjectsGroups)
|
---|
125 | *
|
---|
126 | * @param string $parent Required. The name of the project resource, which is
|
---|
127 | * the parent of the group resources. Format: `projects/{project_number}`
|
---|
128 | * @param array $optParams Optional parameters.
|
---|
129 | *
|
---|
130 | * @opt_param int pageSize Optional. The maximum number of groups to return. The
|
---|
131 | * service may return fewer than this value. The valid range is [1-1000]; If
|
---|
132 | * unspecified (0), at most 25 groups are returned. Values above 1000 are
|
---|
133 | * coerced to 1000.
|
---|
134 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
135 | * `ListGroups` call. Provide this to retrieve the subsequent page. When
|
---|
136 | * paginating, all other parameters provided to `ListGroups` must match the call
|
---|
137 | * that provided the page token.
|
---|
138 | * @return GoogleFirebaseAppdistroV1ListGroupsResponse
|
---|
139 | * @throws \Google\Service\Exception
|
---|
140 | */
|
---|
141 | public function listProjectsGroups($parent, $optParams = [])
|
---|
142 | {
|
---|
143 | $params = ['parent' => $parent];
|
---|
144 | $params = array_merge($params, $optParams);
|
---|
145 | return $this->call('list', [$params], GoogleFirebaseAppdistroV1ListGroupsResponse::class);
|
---|
146 | }
|
---|
147 | /**
|
---|
148 | * Update a group. (groups.patch)
|
---|
149 | *
|
---|
150 | * @param string $name The name of the group resource. Format:
|
---|
151 | * `projects/{project_number}/groups/{group_alias}`
|
---|
152 | * @param GoogleFirebaseAppdistroV1Group $postBody
|
---|
153 | * @param array $optParams Optional parameters.
|
---|
154 | *
|
---|
155 | * @opt_param string updateMask The list of fields to update.
|
---|
156 | * @return GoogleFirebaseAppdistroV1Group
|
---|
157 | * @throws \Google\Service\Exception
|
---|
158 | */
|
---|
159 | public function patch($name, GoogleFirebaseAppdistroV1Group $postBody, $optParams = [])
|
---|
160 | {
|
---|
161 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
162 | $params = array_merge($params, $optParams);
|
---|
163 | return $this->call('patch', [$params], GoogleFirebaseAppdistroV1Group::class);
|
---|
164 | }
|
---|
165 | }
|
---|
166 |
|
---|
167 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
168 | class_alias(ProjectsGroups::class, 'Google_Service_FirebaseAppDistribution_Resource_ProjectsGroups');
|
---|