1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package groupssettings provides access to the Groups Settings API.
8//
9// For product documentation, see: https://developers.google.com/google-apps/groups-settings/get_started
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/groupssettings/v1"
16//   ...
17//   ctx := context.Background()
18//   groupssettingsService, err := groupssettings.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   groupssettingsService, err := groupssettings.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   groupssettingsService, err := groupssettings.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package groupssettings // import "google.golang.org/api/groupssettings/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "groupssettings:v1"
75const apiName = "groupssettings"
76const apiVersion = "v1"
77const basePath = "https://www.googleapis.com/groups/v1/groups/"
78
79// OAuth2 scopes used by this API.
80const (
81	// View and manage the settings of a G Suite group
82	AppsGroupsSettingsScope = "https://www.googleapis.com/auth/apps.groups.settings"
83)
84
85// NewService creates a new Service.
86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
87	scopesOption := option.WithScopes(
88		"https://www.googleapis.com/auth/apps.groups.settings",
89	)
90	// NOTE: prepend, so we don't override user-specified scopes.
91	opts = append([]option.ClientOption{scopesOption}, opts...)
92	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
93	client, endpoint, err := htransport.NewClient(ctx, opts...)
94	if err != nil {
95		return nil, err
96	}
97	s, err := New(client)
98	if err != nil {
99		return nil, err
100	}
101	if endpoint != "" {
102		s.BasePath = endpoint
103	}
104	return s, nil
105}
106
107// New creates a new Service. It uses the provided http.Client for requests.
108//
109// Deprecated: please use NewService instead.
110// To provide a custom HTTP client, use option.WithHTTPClient.
111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
112func New(client *http.Client) (*Service, error) {
113	if client == nil {
114		return nil, errors.New("client is nil")
115	}
116	s := &Service{client: client, BasePath: basePath}
117	s.Groups = NewGroupsService(s)
118	return s, nil
119}
120
121type Service struct {
122	client    *http.Client
123	BasePath  string // API endpoint base URL
124	UserAgent string // optional additional User-Agent fragment
125
126	Groups *GroupsService
127}
128
129func (s *Service) userAgent() string {
130	if s.UserAgent == "" {
131		return googleapi.UserAgent
132	}
133	return googleapi.UserAgent + " " + s.UserAgent
134}
135
136func NewGroupsService(s *Service) *GroupsService {
137	rs := &GroupsService{s: s}
138	return rs
139}
140
141type GroupsService struct {
142	s *Service
143}
144
145// Groups: JSON template for Group resource
146type Groups struct {
147	// AllowExternalMembers: Identifies whether members external to your
148	// organization can join the group. Possible values are:
149	// - true: G Suite users external to your organization can become
150	// members of this group.
151	// - false: Users not belonging to the organization are not allowed to
152	// become members of this group.
153	AllowExternalMembers string `json:"allowExternalMembers,omitempty"`
154
155	// AllowGoogleCommunication: Deprecated. Allows Google to contact
156	// administrator of the group.
157	// - true: Allow Google to contact managers of this group. Occasionally
158	// Google may send updates on the latest features, ask for input on new
159	// features, or ask for permission to highlight your group.
160	// - false: Google can not contact managers of this group.
161	AllowGoogleCommunication string `json:"allowGoogleCommunication,omitempty"`
162
163	// AllowWebPosting: Allows posting from web. Possible values are:
164	// - true: Allows any member to post to the group forum.
165	// - false: Members only use Gmail to communicate with the group.
166	AllowWebPosting string `json:"allowWebPosting,omitempty"`
167
168	// ArchiveOnly: Allows the group to be archived only. Possible values
169	// are:
170	// - true: Group is archived and the group is inactive. New messages to
171	// this group are rejected. The older archived messages are browseable
172	// and searchable.
173	// - If true, the whoCanPostMessage property is set to NONE_CAN_POST.
174	//
175	// - If reverted from true to false, whoCanPostMessages is set to
176	// ALL_MANAGERS_CAN_POST.
177	// - false: The group is active and can receive messages.
178	// - When false, updating whoCanPostMessage to NONE_CAN_POST, results in
179	// an error.
180	ArchiveOnly string `json:"archiveOnly,omitempty"`
181
182	// CustomFooterText: Set the content of custom footer text. The maximum
183	// number of characters is 1,000.
184	CustomFooterText string `json:"customFooterText,omitempty"`
185
186	// CustomReplyTo: An email address used when replying to a message if
187	// the replyTo property is set to REPLY_TO_CUSTOM. This address is
188	// defined by an account administrator.
189	// - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the
190	// customReplyTo property holds a custom email address used when
191	// replying to a message.
192	// - If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the
193	// customReplyTo property must have a text value or an error is
194	// returned.
195	CustomReplyTo string `json:"customReplyTo,omitempty"`
196
197	// CustomRolesEnabledForSettingsToBeMerged: Specifies whether the group
198	// has a custom role that's included in one of the settings being
199	// merged. This field is read-only and update/patch requests to it are
200	// ignored. Possible values are:
201	// - true
202	// - false
203	CustomRolesEnabledForSettingsToBeMerged string `json:"customRolesEnabledForSettingsToBeMerged,omitempty"`
204
205	// DefaultMessageDenyNotificationText: When a message is rejected, this
206	// is text for the rejection notification sent to the message's author.
207	// By default, this property is empty and has no value in the API's
208	// response body. The maximum notification text size is 10,000
209	// characters. Note: Requires sendMessageDenyNotification property to be
210	// true.
211	DefaultMessageDenyNotificationText string `json:"defaultMessageDenyNotificationText,omitempty"`
212
213	// DefaultSender: Default sender for members who can post messages as
214	// the group. Possible values are: - `DEFAULT_SELF`: By default messages
215	// will be sent from the user - `GROUP`: By default messages will be
216	// sent from the group
217	DefaultSender string `json:"default_sender,omitempty"`
218
219	// Description: Description of the group. This property value may be an
220	// empty string if no group description has been entered. If entered,
221	// the maximum group description is no more than 300 characters.
222	Description string `json:"description,omitempty"`
223
224	// Email: The group's email address. This property can be updated using
225	// the Directory API. Note: Only a group owner can change a group's
226	// email address. A group manager can't do this.
227	// When you change your group's address using the Directory API or the
228	// control panel, you are changing the address your subscribers use to
229	// send email and the web address people use to access your group.
230	// People can't reach your group by visiting the old address.
231	Email string `json:"email,omitempty"`
232
233	// EnableCollaborativeInbox: Specifies whether a collaborative inbox
234	// will remain turned on for the group. Possible values are:
235	// - true
236	// - false
237	EnableCollaborativeInbox string `json:"enableCollaborativeInbox,omitempty"`
238
239	// FavoriteRepliesOnTop: Indicates if favorite replies should be
240	// displayed above other replies.
241	// - true: Favorite replies will be displayed above other replies.
242	// - false: Favorite replies will not be displayed above other replies.
243	FavoriteRepliesOnTop string `json:"favoriteRepliesOnTop,omitempty"`
244
245	// IncludeCustomFooter: Whether to include custom footer. Possible
246	// values are:
247	// - true
248	// - false
249	IncludeCustomFooter string `json:"includeCustomFooter,omitempty"`
250
251	// IncludeInGlobalAddressList: Enables the group to be included in the
252	// Global Address List. For more information, see the help center.
253	// Possible values are:
254	// - true: Group is included in the Global Address List.
255	// - false: Group is not included in the Global Address List.
256	IncludeInGlobalAddressList string `json:"includeInGlobalAddressList,omitempty"`
257
258	// IsArchived: Allows the Group contents to be archived. Possible values
259	// are:
260	// - true: Archive messages sent to the group.
261	// - false: Do not keep an archive of messages sent to this group. If
262	// false, previously archived messages remain in the archive.
263	IsArchived string `json:"isArchived,omitempty"`
264
265	// Kind: The type of the resource. It is always groupsSettings#groups.
266	Kind string `json:"kind,omitempty"`
267
268	// MaxMessageBytes: Deprecated. The maximum size of a message is 25Mb.
269	MaxMessageBytes int64 `json:"maxMessageBytes,omitempty"`
270
271	// MembersCanPostAsTheGroup: Enables members to post messages as the
272	// group. Possible values are:
273	// - true: Group member can post messages using the group's email
274	// address instead of their own email address. Message appear to
275	// originate from the group itself. Note: When true, any message
276	// moderation settings on individual users or new members do not apply
277	// to posts made on behalf of the group.
278	// - false: Members can not post in behalf of the group's email address.
279	MembersCanPostAsTheGroup string `json:"membersCanPostAsTheGroup,omitempty"`
280
281	// MessageDisplayFont: Deprecated. The default message display font
282	// always has a value of "DEFAULT_FONT".
283	MessageDisplayFont string `json:"messageDisplayFont,omitempty"`
284
285	// MessageModerationLevel: Moderation level of incoming messages.
286	// Possible values are:
287	// - MODERATE_ALL_MESSAGES: All messages are sent to the group owner's
288	// email address for approval. If approved, the message is sent to the
289	// group.
290	// - MODERATE_NON_MEMBERS: All messages from non group members are sent
291	// to the group owner's email address for approval. If approved, the
292	// message is sent to the group.
293	// - MODERATE_NEW_MEMBERS: All messages from new members are sent to the
294	// group owner's email address for approval. If approved, the message is
295	// sent to the group.
296	// - MODERATE_NONE: No moderator approval is required. Messages are
297	// delivered directly to the group. Note: When the whoCanPostMessage is
298	// set to ANYONE_CAN_POST, we recommend the messageModerationLevel be
299	// set to MODERATE_NON_MEMBERS to protect the group from possible
300	// spam.
301	// When memberCanPostAsTheGroup is true, any message moderation settings
302	// on individual users or new members will not apply to posts made on
303	// behalf of the group.
304	MessageModerationLevel string `json:"messageModerationLevel,omitempty"`
305
306	// Name: Name of the group, which has a maximum size of 75 characters.
307	Name string `json:"name,omitempty"`
308
309	// PrimaryLanguage: The primary language for group. For a group's
310	// primary language use the language tags from the G Suite languages
311	// found at G Suite Email Settings API Email Language Tags.
312	PrimaryLanguage string `json:"primaryLanguage,omitempty"`
313
314	// ReplyTo: Specifies who receives the default reply. Possible values
315	// are:
316	// - REPLY_TO_CUSTOM: For replies to messages, use the group's custom
317	// email address.
318	// When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the
319	// customReplyTo property holds the custom email address used when
320	// replying to a message. If the group's ReplyTo property is set to
321	// REPLY_TO_CUSTOM, the customReplyTo property must have a value.
322	// Otherwise an error is returned.
323	//
324	// - REPLY_TO_SENDER: The reply sent to author of message.
325	// - REPLY_TO_LIST: This reply message is sent to the group.
326	// - REPLY_TO_OWNER: The reply is sent to the owner(s) of the group.
327	// This does not include the group's managers.
328	// - REPLY_TO_IGNORE: Group users individually decide where the message
329	// reply is sent.
330	// - REPLY_TO_MANAGERS: This reply message is sent to the group's
331	// managers, which includes all managers and the group owner.
332	ReplyTo string `json:"replyTo,omitempty"`
333
334	// SendMessageDenyNotification: Allows a member to be notified if the
335	// member's message to the group is denied by the group owner. Possible
336	// values are:
337	// - true: When a message is rejected, send the deny message
338	// notification to the message author.
339	// The defaultMessageDenyNotificationText property is dependent on the
340	// sendMessageDenyNotification property being true.
341	//
342	// - false: When a message is rejected, no notification is sent.
343	SendMessageDenyNotification string `json:"sendMessageDenyNotification,omitempty"`
344
345	// ShowInGroupDirectory: Deprecated. This is merged into the new
346	// whoCanDiscoverGroup setting. Allows the group to be visible in the
347	// Groups Directory. Possible values are:
348	// - true: All groups in the account are listed in the Groups directory.
349	//
350	// - false: All groups in the account are not listed in the directory.
351	ShowInGroupDirectory string `json:"showInGroupDirectory,omitempty"`
352
353	// SpamModerationLevel: Specifies moderation levels for messages
354	// detected as spam. Possible values are:
355	// - ALLOW: Post the message to the group.
356	// - MODERATE: Send the message to the moderation queue. This is the
357	// default.
358	// - SILENTLY_MODERATE: Send the message to the moderation queue, but do
359	// not send notification to moderators.
360	// - REJECT: Immediately reject the message.
361	SpamModerationLevel string `json:"spamModerationLevel,omitempty"`
362
363	// WhoCanAdd: Deprecated. This is merged into the new
364	// whoCanModerateMembers setting. Permissions to add members. Possible
365	// values are:
366	// - ALL_MEMBERS_CAN_ADD: Managers and members can directly add new
367	// members.
368	// - ALL_MANAGERS_CAN_ADD: Only managers can directly add new members.
369	// this includes the group's owner.
370	// - ALL_OWNERS_CAN_ADD: Only owners can directly add new members.
371	// - NONE_CAN_ADD: No one can directly add new members.
372	WhoCanAdd string `json:"whoCanAdd,omitempty"`
373
374	// WhoCanAddReferences: Deprecated. This functionality is no longer
375	// supported in the Google Groups UI. The value is always "NONE".
376	WhoCanAddReferences string `json:"whoCanAddReferences,omitempty"`
377
378	// WhoCanApproveMembers: Specifies who can approve members who ask to
379	// join groups. This permission will be deprecated once it is merged
380	// into the new whoCanModerateMembers setting. Possible values are:
381	// - ALL_MEMBERS_CAN_APPROVE
382	// - ALL_MANAGERS_CAN_APPROVE
383	// - ALL_OWNERS_CAN_APPROVE
384	// - NONE_CAN_APPROVE
385	WhoCanApproveMembers string `json:"whoCanApproveMembers,omitempty"`
386
387	// WhoCanApproveMessages: Deprecated. This is merged into the new
388	// whoCanModerateContent setting. Specifies who can approve pending
389	// messages in the moderation queue. Possible values are:
390	// - ALL_MEMBERS
391	// - OWNERS_AND_MANAGERS
392	// - OWNERS_ONLY
393	// - NONE
394	WhoCanApproveMessages string `json:"whoCanApproveMessages,omitempty"`
395
396	// WhoCanAssignTopics: Deprecated. This is merged into the new
397	// whoCanAssistContent setting. Permission to assign topics in a forum
398	// to another user. Possible values are:
399	// - ALL_MEMBERS
400	// - OWNERS_AND_MANAGERS
401	// - MANAGERS_ONLY
402	// - OWNERS_ONLY
403	// - NONE
404	WhoCanAssignTopics string `json:"whoCanAssignTopics,omitempty"`
405
406	// WhoCanAssistContent: Specifies who can moderate metadata. Possible
407	// values are:
408	// - ALL_MEMBERS
409	// - OWNERS_AND_MANAGERS
410	// - MANAGERS_ONLY
411	// - OWNERS_ONLY
412	// - NONE
413	WhoCanAssistContent string `json:"whoCanAssistContent,omitempty"`
414
415	// WhoCanBanUsers: Specifies who can deny membership to users. This
416	// permission will be deprecated once it is merged into the new
417	// whoCanModerateMembers setting. Possible values are:
418	// - ALL_MEMBERS
419	// - OWNERS_AND_MANAGERS
420	// - OWNERS_ONLY
421	// - NONE
422	WhoCanBanUsers string `json:"whoCanBanUsers,omitempty"`
423
424	// WhoCanContactOwner: Permission to contact owner of the group via web
425	// UI. Possible values are:
426	// - ALL_IN_DOMAIN_CAN_CONTACT
427	// - ALL_MANAGERS_CAN_CONTACT
428	// - ALL_MEMBERS_CAN_CONTACT
429	// - ANYONE_CAN_CONTACT
430	// - ALL_OWNERS_CAN_CONTACT
431	WhoCanContactOwner string `json:"whoCanContactOwner,omitempty"`
432
433	// WhoCanDeleteAnyPost: Deprecated. This is merged into the new
434	// whoCanModerateContent setting. Specifies who can delete replies to
435	// topics. (Authors can always delete their own posts). Possible values
436	// are:
437	// - ALL_MEMBERS
438	// - OWNERS_AND_MANAGERS
439	// - OWNERS_ONLY
440	// - NONE
441	WhoCanDeleteAnyPost string `json:"whoCanDeleteAnyPost,omitempty"`
442
443	// WhoCanDeleteTopics: Deprecated. This is merged into the new
444	// whoCanModerateContent setting. Specifies who can delete topics.
445	// Possible values are:
446	// - ALL_MEMBERS
447	// - OWNERS_AND_MANAGERS
448	// - OWNERS_ONLY
449	// - NONE
450	WhoCanDeleteTopics string `json:"whoCanDeleteTopics,omitempty"`
451
452	// WhoCanDiscoverGroup: Specifies the set of users for whom this group
453	// is discoverable. Possible values are:
454	// - ANYONE_CAN_DISCOVER
455	// - ALL_IN_DOMAIN_CAN_DISCOVER
456	// - ALL_MEMBERS_CAN_DISCOVER
457	WhoCanDiscoverGroup string `json:"whoCanDiscoverGroup,omitempty"`
458
459	// WhoCanEnterFreeFormTags: Deprecated. This is merged into the new
460	// whoCanAssistContent setting. Permission to enter free form tags for
461	// topics in a forum. Possible values are:
462	// - ALL_MEMBERS
463	// - OWNERS_AND_MANAGERS
464	// - MANAGERS_ONLY
465	// - OWNERS_ONLY
466	// - NONE
467	WhoCanEnterFreeFormTags string `json:"whoCanEnterFreeFormTags,omitempty"`
468
469	// WhoCanHideAbuse: Deprecated. This is merged into the new
470	// whoCanModerateContent setting. Specifies who can hide posts by
471	// reporting them as abuse. Possible values are:
472	// - ALL_MEMBERS
473	// - OWNERS_AND_MANAGERS
474	// - OWNERS_ONLY
475	// - NONE
476	WhoCanHideAbuse string `json:"whoCanHideAbuse,omitempty"`
477
478	// WhoCanInvite: Deprecated. This is merged into the new
479	// whoCanModerateMembers setting. Permissions to invite new members.
480	// Possible values are:
481	// - ALL_MEMBERS_CAN_INVITE: Managers and members can invite a new
482	// member candidate.
483	// - ALL_MANAGERS_CAN_INVITE: Only managers can invite a new member.
484	// This includes the group's owner.
485	// - ALL_OWNERS_CAN_INVITE: Only owners can invite a new member.
486	// - NONE_CAN_INVITE: No one can invite a new member candidate.
487	WhoCanInvite string `json:"whoCanInvite,omitempty"`
488
489	// WhoCanJoin: Permission to join group. Possible values are:
490	// - ANYONE_CAN_JOIN: Anyone in the account domain can join. This
491	// includes accounts with multiple domains.
492	// - ALL_IN_DOMAIN_CAN_JOIN: Any Internet user who is outside your
493	// domain can access your Google Groups service and view the list of
494	// groups in your Groups directory. Warning: Group owners can add
495	// external addresses, outside of the domain to their groups. They can
496	// also allow people outside your domain to join their groups. If you
497	// later disable this option, any external addresses already added to
498	// users' groups remain in those groups.
499	// - INVITED_CAN_JOIN: Candidates for membership can be invited to join.
500	//
501	// - CAN_REQUEST_TO_JOIN: Non members can request an invitation to join.
502	WhoCanJoin string `json:"whoCanJoin,omitempty"`
503
504	// WhoCanLeaveGroup: Permission to leave the group. Possible values are:
505	//
506	// - ALL_MANAGERS_CAN_LEAVE
507	// - ALL_MEMBERS_CAN_LEAVE
508	// - NONE_CAN_LEAVE
509	WhoCanLeaveGroup string `json:"whoCanLeaveGroup,omitempty"`
510
511	// WhoCanLockTopics: Deprecated. This is merged into the new
512	// whoCanModerateContent setting. Specifies who can prevent users from
513	// posting replies to topics. Possible values are:
514	// - ALL_MEMBERS
515	// - OWNERS_AND_MANAGERS
516	// - OWNERS_ONLY
517	// - NONE
518	WhoCanLockTopics string `json:"whoCanLockTopics,omitempty"`
519
520	// WhoCanMakeTopicsSticky: Deprecated. This is merged into the new
521	// whoCanModerateContent setting. Specifies who can make topics appear
522	// at the top of the topic list. Possible values are:
523	// - ALL_MEMBERS
524	// - OWNERS_AND_MANAGERS
525	// - OWNERS_ONLY
526	// - NONE
527	WhoCanMakeTopicsSticky string `json:"whoCanMakeTopicsSticky,omitempty"`
528
529	// WhoCanMarkDuplicate: Deprecated. This is merged into the new
530	// whoCanAssistContent setting. Permission to mark a topic as a
531	// duplicate of another topic. Possible values are:
532	// - ALL_MEMBERS
533	// - OWNERS_AND_MANAGERS
534	// - MANAGERS_ONLY
535	// - OWNERS_ONLY
536	// - NONE
537	WhoCanMarkDuplicate string `json:"whoCanMarkDuplicate,omitempty"`
538
539	// WhoCanMarkFavoriteReplyOnAnyTopic: Deprecated. This is merged into
540	// the new whoCanAssistContent setting. Permission to mark any other
541	// user's post as a favorite reply. Possible values are:
542	// - ALL_MEMBERS
543	// - OWNERS_AND_MANAGERS
544	// - MANAGERS_ONLY
545	// - OWNERS_ONLY
546	// - NONE
547	WhoCanMarkFavoriteReplyOnAnyTopic string `json:"whoCanMarkFavoriteReplyOnAnyTopic,omitempty"`
548
549	// WhoCanMarkFavoriteReplyOnOwnTopic: Deprecated. This is merged into
550	// the new whoCanAssistContent setting. Permission to mark a post for a
551	// topic they started as a favorite reply. Possible values are:
552	// - ALL_MEMBERS
553	// - OWNERS_AND_MANAGERS
554	// - MANAGERS_ONLY
555	// - OWNERS_ONLY
556	// - NONE
557	WhoCanMarkFavoriteReplyOnOwnTopic string `json:"whoCanMarkFavoriteReplyOnOwnTopic,omitempty"`
558
559	// WhoCanMarkNoResponseNeeded: Deprecated. This is merged into the new
560	// whoCanAssistContent setting. Permission to mark a topic as not
561	// needing a response. Possible values are:
562	// - ALL_MEMBERS
563	// - OWNERS_AND_MANAGERS
564	// - MANAGERS_ONLY
565	// - OWNERS_ONLY
566	// - NONE
567	WhoCanMarkNoResponseNeeded string `json:"whoCanMarkNoResponseNeeded,omitempty"`
568
569	// WhoCanModerateContent: Specifies who can moderate content. Possible
570	// values are:
571	// - ALL_MEMBERS
572	// - OWNERS_AND_MANAGERS
573	// - OWNERS_ONLY
574	// - NONE
575	WhoCanModerateContent string `json:"whoCanModerateContent,omitempty"`
576
577	// WhoCanModerateMembers: Specifies who can manage members. Possible
578	// values are:
579	// - ALL_MEMBERS
580	// - OWNERS_AND_MANAGERS
581	// - OWNERS_ONLY
582	// - NONE
583	WhoCanModerateMembers string `json:"whoCanModerateMembers,omitempty"`
584
585	// WhoCanModifyMembers: Deprecated. This is merged into the new
586	// whoCanModerateMembers setting. Specifies who can change group
587	// members' roles. Possible values are:
588	// - ALL_MEMBERS
589	// - OWNERS_AND_MANAGERS
590	// - OWNERS_ONLY
591	// - NONE
592	WhoCanModifyMembers string `json:"whoCanModifyMembers,omitempty"`
593
594	// WhoCanModifyTagsAndCategories: Deprecated. This is merged into the
595	// new whoCanAssistContent setting. Permission to change tags and
596	// categories. Possible values are:
597	// - ALL_MEMBERS
598	// - OWNERS_AND_MANAGERS
599	// - MANAGERS_ONLY
600	// - OWNERS_ONLY
601	// - NONE
602	WhoCanModifyTagsAndCategories string `json:"whoCanModifyTagsAndCategories,omitempty"`
603
604	// WhoCanMoveTopicsIn: Deprecated. This is merged into the new
605	// whoCanModerateContent setting. Specifies who can move topics into the
606	// group or forum. Possible values are:
607	// - ALL_MEMBERS
608	// - OWNERS_AND_MANAGERS
609	// - OWNERS_ONLY
610	// - NONE
611	WhoCanMoveTopicsIn string `json:"whoCanMoveTopicsIn,omitempty"`
612
613	// WhoCanMoveTopicsOut: Deprecated. This is merged into the new
614	// whoCanModerateContent setting. Specifies who can move topics out of
615	// the group or forum. Possible values are:
616	// - ALL_MEMBERS
617	// - OWNERS_AND_MANAGERS
618	// - OWNERS_ONLY
619	// - NONE
620	WhoCanMoveTopicsOut string `json:"whoCanMoveTopicsOut,omitempty"`
621
622	// WhoCanPostAnnouncements: Deprecated. This is merged into the new
623	// whoCanModerateContent setting. Specifies who can post announcements,
624	// a special topic type. Possible values are:
625	// - ALL_MEMBERS
626	// - OWNERS_AND_MANAGERS
627	// - OWNERS_ONLY
628	// - NONE
629	WhoCanPostAnnouncements string `json:"whoCanPostAnnouncements,omitempty"`
630
631	// WhoCanPostMessage: Permissions to post messages. Possible values are:
632	//
633	// - NONE_CAN_POST: The group is disabled and archived. No one can post
634	// a message to this group.
635	// - When archiveOnly is false, updating whoCanPostMessage to
636	// NONE_CAN_POST, results in an error.
637	// - If archiveOnly is reverted from true to false, whoCanPostMessages
638	// is set to ALL_MANAGERS_CAN_POST.
639	// - ALL_MANAGERS_CAN_POST: Managers, including group owners, can post
640	// messages.
641	// - ALL_MEMBERS_CAN_POST: Any group member can post a message.
642	// - ALL_OWNERS_CAN_POST: Only group owners can post a message.
643	// - ALL_IN_DOMAIN_CAN_POST: Anyone in the account can post a message.
644	//
645	// - ANYONE_CAN_POST: Any Internet user who outside your account can
646	// access your Google Groups service and post a message. Note: When
647	// whoCanPostMessage is set to ANYONE_CAN_POST, we recommend the
648	// messageModerationLevel be set to MODERATE_NON_MEMBERS to protect the
649	// group from possible spam.
650	WhoCanPostMessage string `json:"whoCanPostMessage,omitempty"`
651
652	// WhoCanTakeTopics: Deprecated. This is merged into the new
653	// whoCanAssistContent setting. Permission to take topics in a forum.
654	// Possible values are:
655	// - ALL_MEMBERS
656	// - OWNERS_AND_MANAGERS
657	// - MANAGERS_ONLY
658	// - OWNERS_ONLY
659	// - NONE
660	WhoCanTakeTopics string `json:"whoCanTakeTopics,omitempty"`
661
662	// WhoCanUnassignTopic: Deprecated. This is merged into the new
663	// whoCanAssistContent setting. Permission to unassign any topic in a
664	// forum. Possible values are:
665	// - ALL_MEMBERS
666	// - OWNERS_AND_MANAGERS
667	// - MANAGERS_ONLY
668	// - OWNERS_ONLY
669	// - NONE
670	WhoCanUnassignTopic string `json:"whoCanUnassignTopic,omitempty"`
671
672	// WhoCanUnmarkFavoriteReplyOnAnyTopic: Deprecated. This is merged into
673	// the new whoCanAssistContent setting. Permission to unmark any post
674	// from a favorite reply. Possible values are:
675	// - ALL_MEMBERS
676	// - OWNERS_AND_MANAGERS
677	// - MANAGERS_ONLY
678	// - OWNERS_ONLY
679	// - NONE
680	WhoCanUnmarkFavoriteReplyOnAnyTopic string `json:"whoCanUnmarkFavoriteReplyOnAnyTopic,omitempty"`
681
682	// WhoCanViewGroup: Permissions to view group messages. Possible values
683	// are:
684	// - ANYONE_CAN_VIEW: Any Internet user can view the group's messages.
685	//
686	// - ALL_IN_DOMAIN_CAN_VIEW: Anyone in your account can view this
687	// group's messages.
688	// - ALL_MEMBERS_CAN_VIEW: All group members can view the group's
689	// messages.
690	// - ALL_MANAGERS_CAN_VIEW: Any group manager can view this group's
691	// messages.
692	WhoCanViewGroup string `json:"whoCanViewGroup,omitempty"`
693
694	// WhoCanViewMembership: Permissions to view membership. Possible values
695	// are:
696	// - ALL_IN_DOMAIN_CAN_VIEW: Anyone in the account can view the group
697	// members list.
698	// If a group already has external members, those members can still send
699	// email to this group.
700	//
701	// - ALL_MEMBERS_CAN_VIEW: The group members can view the group members
702	// list.
703	// - ALL_MANAGERS_CAN_VIEW: The group managers can view group members
704	// list.
705	WhoCanViewMembership string `json:"whoCanViewMembership,omitempty"`
706
707	// ServerResponse contains the HTTP response code and headers from the
708	// server.
709	googleapi.ServerResponse `json:"-"`
710
711	// ForceSendFields is a list of field names (e.g.
712	// "AllowExternalMembers") to unconditionally include in API requests.
713	// By default, fields with empty or default values are omitted from API
714	// requests. However, any non-pointer, non-interface field appearing in
715	// ForceSendFields will be sent to the server regardless of whether the
716	// field is empty or not. This may be used to include empty fields in
717	// Patch requests.
718	ForceSendFields []string `json:"-"`
719
720	// NullFields is a list of field names (e.g. "AllowExternalMembers") to
721	// include in API requests with the JSON null value. By default, fields
722	// with empty values are omitted from API requests. However, any field
723	// with an empty value appearing in NullFields will be sent to the
724	// server as null. It is an error if a field in this list has a
725	// non-empty value. This may be used to include null fields in Patch
726	// requests.
727	NullFields []string `json:"-"`
728}
729
730func (s *Groups) MarshalJSON() ([]byte, error) {
731	type NoMethod Groups
732	raw := NoMethod(*s)
733	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
734}
735
736// method id "groupsSettings.groups.get":
737
738type GroupsGetCall struct {
739	s             *Service
740	groupUniqueId string
741	urlParams_    gensupport.URLParams
742	ifNoneMatch_  string
743	ctx_          context.Context
744	header_       http.Header
745}
746
747// Get: Gets one resource by id.
748//
749// - groupUniqueId: The group's email address.
750func (r *GroupsService) Get(groupUniqueId string) *GroupsGetCall {
751	c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
752	c.groupUniqueId = groupUniqueId
753	return c
754}
755
756// Fields allows partial responses to be retrieved. See
757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
758// for more information.
759func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
761	return c
762}
763
764// IfNoneMatch sets the optional parameter which makes the operation
765// fail if the object's ETag matches the given value. This is useful for
766// getting updates only after the object has changed since the last
767// request. Use googleapi.IsNotModified to check whether the response
768// error from Do is the result of In-None-Match.
769func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
770	c.ifNoneMatch_ = entityTag
771	return c
772}
773
774// Context sets the context to be used in this call's Do method. Any
775// pending HTTP request will be aborted if the provided context is
776// canceled.
777func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
778	c.ctx_ = ctx
779	return c
780}
781
782// Header returns an http.Header that can be modified by the caller to
783// add HTTP headers to the request.
784func (c *GroupsGetCall) Header() http.Header {
785	if c.header_ == nil {
786		c.header_ = make(http.Header)
787	}
788	return c.header_
789}
790
791func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
792	reqHeaders := make(http.Header)
793	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
794	for k, v := range c.header_ {
795		reqHeaders[k] = v
796	}
797	reqHeaders.Set("User-Agent", c.s.userAgent())
798	if c.ifNoneMatch_ != "" {
799		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
800	}
801	var body io.Reader = nil
802	c.urlParams_.Set("alt", alt)
803	c.urlParams_.Set("prettyPrint", "false")
804	urls := googleapi.ResolveRelative(c.s.BasePath, "{groupUniqueId}")
805	urls += "?" + c.urlParams_.Encode()
806	req, err := http.NewRequest("GET", urls, body)
807	if err != nil {
808		return nil, err
809	}
810	req.Header = reqHeaders
811	googleapi.Expand(req.URL, map[string]string{
812		"groupUniqueId": c.groupUniqueId,
813	})
814	return gensupport.SendRequest(c.ctx_, c.s.client, req)
815}
816
817// Do executes the "groupsSettings.groups.get" call.
818// Exactly one of *Groups or error will be non-nil. Any non-2xx status
819// code is an error. Response headers are in either
820// *Groups.ServerResponse.Header or (if a response was returned at all)
821// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
822// check whether the returned error was because http.StatusNotModified
823// was returned.
824func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
825	gensupport.SetOptions(c.urlParams_, opts...)
826	res, err := c.doRequest("json")
827	if res != nil && res.StatusCode == http.StatusNotModified {
828		if res.Body != nil {
829			res.Body.Close()
830		}
831		return nil, &googleapi.Error{
832			Code:   res.StatusCode,
833			Header: res.Header,
834		}
835	}
836	if err != nil {
837		return nil, err
838	}
839	defer googleapi.CloseBody(res)
840	if err := googleapi.CheckResponse(res); err != nil {
841		return nil, err
842	}
843	ret := &Groups{
844		ServerResponse: googleapi.ServerResponse{
845			Header:         res.Header,
846			HTTPStatusCode: res.StatusCode,
847		},
848	}
849	target := &ret
850	if err := gensupport.DecodeResponse(target, res); err != nil {
851		return nil, err
852	}
853	return ret, nil
854	// {
855	//   "description": "Gets one resource by id.",
856	//   "httpMethod": "GET",
857	//   "id": "groupsSettings.groups.get",
858	//   "parameterOrder": [
859	//     "groupUniqueId"
860	//   ],
861	//   "parameters": {
862	//     "groupUniqueId": {
863	//       "description": "The group's email address.",
864	//       "location": "path",
865	//       "required": true,
866	//       "type": "string"
867	//     }
868	//   },
869	//   "path": "{groupUniqueId}",
870	//   "response": {
871	//     "$ref": "Groups"
872	//   },
873	//   "scopes": [
874	//     "https://www.googleapis.com/auth/apps.groups.settings"
875	//   ]
876	// }
877
878}
879
880// method id "groupsSettings.groups.patch":
881
882type GroupsPatchCall struct {
883	s             *Service
884	groupUniqueId string
885	groups        *Groups
886	urlParams_    gensupport.URLParams
887	ctx_          context.Context
888	header_       http.Header
889}
890
891// Patch: Updates an existing resource. This method supports patch
892// semantics.
893//
894// - groupUniqueId: The group's email address.
895func (r *GroupsService) Patch(groupUniqueId string, groups *Groups) *GroupsPatchCall {
896	c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
897	c.groupUniqueId = groupUniqueId
898	c.groups = groups
899	return c
900}
901
902// Fields allows partial responses to be retrieved. See
903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
904// for more information.
905func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
907	return c
908}
909
910// Context sets the context to be used in this call's Do method. Any
911// pending HTTP request will be aborted if the provided context is
912// canceled.
913func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
914	c.ctx_ = ctx
915	return c
916}
917
918// Header returns an http.Header that can be modified by the caller to
919// add HTTP headers to the request.
920func (c *GroupsPatchCall) Header() http.Header {
921	if c.header_ == nil {
922		c.header_ = make(http.Header)
923	}
924	return c.header_
925}
926
927func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
928	reqHeaders := make(http.Header)
929	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
930	for k, v := range c.header_ {
931		reqHeaders[k] = v
932	}
933	reqHeaders.Set("User-Agent", c.s.userAgent())
934	var body io.Reader = nil
935	body, err := googleapi.WithoutDataWrapper.JSONReader(c.groups)
936	if err != nil {
937		return nil, err
938	}
939	reqHeaders.Set("Content-Type", "application/json")
940	c.urlParams_.Set("alt", alt)
941	c.urlParams_.Set("prettyPrint", "false")
942	urls := googleapi.ResolveRelative(c.s.BasePath, "{groupUniqueId}")
943	urls += "?" + c.urlParams_.Encode()
944	req, err := http.NewRequest("PATCH", urls, body)
945	if err != nil {
946		return nil, err
947	}
948	req.Header = reqHeaders
949	googleapi.Expand(req.URL, map[string]string{
950		"groupUniqueId": c.groupUniqueId,
951	})
952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
953}
954
955// Do executes the "groupsSettings.groups.patch" call.
956// Exactly one of *Groups or error will be non-nil. Any non-2xx status
957// code is an error. Response headers are in either
958// *Groups.ServerResponse.Header or (if a response was returned at all)
959// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
960// check whether the returned error was because http.StatusNotModified
961// was returned.
962func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
963	gensupport.SetOptions(c.urlParams_, opts...)
964	res, err := c.doRequest("json")
965	if res != nil && res.StatusCode == http.StatusNotModified {
966		if res.Body != nil {
967			res.Body.Close()
968		}
969		return nil, &googleapi.Error{
970			Code:   res.StatusCode,
971			Header: res.Header,
972		}
973	}
974	if err != nil {
975		return nil, err
976	}
977	defer googleapi.CloseBody(res)
978	if err := googleapi.CheckResponse(res); err != nil {
979		return nil, err
980	}
981	ret := &Groups{
982		ServerResponse: googleapi.ServerResponse{
983			Header:         res.Header,
984			HTTPStatusCode: res.StatusCode,
985		},
986	}
987	target := &ret
988	if err := gensupport.DecodeResponse(target, res); err != nil {
989		return nil, err
990	}
991	return ret, nil
992	// {
993	//   "description": "Updates an existing resource. This method supports patch semantics.",
994	//   "httpMethod": "PATCH",
995	//   "id": "groupsSettings.groups.patch",
996	//   "parameterOrder": [
997	//     "groupUniqueId"
998	//   ],
999	//   "parameters": {
1000	//     "groupUniqueId": {
1001	//       "description": "The group's email address.",
1002	//       "location": "path",
1003	//       "required": true,
1004	//       "type": "string"
1005	//     }
1006	//   },
1007	//   "path": "{groupUniqueId}",
1008	//   "request": {
1009	//     "$ref": "Groups"
1010	//   },
1011	//   "response": {
1012	//     "$ref": "Groups"
1013	//   },
1014	//   "scopes": [
1015	//     "https://www.googleapis.com/auth/apps.groups.settings"
1016	//   ]
1017	// }
1018
1019}
1020
1021// method id "groupsSettings.groups.update":
1022
1023type GroupsUpdateCall struct {
1024	s             *Service
1025	groupUniqueId string
1026	groups        *Groups
1027	urlParams_    gensupport.URLParams
1028	ctx_          context.Context
1029	header_       http.Header
1030}
1031
1032// Update: Updates an existing resource.
1033//
1034// - groupUniqueId: The group's email address.
1035func (r *GroupsService) Update(groupUniqueId string, groups *Groups) *GroupsUpdateCall {
1036	c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1037	c.groupUniqueId = groupUniqueId
1038	c.groups = groups
1039	return c
1040}
1041
1042// Fields allows partial responses to be retrieved. See
1043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1044// for more information.
1045func (c *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall {
1046	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1047	return c
1048}
1049
1050// Context sets the context to be used in this call's Do method. Any
1051// pending HTTP request will be aborted if the provided context is
1052// canceled.
1053func (c *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
1054	c.ctx_ = ctx
1055	return c
1056}
1057
1058// Header returns an http.Header that can be modified by the caller to
1059// add HTTP headers to the request.
1060func (c *GroupsUpdateCall) Header() http.Header {
1061	if c.header_ == nil {
1062		c.header_ = make(http.Header)
1063	}
1064	return c.header_
1065}
1066
1067func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
1068	reqHeaders := make(http.Header)
1069	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
1070	for k, v := range c.header_ {
1071		reqHeaders[k] = v
1072	}
1073	reqHeaders.Set("User-Agent", c.s.userAgent())
1074	var body io.Reader = nil
1075	body, err := googleapi.WithoutDataWrapper.JSONReader(c.groups)
1076	if err != nil {
1077		return nil, err
1078	}
1079	reqHeaders.Set("Content-Type", "application/json")
1080	c.urlParams_.Set("alt", alt)
1081	c.urlParams_.Set("prettyPrint", "false")
1082	urls := googleapi.ResolveRelative(c.s.BasePath, "{groupUniqueId}")
1083	urls += "?" + c.urlParams_.Encode()
1084	req, err := http.NewRequest("PUT", urls, body)
1085	if err != nil {
1086		return nil, err
1087	}
1088	req.Header = reqHeaders
1089	googleapi.Expand(req.URL, map[string]string{
1090		"groupUniqueId": c.groupUniqueId,
1091	})
1092	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1093}
1094
1095// Do executes the "groupsSettings.groups.update" call.
1096// Exactly one of *Groups or error will be non-nil. Any non-2xx status
1097// code is an error. Response headers are in either
1098// *Groups.ServerResponse.Header or (if a response was returned at all)
1099// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
1100// check whether the returned error was because http.StatusNotModified
1101// was returned.
1102func (c *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
1103	gensupport.SetOptions(c.urlParams_, opts...)
1104	res, err := c.doRequest("json")
1105	if res != nil && res.StatusCode == http.StatusNotModified {
1106		if res.Body != nil {
1107			res.Body.Close()
1108		}
1109		return nil, &googleapi.Error{
1110			Code:   res.StatusCode,
1111			Header: res.Header,
1112		}
1113	}
1114	if err != nil {
1115		return nil, err
1116	}
1117	defer googleapi.CloseBody(res)
1118	if err := googleapi.CheckResponse(res); err != nil {
1119		return nil, err
1120	}
1121	ret := &Groups{
1122		ServerResponse: googleapi.ServerResponse{
1123			Header:         res.Header,
1124			HTTPStatusCode: res.StatusCode,
1125		},
1126	}
1127	target := &ret
1128	if err := gensupport.DecodeResponse(target, res); err != nil {
1129		return nil, err
1130	}
1131	return ret, nil
1132	// {
1133	//   "description": "Updates an existing resource.",
1134	//   "httpMethod": "PUT",
1135	//   "id": "groupsSettings.groups.update",
1136	//   "parameterOrder": [
1137	//     "groupUniqueId"
1138	//   ],
1139	//   "parameters": {
1140	//     "groupUniqueId": {
1141	//       "description": "The group's email address.",
1142	//       "location": "path",
1143	//       "required": true,
1144	//       "type": "string"
1145	//     }
1146	//   },
1147	//   "path": "{groupUniqueId}",
1148	//   "request": {
1149	//     "$ref": "Groups"
1150	//   },
1151	//   "response": {
1152	//     "$ref": "Groups"
1153	//   },
1154	//   "scopes": [
1155	//     "https://www.googleapis.com/auth/apps.groups.settings"
1156	//   ]
1157	// }
1158
1159}
1160