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;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for WorkspaceEvents (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * The Google Workspace Events API lets you subscribe to events and manage
|
---|
27 | * change notifications across Google Workspace applications.</p>
|
---|
28 | *
|
---|
29 | * <p>
|
---|
30 | * For more information about this service, see the API
|
---|
31 | * <a href="https://developers.google.com/workspace/events" target="_blank">Documentation</a>
|
---|
32 | * </p>
|
---|
33 | *
|
---|
34 | * @author Google, Inc.
|
---|
35 | */
|
---|
36 | class WorkspaceEvents extends \Google\Service
|
---|
37 | {
|
---|
38 | /** Private Service: https://www.googleapis.com/auth/chat.bot. */
|
---|
39 | const CHAT_BOT =
|
---|
40 | "https://www.googleapis.com/auth/chat.bot";
|
---|
41 | /** See, add, update, and remove members from conversations and spaces in Google Chat. */
|
---|
42 | const CHAT_MEMBERSHIPS =
|
---|
43 | "https://www.googleapis.com/auth/chat.memberships";
|
---|
44 | /** View members in Google Chat conversations.. */
|
---|
45 | const CHAT_MEMBERSHIPS_READONLY =
|
---|
46 | "https://www.googleapis.com/auth/chat.memberships.readonly";
|
---|
47 | /** See, compose, send, update, and delete messages and their associated attachments, and add, see, and delete reactions to messages.. */
|
---|
48 | const CHAT_MESSAGES =
|
---|
49 | "https://www.googleapis.com/auth/chat.messages";
|
---|
50 | /** See, add, and delete reactions to messages in Google Chat. */
|
---|
51 | const CHAT_MESSAGES_REACTIONS =
|
---|
52 | "https://www.googleapis.com/auth/chat.messages.reactions";
|
---|
53 | /** View reactions to messages in Google Chat. */
|
---|
54 | const CHAT_MESSAGES_REACTIONS_READONLY =
|
---|
55 | "https://www.googleapis.com/auth/chat.messages.reactions.readonly";
|
---|
56 | /** See messages and their associated reactions and attachments in Google Chat. */
|
---|
57 | const CHAT_MESSAGES_READONLY =
|
---|
58 | "https://www.googleapis.com/auth/chat.messages.readonly";
|
---|
59 | /** Create conversations and spaces and see or update metadata (including history settings and access settings) in Google Chat. */
|
---|
60 | const CHAT_SPACES =
|
---|
61 | "https://www.googleapis.com/auth/chat.spaces";
|
---|
62 | /** View chat and spaces in Google Chat. */
|
---|
63 | const CHAT_SPACES_READONLY =
|
---|
64 | "https://www.googleapis.com/auth/chat.spaces.readonly";
|
---|
65 | /** See, edit, create, and delete all of your Google Drive files. */
|
---|
66 | const DRIVE =
|
---|
67 | "https://www.googleapis.com/auth/drive";
|
---|
68 | /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
|
---|
69 | const DRIVE_FILE =
|
---|
70 | "https://www.googleapis.com/auth/drive.file";
|
---|
71 | /** View and manage metadata of files in your Google Drive. */
|
---|
72 | const DRIVE_METADATA =
|
---|
73 | "https://www.googleapis.com/auth/drive.metadata";
|
---|
74 | /** See information about your Google Drive files. */
|
---|
75 | const DRIVE_METADATA_READONLY =
|
---|
76 | "https://www.googleapis.com/auth/drive.metadata.readonly";
|
---|
77 | /** See and download all your Google Drive files. */
|
---|
78 | const DRIVE_READONLY =
|
---|
79 | "https://www.googleapis.com/auth/drive.readonly";
|
---|
80 | /** Create, edit, and see information about your Google Meet conferences created by the app.. */
|
---|
81 | const MEETINGS_SPACE_CREATED =
|
---|
82 | "https://www.googleapis.com/auth/meetings.space.created";
|
---|
83 | /** Read information about any of your Google Meet conferences. */
|
---|
84 | const MEETINGS_SPACE_READONLY =
|
---|
85 | "https://www.googleapis.com/auth/meetings.space.readonly";
|
---|
86 |
|
---|
87 | public $operations;
|
---|
88 | public $subscriptions;
|
---|
89 | public $rootUrlTemplate;
|
---|
90 |
|
---|
91 | /**
|
---|
92 | * Constructs the internal representation of the WorkspaceEvents service.
|
---|
93 | *
|
---|
94 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
95 | * config array to pass to a new Client instance.
|
---|
96 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
97 | */
|
---|
98 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
99 | {
|
---|
100 | parent::__construct($clientOrConfig);
|
---|
101 | $this->rootUrl = $rootUrl ?: 'https://workspaceevents.googleapis.com/';
|
---|
102 | $this->rootUrlTemplate = $rootUrl ?: 'https://workspaceevents.UNIVERSE_DOMAIN/';
|
---|
103 | $this->servicePath = '';
|
---|
104 | $this->batchPath = 'batch';
|
---|
105 | $this->version = 'v1';
|
---|
106 | $this->serviceName = 'workspaceevents';
|
---|
107 |
|
---|
108 | $this->operations = new WorkspaceEvents\Resource\Operations(
|
---|
109 | $this,
|
---|
110 | $this->serviceName,
|
---|
111 | 'operations',
|
---|
112 | [
|
---|
113 | 'methods' => [
|
---|
114 | 'get' => [
|
---|
115 | 'path' => 'v1/{+name}',
|
---|
116 | 'httpMethod' => 'GET',
|
---|
117 | 'parameters' => [
|
---|
118 | 'name' => [
|
---|
119 | 'location' => 'path',
|
---|
120 | 'type' => 'string',
|
---|
121 | 'required' => true,
|
---|
122 | ],
|
---|
123 | ],
|
---|
124 | ],
|
---|
125 | ]
|
---|
126 | ]
|
---|
127 | );
|
---|
128 | $this->subscriptions = new WorkspaceEvents\Resource\Subscriptions(
|
---|
129 | $this,
|
---|
130 | $this->serviceName,
|
---|
131 | 'subscriptions',
|
---|
132 | [
|
---|
133 | 'methods' => [
|
---|
134 | 'create' => [
|
---|
135 | 'path' => 'v1/subscriptions',
|
---|
136 | 'httpMethod' => 'POST',
|
---|
137 | 'parameters' => [
|
---|
138 | 'validateOnly' => [
|
---|
139 | 'location' => 'query',
|
---|
140 | 'type' => 'boolean',
|
---|
141 | ],
|
---|
142 | ],
|
---|
143 | ],'delete' => [
|
---|
144 | 'path' => 'v1/{+name}',
|
---|
145 | 'httpMethod' => 'DELETE',
|
---|
146 | 'parameters' => [
|
---|
147 | 'name' => [
|
---|
148 | 'location' => 'path',
|
---|
149 | 'type' => 'string',
|
---|
150 | 'required' => true,
|
---|
151 | ],
|
---|
152 | 'allowMissing' => [
|
---|
153 | 'location' => 'query',
|
---|
154 | 'type' => 'boolean',
|
---|
155 | ],
|
---|
156 | 'etag' => [
|
---|
157 | 'location' => 'query',
|
---|
158 | 'type' => 'string',
|
---|
159 | ],
|
---|
160 | 'validateOnly' => [
|
---|
161 | 'location' => 'query',
|
---|
162 | 'type' => 'boolean',
|
---|
163 | ],
|
---|
164 | ],
|
---|
165 | ],'get' => [
|
---|
166 | 'path' => 'v1/{+name}',
|
---|
167 | 'httpMethod' => 'GET',
|
---|
168 | 'parameters' => [
|
---|
169 | 'name' => [
|
---|
170 | 'location' => 'path',
|
---|
171 | 'type' => 'string',
|
---|
172 | 'required' => true,
|
---|
173 | ],
|
---|
174 | ],
|
---|
175 | ],'list' => [
|
---|
176 | 'path' => 'v1/subscriptions',
|
---|
177 | 'httpMethod' => 'GET',
|
---|
178 | 'parameters' => [
|
---|
179 | 'filter' => [
|
---|
180 | 'location' => 'query',
|
---|
181 | 'type' => 'string',
|
---|
182 | ],
|
---|
183 | 'pageSize' => [
|
---|
184 | 'location' => 'query',
|
---|
185 | 'type' => 'integer',
|
---|
186 | ],
|
---|
187 | 'pageToken' => [
|
---|
188 | 'location' => 'query',
|
---|
189 | 'type' => 'string',
|
---|
190 | ],
|
---|
191 | ],
|
---|
192 | ],'patch' => [
|
---|
193 | 'path' => 'v1/{+name}',
|
---|
194 | 'httpMethod' => 'PATCH',
|
---|
195 | 'parameters' => [
|
---|
196 | 'name' => [
|
---|
197 | 'location' => 'path',
|
---|
198 | 'type' => 'string',
|
---|
199 | 'required' => true,
|
---|
200 | ],
|
---|
201 | 'updateMask' => [
|
---|
202 | 'location' => 'query',
|
---|
203 | 'type' => 'string',
|
---|
204 | ],
|
---|
205 | 'validateOnly' => [
|
---|
206 | 'location' => 'query',
|
---|
207 | 'type' => 'boolean',
|
---|
208 | ],
|
---|
209 | ],
|
---|
210 | ],'reactivate' => [
|
---|
211 | 'path' => 'v1/{+name}:reactivate',
|
---|
212 | 'httpMethod' => 'POST',
|
---|
213 | 'parameters' => [
|
---|
214 | 'name' => [
|
---|
215 | 'location' => 'path',
|
---|
216 | 'type' => 'string',
|
---|
217 | 'required' => true,
|
---|
218 | ],
|
---|
219 | ],
|
---|
220 | ],
|
---|
221 | ]
|
---|
222 | ]
|
---|
223 | );
|
---|
224 | }
|
---|
225 | }
|
---|
226 |
|
---|
227 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
228 | class_alias(WorkspaceEvents::class, 'Google_Service_WorkspaceEvents');
|
---|