Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Side by Side Diff: generated/googleapis/lib/groupssettings/v1.dart

Issue 559053002: Generate 0.1.0 version of googleapis/googleapis_beta (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 library googleapis.groupssettings.v1;
2
3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async;
6 import "dart:convert" as convert;
7
8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12
13 export '../common/common.dart' show ApiRequestError;
14 export '../common/common.dart' show DetailedApiRequestError;
15
16 /** Lets you manage permission levels and related settings of a group. */
17 class GroupssettingsApi {
18 /** View and manage the settings of a Google Apps Group */
19 static const AppsGroupsSettingsScope = "https://www.googleapis.com/auth/apps.g roups.settings";
20
21
22 final common_internal.ApiRequester _requester;
23
24 GroupsResourceApi get groups => new GroupsResourceApi(_requester);
25
26 GroupssettingsApi(http.Client client) :
27 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "/groups/v1/groups/");
28 }
29
30
31 /** Not documented yet. */
32 class GroupsResourceApi {
33 final common_internal.ApiRequester _requester;
34
35 GroupsResourceApi(common_internal.ApiRequester client) :
36 _requester = client;
37
38 /**
39 * Gets one resource by id.
40 *
41 * Request parameters:
42 *
43 * [groupUniqueId] - The resource ID
44 *
45 * Completes with a [Groups].
46 *
47 * Completes with a [common.ApiRequestError] if the API endpoint returned an
48 * error.
49 *
50 * If the used [http.Client] completes with an error when making a REST call,
51 * this method will complete with the same error.
52 */
53 async.Future<Groups> get(core.String groupUniqueId) {
54 var _url = null;
55 var _queryParams = new core.Map();
56 var _uploadMedia = null;
57 var _uploadOptions = null;
58 var _downloadOptions = common.DownloadOptions.Metadata;
59 var _body = null;
60
61 if (groupUniqueId == null) {
62 throw new core.ArgumentError("Parameter groupUniqueId is required.");
63 }
64
65
66 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId');
67
68 var _response = _requester.request(_url,
69 "GET",
70 body: _body,
71 queryParams: _queryParams,
72 uploadOptions: _uploadOptions,
73 uploadMedia: _uploadMedia,
74 downloadOptions: _downloadOptions);
75 return _response.then((data) => new Groups.fromJson(data));
76 }
77
78 /**
79 * Updates an existing resource. This method supports patch semantics.
80 *
81 * [request] - The metadata request object.
82 *
83 * Request parameters:
84 *
85 * [groupUniqueId] - The resource ID
86 *
87 * Completes with a [Groups].
88 *
89 * Completes with a [common.ApiRequestError] if the API endpoint returned an
90 * error.
91 *
92 * If the used [http.Client] completes with an error when making a REST call,
93 * this method will complete with the same error.
94 */
95 async.Future<Groups> patch(Groups request, core.String groupUniqueId) {
96 var _url = null;
97 var _queryParams = new core.Map();
98 var _uploadMedia = null;
99 var _uploadOptions = null;
100 var _downloadOptions = common.DownloadOptions.Metadata;
101 var _body = null;
102
103 if (request != null) {
104 _body = convert.JSON.encode((request).toJson());
105 }
106 if (groupUniqueId == null) {
107 throw new core.ArgumentError("Parameter groupUniqueId is required.");
108 }
109
110
111 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId');
112
113 var _response = _requester.request(_url,
114 "PATCH",
115 body: _body,
116 queryParams: _queryParams,
117 uploadOptions: _uploadOptions,
118 uploadMedia: _uploadMedia,
119 downloadOptions: _downloadOptions);
120 return _response.then((data) => new Groups.fromJson(data));
121 }
122
123 /**
124 * Updates an existing resource.
125 *
126 * [request] - The metadata request object.
127 *
128 * Request parameters:
129 *
130 * [groupUniqueId] - The resource ID
131 *
132 * Completes with a [Groups].
133 *
134 * Completes with a [common.ApiRequestError] if the API endpoint returned an
135 * error.
136 *
137 * If the used [http.Client] completes with an error when making a REST call,
138 * this method will complete with the same error.
139 */
140 async.Future<Groups> update(Groups request, core.String groupUniqueId) {
141 var _url = null;
142 var _queryParams = new core.Map();
143 var _uploadMedia = null;
144 var _uploadOptions = null;
145 var _downloadOptions = common.DownloadOptions.Metadata;
146 var _body = null;
147
148 if (request != null) {
149 _body = convert.JSON.encode((request).toJson());
150 }
151 if (groupUniqueId == null) {
152 throw new core.ArgumentError("Parameter groupUniqueId is required.");
153 }
154
155
156 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId');
157
158 var _response = _requester.request(_url,
159 "PUT",
160 body: _body,
161 queryParams: _queryParams,
162 uploadOptions: _uploadOptions,
163 uploadMedia: _uploadMedia,
164 downloadOptions: _downloadOptions);
165 return _response.then((data) => new Groups.fromJson(data));
166 }
167
168 }
169
170
171
172 /** JSON template for Group resource */
173 class Groups {
174 /** Are external members allowed to join the group. */
175 core.String allowExternalMembers;
176
177 /** Is google allowed to contact admins. */
178 core.String allowGoogleCommunication;
179
180 /** If posting from web is allowed. */
181 core.String allowWebPosting;
182
183 /** If the group is archive only */
184 core.String archiveOnly;
185
186 /** Default email to which reply to any message should go. */
187 core.String customReplyTo;
188
189 /** Default message deny notification message */
190 core.String defaultMessageDenyNotificationText;
191
192 /** Description of the group */
193 core.String description;
194
195 /** Email id of the group */
196 core.String email;
197
198 /** If this groups should be included in global address list or not. */
199 core.String includeInGlobalAddressList;
200
201 /** If the contents of the group are archived. */
202 core.String isArchived;
203
204 /** The type of the resource. */
205 core.String kind;
206
207 /** Maximum message size allowed. */
208 core.int maxMessageBytes;
209
210 /** Can members post using the group email address. */
211 core.String membersCanPostAsTheGroup;
212
213 /**
214 * Default message display font. Possible values are: DEFAULT_FONT
215 * FIXED_WIDTH_FONT
216 */
217 core.String messageDisplayFont;
218
219 /**
220 * Moderation level for messages. Possible values are: MODERATE_ALL_MESSAGES
221 * MODERATE_NON_MEMBERS MODERATE_NEW_MEMBERS MODERATE_NONE
222 */
223 core.String messageModerationLevel;
224
225 /** Name of the Group */
226 core.String name;
227
228 /** Primary language for the group. */
229 core.String primaryLanguage;
230
231 /**
232 * Whome should the default reply to a message go to. Possible values are:
233 * REPLY_TO_CUSTOM REPLY_TO_SENDER REPLY_TO_LIST REPLY_TO_OWNER
234 * REPLY_TO_IGNORE REPLY_TO_MANAGERS
235 */
236 core.String replyTo;
237
238 /** Should the member be notified if his message is denied by owner. */
239 core.String sendMessageDenyNotification;
240
241 /** Is the group listed in groups directory */
242 core.String showInGroupDirectory;
243
244 /**
245 * Moderation level for messages detected as spam. Possible values are: ALLOW
246 * MODERATE SILENTLY_MODERATE REJECT
247 */
248 core.String spamModerationLevel;
249
250 /**
251 * Permission to contact owner of the group via web UI. Possbile values are:
252 * ANYONE_CAN_CONTACT ALL_IN_DOMAIN_CAN_CONTACT ALL_MEMBERS_CAN_CONTACT
253 * ALL_MANAGERS_CAN_CONTACT
254 */
255 core.String whoCanContactOwner;
256
257 /**
258 * Permissions to invite members. Possbile values are: ALL_MEMBERS_CAN_INVITE
259 * ALL_MANAGERS_CAN_INVITE
260 */
261 core.String whoCanInvite;
262
263 /**
264 * Permissions to join the group. Possible values are: ANYONE_CAN_JOIN
265 * ALL_IN_DOMAIN_CAN_JOIN INVITED_CAN_JOIN CAN_REQUEST_TO_JOIN
266 */
267 core.String whoCanJoin;
268
269 /**
270 * Permission to leave the group. Possible values are: ALL_MANAGERS_CAN_LEAVE
271 * ALL_MEMBERS_CAN_LEAVE
272 */
273 core.String whoCanLeaveGroup;
274
275 /**
276 * Permissions to post messages to the group. Possible values are:
277 * NONE_CAN_POST ALL_MANAGERS_CAN_POST ALL_MEMBERS_CAN_POST
278 * ALL_IN_DOMAIN_CAN_POST ANYONE_CAN_POST
279 */
280 core.String whoCanPostMessage;
281
282 /**
283 * Permissions to view group. Possbile values are: ANYONE_CAN_VIEW
284 * ALL_IN_DOMAIN_CAN_VIEW ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW
285 */
286 core.String whoCanViewGroup;
287
288 /**
289 * Permissions to view membership. Possbile values are: ALL_IN_DOMAIN_CAN_VIEW
290 * ALL_MEMBERS_CAN_VIEW ALL_MANAGERS_CAN_VIEW
291 */
292 core.String whoCanViewMembership;
293
294
295 Groups();
296
297 Groups.fromJson(core.Map _json) {
298 if (_json.containsKey("allowExternalMembers")) {
299 allowExternalMembers = _json["allowExternalMembers"];
300 }
301 if (_json.containsKey("allowGoogleCommunication")) {
302 allowGoogleCommunication = _json["allowGoogleCommunication"];
303 }
304 if (_json.containsKey("allowWebPosting")) {
305 allowWebPosting = _json["allowWebPosting"];
306 }
307 if (_json.containsKey("archiveOnly")) {
308 archiveOnly = _json["archiveOnly"];
309 }
310 if (_json.containsKey("customReplyTo")) {
311 customReplyTo = _json["customReplyTo"];
312 }
313 if (_json.containsKey("defaultMessageDenyNotificationText")) {
314 defaultMessageDenyNotificationText = _json["defaultMessageDenyNotification Text"];
315 }
316 if (_json.containsKey("description")) {
317 description = _json["description"];
318 }
319 if (_json.containsKey("email")) {
320 email = _json["email"];
321 }
322 if (_json.containsKey("includeInGlobalAddressList")) {
323 includeInGlobalAddressList = _json["includeInGlobalAddressList"];
324 }
325 if (_json.containsKey("isArchived")) {
326 isArchived = _json["isArchived"];
327 }
328 if (_json.containsKey("kind")) {
329 kind = _json["kind"];
330 }
331 if (_json.containsKey("maxMessageBytes")) {
332 maxMessageBytes = _json["maxMessageBytes"];
333 }
334 if (_json.containsKey("membersCanPostAsTheGroup")) {
335 membersCanPostAsTheGroup = _json["membersCanPostAsTheGroup"];
336 }
337 if (_json.containsKey("messageDisplayFont")) {
338 messageDisplayFont = _json["messageDisplayFont"];
339 }
340 if (_json.containsKey("messageModerationLevel")) {
341 messageModerationLevel = _json["messageModerationLevel"];
342 }
343 if (_json.containsKey("name")) {
344 name = _json["name"];
345 }
346 if (_json.containsKey("primaryLanguage")) {
347 primaryLanguage = _json["primaryLanguage"];
348 }
349 if (_json.containsKey("replyTo")) {
350 replyTo = _json["replyTo"];
351 }
352 if (_json.containsKey("sendMessageDenyNotification")) {
353 sendMessageDenyNotification = _json["sendMessageDenyNotification"];
354 }
355 if (_json.containsKey("showInGroupDirectory")) {
356 showInGroupDirectory = _json["showInGroupDirectory"];
357 }
358 if (_json.containsKey("spamModerationLevel")) {
359 spamModerationLevel = _json["spamModerationLevel"];
360 }
361 if (_json.containsKey("whoCanContactOwner")) {
362 whoCanContactOwner = _json["whoCanContactOwner"];
363 }
364 if (_json.containsKey("whoCanInvite")) {
365 whoCanInvite = _json["whoCanInvite"];
366 }
367 if (_json.containsKey("whoCanJoin")) {
368 whoCanJoin = _json["whoCanJoin"];
369 }
370 if (_json.containsKey("whoCanLeaveGroup")) {
371 whoCanLeaveGroup = _json["whoCanLeaveGroup"];
372 }
373 if (_json.containsKey("whoCanPostMessage")) {
374 whoCanPostMessage = _json["whoCanPostMessage"];
375 }
376 if (_json.containsKey("whoCanViewGroup")) {
377 whoCanViewGroup = _json["whoCanViewGroup"];
378 }
379 if (_json.containsKey("whoCanViewMembership")) {
380 whoCanViewMembership = _json["whoCanViewMembership"];
381 }
382 }
383
384 core.Map toJson() {
385 var _json = new core.Map();
386 if (allowExternalMembers != null) {
387 _json["allowExternalMembers"] = allowExternalMembers;
388 }
389 if (allowGoogleCommunication != null) {
390 _json["allowGoogleCommunication"] = allowGoogleCommunication;
391 }
392 if (allowWebPosting != null) {
393 _json["allowWebPosting"] = allowWebPosting;
394 }
395 if (archiveOnly != null) {
396 _json["archiveOnly"] = archiveOnly;
397 }
398 if (customReplyTo != null) {
399 _json["customReplyTo"] = customReplyTo;
400 }
401 if (defaultMessageDenyNotificationText != null) {
402 _json["defaultMessageDenyNotificationText"] = defaultMessageDenyNotificati onText;
403 }
404 if (description != null) {
405 _json["description"] = description;
406 }
407 if (email != null) {
408 _json["email"] = email;
409 }
410 if (includeInGlobalAddressList != null) {
411 _json["includeInGlobalAddressList"] = includeInGlobalAddressList;
412 }
413 if (isArchived != null) {
414 _json["isArchived"] = isArchived;
415 }
416 if (kind != null) {
417 _json["kind"] = kind;
418 }
419 if (maxMessageBytes != null) {
420 _json["maxMessageBytes"] = maxMessageBytes;
421 }
422 if (membersCanPostAsTheGroup != null) {
423 _json["membersCanPostAsTheGroup"] = membersCanPostAsTheGroup;
424 }
425 if (messageDisplayFont != null) {
426 _json["messageDisplayFont"] = messageDisplayFont;
427 }
428 if (messageModerationLevel != null) {
429 _json["messageModerationLevel"] = messageModerationLevel;
430 }
431 if (name != null) {
432 _json["name"] = name;
433 }
434 if (primaryLanguage != null) {
435 _json["primaryLanguage"] = primaryLanguage;
436 }
437 if (replyTo != null) {
438 _json["replyTo"] = replyTo;
439 }
440 if (sendMessageDenyNotification != null) {
441 _json["sendMessageDenyNotification"] = sendMessageDenyNotification;
442 }
443 if (showInGroupDirectory != null) {
444 _json["showInGroupDirectory"] = showInGroupDirectory;
445 }
446 if (spamModerationLevel != null) {
447 _json["spamModerationLevel"] = spamModerationLevel;
448 }
449 if (whoCanContactOwner != null) {
450 _json["whoCanContactOwner"] = whoCanContactOwner;
451 }
452 if (whoCanInvite != null) {
453 _json["whoCanInvite"] = whoCanInvite;
454 }
455 if (whoCanJoin != null) {
456 _json["whoCanJoin"] = whoCanJoin;
457 }
458 if (whoCanLeaveGroup != null) {
459 _json["whoCanLeaveGroup"] = whoCanLeaveGroup;
460 }
461 if (whoCanPostMessage != null) {
462 _json["whoCanPostMessage"] = whoCanPostMessage;
463 }
464 if (whoCanViewGroup != null) {
465 _json["whoCanViewGroup"] = whoCanViewGroup;
466 }
467 if (whoCanViewMembership != null) {
468 _json["whoCanViewMembership"] = whoCanViewMembership;
469 }
470 return _json;
471 }
472 }
473
474
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698