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 admin provides access to the Admin SDK API.
8//
9// For product documentation, see: https://developers.google.com/admin-sdk/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/admin/directory/v1"
16//   ...
17//   ctx := context.Background()
18//   adminService, err := admin.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// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   adminService, err := admin.NewService(ctx, option.WithScopes(admin.CloudPlatformScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   adminService, err := admin.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   adminService, err := admin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package admin // import "google.golang.org/api/admin/directory/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "admin:directory_v1"
79const apiName = "admin"
80const apiVersion = "directory_v1"
81const basePath = "https://admin.googleapis.com/"
82const mtlsBasePath = "https://admin.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See, add, edit, and permanently delete the printers that your
87	// organization can use with Chrome
88	AdminChromePrintersScope = "https://www.googleapis.com/auth/admin.chrome.printers"
89
90	// See the printers that your organization can use with Chrome
91	AdminChromePrintersReadonlyScope = "https://www.googleapis.com/auth/admin.chrome.printers.readonly"
92
93	// View and manage customer related information
94	AdminDirectoryCustomerScope = "https://www.googleapis.com/auth/admin.directory.customer"
95
96	// View customer related information
97	AdminDirectoryCustomerReadonlyScope = "https://www.googleapis.com/auth/admin.directory.customer.readonly"
98
99	// View and manage your Chrome OS devices' metadata
100	AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos"
101
102	// View your Chrome OS devices' metadata
103	AdminDirectoryDeviceChromeosReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
104
105	// View and manage your mobile devices' metadata
106	AdminDirectoryDeviceMobileScope = "https://www.googleapis.com/auth/admin.directory.device.mobile"
107
108	// Manage your mobile devices by performing administrative tasks
109	AdminDirectoryDeviceMobileActionScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.action"
110
111	// View your mobile devices' metadata
112	AdminDirectoryDeviceMobileReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
113
114	// View and manage the provisioning of domains for your customers
115	AdminDirectoryDomainScope = "https://www.googleapis.com/auth/admin.directory.domain"
116
117	// View domains related to your customers
118	AdminDirectoryDomainReadonlyScope = "https://www.googleapis.com/auth/admin.directory.domain.readonly"
119
120	// View and manage the provisioning of groups on your domain
121	AdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin.directory.group"
122
123	// View and manage group subscriptions on your domain
124	AdminDirectoryGroupMemberScope = "https://www.googleapis.com/auth/admin.directory.group.member"
125
126	// View group subscriptions on your domain
127	AdminDirectoryGroupMemberReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.member.readonly"
128
129	// View groups on your domain
130	AdminDirectoryGroupReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.readonly"
131
132	// View and manage organization units on your domain
133	AdminDirectoryOrgunitScope = "https://www.googleapis.com/auth/admin.directory.orgunit"
134
135	// View organization units on your domain
136	AdminDirectoryOrgunitReadonlyScope = "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
137
138	// View and manage the provisioning of calendar resources on your domain
139	AdminDirectoryResourceCalendarScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar"
140
141	// View calendar resources on your domain
142	AdminDirectoryResourceCalendarReadonlyScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
143
144	// Manage delegated admin roles for your domain
145	AdminDirectoryRolemanagementScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement"
146
147	// View delegated admin roles for your domain
148	AdminDirectoryRolemanagementReadonlyScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
149
150	// View and manage the provisioning of users on your domain
151	AdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.directory.user"
152
153	// View and manage user aliases on your domain
154	AdminDirectoryUserAliasScope = "https://www.googleapis.com/auth/admin.directory.user.alias"
155
156	// View user aliases on your domain
157	AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.alias.readonly"
158
159	// See info about users on your domain
160	AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.readonly"
161
162	// Manage data access permissions for users on your domain
163	AdminDirectoryUserSecurityScope = "https://www.googleapis.com/auth/admin.directory.user.security"
164
165	// View and manage the provisioning of user schemas on your domain
166	AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/admin.directory.userschema"
167
168	// View user schemas on your domain
169	AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
170
171	// See, edit, configure, and delete your Google Cloud Platform data
172	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
173)
174
175// NewService creates a new Service.
176func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
177	scopesOption := option.WithScopes(
178		"https://www.googleapis.com/auth/admin.chrome.printers",
179		"https://www.googleapis.com/auth/admin.chrome.printers.readonly",
180		"https://www.googleapis.com/auth/admin.directory.customer",
181		"https://www.googleapis.com/auth/admin.directory.customer.readonly",
182		"https://www.googleapis.com/auth/admin.directory.device.chromeos",
183		"https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly",
184		"https://www.googleapis.com/auth/admin.directory.device.mobile",
185		"https://www.googleapis.com/auth/admin.directory.device.mobile.action",
186		"https://www.googleapis.com/auth/admin.directory.device.mobile.readonly",
187		"https://www.googleapis.com/auth/admin.directory.domain",
188		"https://www.googleapis.com/auth/admin.directory.domain.readonly",
189		"https://www.googleapis.com/auth/admin.directory.group",
190		"https://www.googleapis.com/auth/admin.directory.group.member",
191		"https://www.googleapis.com/auth/admin.directory.group.member.readonly",
192		"https://www.googleapis.com/auth/admin.directory.group.readonly",
193		"https://www.googleapis.com/auth/admin.directory.orgunit",
194		"https://www.googleapis.com/auth/admin.directory.orgunit.readonly",
195		"https://www.googleapis.com/auth/admin.directory.resource.calendar",
196		"https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly",
197		"https://www.googleapis.com/auth/admin.directory.rolemanagement",
198		"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly",
199		"https://www.googleapis.com/auth/admin.directory.user",
200		"https://www.googleapis.com/auth/admin.directory.user.alias",
201		"https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
202		"https://www.googleapis.com/auth/admin.directory.user.readonly",
203		"https://www.googleapis.com/auth/admin.directory.user.security",
204		"https://www.googleapis.com/auth/admin.directory.userschema",
205		"https://www.googleapis.com/auth/admin.directory.userschema.readonly",
206		"https://www.googleapis.com/auth/cloud-platform",
207	)
208	// NOTE: prepend, so we don't override user-specified scopes.
209	opts = append([]option.ClientOption{scopesOption}, opts...)
210	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
211	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
212	client, endpoint, err := htransport.NewClient(ctx, opts...)
213	if err != nil {
214		return nil, err
215	}
216	s, err := New(client)
217	if err != nil {
218		return nil, err
219	}
220	if endpoint != "" {
221		s.BasePath = endpoint
222	}
223	return s, nil
224}
225
226// New creates a new Service. It uses the provided http.Client for requests.
227//
228// Deprecated: please use NewService instead.
229// To provide a custom HTTP client, use option.WithHTTPClient.
230// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
231func New(client *http.Client) (*Service, error) {
232	if client == nil {
233		return nil, errors.New("client is nil")
234	}
235	s := &Service{client: client, BasePath: basePath}
236	s.Asps = NewAspsService(s)
237	s.Channels = NewChannelsService(s)
238	s.Chromeosdevices = NewChromeosdevicesService(s)
239	s.Customer = NewCustomerService(s)
240	s.Customers = NewCustomersService(s)
241	s.DomainAliases = NewDomainAliasesService(s)
242	s.Domains = NewDomainsService(s)
243	s.Groups = NewGroupsService(s)
244	s.Members = NewMembersService(s)
245	s.Mobiledevices = NewMobiledevicesService(s)
246	s.Orgunits = NewOrgunitsService(s)
247	s.Privileges = NewPrivilegesService(s)
248	s.Resources = NewResourcesService(s)
249	s.RoleAssignments = NewRoleAssignmentsService(s)
250	s.Roles = NewRolesService(s)
251	s.Schemas = NewSchemasService(s)
252	s.Tokens = NewTokensService(s)
253	s.TwoStepVerification = NewTwoStepVerificationService(s)
254	s.Users = NewUsersService(s)
255	s.VerificationCodes = NewVerificationCodesService(s)
256	return s, nil
257}
258
259type Service struct {
260	client    *http.Client
261	BasePath  string // API endpoint base URL
262	UserAgent string // optional additional User-Agent fragment
263
264	Asps *AspsService
265
266	Channels *ChannelsService
267
268	Chromeosdevices *ChromeosdevicesService
269
270	Customer *CustomerService
271
272	Customers *CustomersService
273
274	DomainAliases *DomainAliasesService
275
276	Domains *DomainsService
277
278	Groups *GroupsService
279
280	Members *MembersService
281
282	Mobiledevices *MobiledevicesService
283
284	Orgunits *OrgunitsService
285
286	Privileges *PrivilegesService
287
288	Resources *ResourcesService
289
290	RoleAssignments *RoleAssignmentsService
291
292	Roles *RolesService
293
294	Schemas *SchemasService
295
296	Tokens *TokensService
297
298	TwoStepVerification *TwoStepVerificationService
299
300	Users *UsersService
301
302	VerificationCodes *VerificationCodesService
303}
304
305func (s *Service) userAgent() string {
306	if s.UserAgent == "" {
307		return googleapi.UserAgent
308	}
309	return googleapi.UserAgent + " " + s.UserAgent
310}
311
312func NewAspsService(s *Service) *AspsService {
313	rs := &AspsService{s: s}
314	return rs
315}
316
317type AspsService struct {
318	s *Service
319}
320
321func NewChannelsService(s *Service) *ChannelsService {
322	rs := &ChannelsService{s: s}
323	return rs
324}
325
326type ChannelsService struct {
327	s *Service
328}
329
330func NewChromeosdevicesService(s *Service) *ChromeosdevicesService {
331	rs := &ChromeosdevicesService{s: s}
332	return rs
333}
334
335type ChromeosdevicesService struct {
336	s *Service
337}
338
339func NewCustomerService(s *Service) *CustomerService {
340	rs := &CustomerService{s: s}
341	rs.Devices = NewCustomerDevicesService(s)
342	return rs
343}
344
345type CustomerService struct {
346	s *Service
347
348	Devices *CustomerDevicesService
349}
350
351func NewCustomerDevicesService(s *Service) *CustomerDevicesService {
352	rs := &CustomerDevicesService{s: s}
353	rs.Chromeos = NewCustomerDevicesChromeosService(s)
354	return rs
355}
356
357type CustomerDevicesService struct {
358	s *Service
359
360	Chromeos *CustomerDevicesChromeosService
361}
362
363func NewCustomerDevicesChromeosService(s *Service) *CustomerDevicesChromeosService {
364	rs := &CustomerDevicesChromeosService{s: s}
365	rs.Commands = NewCustomerDevicesChromeosCommandsService(s)
366	return rs
367}
368
369type CustomerDevicesChromeosService struct {
370	s *Service
371
372	Commands *CustomerDevicesChromeosCommandsService
373}
374
375func NewCustomerDevicesChromeosCommandsService(s *Service) *CustomerDevicesChromeosCommandsService {
376	rs := &CustomerDevicesChromeosCommandsService{s: s}
377	return rs
378}
379
380type CustomerDevicesChromeosCommandsService struct {
381	s *Service
382}
383
384func NewCustomersService(s *Service) *CustomersService {
385	rs := &CustomersService{s: s}
386	rs.Chrome = NewCustomersChromeService(s)
387	return rs
388}
389
390type CustomersService struct {
391	s *Service
392
393	Chrome *CustomersChromeService
394}
395
396func NewCustomersChromeService(s *Service) *CustomersChromeService {
397	rs := &CustomersChromeService{s: s}
398	rs.Printers = NewCustomersChromePrintersService(s)
399	return rs
400}
401
402type CustomersChromeService struct {
403	s *Service
404
405	Printers *CustomersChromePrintersService
406}
407
408func NewCustomersChromePrintersService(s *Service) *CustomersChromePrintersService {
409	rs := &CustomersChromePrintersService{s: s}
410	return rs
411}
412
413type CustomersChromePrintersService struct {
414	s *Service
415}
416
417func NewDomainAliasesService(s *Service) *DomainAliasesService {
418	rs := &DomainAliasesService{s: s}
419	return rs
420}
421
422type DomainAliasesService struct {
423	s *Service
424}
425
426func NewDomainsService(s *Service) *DomainsService {
427	rs := &DomainsService{s: s}
428	return rs
429}
430
431type DomainsService struct {
432	s *Service
433}
434
435func NewGroupsService(s *Service) *GroupsService {
436	rs := &GroupsService{s: s}
437	rs.Aliases = NewGroupsAliasesService(s)
438	return rs
439}
440
441type GroupsService struct {
442	s *Service
443
444	Aliases *GroupsAliasesService
445}
446
447func NewGroupsAliasesService(s *Service) *GroupsAliasesService {
448	rs := &GroupsAliasesService{s: s}
449	return rs
450}
451
452type GroupsAliasesService struct {
453	s *Service
454}
455
456func NewMembersService(s *Service) *MembersService {
457	rs := &MembersService{s: s}
458	return rs
459}
460
461type MembersService struct {
462	s *Service
463}
464
465func NewMobiledevicesService(s *Service) *MobiledevicesService {
466	rs := &MobiledevicesService{s: s}
467	return rs
468}
469
470type MobiledevicesService struct {
471	s *Service
472}
473
474func NewOrgunitsService(s *Service) *OrgunitsService {
475	rs := &OrgunitsService{s: s}
476	return rs
477}
478
479type OrgunitsService struct {
480	s *Service
481}
482
483func NewPrivilegesService(s *Service) *PrivilegesService {
484	rs := &PrivilegesService{s: s}
485	return rs
486}
487
488type PrivilegesService struct {
489	s *Service
490}
491
492func NewResourcesService(s *Service) *ResourcesService {
493	rs := &ResourcesService{s: s}
494	rs.Buildings = NewResourcesBuildingsService(s)
495	rs.Calendars = NewResourcesCalendarsService(s)
496	rs.Features = NewResourcesFeaturesService(s)
497	return rs
498}
499
500type ResourcesService struct {
501	s *Service
502
503	Buildings *ResourcesBuildingsService
504
505	Calendars *ResourcesCalendarsService
506
507	Features *ResourcesFeaturesService
508}
509
510func NewResourcesBuildingsService(s *Service) *ResourcesBuildingsService {
511	rs := &ResourcesBuildingsService{s: s}
512	return rs
513}
514
515type ResourcesBuildingsService struct {
516	s *Service
517}
518
519func NewResourcesCalendarsService(s *Service) *ResourcesCalendarsService {
520	rs := &ResourcesCalendarsService{s: s}
521	return rs
522}
523
524type ResourcesCalendarsService struct {
525	s *Service
526}
527
528func NewResourcesFeaturesService(s *Service) *ResourcesFeaturesService {
529	rs := &ResourcesFeaturesService{s: s}
530	return rs
531}
532
533type ResourcesFeaturesService struct {
534	s *Service
535}
536
537func NewRoleAssignmentsService(s *Service) *RoleAssignmentsService {
538	rs := &RoleAssignmentsService{s: s}
539	return rs
540}
541
542type RoleAssignmentsService struct {
543	s *Service
544}
545
546func NewRolesService(s *Service) *RolesService {
547	rs := &RolesService{s: s}
548	return rs
549}
550
551type RolesService struct {
552	s *Service
553}
554
555func NewSchemasService(s *Service) *SchemasService {
556	rs := &SchemasService{s: s}
557	return rs
558}
559
560type SchemasService struct {
561	s *Service
562}
563
564func NewTokensService(s *Service) *TokensService {
565	rs := &TokensService{s: s}
566	return rs
567}
568
569type TokensService struct {
570	s *Service
571}
572
573func NewTwoStepVerificationService(s *Service) *TwoStepVerificationService {
574	rs := &TwoStepVerificationService{s: s}
575	return rs
576}
577
578type TwoStepVerificationService struct {
579	s *Service
580}
581
582func NewUsersService(s *Service) *UsersService {
583	rs := &UsersService{s: s}
584	rs.Aliases = NewUsersAliasesService(s)
585	rs.Photos = NewUsersPhotosService(s)
586	return rs
587}
588
589type UsersService struct {
590	s *Service
591
592	Aliases *UsersAliasesService
593
594	Photos *UsersPhotosService
595}
596
597func NewUsersAliasesService(s *Service) *UsersAliasesService {
598	rs := &UsersAliasesService{s: s}
599	return rs
600}
601
602type UsersAliasesService struct {
603	s *Service
604}
605
606func NewUsersPhotosService(s *Service) *UsersPhotosService {
607	rs := &UsersPhotosService{s: s}
608	return rs
609}
610
611type UsersPhotosService struct {
612	s *Service
613}
614
615func NewVerificationCodesService(s *Service) *VerificationCodesService {
616	rs := &VerificationCodesService{s: s}
617	return rs
618}
619
620type VerificationCodesService struct {
621	s *Service
622}
623
624// Alias: JSON template for Alias object in Directory API.
625type Alias struct {
626	Alias string `json:"alias,omitempty"`
627
628	Etag string `json:"etag,omitempty"`
629
630	Id string `json:"id,omitempty"`
631
632	Kind string `json:"kind,omitempty"`
633
634	PrimaryEmail string `json:"primaryEmail,omitempty"`
635
636	// ServerResponse contains the HTTP response code and headers from the
637	// server.
638	googleapi.ServerResponse `json:"-"`
639
640	// ForceSendFields is a list of field names (e.g. "Alias") to
641	// unconditionally include in API requests. By default, fields with
642	// empty or default values are omitted from API requests. However, any
643	// non-pointer, non-interface field appearing in ForceSendFields will be
644	// sent to the server regardless of whether the field is empty or not.
645	// This may be used to include empty fields in Patch requests.
646	ForceSendFields []string `json:"-"`
647
648	// NullFields is a list of field names (e.g. "Alias") to include in API
649	// requests with the JSON null value. By default, fields with empty
650	// values are omitted from API requests. However, any field with an
651	// empty value appearing in NullFields will be sent to the server as
652	// null. It is an error if a field in this list has a non-empty value.
653	// This may be used to include null fields in Patch requests.
654	NullFields []string `json:"-"`
655}
656
657func (s *Alias) MarshalJSON() ([]byte, error) {
658	type NoMethod Alias
659	raw := NoMethod(*s)
660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
661}
662
663// Aliases: JSON response template to list aliases in Directory API.
664type Aliases struct {
665	Aliases []interface{} `json:"aliases,omitempty"`
666
667	Etag string `json:"etag,omitempty"`
668
669	Kind string `json:"kind,omitempty"`
670
671	// ServerResponse contains the HTTP response code and headers from the
672	// server.
673	googleapi.ServerResponse `json:"-"`
674
675	// ForceSendFields is a list of field names (e.g. "Aliases") to
676	// unconditionally include in API requests. By default, fields with
677	// empty or default values are omitted from API requests. However, any
678	// non-pointer, non-interface field appearing in ForceSendFields will be
679	// sent to the server regardless of whether the field is empty or not.
680	// This may be used to include empty fields in Patch requests.
681	ForceSendFields []string `json:"-"`
682
683	// NullFields is a list of field names (e.g. "Aliases") to include in
684	// API requests with the JSON null value. By default, fields with empty
685	// values are omitted from API requests. However, any field with an
686	// empty value appearing in NullFields will be sent to the server as
687	// null. It is an error if a field in this list has a non-empty value.
688	// This may be used to include null fields in Patch requests.
689	NullFields []string `json:"-"`
690}
691
692func (s *Aliases) MarshalJSON() ([]byte, error) {
693	type NoMethod Aliases
694	raw := NoMethod(*s)
695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
696}
697
698// Asp: An application-specific password (ASP) is used with applications
699// that do not accept a verification code when logging into the
700// application on certain devices. The ASP access code is used instead
701// of the login and password you commonly use when accessing an
702// application through a browser. For more information about ASPs and
703// how to create one, see the help center
704// (https://support.google.com/a/answer/2537800#asp).
705type Asp struct {
706	// CodeId: The unique ID of the ASP.
707	CodeId int64 `json:"codeId,omitempty"`
708
709	// CreationTime: The time when the ASP was created. Expressed in Unix
710	// time (https://en.wikipedia.org/wiki/Epoch_time) format.
711	CreationTime int64 `json:"creationTime,omitempty,string"`
712
713	// Etag: ETag of the ASP.
714	Etag string `json:"etag,omitempty"`
715
716	// Kind: The type of the API resource. This is always
717	// `admin#directory#asp`.
718	Kind string `json:"kind,omitempty"`
719
720	// LastTimeUsed: The time when the ASP was last used. Expressed in Unix
721	// time (https://en.wikipedia.org/wiki/Epoch_time) format.
722	LastTimeUsed int64 `json:"lastTimeUsed,omitempty,string"`
723
724	// Name: The name of the application that the user, represented by their
725	// `userId`, entered when the ASP was created.
726	Name string `json:"name,omitempty"`
727
728	// UserKey: The unique ID of the user who issued the ASP.
729	UserKey string `json:"userKey,omitempty"`
730
731	// ServerResponse contains the HTTP response code and headers from the
732	// server.
733	googleapi.ServerResponse `json:"-"`
734
735	// ForceSendFields is a list of field names (e.g. "CodeId") to
736	// unconditionally include in API requests. By default, fields with
737	// empty or default values are omitted from API requests. However, any
738	// non-pointer, non-interface field appearing in ForceSendFields will be
739	// sent to the server regardless of whether the field is empty or not.
740	// This may be used to include empty fields in Patch requests.
741	ForceSendFields []string `json:"-"`
742
743	// NullFields is a list of field names (e.g. "CodeId") to include in API
744	// requests with the JSON null value. By default, fields with empty
745	// values are omitted from API requests. However, any field with an
746	// empty value appearing in NullFields will be sent to the server as
747	// null. It is an error if a field in this list has a non-empty value.
748	// This may be used to include null fields in Patch requests.
749	NullFields []string `json:"-"`
750}
751
752func (s *Asp) MarshalJSON() ([]byte, error) {
753	type NoMethod Asp
754	raw := NoMethod(*s)
755	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
756}
757
758type Asps struct {
759	// Etag: ETag of the resource.
760	Etag string `json:"etag,omitempty"`
761
762	// Items: A list of ASP resources.
763	Items []*Asp `json:"items,omitempty"`
764
765	// Kind: The type of the API resource. This is always
766	// `admin#directory#aspList`.
767	Kind string `json:"kind,omitempty"`
768
769	// ServerResponse contains the HTTP response code and headers from the
770	// server.
771	googleapi.ServerResponse `json:"-"`
772
773	// ForceSendFields is a list of field names (e.g. "Etag") to
774	// unconditionally include in API requests. By default, fields with
775	// empty or default values are omitted from API requests. However, any
776	// non-pointer, non-interface field appearing in ForceSendFields will be
777	// sent to the server regardless of whether the field is empty or not.
778	// This may be used to include empty fields in Patch requests.
779	ForceSendFields []string `json:"-"`
780
781	// NullFields is a list of field names (e.g. "Etag") to include in API
782	// requests with the JSON null value. By default, fields with empty
783	// values are omitted from API requests. However, any field with an
784	// empty value appearing in NullFields will be sent to the server as
785	// null. It is an error if a field in this list has a non-empty value.
786	// This may be used to include null fields in Patch requests.
787	NullFields []string `json:"-"`
788}
789
790func (s *Asps) MarshalJSON() ([]byte, error) {
791	type NoMethod Asps
792	raw := NoMethod(*s)
793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
794}
795
796// AuxiliaryMessage: Auxiliary message about issues with printers or
797// settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING,
798// field_mask:make_and_model, message:"Given printer is invalid or no
799// longer supported."}
800type AuxiliaryMessage struct {
801	// AuxiliaryMessage: Human readable message in English. Example: "Given
802	// printer is invalid or no longer supported."
803	AuxiliaryMessage string `json:"auxiliaryMessage,omitempty"`
804
805	// FieldMask: Field that this message concerns.
806	FieldMask string `json:"fieldMask,omitempty"`
807
808	// Severity: Message severity
809	//
810	// Possible values:
811	//   "SEVERITY_UNSPECIFIED" - Message type unspecified.
812	//   "SEVERITY_INFO" - Message of severity: info.
813	//   "SEVERITY_WARNING" - Message of severity: warning.
814	//   "SEVERITY_ERROR" - Message of severity: error.
815	Severity string `json:"severity,omitempty"`
816
817	// ForceSendFields is a list of field names (e.g. "AuxiliaryMessage") to
818	// unconditionally include in API requests. By default, fields with
819	// empty or default values are omitted from API requests. However, any
820	// non-pointer, non-interface field appearing in ForceSendFields will be
821	// sent to the server regardless of whether the field is empty or not.
822	// This may be used to include empty fields in Patch requests.
823	ForceSendFields []string `json:"-"`
824
825	// NullFields is a list of field names (e.g. "AuxiliaryMessage") to
826	// include in API requests with the JSON null value. By default, fields
827	// with empty values are omitted from API requests. However, any field
828	// with an empty value appearing in NullFields will be sent to the
829	// server as null. It is an error if a field in this list has a
830	// non-empty value. This may be used to include null fields in Patch
831	// requests.
832	NullFields []string `json:"-"`
833}
834
835func (s *AuxiliaryMessage) MarshalJSON() ([]byte, error) {
836	type NoMethod AuxiliaryMessage
837	raw := NoMethod(*s)
838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
839}
840
841// BatchCreatePrintersRequest: Request for adding new printers in batch.
842type BatchCreatePrintersRequest struct {
843	// Requests: A list of Printers to be created. Max 50 at a time.
844	Requests []*CreatePrinterRequest `json:"requests,omitempty"`
845
846	// ForceSendFields is a list of field names (e.g. "Requests") to
847	// unconditionally include in API requests. By default, fields with
848	// empty or default values are omitted from API requests. However, any
849	// non-pointer, non-interface field appearing in ForceSendFields will be
850	// sent to the server regardless of whether the field is empty or not.
851	// This may be used to include empty fields in Patch requests.
852	ForceSendFields []string `json:"-"`
853
854	// NullFields is a list of field names (e.g. "Requests") to include in
855	// API requests with the JSON null value. By default, fields with empty
856	// values are omitted from API requests. However, any field with an
857	// empty value appearing in NullFields will be sent to the server as
858	// null. It is an error if a field in this list has a non-empty value.
859	// This may be used to include null fields in Patch requests.
860	NullFields []string `json:"-"`
861}
862
863func (s *BatchCreatePrintersRequest) MarshalJSON() ([]byte, error) {
864	type NoMethod BatchCreatePrintersRequest
865	raw := NoMethod(*s)
866	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
867}
868
869// BatchCreatePrintersResponse: Response for adding new printers in
870// batch.
871type BatchCreatePrintersResponse struct {
872	// Failures: A list of create failures. Printer IDs are not populated,
873	// as printer were not created.
874	Failures []*FailureInfo `json:"failures,omitempty"`
875
876	// Printers: A list of successfully created printers with their IDs
877	// populated.
878	Printers []*Printer `json:"printers,omitempty"`
879
880	// ServerResponse contains the HTTP response code and headers from the
881	// server.
882	googleapi.ServerResponse `json:"-"`
883
884	// ForceSendFields is a list of field names (e.g. "Failures") to
885	// unconditionally include in API requests. By default, fields with
886	// empty or default values are omitted from API requests. However, any
887	// non-pointer, non-interface field appearing in ForceSendFields will be
888	// sent to the server regardless of whether the field is empty or not.
889	// This may be used to include empty fields in Patch requests.
890	ForceSendFields []string `json:"-"`
891
892	// NullFields is a list of field names (e.g. "Failures") to include in
893	// API requests with the JSON null value. By default, fields with empty
894	// values are omitted from API requests. However, any field with an
895	// empty value appearing in NullFields will be sent to the server as
896	// null. It is an error if a field in this list has a non-empty value.
897	// This may be used to include null fields in Patch requests.
898	NullFields []string `json:"-"`
899}
900
901func (s *BatchCreatePrintersResponse) MarshalJSON() ([]byte, error) {
902	type NoMethod BatchCreatePrintersResponse
903	raw := NoMethod(*s)
904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
905}
906
907// BatchDeletePrintersRequest: Request for deleting existing printers in
908// batch.
909type BatchDeletePrintersRequest struct {
910	// PrinterIds: A list of Printer.id that should be deleted. Max 100 at a
911	// time.
912	PrinterIds []string `json:"printerIds,omitempty"`
913
914	// ForceSendFields is a list of field names (e.g. "PrinterIds") to
915	// unconditionally include in API requests. By default, fields with
916	// empty or default values are omitted from API requests. However, any
917	// non-pointer, non-interface field appearing in ForceSendFields will be
918	// sent to the server regardless of whether the field is empty or not.
919	// This may be used to include empty fields in Patch requests.
920	ForceSendFields []string `json:"-"`
921
922	// NullFields is a list of field names (e.g. "PrinterIds") to include in
923	// API requests with the JSON null value. By default, fields with empty
924	// values are omitted from API requests. However, any field with an
925	// empty value appearing in NullFields will be sent to the server as
926	// null. It is an error if a field in this list has a non-empty value.
927	// This may be used to include null fields in Patch requests.
928	NullFields []string `json:"-"`
929}
930
931func (s *BatchDeletePrintersRequest) MarshalJSON() ([]byte, error) {
932	type NoMethod BatchDeletePrintersRequest
933	raw := NoMethod(*s)
934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
935}
936
937// BatchDeletePrintersResponse: Response for deleting existing printers
938// in batch.
939type BatchDeletePrintersResponse struct {
940	// FailedPrinters: A list of update failures.
941	FailedPrinters []*FailureInfo `json:"failedPrinters,omitempty"`
942
943	// PrinterIds: A list of Printer.id that were successfully deleted.
944	PrinterIds []string `json:"printerIds,omitempty"`
945
946	// ServerResponse contains the HTTP response code and headers from the
947	// server.
948	googleapi.ServerResponse `json:"-"`
949
950	// ForceSendFields is a list of field names (e.g. "FailedPrinters") to
951	// unconditionally include in API requests. By default, fields with
952	// empty or default values are omitted from API requests. However, any
953	// non-pointer, non-interface field appearing in ForceSendFields will be
954	// sent to the server regardless of whether the field is empty or not.
955	// This may be used to include empty fields in Patch requests.
956	ForceSendFields []string `json:"-"`
957
958	// NullFields is a list of field names (e.g. "FailedPrinters") to
959	// include in API requests with the JSON null value. By default, fields
960	// with empty values are omitted from API requests. However, any field
961	// with an empty value appearing in NullFields will be sent to the
962	// server as null. It is an error if a field in this list has a
963	// non-empty value. This may be used to include null fields in Patch
964	// requests.
965	NullFields []string `json:"-"`
966}
967
968func (s *BatchDeletePrintersResponse) MarshalJSON() ([]byte, error) {
969	type NoMethod BatchDeletePrintersResponse
970	raw := NoMethod(*s)
971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
972}
973
974// Building: Public API: Resources.buildings
975type Building struct {
976	// Address: The postal address of the building. See `PostalAddress`
977	// (/my-business/reference/rest/v4/PostalAddress) for details. Note that
978	// only a single address line and region code are required.
979	Address *BuildingAddress `json:"address,omitempty"`
980
981	// BuildingId: Unique identifier for the building. The maximum length is
982	// 100 characters.
983	BuildingId string `json:"buildingId,omitempty"`
984
985	// BuildingName: The building name as seen by users in Calendar. Must be
986	// unique for the customer. For example, "NYC-CHEL". The maximum length
987	// is 100 characters.
988	BuildingName string `json:"buildingName,omitempty"`
989
990	// Coordinates: The geographic coordinates of the center of the
991	// building, expressed as latitude and longitude in decimal degrees.
992	Coordinates *BuildingCoordinates `json:"coordinates,omitempty"`
993
994	// Description: A brief description of the building. For example,
995	// "Chelsea Market".
996	Description string `json:"description,omitempty"`
997
998	// Etags: ETag of the resource.
999	Etags string `json:"etags,omitempty"`
1000
1001	// FloorNames: The display names for all floors in this building. The
1002	// floors are expected to be sorted in ascending order, from lowest
1003	// floor to highest floor. For example, ["B2", "B1", "L", "1", "2",
1004	// "2M", "3", "PH"] Must contain at least one entry.
1005	FloorNames []string `json:"floorNames,omitempty"`
1006
1007	// Kind: Kind of resource this is.
1008	Kind string `json:"kind,omitempty"`
1009
1010	// ServerResponse contains the HTTP response code and headers from the
1011	// server.
1012	googleapi.ServerResponse `json:"-"`
1013
1014	// ForceSendFields is a list of field names (e.g. "Address") to
1015	// unconditionally include in API requests. By default, fields with
1016	// empty or default values are omitted from API requests. However, any
1017	// non-pointer, non-interface field appearing in ForceSendFields will be
1018	// sent to the server regardless of whether the field is empty or not.
1019	// This may be used to include empty fields in Patch requests.
1020	ForceSendFields []string `json:"-"`
1021
1022	// NullFields is a list of field names (e.g. "Address") to include in
1023	// API requests with the JSON null value. By default, fields with empty
1024	// values are omitted from API requests. However, any field with an
1025	// empty value appearing in NullFields will be sent to the server as
1026	// null. It is an error if a field in this list has a non-empty value.
1027	// This may be used to include null fields in Patch requests.
1028	NullFields []string `json:"-"`
1029}
1030
1031func (s *Building) MarshalJSON() ([]byte, error) {
1032	type NoMethod Building
1033	raw := NoMethod(*s)
1034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1035}
1036
1037// BuildingAddress: Public API: Resources.buildings
1038type BuildingAddress struct {
1039	// AddressLines: Unstructured address lines describing the lower levels
1040	// of an address.
1041	AddressLines []string `json:"addressLines,omitempty"`
1042
1043	// AdministrativeArea: Optional. Highest administrative subdivision
1044	// which is used for postal addresses of a country or region.
1045	AdministrativeArea string `json:"administrativeArea,omitempty"`
1046
1047	// LanguageCode: Optional. BCP-47 language code of the contents of this
1048	// address (if known).
1049	LanguageCode string `json:"languageCode,omitempty"`
1050
1051	// Locality: Optional. Generally refers to the city/town portion of the
1052	// address. Examples: US city, IT comune, UK post town. In regions of
1053	// the world where localities are not well defined or do not fit into
1054	// this structure well, leave locality empty and use addressLines.
1055	Locality string `json:"locality,omitempty"`
1056
1057	// PostalCode: Optional. Postal code of the address.
1058	PostalCode string `json:"postalCode,omitempty"`
1059
1060	// RegionCode: Required. CLDR region code of the country/region of the
1061	// address.
1062	RegionCode string `json:"regionCode,omitempty"`
1063
1064	// Sublocality: Optional. Sublocality of the address.
1065	Sublocality string `json:"sublocality,omitempty"`
1066
1067	// ForceSendFields is a list of field names (e.g. "AddressLines") to
1068	// unconditionally include in API requests. By default, fields with
1069	// empty or default values are omitted from API requests. However, any
1070	// non-pointer, non-interface field appearing in ForceSendFields will be
1071	// sent to the server regardless of whether the field is empty or not.
1072	// This may be used to include empty fields in Patch requests.
1073	ForceSendFields []string `json:"-"`
1074
1075	// NullFields is a list of field names (e.g. "AddressLines") to include
1076	// in API requests with the JSON null value. By default, fields with
1077	// empty values are omitted from API requests. However, any field with
1078	// an empty value appearing in NullFields will be sent to the server as
1079	// null. It is an error if a field in this list has a non-empty value.
1080	// This may be used to include null fields in Patch requests.
1081	NullFields []string `json:"-"`
1082}
1083
1084func (s *BuildingAddress) MarshalJSON() ([]byte, error) {
1085	type NoMethod BuildingAddress
1086	raw := NoMethod(*s)
1087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1088}
1089
1090// BuildingCoordinates: Public API: Resources.buildings
1091type BuildingCoordinates struct {
1092	// Latitude: Latitude in decimal degrees.
1093	Latitude float64 `json:"latitude,omitempty"`
1094
1095	// Longitude: Longitude in decimal degrees.
1096	Longitude float64 `json:"longitude,omitempty"`
1097
1098	// ForceSendFields is a list of field names (e.g. "Latitude") to
1099	// unconditionally include in API requests. By default, fields with
1100	// empty or default values are omitted from API requests. However, any
1101	// non-pointer, non-interface field appearing in ForceSendFields will be
1102	// sent to the server regardless of whether the field is empty or not.
1103	// This may be used to include empty fields in Patch requests.
1104	ForceSendFields []string `json:"-"`
1105
1106	// NullFields is a list of field names (e.g. "Latitude") to include in
1107	// API requests with the JSON null value. By default, fields with empty
1108	// values are omitted from API requests. However, any field with an
1109	// empty value appearing in NullFields will be sent to the server as
1110	// null. It is an error if a field in this list has a non-empty value.
1111	// This may be used to include null fields in Patch requests.
1112	NullFields []string `json:"-"`
1113}
1114
1115func (s *BuildingCoordinates) MarshalJSON() ([]byte, error) {
1116	type NoMethod BuildingCoordinates
1117	raw := NoMethod(*s)
1118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1119}
1120
1121func (s *BuildingCoordinates) UnmarshalJSON(data []byte) error {
1122	type NoMethod BuildingCoordinates
1123	var s1 struct {
1124		Latitude  gensupport.JSONFloat64 `json:"latitude"`
1125		Longitude gensupport.JSONFloat64 `json:"longitude"`
1126		*NoMethod
1127	}
1128	s1.NoMethod = (*NoMethod)(s)
1129	if err := json.Unmarshal(data, &s1); err != nil {
1130		return err
1131	}
1132	s.Latitude = float64(s1.Latitude)
1133	s.Longitude = float64(s1.Longitude)
1134	return nil
1135}
1136
1137// Buildings: Public API: Resources.buildings
1138type Buildings struct {
1139	// Buildings: The Buildings in this page of results.
1140	Buildings []*Building `json:"buildings,omitempty"`
1141
1142	// Etag: ETag of the resource.
1143	Etag string `json:"etag,omitempty"`
1144
1145	// Kind: Kind of resource this is.
1146	Kind string `json:"kind,omitempty"`
1147
1148	// NextPageToken: The continuation token, used to page through large
1149	// result sets. Provide this value in a subsequent request to return the
1150	// next page of results.
1151	NextPageToken string `json:"nextPageToken,omitempty"`
1152
1153	// ServerResponse contains the HTTP response code and headers from the
1154	// server.
1155	googleapi.ServerResponse `json:"-"`
1156
1157	// ForceSendFields is a list of field names (e.g. "Buildings") to
1158	// unconditionally include in API requests. By default, fields with
1159	// empty or default values are omitted from API requests. However, any
1160	// non-pointer, non-interface field appearing in ForceSendFields will be
1161	// sent to the server regardless of whether the field is empty or not.
1162	// This may be used to include empty fields in Patch requests.
1163	ForceSendFields []string `json:"-"`
1164
1165	// NullFields is a list of field names (e.g. "Buildings") to include in
1166	// API requests with the JSON null value. By default, fields with empty
1167	// values are omitted from API requests. However, any field with an
1168	// empty value appearing in NullFields will be sent to the server as
1169	// null. It is an error if a field in this list has a non-empty value.
1170	// This may be used to include null fields in Patch requests.
1171	NullFields []string `json:"-"`
1172}
1173
1174func (s *Buildings) MarshalJSON() ([]byte, error) {
1175	type NoMethod Buildings
1176	raw := NoMethod(*s)
1177	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1178}
1179
1180// CalendarResource: Public API: Resources.calendars
1181type CalendarResource struct {
1182	// BuildingId: Unique ID for the building a resource is located in.
1183	BuildingId string `json:"buildingId,omitempty"`
1184
1185	// Capacity: Capacity of a resource, number of seats in a room.
1186	Capacity int64 `json:"capacity,omitempty"`
1187
1188	// Etags: ETag of the resource.
1189	Etags string `json:"etags,omitempty"`
1190
1191	// FeatureInstances: Instances of features for the calendar resource.
1192	FeatureInstances interface{} `json:"featureInstances,omitempty"`
1193
1194	// FloorName: Name of the floor a resource is located on.
1195	FloorName string `json:"floorName,omitempty"`
1196
1197	// FloorSection: Name of the section within a floor a resource is
1198	// located in.
1199	FloorSection string `json:"floorSection,omitempty"`
1200
1201	// GeneratedResourceName: The read-only auto-generated name of the
1202	// calendar resource which includes metadata about the resource such as
1203	// building name, floor, capacity, etc. For example, "NYC-2-Training
1204	// Room 1A (16)".
1205	GeneratedResourceName string `json:"generatedResourceName,omitempty"`
1206
1207	// Kind: The type of the resource. For calendar resources, the value is
1208	// `admin#directory#resources#calendars#CalendarResource`.
1209	Kind string `json:"kind,omitempty"`
1210
1211	// ResourceCategory: The category of the calendar resource. Either
1212	// CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN.
1213	ResourceCategory string `json:"resourceCategory,omitempty"`
1214
1215	// ResourceDescription: Description of the resource, visible only to
1216	// admins.
1217	ResourceDescription string `json:"resourceDescription,omitempty"`
1218
1219	// ResourceEmail: The read-only email for the calendar resource.
1220	// Generated as part of creating a new calendar resource.
1221	ResourceEmail string `json:"resourceEmail,omitempty"`
1222
1223	// ResourceId: The unique ID for the calendar resource.
1224	ResourceId string `json:"resourceId,omitempty"`
1225
1226	// ResourceName: The name of the calendar resource. For example,
1227	// "Training Room 1A".
1228	ResourceName string `json:"resourceName,omitempty"`
1229
1230	// ResourceType: The type of the calendar resource, intended for
1231	// non-room resources.
1232	ResourceType string `json:"resourceType,omitempty"`
1233
1234	// UserVisibleDescription: Description of the resource, visible to users
1235	// and admins.
1236	UserVisibleDescription string `json:"userVisibleDescription,omitempty"`
1237
1238	// ServerResponse contains the HTTP response code and headers from the
1239	// server.
1240	googleapi.ServerResponse `json:"-"`
1241
1242	// ForceSendFields is a list of field names (e.g. "BuildingId") to
1243	// unconditionally include in API requests. By default, fields with
1244	// empty or default values are omitted from API requests. However, any
1245	// non-pointer, non-interface field appearing in ForceSendFields will be
1246	// sent to the server regardless of whether the field is empty or not.
1247	// This may be used to include empty fields in Patch requests.
1248	ForceSendFields []string `json:"-"`
1249
1250	// NullFields is a list of field names (e.g. "BuildingId") to include in
1251	// API requests with the JSON null value. By default, fields with empty
1252	// values are omitted from API requests. However, any field with an
1253	// empty value appearing in NullFields will be sent to the server as
1254	// null. It is an error if a field in this list has a non-empty value.
1255	// This may be used to include null fields in Patch requests.
1256	NullFields []string `json:"-"`
1257}
1258
1259func (s *CalendarResource) MarshalJSON() ([]byte, error) {
1260	type NoMethod CalendarResource
1261	raw := NoMethod(*s)
1262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1263}
1264
1265// CalendarResources: Public API: Resources.calendars
1266type CalendarResources struct {
1267	// Etag: ETag of the resource.
1268	Etag string `json:"etag,omitempty"`
1269
1270	// Items: The CalendarResources in this page of results.
1271	Items []*CalendarResource `json:"items,omitempty"`
1272
1273	// Kind: Identifies this as a collection of CalendarResources. This is
1274	// always `admin#directory#resources#calendars#calendarResourcesList`.
1275	Kind string `json:"kind,omitempty"`
1276
1277	// NextPageToken: The continuation token, used to page through large
1278	// result sets. Provide this value in a subsequent request to return the
1279	// next page of results.
1280	NextPageToken string `json:"nextPageToken,omitempty"`
1281
1282	// ServerResponse contains the HTTP response code and headers from the
1283	// server.
1284	googleapi.ServerResponse `json:"-"`
1285
1286	// ForceSendFields is a list of field names (e.g. "Etag") to
1287	// unconditionally include in API requests. By default, fields with
1288	// empty or default values are omitted from API requests. However, any
1289	// non-pointer, non-interface field appearing in ForceSendFields will be
1290	// sent to the server regardless of whether the field is empty or not.
1291	// This may be used to include empty fields in Patch requests.
1292	ForceSendFields []string `json:"-"`
1293
1294	// NullFields is a list of field names (e.g. "Etag") to include in API
1295	// requests with the JSON null value. By default, fields with empty
1296	// values are omitted from API requests. However, any field with an
1297	// empty value appearing in NullFields will be sent to the server as
1298	// null. It is an error if a field in this list has a non-empty value.
1299	// This may be used to include null fields in Patch requests.
1300	NullFields []string `json:"-"`
1301}
1302
1303func (s *CalendarResources) MarshalJSON() ([]byte, error) {
1304	type NoMethod CalendarResources
1305	raw := NoMethod(*s)
1306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1307}
1308
1309// Channel: An notification channel used to watch for resource changes.
1310type Channel struct {
1311	// Address: The address where notifications are delivered for this
1312	// channel.
1313	Address string `json:"address,omitempty"`
1314
1315	// Expiration: Date and time of notification channel expiration,
1316	// expressed as a Unix timestamp, in milliseconds. Optional.
1317	Expiration int64 `json:"expiration,omitempty,string"`
1318
1319	// Id: A UUID or similar unique string that identifies this channel.
1320	Id string `json:"id,omitempty"`
1321
1322	// Kind: Identifies this as a notification channel used to watch for
1323	// changes to a resource, which is `api#channel`.
1324	Kind string `json:"kind,omitempty"`
1325
1326	// Params: Additional parameters controlling delivery channel behavior.
1327	// Optional.
1328	Params map[string]string `json:"params,omitempty"`
1329
1330	// Payload: A Boolean value to indicate whether payload is wanted.
1331	// Optional.
1332	Payload bool `json:"payload,omitempty"`
1333
1334	// ResourceId: An opaque ID that identifies the resource being watched
1335	// on this channel. Stable across different API versions.
1336	ResourceId string `json:"resourceId,omitempty"`
1337
1338	// ResourceUri: A version-specific identifier for the watched resource.
1339	ResourceUri string `json:"resourceUri,omitempty"`
1340
1341	// Token: An arbitrary string delivered to the target address with each
1342	// notification delivered over this channel. Optional.
1343	Token string `json:"token,omitempty"`
1344
1345	// Type: The type of delivery mechanism used for this channel.
1346	Type string `json:"type,omitempty"`
1347
1348	// ServerResponse contains the HTTP response code and headers from the
1349	// server.
1350	googleapi.ServerResponse `json:"-"`
1351
1352	// ForceSendFields is a list of field names (e.g. "Address") to
1353	// unconditionally include in API requests. By default, fields with
1354	// empty or default values are omitted from API requests. However, any
1355	// non-pointer, non-interface field appearing in ForceSendFields will be
1356	// sent to the server regardless of whether the field is empty or not.
1357	// This may be used to include empty fields in Patch requests.
1358	ForceSendFields []string `json:"-"`
1359
1360	// NullFields is a list of field names (e.g. "Address") to include in
1361	// API requests with the JSON null value. By default, fields with empty
1362	// values are omitted from API requests. However, any field with an
1363	// empty value appearing in NullFields will be sent to the server as
1364	// null. It is an error if a field in this list has a non-empty value.
1365	// This may be used to include null fields in Patch requests.
1366	NullFields []string `json:"-"`
1367}
1368
1369func (s *Channel) MarshalJSON() ([]byte, error) {
1370	type NoMethod Channel
1371	raw := NoMethod(*s)
1372	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1373}
1374
1375// ChromeOsDevice: Google Chrome devices run on the Chrome OS
1376// (https://support.google.com/chromeos). For more information about
1377// common API tasks, see the Developer's Guide
1378// (/admin-sdk/directory/v1/guides/manage-chrome-devices).
1379type ChromeOsDevice struct {
1380	// ActiveTimeRanges: List of active time ranges (Read-only).
1381	ActiveTimeRanges []*ChromeOsDeviceActiveTimeRanges `json:"activeTimeRanges,omitempty"`
1382
1383	// AnnotatedAssetId: The asset identifier as noted by an administrator
1384	// or specified during enrollment.
1385	AnnotatedAssetId string `json:"annotatedAssetId,omitempty"`
1386
1387	// AnnotatedLocation: The address or location of the device as noted by
1388	// the administrator. Maximum length is `200` characters. Empty values
1389	// are allowed.
1390	AnnotatedLocation string `json:"annotatedLocation,omitempty"`
1391
1392	// AnnotatedUser: The user of the device as noted by the administrator.
1393	// Maximum length is 100 characters. Empty values are allowed.
1394	AnnotatedUser string `json:"annotatedUser,omitempty"`
1395
1396	// AutoUpdateExpiration: (Read-only) The timestamp after which the
1397	// device will stop receiving Chrome updates or support
1398	AutoUpdateExpiration int64 `json:"autoUpdateExpiration,omitempty,string"`
1399
1400	// BootMode: The boot mode for the device. The possible values are: *
1401	// `Verified`: The device is running a valid version of the Chrome OS. *
1402	// `Dev`: The devices's developer hardware switch is enabled. When
1403	// booted, the device has a command line shell. For an example of a
1404	// developer switch, see the Chromebook developer information
1405	// (https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-series-5-chromebook#TOC-Developer-switch).
1406	BootMode string `json:"bootMode,omitempty"`
1407
1408	// CpuStatusReports: Reports of CPU utilization and temperature
1409	// (Read-only)
1410	CpuStatusReports []*ChromeOsDeviceCpuStatusReports `json:"cpuStatusReports,omitempty"`
1411
1412	// DeviceFiles: List of device files to download (Read-only)
1413	DeviceFiles []*ChromeOsDeviceDeviceFiles `json:"deviceFiles,omitempty"`
1414
1415	// DeviceId: The unique ID of the Chrome device.
1416	DeviceId string `json:"deviceId,omitempty"`
1417
1418	// DiskVolumeReports: Reports of disk space and other info about
1419	// mounted/connected volumes.
1420	DiskVolumeReports []*ChromeOsDeviceDiskVolumeReports `json:"diskVolumeReports,omitempty"`
1421
1422	// DockMacAddress: (Read-only) Built-in MAC address for the docking
1423	// station that the device connected to. Factory sets Media access
1424	// control address (MAC address) assigned for use by a dock. It is
1425	// reserved specifically for MAC pass through device policy. The format
1426	// is twelve (12) hexadecimal digits without any delimiter (uppercase
1427	// letters). This is only relevant for some devices.
1428	DockMacAddress string `json:"dockMacAddress,omitempty"`
1429
1430	// Etag: ETag of the resource.
1431	Etag string `json:"etag,omitempty"`
1432
1433	// EthernetMacAddress: The device's MAC address on the ethernet network
1434	// interface.
1435	EthernetMacAddress string `json:"ethernetMacAddress,omitempty"`
1436
1437	// EthernetMacAddress0: (Read-only) MAC address used by the
1438	// Chromebook’s internal ethernet port, and for onboard network
1439	// (ethernet) interface. The format is twelve (12) hexadecimal digits
1440	// without any delimiter (uppercase letters). This is only relevant for
1441	// some devices.
1442	EthernetMacAddress0 string `json:"ethernetMacAddress0,omitempty"`
1443
1444	// FirmwareVersion: The Chrome device's firmware version.
1445	FirmwareVersion string `json:"firmwareVersion,omitempty"`
1446
1447	// Kind: The type of resource. For the Chromeosdevices resource, the
1448	// value is `admin#directory#chromeosdevice`.
1449	Kind string `json:"kind,omitempty"`
1450
1451	// LastEnrollmentTime: Date and time the device was last enrolled
1452	// (Read-only)
1453	LastEnrollmentTime string `json:"lastEnrollmentTime,omitempty"`
1454
1455	// LastKnownNetwork: Contains last known network (Read-only)
1456	LastKnownNetwork []*ChromeOsDeviceLastKnownNetwork `json:"lastKnownNetwork,omitempty"`
1457
1458	// LastSync: Date and time the device was last synchronized with the
1459	// policy settings in the G Suite administrator control panel
1460	// (Read-only)
1461	LastSync string `json:"lastSync,omitempty"`
1462
1463	// MacAddress: The device's wireless MAC address. If the device does not
1464	// have this information, it is not included in the response.
1465	MacAddress string `json:"macAddress,omitempty"`
1466
1467	// ManufactureDate: (Read-only) The date the device was manufactured in
1468	// yyyy-mm-dd format.
1469	ManufactureDate string `json:"manufactureDate,omitempty"`
1470
1471	// Meid: The Mobile Equipment Identifier (MEID) or the International
1472	// Mobile Equipment Identity (IMEI) for the 3G mobile card in a mobile
1473	// device. A MEID/IMEI is typically used when adding a device to a
1474	// wireless carrier's post-pay service plan. If the device does not have
1475	// this information, this property is not included in the response. For
1476	// more information on how to export a MEID/IMEI list, see the
1477	// Developer's Guide
1478	// (/admin-sdk/directory/v1/guides/manage-chrome-devices.html#export_meid
1479	// ).
1480	Meid string `json:"meid,omitempty"`
1481
1482	// Model: The device's model information. If the device does not have
1483	// this information, this property is not included in the response.
1484	Model string `json:"model,omitempty"`
1485
1486	// Notes: Notes about this device added by the administrator. This
1487	// property can be searched
1488	// (https://support.google.com/chrome/a/answer/1698333) with the list
1489	// (/admin-sdk/directory/v1/reference/chromeosdevices/list) method's
1490	// `query` parameter. Maximum length is 500 characters. Empty values are
1491	// allowed.
1492	Notes string `json:"notes,omitempty"`
1493
1494	// OrderNumber: The device's order number. Only devices directly
1495	// purchased from Google have an order number.
1496	OrderNumber string `json:"orderNumber,omitempty"`
1497
1498	// OrgUnitPath: The full parent path with the organizational unit's name
1499	// associated with the device. Path names are case insensitive. If the
1500	// parent organizational unit is the top-level organization, it is
1501	// represented as a forward slash, `/`. This property can be updated
1502	// (/admin-sdk/directory/v1/guides/manage-chrome-devices#update_chrome_de
1503	// vice) using the API. For more information about how to create an
1504	// organizational structure for your device, see the administration help
1505	// center (https://support.google.com/a/answer/182433).
1506	OrgUnitPath string `json:"orgUnitPath,omitempty"`
1507
1508	// OsVersion: The Chrome device's operating system version.
1509	OsVersion string `json:"osVersion,omitempty"`
1510
1511	// PlatformVersion: The Chrome device's platform version.
1512	PlatformVersion string `json:"platformVersion,omitempty"`
1513
1514	// RecentUsers: List of recent device users, in descending order, by
1515	// last login time.
1516	RecentUsers []*ChromeOsDeviceRecentUsers `json:"recentUsers,omitempty"`
1517
1518	// ScreenshotFiles: List of screenshot files to download. Type is always
1519	// "SCREENSHOT_FILE". (Read-only)
1520	ScreenshotFiles []*ChromeOsDeviceScreenshotFiles `json:"screenshotFiles,omitempty"`
1521
1522	// SerialNumber: The Chrome device serial number entered when the device
1523	// was enabled. This value is the same as the Admin console's *Serial
1524	// Number* in the *Chrome OS Devices* tab.
1525	SerialNumber string `json:"serialNumber,omitempty"`
1526
1527	// Status: The status of the device.
1528	Status string `json:"status,omitempty"`
1529
1530	// SupportEndDate: Final date the device will be supported (Read-only)
1531	SupportEndDate string `json:"supportEndDate,omitempty"`
1532
1533	// SystemRamFreeReports: Reports of amounts of available RAM memory
1534	// (Read-only)
1535	SystemRamFreeReports []*ChromeOsDeviceSystemRamFreeReports `json:"systemRamFreeReports,omitempty"`
1536
1537	// SystemRamTotal: Total RAM on the device [in bytes] (Read-only)
1538	SystemRamTotal int64 `json:"systemRamTotal,omitempty,string"`
1539
1540	// TpmVersionInfo: Trusted Platform Module (TPM) (Read-only)
1541	TpmVersionInfo *ChromeOsDeviceTpmVersionInfo `json:"tpmVersionInfo,omitempty"`
1542
1543	// WillAutoRenew: Determines if the device will auto renew its support
1544	// after the support end date. This is a read-only property.
1545	WillAutoRenew bool `json:"willAutoRenew,omitempty"`
1546
1547	// ServerResponse contains the HTTP response code and headers from the
1548	// server.
1549	googleapi.ServerResponse `json:"-"`
1550
1551	// ForceSendFields is a list of field names (e.g. "ActiveTimeRanges") to
1552	// unconditionally include in API requests. By default, fields with
1553	// empty or default values are omitted from API requests. However, any
1554	// non-pointer, non-interface field appearing in ForceSendFields will be
1555	// sent to the server regardless of whether the field is empty or not.
1556	// This may be used to include empty fields in Patch requests.
1557	ForceSendFields []string `json:"-"`
1558
1559	// NullFields is a list of field names (e.g. "ActiveTimeRanges") to
1560	// include in API requests with the JSON null value. By default, fields
1561	// with empty values are omitted from API requests. However, any field
1562	// with an empty value appearing in NullFields will be sent to the
1563	// server as null. It is an error if a field in this list has a
1564	// non-empty value. This may be used to include null fields in Patch
1565	// requests.
1566	NullFields []string `json:"-"`
1567}
1568
1569func (s *ChromeOsDevice) MarshalJSON() ([]byte, error) {
1570	type NoMethod ChromeOsDevice
1571	raw := NoMethod(*s)
1572	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1573}
1574
1575type ChromeOsDeviceActiveTimeRanges struct {
1576	// ActiveTime: Duration of usage in milliseconds.
1577	ActiveTime int64 `json:"activeTime,omitempty"`
1578
1579	// Date: Date of usage
1580	Date string `json:"date,omitempty"`
1581
1582	// ForceSendFields is a list of field names (e.g. "ActiveTime") to
1583	// unconditionally include in API requests. By default, fields with
1584	// empty or default values are omitted from API requests. However, any
1585	// non-pointer, non-interface field appearing in ForceSendFields will be
1586	// sent to the server regardless of whether the field is empty or not.
1587	// This may be used to include empty fields in Patch requests.
1588	ForceSendFields []string `json:"-"`
1589
1590	// NullFields is a list of field names (e.g. "ActiveTime") to include in
1591	// API requests with the JSON null value. By default, fields with empty
1592	// values are omitted from API requests. However, any field with an
1593	// empty value appearing in NullFields will be sent to the server as
1594	// null. It is an error if a field in this list has a non-empty value.
1595	// This may be used to include null fields in Patch requests.
1596	NullFields []string `json:"-"`
1597}
1598
1599func (s *ChromeOsDeviceActiveTimeRanges) MarshalJSON() ([]byte, error) {
1600	type NoMethod ChromeOsDeviceActiveTimeRanges
1601	raw := NoMethod(*s)
1602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1603}
1604
1605type ChromeOsDeviceCpuStatusReports struct {
1606	// CpuTemperatureInfo: List of CPU temperature samples.
1607	CpuTemperatureInfo []*ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo `json:"cpuTemperatureInfo,omitempty"`
1608
1609	CpuUtilizationPercentageInfo []int64 `json:"cpuUtilizationPercentageInfo,omitempty"`
1610
1611	// ReportTime: Date and time the report was received.
1612	ReportTime string `json:"reportTime,omitempty"`
1613
1614	// ForceSendFields is a list of field names (e.g. "CpuTemperatureInfo")
1615	// to unconditionally include in API requests. By default, fields with
1616	// empty or default values are omitted from API requests. However, any
1617	// non-pointer, non-interface field appearing in ForceSendFields will be
1618	// sent to the server regardless of whether the field is empty or not.
1619	// This may be used to include empty fields in Patch requests.
1620	ForceSendFields []string `json:"-"`
1621
1622	// NullFields is a list of field names (e.g. "CpuTemperatureInfo") to
1623	// include in API requests with the JSON null value. By default, fields
1624	// with empty values are omitted from API requests. However, any field
1625	// with an empty value appearing in NullFields will be sent to the
1626	// server as null. It is an error if a field in this list has a
1627	// non-empty value. This may be used to include null fields in Patch
1628	// requests.
1629	NullFields []string `json:"-"`
1630}
1631
1632func (s *ChromeOsDeviceCpuStatusReports) MarshalJSON() ([]byte, error) {
1633	type NoMethod ChromeOsDeviceCpuStatusReports
1634	raw := NoMethod(*s)
1635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1636}
1637
1638type ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo struct {
1639	// Label: CPU label
1640	Label string `json:"label,omitempty"`
1641
1642	// Temperature: Temperature in Celsius degrees.
1643	Temperature int64 `json:"temperature,omitempty"`
1644
1645	// ForceSendFields is a list of field names (e.g. "Label") to
1646	// unconditionally include in API requests. By default, fields with
1647	// empty or default values are omitted from API requests. However, any
1648	// non-pointer, non-interface field appearing in ForceSendFields will be
1649	// sent to the server regardless of whether the field is empty or not.
1650	// This may be used to include empty fields in Patch requests.
1651	ForceSendFields []string `json:"-"`
1652
1653	// NullFields is a list of field names (e.g. "Label") to include in API
1654	// requests with the JSON null value. By default, fields with empty
1655	// values are omitted from API requests. However, any field with an
1656	// empty value appearing in NullFields will be sent to the server as
1657	// null. It is an error if a field in this list has a non-empty value.
1658	// This may be used to include null fields in Patch requests.
1659	NullFields []string `json:"-"`
1660}
1661
1662func (s *ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo) MarshalJSON() ([]byte, error) {
1663	type NoMethod ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo
1664	raw := NoMethod(*s)
1665	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1666}
1667
1668type ChromeOsDeviceDeviceFiles struct {
1669	// CreateTime: Date and time the file was created
1670	CreateTime string `json:"createTime,omitempty"`
1671
1672	// DownloadUrl: File download URL
1673	DownloadUrl string `json:"downloadUrl,omitempty"`
1674
1675	// Name: File name
1676	Name string `json:"name,omitempty"`
1677
1678	// Type: File type
1679	Type string `json:"type,omitempty"`
1680
1681	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1682	// unconditionally include in API requests. By default, fields with
1683	// empty or default values are omitted from API requests. However, any
1684	// non-pointer, non-interface field appearing in ForceSendFields will be
1685	// sent to the server regardless of whether the field is empty or not.
1686	// This may be used to include empty fields in Patch requests.
1687	ForceSendFields []string `json:"-"`
1688
1689	// NullFields is a list of field names (e.g. "CreateTime") to include in
1690	// API requests with the JSON null value. By default, fields with empty
1691	// values are omitted from API requests. However, any field with an
1692	// empty value appearing in NullFields will be sent to the server as
1693	// null. It is an error if a field in this list has a non-empty value.
1694	// This may be used to include null fields in Patch requests.
1695	NullFields []string `json:"-"`
1696}
1697
1698func (s *ChromeOsDeviceDeviceFiles) MarshalJSON() ([]byte, error) {
1699	type NoMethod ChromeOsDeviceDeviceFiles
1700	raw := NoMethod(*s)
1701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1702}
1703
1704type ChromeOsDeviceDiskVolumeReports struct {
1705	// VolumeInfo: Disk volumes
1706	VolumeInfo []*ChromeOsDeviceDiskVolumeReportsVolumeInfo `json:"volumeInfo,omitempty"`
1707
1708	// ForceSendFields is a list of field names (e.g. "VolumeInfo") to
1709	// unconditionally include in API requests. By default, fields with
1710	// empty or default values are omitted from API requests. However, any
1711	// non-pointer, non-interface field appearing in ForceSendFields will be
1712	// sent to the server regardless of whether the field is empty or not.
1713	// This may be used to include empty fields in Patch requests.
1714	ForceSendFields []string `json:"-"`
1715
1716	// NullFields is a list of field names (e.g. "VolumeInfo") to include in
1717	// API requests with the JSON null value. By default, fields with empty
1718	// values are omitted from API requests. However, any field with an
1719	// empty value appearing in NullFields will be sent to the server as
1720	// null. It is an error if a field in this list has a non-empty value.
1721	// This may be used to include null fields in Patch requests.
1722	NullFields []string `json:"-"`
1723}
1724
1725func (s *ChromeOsDeviceDiskVolumeReports) MarshalJSON() ([]byte, error) {
1726	type NoMethod ChromeOsDeviceDiskVolumeReports
1727	raw := NoMethod(*s)
1728	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1729}
1730
1731type ChromeOsDeviceDiskVolumeReportsVolumeInfo struct {
1732	// StorageFree: Free disk space [in bytes]
1733	StorageFree int64 `json:"storageFree,omitempty,string"`
1734
1735	// StorageTotal: Total disk space [in bytes]
1736	StorageTotal int64 `json:"storageTotal,omitempty,string"`
1737
1738	// VolumeId: Volume id
1739	VolumeId string `json:"volumeId,omitempty"`
1740
1741	// ForceSendFields is a list of field names (e.g. "StorageFree") to
1742	// unconditionally include in API requests. By default, fields with
1743	// empty or default values are omitted from API requests. However, any
1744	// non-pointer, non-interface field appearing in ForceSendFields will be
1745	// sent to the server regardless of whether the field is empty or not.
1746	// This may be used to include empty fields in Patch requests.
1747	ForceSendFields []string `json:"-"`
1748
1749	// NullFields is a list of field names (e.g. "StorageFree") to include
1750	// in API requests with the JSON null value. By default, fields with
1751	// empty values are omitted from API requests. However, any field with
1752	// an empty value appearing in NullFields will be sent to the server as
1753	// null. It is an error if a field in this list has a non-empty value.
1754	// This may be used to include null fields in Patch requests.
1755	NullFields []string `json:"-"`
1756}
1757
1758func (s *ChromeOsDeviceDiskVolumeReportsVolumeInfo) MarshalJSON() ([]byte, error) {
1759	type NoMethod ChromeOsDeviceDiskVolumeReportsVolumeInfo
1760	raw := NoMethod(*s)
1761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1762}
1763
1764// ChromeOsDeviceLastKnownNetwork: Information for an ip address.
1765type ChromeOsDeviceLastKnownNetwork struct {
1766	// IpAddress: The IP address.
1767	IpAddress string `json:"ipAddress,omitempty"`
1768
1769	// WanIpAddress: The WAN IP address.
1770	WanIpAddress string `json:"wanIpAddress,omitempty"`
1771
1772	// ForceSendFields is a list of field names (e.g. "IpAddress") to
1773	// unconditionally include in API requests. By default, fields with
1774	// empty or default values are omitted from API requests. However, any
1775	// non-pointer, non-interface field appearing in ForceSendFields will be
1776	// sent to the server regardless of whether the field is empty or not.
1777	// This may be used to include empty fields in Patch requests.
1778	ForceSendFields []string `json:"-"`
1779
1780	// NullFields is a list of field names (e.g. "IpAddress") to include in
1781	// API requests with the JSON null value. By default, fields with empty
1782	// values are omitted from API requests. However, any field with an
1783	// empty value appearing in NullFields will be sent to the server as
1784	// null. It is an error if a field in this list has a non-empty value.
1785	// This may be used to include null fields in Patch requests.
1786	NullFields []string `json:"-"`
1787}
1788
1789func (s *ChromeOsDeviceLastKnownNetwork) MarshalJSON() ([]byte, error) {
1790	type NoMethod ChromeOsDeviceLastKnownNetwork
1791	raw := NoMethod(*s)
1792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1793}
1794
1795// ChromeOsDeviceRecentUsers: List of recent device users, in descending
1796// order, by last login time.
1797type ChromeOsDeviceRecentUsers struct {
1798	// Email: The user's email address. This is only present if the user
1799	// type is `USER_TYPE_MANAGED`.
1800	Email string `json:"email,omitempty"`
1801
1802	// Type: The type of the user.
1803	Type string `json:"type,omitempty"`
1804
1805	// ForceSendFields is a list of field names (e.g. "Email") to
1806	// unconditionally include in API requests. By default, fields with
1807	// empty or default values are omitted from API requests. However, any
1808	// non-pointer, non-interface field appearing in ForceSendFields will be
1809	// sent to the server regardless of whether the field is empty or not.
1810	// This may be used to include empty fields in Patch requests.
1811	ForceSendFields []string `json:"-"`
1812
1813	// NullFields is a list of field names (e.g. "Email") to include in API
1814	// requests with the JSON null value. By default, fields with empty
1815	// values are omitted from API requests. However, any field with an
1816	// empty value appearing in NullFields will be sent to the server as
1817	// null. It is an error if a field in this list has a non-empty value.
1818	// This may be used to include null fields in Patch requests.
1819	NullFields []string `json:"-"`
1820}
1821
1822func (s *ChromeOsDeviceRecentUsers) MarshalJSON() ([]byte, error) {
1823	type NoMethod ChromeOsDeviceRecentUsers
1824	raw := NoMethod(*s)
1825	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1826}
1827
1828type ChromeOsDeviceScreenshotFiles struct {
1829	// CreateTime: Date and time the file was created
1830	CreateTime string `json:"createTime,omitempty"`
1831
1832	// DownloadUrl: File download URL
1833	DownloadUrl string `json:"downloadUrl,omitempty"`
1834
1835	// Name: File name
1836	Name string `json:"name,omitempty"`
1837
1838	// Type: File type
1839	Type string `json:"type,omitempty"`
1840
1841	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1842	// unconditionally include in API requests. By default, fields with
1843	// empty or default values are omitted from API requests. However, any
1844	// non-pointer, non-interface field appearing in ForceSendFields will be
1845	// sent to the server regardless of whether the field is empty or not.
1846	// This may be used to include empty fields in Patch requests.
1847	ForceSendFields []string `json:"-"`
1848
1849	// NullFields is a list of field names (e.g. "CreateTime") to include in
1850	// API requests with the JSON null value. By default, fields with empty
1851	// values are omitted from API requests. However, any field with an
1852	// empty value appearing in NullFields will be sent to the server as
1853	// null. It is an error if a field in this list has a non-empty value.
1854	// This may be used to include null fields in Patch requests.
1855	NullFields []string `json:"-"`
1856}
1857
1858func (s *ChromeOsDeviceScreenshotFiles) MarshalJSON() ([]byte, error) {
1859	type NoMethod ChromeOsDeviceScreenshotFiles
1860	raw := NoMethod(*s)
1861	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1862}
1863
1864type ChromeOsDeviceSystemRamFreeReports struct {
1865	// ReportTime: Date and time the report was received.
1866	ReportTime string `json:"reportTime,omitempty"`
1867
1868	SystemRamFreeInfo googleapi.Int64s `json:"systemRamFreeInfo,omitempty"`
1869
1870	// ForceSendFields is a list of field names (e.g. "ReportTime") to
1871	// unconditionally include in API requests. By default, fields with
1872	// empty or default values are omitted from API requests. However, any
1873	// non-pointer, non-interface field appearing in ForceSendFields will be
1874	// sent to the server regardless of whether the field is empty or not.
1875	// This may be used to include empty fields in Patch requests.
1876	ForceSendFields []string `json:"-"`
1877
1878	// NullFields is a list of field names (e.g. "ReportTime") to include in
1879	// API requests with the JSON null value. By default, fields with empty
1880	// values are omitted from API requests. However, any field with an
1881	// empty value appearing in NullFields will be sent to the server as
1882	// null. It is an error if a field in this list has a non-empty value.
1883	// This may be used to include null fields in Patch requests.
1884	NullFields []string `json:"-"`
1885}
1886
1887func (s *ChromeOsDeviceSystemRamFreeReports) MarshalJSON() ([]byte, error) {
1888	type NoMethod ChromeOsDeviceSystemRamFreeReports
1889	raw := NoMethod(*s)
1890	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1891}
1892
1893// ChromeOsDeviceTpmVersionInfo: Trusted Platform Module (TPM)
1894// (Read-only)
1895type ChromeOsDeviceTpmVersionInfo struct {
1896	// Family: TPM family. We use the TPM 2.0 style encoding, e.g.: TPM 1.2:
1897	// "1.2" -> 312e3200 TPM 2.0: "2.0" -> 322e3000
1898	Family string `json:"family,omitempty"`
1899
1900	// FirmwareVersion: TPM firmware version.
1901	FirmwareVersion string `json:"firmwareVersion,omitempty"`
1902
1903	// Manufacturer: TPM manufacturer code.
1904	Manufacturer string `json:"manufacturer,omitempty"`
1905
1906	// SpecLevel: TPM specification level. See Library Specification for TPM
1907	// 2.0 and Main Specification for TPM 1.2.
1908	SpecLevel string `json:"specLevel,omitempty"`
1909
1910	// TpmModel: TPM model number.
1911	TpmModel string `json:"tpmModel,omitempty"`
1912
1913	// VendorSpecific: Vendor-specific information such as Vendor ID.
1914	VendorSpecific string `json:"vendorSpecific,omitempty"`
1915
1916	// ForceSendFields is a list of field names (e.g. "Family") to
1917	// unconditionally include in API requests. By default, fields with
1918	// empty or default values are omitted from API requests. However, any
1919	// non-pointer, non-interface field appearing in ForceSendFields will be
1920	// sent to the server regardless of whether the field is empty or not.
1921	// This may be used to include empty fields in Patch requests.
1922	ForceSendFields []string `json:"-"`
1923
1924	// NullFields is a list of field names (e.g. "Family") to include in API
1925	// requests with the JSON null value. By default, fields with empty
1926	// values are omitted from API requests. However, any field with an
1927	// empty value appearing in NullFields will be sent to the server as
1928	// null. It is an error if a field in this list has a non-empty value.
1929	// This may be used to include null fields in Patch requests.
1930	NullFields []string `json:"-"`
1931}
1932
1933func (s *ChromeOsDeviceTpmVersionInfo) MarshalJSON() ([]byte, error) {
1934	type NoMethod ChromeOsDeviceTpmVersionInfo
1935	raw := NoMethod(*s)
1936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1937}
1938
1939type ChromeOsDeviceAction struct {
1940	// Action: Action to be taken on the Chrome OS device.
1941	Action string `json:"action,omitempty"`
1942
1943	// DeprovisionReason: Only used when the action is `deprovision`. With
1944	// the `deprovision` action, this field is required. *Note*: The
1945	// deprovision reason is audited because it might have implications on
1946	// licenses for perpetual subscription customers.
1947	DeprovisionReason string `json:"deprovisionReason,omitempty"`
1948
1949	// ForceSendFields is a list of field names (e.g. "Action") to
1950	// unconditionally include in API requests. By default, fields with
1951	// empty or default values are omitted from API requests. However, any
1952	// non-pointer, non-interface field appearing in ForceSendFields will be
1953	// sent to the server regardless of whether the field is empty or not.
1954	// This may be used to include empty fields in Patch requests.
1955	ForceSendFields []string `json:"-"`
1956
1957	// NullFields is a list of field names (e.g. "Action") to include in API
1958	// requests with the JSON null value. By default, fields with empty
1959	// values are omitted from API requests. However, any field with an
1960	// empty value appearing in NullFields will be sent to the server as
1961	// null. It is an error if a field in this list has a non-empty value.
1962	// This may be used to include null fields in Patch requests.
1963	NullFields []string `json:"-"`
1964}
1965
1966func (s *ChromeOsDeviceAction) MarshalJSON() ([]byte, error) {
1967	type NoMethod ChromeOsDeviceAction
1968	raw := NoMethod(*s)
1969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1970}
1971
1972type ChromeOsDevices struct {
1973	// Chromeosdevices: List of Chrome OS Device objects.
1974	Chromeosdevices []*ChromeOsDevice `json:"chromeosdevices,omitempty"`
1975
1976	// Etag: ETag of the resource.
1977	Etag string `json:"etag,omitempty"`
1978
1979	// Kind: Kind of resource this is.
1980	Kind string `json:"kind,omitempty"`
1981
1982	// NextPageToken: Token used to access the next page of this result. To
1983	// access the next page, use this token's value in the `pageToken` query
1984	// string of this request.
1985	NextPageToken string `json:"nextPageToken,omitempty"`
1986
1987	// ServerResponse contains the HTTP response code and headers from the
1988	// server.
1989	googleapi.ServerResponse `json:"-"`
1990
1991	// ForceSendFields is a list of field names (e.g. "Chromeosdevices") to
1992	// unconditionally include in API requests. By default, fields with
1993	// empty or default values are omitted from API requests. However, any
1994	// non-pointer, non-interface field appearing in ForceSendFields will be
1995	// sent to the server regardless of whether the field is empty or not.
1996	// This may be used to include empty fields in Patch requests.
1997	ForceSendFields []string `json:"-"`
1998
1999	// NullFields is a list of field names (e.g. "Chromeosdevices") to
2000	// include in API requests with the JSON null value. By default, fields
2001	// with empty values are omitted from API requests. However, any field
2002	// with an empty value appearing in NullFields will be sent to the
2003	// server as null. It is an error if a field in this list has a
2004	// non-empty value. This may be used to include null fields in Patch
2005	// requests.
2006	NullFields []string `json:"-"`
2007}
2008
2009func (s *ChromeOsDevices) MarshalJSON() ([]byte, error) {
2010	type NoMethod ChromeOsDevices
2011	raw := NoMethod(*s)
2012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2013}
2014
2015type ChromeOsMoveDevicesToOu struct {
2016	// DeviceIds: Chrome OS devices to be moved to OU
2017	DeviceIds []string `json:"deviceIds,omitempty"`
2018
2019	// ForceSendFields is a list of field names (e.g. "DeviceIds") to
2020	// unconditionally include in API requests. By default, fields with
2021	// empty or default values are omitted from API requests. However, any
2022	// non-pointer, non-interface field appearing in ForceSendFields will be
2023	// sent to the server regardless of whether the field is empty or not.
2024	// This may be used to include empty fields in Patch requests.
2025	ForceSendFields []string `json:"-"`
2026
2027	// NullFields is a list of field names (e.g. "DeviceIds") to include in
2028	// API requests with the JSON null value. By default, fields with empty
2029	// values are omitted from API requests. However, any field with an
2030	// empty value appearing in NullFields will be sent to the server as
2031	// null. It is an error if a field in this list has a non-empty value.
2032	// This may be used to include null fields in Patch requests.
2033	NullFields []string `json:"-"`
2034}
2035
2036func (s *ChromeOsMoveDevicesToOu) MarshalJSON() ([]byte, error) {
2037	type NoMethod ChromeOsMoveDevicesToOu
2038	raw := NoMethod(*s)
2039	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2040}
2041
2042// CreatePrinterRequest: Request for adding a new printer.
2043type CreatePrinterRequest struct {
2044	// Parent: Required. The name of the customer. Format:
2045	// customers/{customer_id}
2046	Parent string `json:"parent,omitempty"`
2047
2048	// Printer: Required. A printer to create. If you want to place the
2049	// printer under particular OU then populate printer.org_unit_id filed.
2050	// Otherwise the printer will be placed under root OU.
2051	Printer *Printer `json:"printer,omitempty"`
2052
2053	// ForceSendFields is a list of field names (e.g. "Parent") to
2054	// unconditionally include in API requests. By default, fields with
2055	// empty or default values are omitted from API requests. However, any
2056	// non-pointer, non-interface field appearing in ForceSendFields will be
2057	// sent to the server regardless of whether the field is empty or not.
2058	// This may be used to include empty fields in Patch requests.
2059	ForceSendFields []string `json:"-"`
2060
2061	// NullFields is a list of field names (e.g. "Parent") to include in API
2062	// requests with the JSON null value. By default, fields with empty
2063	// values are omitted from API requests. However, any field with an
2064	// empty value appearing in NullFields will be sent to the server as
2065	// null. It is an error if a field in this list has a non-empty value.
2066	// This may be used to include null fields in Patch requests.
2067	NullFields []string `json:"-"`
2068}
2069
2070func (s *CreatePrinterRequest) MarshalJSON() ([]byte, error) {
2071	type NoMethod CreatePrinterRequest
2072	raw := NoMethod(*s)
2073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2074}
2075
2076type Customer struct {
2077	// AlternateEmail: The customer's secondary contact email address. This
2078	// email address cannot be on the same domain as the `customerDomain`
2079	AlternateEmail string `json:"alternateEmail,omitempty"`
2080
2081	// CustomerCreationTime: The customer's creation time (Readonly)
2082	CustomerCreationTime string `json:"customerCreationTime,omitempty"`
2083
2084	// CustomerDomain: The customer's primary domain name string. Do not
2085	// include the `www` prefix when creating a new customer.
2086	CustomerDomain string `json:"customerDomain,omitempty"`
2087
2088	// Etag: ETag of the resource.
2089	Etag string `json:"etag,omitempty"`
2090
2091	// Id: The unique ID for the customer's Google Workspace account.
2092	// (Readonly)
2093	Id string `json:"id,omitempty"`
2094
2095	// Kind: Identifies the resource as a customer. Value:
2096	// `admin#directory#customer`
2097	Kind string `json:"kind,omitempty"`
2098
2099	// Language: The customer's ISO 639-2 language code. See the Language
2100	// Codes (/admin-sdk/directory/v1/languages) page for the list of
2101	// supported codes. Valid language codes outside the supported set will
2102	// be accepted by the API but may lead to unexpected behavior. The
2103	// default value is `en`.
2104	Language string `json:"language,omitempty"`
2105
2106	// PhoneNumber: The customer's contact phone number in E.164
2107	// (https://en.wikipedia.org/wiki/E.164) format.
2108	PhoneNumber string `json:"phoneNumber,omitempty"`
2109
2110	// PostalAddress: The customer's postal address information.
2111	PostalAddress *CustomerPostalAddress `json:"postalAddress,omitempty"`
2112
2113	// ServerResponse contains the HTTP response code and headers from the
2114	// server.
2115	googleapi.ServerResponse `json:"-"`
2116
2117	// ForceSendFields is a list of field names (e.g. "AlternateEmail") to
2118	// unconditionally include in API requests. By default, fields with
2119	// empty or default values are omitted from API requests. However, any
2120	// non-pointer, non-interface field appearing in ForceSendFields will be
2121	// sent to the server regardless of whether the field is empty or not.
2122	// This may be used to include empty fields in Patch requests.
2123	ForceSendFields []string `json:"-"`
2124
2125	// NullFields is a list of field names (e.g. "AlternateEmail") to
2126	// include in API requests with the JSON null value. By default, fields
2127	// with empty values are omitted from API requests. However, any field
2128	// with an empty value appearing in NullFields will be sent to the
2129	// server as null. It is an error if a field in this list has a
2130	// non-empty value. This may be used to include null fields in Patch
2131	// requests.
2132	NullFields []string `json:"-"`
2133}
2134
2135func (s *Customer) MarshalJSON() ([]byte, error) {
2136	type NoMethod Customer
2137	raw := NoMethod(*s)
2138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2139}
2140
2141type CustomerPostalAddress struct {
2142	// AddressLine1: A customer's physical address. The address can be
2143	// composed of one to three lines.
2144	AddressLine1 string `json:"addressLine1,omitempty"`
2145
2146	// AddressLine2: Address line 2 of the address.
2147	AddressLine2 string `json:"addressLine2,omitempty"`
2148
2149	// AddressLine3: Address line 3 of the address.
2150	AddressLine3 string `json:"addressLine3,omitempty"`
2151
2152	// ContactName: The customer contact's name.
2153	ContactName string `json:"contactName,omitempty"`
2154
2155	// CountryCode: This is a required property. For `countryCode`
2156	// information see the ISO 3166 country code elements
2157	// (https://www.iso.org/iso/country_codes.htm).
2158	CountryCode string `json:"countryCode,omitempty"`
2159
2160	// Locality: Name of the locality. An example of a locality value is the
2161	// city of `San Francisco`.
2162	Locality string `json:"locality,omitempty"`
2163
2164	// OrganizationName: The company or company division name.
2165	OrganizationName string `json:"organizationName,omitempty"`
2166
2167	// PostalCode: The postal code. A postalCode example is a postal zip
2168	// code such as `10009`. This is in accordance with - http:
2169	// //portablecontacts.net/draft-spec.html#address_element.
2170	PostalCode string `json:"postalCode,omitempty"`
2171
2172	// Region: Name of the region. An example of a region value is `NY` for
2173	// the state of New York.
2174	Region string `json:"region,omitempty"`
2175
2176	// ForceSendFields is a list of field names (e.g. "AddressLine1") to
2177	// unconditionally include in API requests. By default, fields with
2178	// empty or default values are omitted from API requests. However, any
2179	// non-pointer, non-interface field appearing in ForceSendFields will be
2180	// sent to the server regardless of whether the field is empty or not.
2181	// This may be used to include empty fields in Patch requests.
2182	ForceSendFields []string `json:"-"`
2183
2184	// NullFields is a list of field names (e.g. "AddressLine1") to include
2185	// in API requests with the JSON null value. By default, fields with
2186	// empty values are omitted from API requests. However, any field with
2187	// an empty value appearing in NullFields will be sent to the server as
2188	// null. It is an error if a field in this list has a non-empty value.
2189	// This may be used to include null fields in Patch requests.
2190	NullFields []string `json:"-"`
2191}
2192
2193func (s *CustomerPostalAddress) MarshalJSON() ([]byte, error) {
2194	type NoMethod CustomerPostalAddress
2195	raw := NoMethod(*s)
2196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2197}
2198
2199// DirectoryChromeosdevicesCommand: Information regarding a command that
2200// was issued to a device.
2201type DirectoryChromeosdevicesCommand struct {
2202	// CommandExpireTime: The time at which the command will expire. If the
2203	// device doesn't execute the command within this time the command will
2204	// become expired.
2205	CommandExpireTime string `json:"commandExpireTime,omitempty"`
2206
2207	// CommandId: Unique ID of a device command.
2208	CommandId int64 `json:"commandId,omitempty,string"`
2209
2210	// CommandResult: The result of the command execution.
2211	CommandResult *DirectoryChromeosdevicesCommandResult `json:"commandResult,omitempty"`
2212
2213	// IssueTime: The timestamp when the command was issued by the admin.
2214	IssueTime string `json:"issueTime,omitempty"`
2215
2216	// Payload: The payload that the command specified, if any.
2217	Payload string `json:"payload,omitempty"`
2218
2219	// State: Indicates the command state.
2220	//
2221	// Possible values:
2222	//   "STATE_UNSPECIFIED" - The command status was unspecified.
2223	//   "PENDING" - An unexpired command not yet sent to the client.
2224	//   "EXPIRED" - The command didn't get executed by the client within
2225	// the expected time.
2226	//   "CANCELLED" - The command is cancelled by admin while in PENDING.
2227	//   "SENT_TO_CLIENT" - The command has been sent to the client.
2228	//   "ACKED_BY_CLIENT" - The client has responded that it received the
2229	// command.
2230	//   "EXECUTED_BY_CLIENT" - The client has (un)successfully executed the
2231	// command.
2232	State string `json:"state,omitempty"`
2233
2234	// Type: The type of the command.
2235	//
2236	// Possible values:
2237	//   "COMMAND_TYPE_UNSPECIFIED" - The command type was unspecified.
2238	//   "REBOOT" - Reboot the device. Can only be issued to Kiosk and
2239	// managed guest session devices.
2240	//   "TAKE_A_SCREENSHOT" - Take a screenshot of the device. Only
2241	// available if the device is in Kiosk Mode.
2242	//   "SET_VOLUME" - Set the volume of the device. Can only be issued to
2243	// Kiosk and managed guest session devices.
2244	//   "WIPE_USERS" - Wipe all the users off of the device. Executing this
2245	// command in the device will remove all user profile data, but it will
2246	// keep device policy and enrollment.
2247	//   "REMOTE_POWERWASH" - Wipes the device by performing a power wash.
2248	// Executing this command in the device will remove all data including
2249	// user policies, device policies and enrollment policies. Warning: This
2250	// will revert the device back to a factory state with no enrollment
2251	// unless the device is subject to forced or auto enrollment. Use with
2252	// caution, as this is an irreversible action!
2253	Type string `json:"type,omitempty"`
2254
2255	// ServerResponse contains the HTTP response code and headers from the
2256	// server.
2257	googleapi.ServerResponse `json:"-"`
2258
2259	// ForceSendFields is a list of field names (e.g. "CommandExpireTime")
2260	// to unconditionally include in API requests. By default, fields with
2261	// empty or default values are omitted from API requests. However, any
2262	// non-pointer, non-interface field appearing in ForceSendFields will be
2263	// sent to the server regardless of whether the field is empty or not.
2264	// This may be used to include empty fields in Patch requests.
2265	ForceSendFields []string `json:"-"`
2266
2267	// NullFields is a list of field names (e.g. "CommandExpireTime") to
2268	// include in API requests with the JSON null value. By default, fields
2269	// with empty values are omitted from API requests. However, any field
2270	// with an empty value appearing in NullFields will be sent to the
2271	// server as null. It is an error if a field in this list has a
2272	// non-empty value. This may be used to include null fields in Patch
2273	// requests.
2274	NullFields []string `json:"-"`
2275}
2276
2277func (s *DirectoryChromeosdevicesCommand) MarshalJSON() ([]byte, error) {
2278	type NoMethod DirectoryChromeosdevicesCommand
2279	raw := NoMethod(*s)
2280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2281}
2282
2283// DirectoryChromeosdevicesCommandResult: The result of executing a
2284// command.
2285type DirectoryChromeosdevicesCommandResult struct {
2286	// ErrorMessage: The error message with a short explanation as to why
2287	// the command failed. Only present if the command failed.
2288	ErrorMessage string `json:"errorMessage,omitempty"`
2289
2290	// ExecuteTime: The time at which the command was executed or failed to
2291	// execute.
2292	ExecuteTime string `json:"executeTime,omitempty"`
2293
2294	// Result: The result of the command.
2295	//
2296	// Possible values:
2297	//   "COMMAND_RESULT_TYPE_UNSPECIFIED" - The command result was
2298	// unspecified.
2299	//   "IGNORED" - The command was ignored as obsolete.
2300	//   "FAILURE" - The command could not be executed successfully.
2301	//   "SUCCESS" - The command was successfully executed.
2302	Result string `json:"result,omitempty"`
2303
2304	// ForceSendFields is a list of field names (e.g. "ErrorMessage") to
2305	// unconditionally include in API requests. By default, fields with
2306	// empty or default values are omitted from API requests. However, any
2307	// non-pointer, non-interface field appearing in ForceSendFields will be
2308	// sent to the server regardless of whether the field is empty or not.
2309	// This may be used to include empty fields in Patch requests.
2310	ForceSendFields []string `json:"-"`
2311
2312	// NullFields is a list of field names (e.g. "ErrorMessage") to include
2313	// in API requests with the JSON null value. By default, fields with
2314	// empty values are omitted from API requests. However, any field with
2315	// an empty value appearing in NullFields will be sent to the server as
2316	// null. It is an error if a field in this list has a non-empty value.
2317	// This may be used to include null fields in Patch requests.
2318	NullFields []string `json:"-"`
2319}
2320
2321func (s *DirectoryChromeosdevicesCommandResult) MarshalJSON() ([]byte, error) {
2322	type NoMethod DirectoryChromeosdevicesCommandResult
2323	raw := NoMethod(*s)
2324	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2325}
2326
2327// DirectoryChromeosdevicesIssueCommandRequest: A request for issuing a
2328// command.
2329type DirectoryChromeosdevicesIssueCommandRequest struct {
2330	// CommandType: The type of command.
2331	//
2332	// Possible values:
2333	//   "COMMAND_TYPE_UNSPECIFIED" - The command type was unspecified.
2334	//   "REBOOT" - Reboot the device. Can only be issued to Kiosk and
2335	// managed guest session devices.
2336	//   "TAKE_A_SCREENSHOT" - Take a screenshot of the device. Only
2337	// available if the device is in Kiosk Mode.
2338	//   "SET_VOLUME" - Set the volume of the device. Can only be issued to
2339	// Kiosk and managed guest session devices.
2340	//   "WIPE_USERS" - Wipe all the users off of the device. Executing this
2341	// command in the device will remove all user profile data, but it will
2342	// keep device policy and enrollment.
2343	//   "REMOTE_POWERWASH" - Wipes the device by performing a power wash.
2344	// Executing this command in the device will remove all data including
2345	// user policies, device policies and enrollment policies. Warning: This
2346	// will revert the device back to a factory state with no enrollment
2347	// unless the device is subject to forced or auto enrollment. Use with
2348	// caution, as this is an irreversible action!
2349	CommandType string `json:"commandType,omitempty"`
2350
2351	// Payload: The payload for the command, provide it only if command
2352	// supports it. The following commands support adding payload: -
2353	// SET_VOLUME: Payload is a stringified JSON object in the form: {
2354	// "volume": 50 }. The volume has to be an integer in the range [0,100].
2355	Payload string `json:"payload,omitempty"`
2356
2357	// ForceSendFields is a list of field names (e.g. "CommandType") to
2358	// unconditionally include in API requests. By default, fields with
2359	// empty or default values are omitted from API requests. However, any
2360	// non-pointer, non-interface field appearing in ForceSendFields will be
2361	// sent to the server regardless of whether the field is empty or not.
2362	// This may be used to include empty fields in Patch requests.
2363	ForceSendFields []string `json:"-"`
2364
2365	// NullFields is a list of field names (e.g. "CommandType") to include
2366	// in API requests with the JSON null value. By default, fields with
2367	// empty values are omitted from API requests. However, any field with
2368	// an empty value appearing in NullFields will be sent to the server as
2369	// null. It is an error if a field in this list has a non-empty value.
2370	// This may be used to include null fields in Patch requests.
2371	NullFields []string `json:"-"`
2372}
2373
2374func (s *DirectoryChromeosdevicesIssueCommandRequest) MarshalJSON() ([]byte, error) {
2375	type NoMethod DirectoryChromeosdevicesIssueCommandRequest
2376	raw := NoMethod(*s)
2377	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2378}
2379
2380// DirectoryChromeosdevicesIssueCommandResponse: A response for issuing
2381// a command.
2382type DirectoryChromeosdevicesIssueCommandResponse struct {
2383	// CommandId: The unique ID of the issued command, used to retrieve the
2384	// command status.
2385	CommandId int64 `json:"commandId,omitempty,string"`
2386
2387	// ServerResponse contains the HTTP response code and headers from the
2388	// server.
2389	googleapi.ServerResponse `json:"-"`
2390
2391	// ForceSendFields is a list of field names (e.g. "CommandId") to
2392	// unconditionally include in API requests. By default, fields with
2393	// empty or default values are omitted from API requests. However, any
2394	// non-pointer, non-interface field appearing in ForceSendFields will be
2395	// sent to the server regardless of whether the field is empty or not.
2396	// This may be used to include empty fields in Patch requests.
2397	ForceSendFields []string `json:"-"`
2398
2399	// NullFields is a list of field names (e.g. "CommandId") to include in
2400	// API requests with the JSON null value. By default, fields with empty
2401	// values are omitted from API requests. However, any field with an
2402	// empty value appearing in NullFields will be sent to the server as
2403	// null. It is an error if a field in this list has a non-empty value.
2404	// This may be used to include null fields in Patch requests.
2405	NullFields []string `json:"-"`
2406}
2407
2408func (s *DirectoryChromeosdevicesIssueCommandResponse) MarshalJSON() ([]byte, error) {
2409	type NoMethod DirectoryChromeosdevicesIssueCommandResponse
2410	raw := NoMethod(*s)
2411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2412}
2413
2414type DomainAlias struct {
2415	// CreationTime: The creation time of the domain alias. (Read-only).
2416	CreationTime int64 `json:"creationTime,omitempty,string"`
2417
2418	// DomainAliasName: The domain alias name.
2419	DomainAliasName string `json:"domainAliasName,omitempty"`
2420
2421	// Etag: ETag of the resource.
2422	Etag string `json:"etag,omitempty"`
2423
2424	// Kind: Kind of resource this is.
2425	Kind string `json:"kind,omitempty"`
2426
2427	// ParentDomainName: The parent domain name that the domain alias is
2428	// associated with. This can either be a primary or secondary domain
2429	// name within a customer.
2430	ParentDomainName string `json:"parentDomainName,omitempty"`
2431
2432	// Verified: Indicates the verification state of a domain alias.
2433	// (Read-only)
2434	Verified bool `json:"verified,omitempty"`
2435
2436	// ServerResponse contains the HTTP response code and headers from the
2437	// server.
2438	googleapi.ServerResponse `json:"-"`
2439
2440	// ForceSendFields is a list of field names (e.g. "CreationTime") to
2441	// unconditionally include in API requests. By default, fields with
2442	// empty or default values are omitted from API requests. However, any
2443	// non-pointer, non-interface field appearing in ForceSendFields will be
2444	// sent to the server regardless of whether the field is empty or not.
2445	// This may be used to include empty fields in Patch requests.
2446	ForceSendFields []string `json:"-"`
2447
2448	// NullFields is a list of field names (e.g. "CreationTime") to include
2449	// in API requests with the JSON null value. By default, fields with
2450	// empty values are omitted from API requests. However, any field with
2451	// an empty value appearing in NullFields will be sent to the server as
2452	// null. It is an error if a field in this list has a non-empty value.
2453	// This may be used to include null fields in Patch requests.
2454	NullFields []string `json:"-"`
2455}
2456
2457func (s *DomainAlias) MarshalJSON() ([]byte, error) {
2458	type NoMethod DomainAlias
2459	raw := NoMethod(*s)
2460	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2461}
2462
2463type DomainAliases struct {
2464	// DomainAliases: List of domain alias objects.
2465	DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
2466
2467	// Etag: ETag of the resource.
2468	Etag string `json:"etag,omitempty"`
2469
2470	// Kind: Kind of resource this is.
2471	Kind string `json:"kind,omitempty"`
2472
2473	// ServerResponse contains the HTTP response code and headers from the
2474	// server.
2475	googleapi.ServerResponse `json:"-"`
2476
2477	// ForceSendFields is a list of field names (e.g. "DomainAliases") to
2478	// unconditionally include in API requests. By default, fields with
2479	// empty or default values are omitted from API requests. However, any
2480	// non-pointer, non-interface field appearing in ForceSendFields will be
2481	// sent to the server regardless of whether the field is empty or not.
2482	// This may be used to include empty fields in Patch requests.
2483	ForceSendFields []string `json:"-"`
2484
2485	// NullFields is a list of field names (e.g. "DomainAliases") to include
2486	// in API requests with the JSON null value. By default, fields with
2487	// empty values are omitted from API requests. However, any field with
2488	// an empty value appearing in NullFields will be sent to the server as
2489	// null. It is an error if a field in this list has a non-empty value.
2490	// This may be used to include null fields in Patch requests.
2491	NullFields []string `json:"-"`
2492}
2493
2494func (s *DomainAliases) MarshalJSON() ([]byte, error) {
2495	type NoMethod DomainAliases
2496	raw := NoMethod(*s)
2497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2498}
2499
2500type Domains struct {
2501	// CreationTime: Creation time of the domain. Expressed in Unix time
2502	// (https://en.wikipedia.org/wiki/Epoch_time) format. (Read-only).
2503	CreationTime int64 `json:"creationTime,omitempty,string"`
2504
2505	// DomainAliases: List of domain alias objects. (Read-only)
2506	DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
2507
2508	// DomainName: The domain name of the customer.
2509	DomainName string `json:"domainName,omitempty"`
2510
2511	// Etag: ETag of the resource.
2512	Etag string `json:"etag,omitempty"`
2513
2514	// IsPrimary: Indicates if the domain is a primary domain (Read-only).
2515	IsPrimary bool `json:"isPrimary,omitempty"`
2516
2517	// Kind: Kind of resource this is.
2518	Kind string `json:"kind,omitempty"`
2519
2520	// Verified: Indicates the verification state of a domain. (Read-only).
2521	Verified bool `json:"verified,omitempty"`
2522
2523	// ServerResponse contains the HTTP response code and headers from the
2524	// server.
2525	googleapi.ServerResponse `json:"-"`
2526
2527	// ForceSendFields is a list of field names (e.g. "CreationTime") to
2528	// unconditionally include in API requests. By default, fields with
2529	// empty or default values are omitted from API requests. However, any
2530	// non-pointer, non-interface field appearing in ForceSendFields will be
2531	// sent to the server regardless of whether the field is empty or not.
2532	// This may be used to include empty fields in Patch requests.
2533	ForceSendFields []string `json:"-"`
2534
2535	// NullFields is a list of field names (e.g. "CreationTime") to include
2536	// in API requests with the JSON null value. By default, fields with
2537	// empty values are omitted from API requests. However, any field with
2538	// an empty value appearing in NullFields will be sent to the server as
2539	// null. It is an error if a field in this list has a non-empty value.
2540	// This may be used to include null fields in Patch requests.
2541	NullFields []string `json:"-"`
2542}
2543
2544func (s *Domains) MarshalJSON() ([]byte, error) {
2545	type NoMethod Domains
2546	raw := NoMethod(*s)
2547	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2548}
2549
2550type Domains2 struct {
2551	// Domains: List of domain objects.
2552	Domains []*Domains `json:"domains,omitempty"`
2553
2554	// Etag: ETag of the resource.
2555	Etag string `json:"etag,omitempty"`
2556
2557	// Kind: Kind of resource this is.
2558	Kind string `json:"kind,omitempty"`
2559
2560	// ServerResponse contains the HTTP response code and headers from the
2561	// server.
2562	googleapi.ServerResponse `json:"-"`
2563
2564	// ForceSendFields is a list of field names (e.g. "Domains") to
2565	// unconditionally include in API requests. By default, fields with
2566	// empty or default values are omitted from API requests. However, any
2567	// non-pointer, non-interface field appearing in ForceSendFields will be
2568	// sent to the server regardless of whether the field is empty or not.
2569	// This may be used to include empty fields in Patch requests.
2570	ForceSendFields []string `json:"-"`
2571
2572	// NullFields is a list of field names (e.g. "Domains") to include in
2573	// API requests with the JSON null value. By default, fields with empty
2574	// values are omitted from API requests. However, any field with an
2575	// empty value appearing in NullFields will be sent to the server as
2576	// null. It is an error if a field in this list has a non-empty value.
2577	// This may be used to include null fields in Patch requests.
2578	NullFields []string `json:"-"`
2579}
2580
2581func (s *Domains2) MarshalJSON() ([]byte, error) {
2582	type NoMethod Domains2
2583	raw := NoMethod(*s)
2584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2585}
2586
2587// Empty: A generic empty message that you can re-use to avoid defining
2588// duplicated empty messages in your APIs. A typical example is to use
2589// it as the request or the response type of an API method. For
2590// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
2591// (google.protobuf.Empty); } The JSON representation for `Empty` is
2592// empty JSON object `{}`.
2593type Empty struct {
2594	// ServerResponse contains the HTTP response code and headers from the
2595	// server.
2596	googleapi.ServerResponse `json:"-"`
2597}
2598
2599// FailureInfo: Info about failures
2600type FailureInfo struct {
2601	// ErrorCode: Canonical code for why the update failed to apply.
2602	//
2603	// Possible values:
2604	//   "OK" - Not an error; returned on success HTTP Mapping: 200 OK
2605	//   "CANCELLED" - The operation was cancelled, typically by the caller.
2606	// HTTP Mapping: 499 Client Closed Request
2607	//   "UNKNOWN" - Unknown error. For example, this error may be returned
2608	// when a `Status` value received from another address space belongs to
2609	// an error space that is not known in this address space. Also errors
2610	// raised by APIs that do not return enough error information may be
2611	// converted to this error. HTTP Mapping: 500 Internal Server Error
2612	//   "INVALID_ARGUMENT" - The client specified an invalid argument. Note
2613	// that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT`
2614	// indicates arguments that are problematic regardless of the state of
2615	// the system (e.g., a malformed file name). HTTP Mapping: 400 Bad
2616	// Request
2617	//   "DEADLINE_EXCEEDED" - The deadline expired before the operation
2618	// could complete. For operations that change the state of the system,
2619	// this error may be returned even if the operation has completed
2620	// successfully. For example, a successful response from a server could
2621	// have been delayed long enough for the deadline to expire. HTTP
2622	// Mapping: 504 Gateway Timeout
2623	//   "NOT_FOUND" - Some requested entity (e.g., file or directory) was
2624	// not found. Note to server developers: if a request is denied for an
2625	// entire class of users, such as gradual feature rollout or
2626	// undocumented allowlist, `NOT_FOUND` may be used. If a request is
2627	// denied for some users within a class of users, such as user-based
2628	// access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404
2629	// Not Found
2630	//   "ALREADY_EXISTS" - The entity that a client attempted to create
2631	// (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict
2632	//   "PERMISSION_DENIED" - The caller does not have permission to
2633	// execute the specified operation. `PERMISSION_DENIED` must not be used
2634	// for rejections caused by exhausting some resource (use
2635	// `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED`
2636	// must not be used if the caller can not be identified (use
2637	// `UNAUTHENTICATED` instead for those errors). This error code does not
2638	// imply the request is valid or the requested entity exists or
2639	// satisfies other pre-conditions. HTTP Mapping: 403 Forbidden
2640	//   "UNAUTHENTICATED" - The request does not have valid authentication
2641	// credentials for the operation. HTTP Mapping: 401 Unauthorized
2642	//   "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
2643	// per-user quota, or perhaps the entire file system is out of space.
2644	// HTTP Mapping: 429 Too Many Requests
2645	//   "FAILED_PRECONDITION" - The operation was rejected because the
2646	// system is not in a state required for the operation's execution. For
2647	// example, the directory to be deleted is non-empty, an rmdir operation
2648	// is applied to a non-directory, etc. Service implementors can use the
2649	// following guidelines to decide between `FAILED_PRECONDITION`,
2650	// `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can
2651	// retry just the failing call. (b) Use `ABORTED` if the client should
2652	// retry at a higher level. For example, when a client-specified
2653	// test-and-set fails, indicating the client should restart a
2654	// read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the
2655	// client should not retry until the system state has been explicitly
2656	// fixed. For example, if an "rmdir" fails because the directory is
2657	// non-empty, `FAILED_PRECONDITION` should be returned since the client
2658	// should not retry unless the files are deleted from the directory.
2659	// HTTP Mapping: 400 Bad Request
2660	//   "ABORTED" - The operation was aborted, typically due to a
2661	// concurrency issue such as a sequencer check failure or transaction
2662	// abort. See the guidelines above for deciding between
2663	// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
2664	// 409 Conflict
2665	//   "OUT_OF_RANGE" - The operation was attempted past the valid range.
2666	// E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`,
2667	// this error indicates a problem that may be fixed if the system state
2668	// changes. For example, a 32-bit file system will generate
2669	// `INVALID_ARGUMENT` if asked to read at an offset that is not in the
2670	// range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to
2671	// read from an offset past the current file size. There is a fair bit
2672	// of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We
2673	// recommend using `OUT_OF_RANGE` (the more specific error) when it
2674	// applies so that callers who are iterating through a space can easily
2675	// look for an `OUT_OF_RANGE` error to detect when they are done. HTTP
2676	// Mapping: 400 Bad Request
2677	//   "UNIMPLEMENTED" - The operation is not implemented or is not
2678	// supported/enabled in this service. HTTP Mapping: 501 Not Implemented
2679	//   "INTERNAL" - Internal errors. This means that some invariants
2680	// expected by the underlying system have been broken. This error code
2681	// is reserved for serious errors. HTTP Mapping: 500 Internal Server
2682	// Error
2683	//   "UNAVAILABLE" - The service is currently unavailable. This is most
2684	// likely a transient condition, which can be corrected by retrying with
2685	// a backoff. Note that it is not always safe to retry non-idempotent
2686	// operations. See the guidelines above for deciding between
2687	// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
2688	// 503 Service Unavailable
2689	//   "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping:
2690	// 500 Internal Server Error
2691	ErrorCode string `json:"errorCode,omitempty"`
2692
2693	// ErrorMessage: Failure reason message.
2694	ErrorMessage string `json:"errorMessage,omitempty"`
2695
2696	// Printer: Failed printer.
2697	Printer *Printer `json:"printer,omitempty"`
2698
2699	// PrinterId: Id of a failed printer.
2700	PrinterId string `json:"printerId,omitempty"`
2701
2702	// ForceSendFields is a list of field names (e.g. "ErrorCode") to
2703	// unconditionally include in API requests. By default, fields with
2704	// empty or default values are omitted from API requests. However, any
2705	// non-pointer, non-interface field appearing in ForceSendFields will be
2706	// sent to the server regardless of whether the field is empty or not.
2707	// This may be used to include empty fields in Patch requests.
2708	ForceSendFields []string `json:"-"`
2709
2710	// NullFields is a list of field names (e.g. "ErrorCode") to include in
2711	// API requests with the JSON null value. By default, fields with empty
2712	// values are omitted from API requests. However, any field with an
2713	// empty value appearing in NullFields will be sent to the server as
2714	// null. It is an error if a field in this list has a non-empty value.
2715	// This may be used to include null fields in Patch requests.
2716	NullFields []string `json:"-"`
2717}
2718
2719func (s *FailureInfo) MarshalJSON() ([]byte, error) {
2720	type NoMethod FailureInfo
2721	raw := NoMethod(*s)
2722	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2723}
2724
2725// Feature: JSON template for Feature object in Directory API.
2726type Feature struct {
2727	// Etags: ETag of the resource.
2728	Etags string `json:"etags,omitempty"`
2729
2730	// Kind: Kind of resource this is.
2731	Kind string `json:"kind,omitempty"`
2732
2733	// Name: The name of the feature.
2734	Name string `json:"name,omitempty"`
2735
2736	// ServerResponse contains the HTTP response code and headers from the
2737	// server.
2738	googleapi.ServerResponse `json:"-"`
2739
2740	// ForceSendFields is a list of field names (e.g. "Etags") to
2741	// unconditionally include in API requests. By default, fields with
2742	// empty or default values are omitted from API requests. However, any
2743	// non-pointer, non-interface field appearing in ForceSendFields will be
2744	// sent to the server regardless of whether the field is empty or not.
2745	// This may be used to include empty fields in Patch requests.
2746	ForceSendFields []string `json:"-"`
2747
2748	// NullFields is a list of field names (e.g. "Etags") to include in API
2749	// requests with the JSON null value. By default, fields with empty
2750	// values are omitted from API requests. However, any field with an
2751	// empty value appearing in NullFields will be sent to the server as
2752	// null. It is an error if a field in this list has a non-empty value.
2753	// This may be used to include null fields in Patch requests.
2754	NullFields []string `json:"-"`
2755}
2756
2757func (s *Feature) MarshalJSON() ([]byte, error) {
2758	type NoMethod Feature
2759	raw := NoMethod(*s)
2760	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2761}
2762
2763// FeatureInstance: JSON template for a feature instance.
2764type FeatureInstance struct {
2765	// Feature: The feature that this is an instance of. A calendar resource
2766	// may have multiple instances of a feature.
2767	Feature *Feature `json:"feature,omitempty"`
2768
2769	// ForceSendFields is a list of field names (e.g. "Feature") to
2770	// unconditionally include in API requests. By default, fields with
2771	// empty or default values are omitted from API requests. However, any
2772	// non-pointer, non-interface field appearing in ForceSendFields will be
2773	// sent to the server regardless of whether the field is empty or not.
2774	// This may be used to include empty fields in Patch requests.
2775	ForceSendFields []string `json:"-"`
2776
2777	// NullFields is a list of field names (e.g. "Feature") to include in
2778	// API requests with the JSON null value. By default, fields with empty
2779	// values are omitted from API requests. However, any field with an
2780	// empty value appearing in NullFields will be sent to the server as
2781	// null. It is an error if a field in this list has a non-empty value.
2782	// This may be used to include null fields in Patch requests.
2783	NullFields []string `json:"-"`
2784}
2785
2786func (s *FeatureInstance) MarshalJSON() ([]byte, error) {
2787	type NoMethod FeatureInstance
2788	raw := NoMethod(*s)
2789	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2790}
2791
2792type FeatureRename struct {
2793	// NewName: New name of the feature.
2794	NewName string `json:"newName,omitempty"`
2795
2796	// ForceSendFields is a list of field names (e.g. "NewName") to
2797	// unconditionally include in API requests. By default, fields with
2798	// empty or default values are omitted from API requests. However, any
2799	// non-pointer, non-interface field appearing in ForceSendFields will be
2800	// sent to the server regardless of whether the field is empty or not.
2801	// This may be used to include empty fields in Patch requests.
2802	ForceSendFields []string `json:"-"`
2803
2804	// NullFields is a list of field names (e.g. "NewName") to include in
2805	// API requests with the JSON null value. By default, fields with empty
2806	// values are omitted from API requests. However, any field with an
2807	// empty value appearing in NullFields will be sent to the server as
2808	// null. It is an error if a field in this list has a non-empty value.
2809	// This may be used to include null fields in Patch requests.
2810	NullFields []string `json:"-"`
2811}
2812
2813func (s *FeatureRename) MarshalJSON() ([]byte, error) {
2814	type NoMethod FeatureRename
2815	raw := NoMethod(*s)
2816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2817}
2818
2819// Features: Public API: Resources.features
2820type Features struct {
2821	// Etag: ETag of the resource.
2822	Etag string `json:"etag,omitempty"`
2823
2824	// Features: The Features in this page of results.
2825	Features []*Feature `json:"features,omitempty"`
2826
2827	// Kind: Kind of resource this is.
2828	Kind string `json:"kind,omitempty"`
2829
2830	// NextPageToken: The continuation token, used to page through large
2831	// result sets. Provide this value in a subsequent request to return the
2832	// next page of results.
2833	NextPageToken string `json:"nextPageToken,omitempty"`
2834
2835	// ServerResponse contains the HTTP response code and headers from the
2836	// server.
2837	googleapi.ServerResponse `json:"-"`
2838
2839	// ForceSendFields is a list of field names (e.g. "Etag") to
2840	// unconditionally include in API requests. By default, fields with
2841	// empty or default values are omitted from API requests. However, any
2842	// non-pointer, non-interface field appearing in ForceSendFields will be
2843	// sent to the server regardless of whether the field is empty or not.
2844	// This may be used to include empty fields in Patch requests.
2845	ForceSendFields []string `json:"-"`
2846
2847	// NullFields is a list of field names (e.g. "Etag") to include in API
2848	// requests with the JSON null value. By default, fields with empty
2849	// values are omitted from API requests. However, any field with an
2850	// empty value appearing in NullFields will be sent to the server as
2851	// null. It is an error if a field in this list has a non-empty value.
2852	// This may be used to include null fields in Patch requests.
2853	NullFields []string `json:"-"`
2854}
2855
2856func (s *Features) MarshalJSON() ([]byte, error) {
2857	type NoMethod Features
2858	raw := NoMethod(*s)
2859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2860}
2861
2862// Group: Google Groups provide your users the ability to send messages
2863// to groups of people using the group's email address. For more
2864// information about common tasks, see the Developer's Guide
2865// (/admin-sdk/directory/v1/guides/manage-groups).
2866type Group struct {
2867	// AdminCreated: Value is `true` if this group was created by an
2868	// administrator rather than a user.
2869	AdminCreated bool `json:"adminCreated,omitempty"`
2870
2871	// Aliases: List of a group's alias email addresses.
2872	Aliases []string `json:"aliases,omitempty"`
2873
2874	// Description: An extended description to help users determine the
2875	// purpose of a group. For example, you can include information about
2876	// who should join the group, the types of messages to send to the
2877	// group, links to FAQs about the group, or related groups. Maximum
2878	// length is `4,096` characters.
2879	Description string `json:"description,omitempty"`
2880
2881	// DirectMembersCount: The number of users that are direct members of
2882	// the group. If a group is a member (child) of this group (the parent),
2883	// members of the child group are not counted in the
2884	// `directMembersCount` property of the parent group.
2885	DirectMembersCount int64 `json:"directMembersCount,omitempty,string"`
2886
2887	// Email: The group's email address. If your account has multiple
2888	// domains, select the appropriate domain for the email address. The
2889	// `email` must be unique. This property is required when creating a
2890	// group. Group email addresses are subject to the same character usage
2891	// rules as usernames, see the help center
2892	// (https://support.google.com/a/answer/9193374) for details.
2893	Email string `json:"email,omitempty"`
2894
2895	// Etag: ETag of the resource.
2896	Etag string `json:"etag,omitempty"`
2897
2898	// Id: The unique ID of a group. A group `id` can be used as a group
2899	// request URI's `groupKey`.
2900	Id string `json:"id,omitempty"`
2901
2902	// Kind: The type of the API resource. For Groups resources, the value
2903	// is `admin#directory#group`.
2904	Kind string `json:"kind,omitempty"`
2905
2906	// Name: The group's display name.
2907	Name string `json:"name,omitempty"`
2908
2909	// NonEditableAliases: List of the group's non-editable alias email
2910	// addresses that are outside of the account's primary domain or
2911	// subdomains. These are functioning email addresses used by the group.
2912	// This is a read-only property returned in the API's response for a
2913	// group. If edited in a group's POST or PUT request, the edit is
2914	// ignored by the API service.
2915	NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
2916
2917	// ServerResponse contains the HTTP response code and headers from the
2918	// server.
2919	googleapi.ServerResponse `json:"-"`
2920
2921	// ForceSendFields is a list of field names (e.g. "AdminCreated") to
2922	// unconditionally include in API requests. By default, fields with
2923	// empty or default values are omitted from API requests. However, any
2924	// non-pointer, non-interface field appearing in ForceSendFields will be
2925	// sent to the server regardless of whether the field is empty or not.
2926	// This may be used to include empty fields in Patch requests.
2927	ForceSendFields []string `json:"-"`
2928
2929	// NullFields is a list of field names (e.g. "AdminCreated") to include
2930	// in API requests with the JSON null value. By default, fields with
2931	// empty values are omitted from API requests. However, any field with
2932	// an empty value appearing in NullFields will be sent to the server as
2933	// null. It is an error if a field in this list has a non-empty value.
2934	// This may be used to include null fields in Patch requests.
2935	NullFields []string `json:"-"`
2936}
2937
2938func (s *Group) MarshalJSON() ([]byte, error) {
2939	type NoMethod Group
2940	raw := NoMethod(*s)
2941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2942}
2943
2944type Groups struct {
2945	// Etag: ETag of the resource.
2946	Etag string `json:"etag,omitempty"`
2947
2948	// Groups: List of group objects.
2949	Groups []*Group `json:"groups,omitempty"`
2950
2951	// Kind: Kind of resource this is.
2952	Kind string `json:"kind,omitempty"`
2953
2954	// NextPageToken: Token used to access next page of this result.
2955	NextPageToken string `json:"nextPageToken,omitempty"`
2956
2957	// ServerResponse contains the HTTP response code and headers from the
2958	// server.
2959	googleapi.ServerResponse `json:"-"`
2960
2961	// ForceSendFields is a list of field names (e.g. "Etag") to
2962	// unconditionally include in API requests. By default, fields with
2963	// empty or default values are omitted from API requests. However, any
2964	// non-pointer, non-interface field appearing in ForceSendFields will be
2965	// sent to the server regardless of whether the field is empty or not.
2966	// This may be used to include empty fields in Patch requests.
2967	ForceSendFields []string `json:"-"`
2968
2969	// NullFields is a list of field names (e.g. "Etag") to include in API
2970	// requests with the JSON null value. By default, fields with empty
2971	// values are omitted from API requests. However, any field with an
2972	// empty value appearing in NullFields will be sent to the server as
2973	// null. It is an error if a field in this list has a non-empty value.
2974	// This may be used to include null fields in Patch requests.
2975	NullFields []string `json:"-"`
2976}
2977
2978func (s *Groups) MarshalJSON() ([]byte, error) {
2979	type NoMethod Groups
2980	raw := NoMethod(*s)
2981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2982}
2983
2984// ListPrinterModelsResponse: Response for listing allowed printer
2985// models.
2986type ListPrinterModelsResponse struct {
2987	// NextPageToken: A token, which can be sent as `page_token` to retrieve
2988	// the next page. If this field is omitted, there are no subsequent
2989	// pages.
2990	NextPageToken string `json:"nextPageToken,omitempty"`
2991
2992	// PrinterModels: Printer models that are currently allowed to be
2993	// configured for ChromeOs. Some printers may be added or removed over
2994	// time.
2995	PrinterModels []*PrinterModel `json:"printerModels,omitempty"`
2996
2997	// ServerResponse contains the HTTP response code and headers from the
2998	// server.
2999	googleapi.ServerResponse `json:"-"`
3000
3001	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3002	// unconditionally include in API requests. By default, fields with
3003	// empty or default values are omitted from API requests. However, any
3004	// non-pointer, non-interface field appearing in ForceSendFields will be
3005	// sent to the server regardless of whether the field is empty or not.
3006	// This may be used to include empty fields in Patch requests.
3007	ForceSendFields []string `json:"-"`
3008
3009	// NullFields is a list of field names (e.g. "NextPageToken") to include
3010	// in API requests with the JSON null value. By default, fields with
3011	// empty values are omitted from API requests. However, any field with
3012	// an empty value appearing in NullFields will be sent to the server as
3013	// null. It is an error if a field in this list has a non-empty value.
3014	// This may be used to include null fields in Patch requests.
3015	NullFields []string `json:"-"`
3016}
3017
3018func (s *ListPrinterModelsResponse) MarshalJSON() ([]byte, error) {
3019	type NoMethod ListPrinterModelsResponse
3020	raw := NoMethod(*s)
3021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3022}
3023
3024// ListPrintersResponse: Response for listing printers.
3025type ListPrintersResponse struct {
3026	// NextPageToken: A token, which can be sent as `page_token` to retrieve
3027	// the next page. If this field is omitted, there are no subsequent
3028	// pages.
3029	NextPageToken string `json:"nextPageToken,omitempty"`
3030
3031	// Printers: List of printers. If `org_unit_id` was given in the
3032	// request, then only printers visible for this OU will be returned. If
3033	// `org_unit_id` was given in the request, then all printers will be
3034	// returned.
3035	Printers []*Printer `json:"printers,omitempty"`
3036
3037	// ServerResponse contains the HTTP response code and headers from the
3038	// server.
3039	googleapi.ServerResponse `json:"-"`
3040
3041	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3042	// unconditionally include in API requests. By default, fields with
3043	// empty or default values are omitted from API requests. However, any
3044	// non-pointer, non-interface field appearing in ForceSendFields will be
3045	// sent to the server regardless of whether the field is empty or not.
3046	// This may be used to include empty fields in Patch requests.
3047	ForceSendFields []string `json:"-"`
3048
3049	// NullFields is a list of field names (e.g. "NextPageToken") to include
3050	// in API requests with the JSON null value. By default, fields with
3051	// empty values are omitted from API requests. However, any field with
3052	// an empty value appearing in NullFields will be sent to the server as
3053	// null. It is an error if a field in this list has a non-empty value.
3054	// This may be used to include null fields in Patch requests.
3055	NullFields []string `json:"-"`
3056}
3057
3058func (s *ListPrintersResponse) MarshalJSON() ([]byte, error) {
3059	type NoMethod ListPrintersResponse
3060	raw := NoMethod(*s)
3061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3062}
3063
3064// Member: A Google Groups member can be a user or another group. This
3065// member can be inside or outside of your account's domains. For more
3066// information about common group member tasks, see the Developer's
3067// Guide (/admin-sdk/directory/v1/guides/manage-group-members).
3068type Member struct {
3069	// DeliverySettings: Defines mail delivery preferences of member. This
3070	// is only supported by create/update/get.
3071	DeliverySettings string `json:"delivery_settings,omitempty"`
3072
3073	// Email: The member's email address. A member can be a user or another
3074	// group. This property is required when adding a member to a group. The
3075	// `email` must be unique and cannot be an alias of another group. If
3076	// the email address is changed, the API automatically reflects the
3077	// email address changes.
3078	Email string `json:"email,omitempty"`
3079
3080	// Etag: ETag of the resource.
3081	Etag string `json:"etag,omitempty"`
3082
3083	// Id: The unique ID of the group member. A member `id` can be used as a
3084	// member request URI's `memberKey`.
3085	Id string `json:"id,omitempty"`
3086
3087	// Kind: The type of the API resource. For Members resources, the value
3088	// is `admin#directory#member`.
3089	Kind string `json:"kind,omitempty"`
3090
3091	// Role: The member's role in a group. The API returns an error for
3092	// cycles in group memberships. For example, if `group1` is a member of
3093	// `group2`, `group2` cannot be a member of `group1`. For more
3094	// information about a member's role, see the administration help center
3095	// (https://support.google.com/a/answer/167094).
3096	Role string `json:"role,omitempty"`
3097
3098	// Status: Status of member (Immutable)
3099	Status string `json:"status,omitempty"`
3100
3101	// Type: The type of group member.
3102	Type string `json:"type,omitempty"`
3103
3104	// ServerResponse contains the HTTP response code and headers from the
3105	// server.
3106	googleapi.ServerResponse `json:"-"`
3107
3108	// ForceSendFields is a list of field names (e.g. "DeliverySettings") to
3109	// unconditionally include in API requests. By default, fields with
3110	// empty or default values are omitted from API requests. However, any
3111	// non-pointer, non-interface field appearing in ForceSendFields will be
3112	// sent to the server regardless of whether the field is empty or not.
3113	// This may be used to include empty fields in Patch requests.
3114	ForceSendFields []string `json:"-"`
3115
3116	// NullFields is a list of field names (e.g. "DeliverySettings") to
3117	// include in API requests with the JSON null value. By default, fields
3118	// with empty values are omitted from API requests. However, any field
3119	// with an empty value appearing in NullFields will be sent to the
3120	// server as null. It is an error if a field in this list has a
3121	// non-empty value. This may be used to include null fields in Patch
3122	// requests.
3123	NullFields []string `json:"-"`
3124}
3125
3126func (s *Member) MarshalJSON() ([]byte, error) {
3127	type NoMethod Member
3128	raw := NoMethod(*s)
3129	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3130}
3131
3132type Members struct {
3133	// Etag: ETag of the resource.
3134	Etag string `json:"etag,omitempty"`
3135
3136	// Kind: Kind of resource this is.
3137	Kind string `json:"kind,omitempty"`
3138
3139	// Members: List of member objects.
3140	Members []*Member `json:"members,omitempty"`
3141
3142	// NextPageToken: Token used to access next page of this result.
3143	NextPageToken string `json:"nextPageToken,omitempty"`
3144
3145	// ServerResponse contains the HTTP response code and headers from the
3146	// server.
3147	googleapi.ServerResponse `json:"-"`
3148
3149	// ForceSendFields is a list of field names (e.g. "Etag") to
3150	// unconditionally include in API requests. By default, fields with
3151	// empty or default values are omitted from API requests. However, any
3152	// non-pointer, non-interface field appearing in ForceSendFields will be
3153	// sent to the server regardless of whether the field is empty or not.
3154	// This may be used to include empty fields in Patch requests.
3155	ForceSendFields []string `json:"-"`
3156
3157	// NullFields is a list of field names (e.g. "Etag") to include in API
3158	// requests with the JSON null value. By default, fields with empty
3159	// values are omitted from API requests. However, any field with an
3160	// empty value appearing in NullFields will be sent to the server as
3161	// null. It is an error if a field in this list has a non-empty value.
3162	// This may be used to include null fields in Patch requests.
3163	NullFields []string `json:"-"`
3164}
3165
3166func (s *Members) MarshalJSON() ([]byte, error) {
3167	type NoMethod Members
3168	raw := NoMethod(*s)
3169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3170}
3171
3172// MembersHasMember: JSON template for Has Member response in Directory
3173// API.
3174type MembersHasMember struct {
3175	// IsMember: Output only. Identifies whether the given user is a member
3176	// of the group. Membership can be direct or nested.
3177	IsMember bool `json:"isMember,omitempty"`
3178
3179	// ServerResponse contains the HTTP response code and headers from the
3180	// server.
3181	googleapi.ServerResponse `json:"-"`
3182
3183	// ForceSendFields is a list of field names (e.g. "IsMember") to
3184	// unconditionally include in API requests. By default, fields with
3185	// empty or default values are omitted from API requests. However, any
3186	// non-pointer, non-interface field appearing in ForceSendFields will be
3187	// sent to the server regardless of whether the field is empty or not.
3188	// This may be used to include empty fields in Patch requests.
3189	ForceSendFields []string `json:"-"`
3190
3191	// NullFields is a list of field names (e.g. "IsMember") to include in
3192	// API requests with the JSON null value. By default, fields with empty
3193	// values are omitted from API requests. However, any field with an
3194	// empty value appearing in NullFields will be sent to the server as
3195	// null. It is an error if a field in this list has a non-empty value.
3196	// This may be used to include null fields in Patch requests.
3197	NullFields []string `json:"-"`
3198}
3199
3200func (s *MembersHasMember) MarshalJSON() ([]byte, error) {
3201	type NoMethod MembersHasMember
3202	raw := NoMethod(*s)
3203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3204}
3205
3206// MobileDevice: Google Workspace Mobile Management includes Android,
3207// Google Sync (https://support.google.com/a/answer/135937), and iOS
3208// devices. For more information about common group mobile device API
3209// tasks, see the Developer's Guide
3210// (/admin-sdk/directory/v1/guides/manage-mobile-devices.html).
3211type MobileDevice struct {
3212	// AdbStatus: Adb (USB debugging) enabled or disabled on device
3213	// (Read-only)
3214	AdbStatus bool `json:"adbStatus,omitempty"`
3215
3216	// Applications: The list of applications installed on an Android mobile
3217	// device. It is not applicable to Google Sync and iOS devices. The list
3218	// includes any Android applications that access Google Workspace data.
3219	// When updating an applications list, it is important to note that
3220	// updates replace the existing list. If the Android device has two
3221	// existing applications and the API updates the list with five
3222	// applications, the is now the updated list of five applications.
3223	Applications []*MobileDeviceApplications `json:"applications,omitempty"`
3224
3225	// BasebandVersion: The device's baseband version.
3226	BasebandVersion string `json:"basebandVersion,omitempty"`
3227
3228	// BootloaderVersion: Mobile Device Bootloader version (Read-only)
3229	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
3230
3231	// Brand: Mobile Device Brand (Read-only)
3232	Brand string `json:"brand,omitempty"`
3233
3234	// BuildNumber: The device's operating system build number.
3235	BuildNumber string `json:"buildNumber,omitempty"`
3236
3237	// DefaultLanguage: The default locale used on the device.
3238	DefaultLanguage string `json:"defaultLanguage,omitempty"`
3239
3240	// DeveloperOptionsStatus: Developer options enabled or disabled on
3241	// device (Read-only)
3242	DeveloperOptionsStatus bool `json:"developerOptionsStatus,omitempty"`
3243
3244	// DeviceCompromisedStatus: The compromised device status.
3245	DeviceCompromisedStatus string `json:"deviceCompromisedStatus,omitempty"`
3246
3247	// DeviceId: The serial number for a Google Sync mobile device. For
3248	// Android and iOS devices, this is a software generated unique
3249	// identifier.
3250	DeviceId string `json:"deviceId,omitempty"`
3251
3252	// DevicePasswordStatus: DevicePasswordStatus (Read-only)
3253	DevicePasswordStatus string `json:"devicePasswordStatus,omitempty"`
3254
3255	// Email: List of owner's email addresses. If your application needs the
3256	// current list of user emails, use the get
3257	// (/admin-sdk/directory/v1/reference/mobiledevices/get.html) method.
3258	// For additional information, see the retrieve a user
3259	// (/admin-sdk/directory/v1/guides/manage-users#get_user) method.
3260	Email []string `json:"email,omitempty"`
3261
3262	// EncryptionStatus: Mobile Device Encryption Status (Read-only)
3263	EncryptionStatus string `json:"encryptionStatus,omitempty"`
3264
3265	// Etag: ETag of the resource.
3266	Etag string `json:"etag,omitempty"`
3267
3268	// FirstSync: Date and time the device was first synchronized with the
3269	// policy settings in the G Suite administrator control panel
3270	// (Read-only)
3271	FirstSync string `json:"firstSync,omitempty"`
3272
3273	// Hardware: Mobile Device Hardware (Read-only)
3274	Hardware string `json:"hardware,omitempty"`
3275
3276	// HardwareId: The IMEI/MEID unique identifier for Android hardware. It
3277	// is not applicable to Google Sync devices. When adding an Android
3278	// mobile device, this is an optional property. When updating one of
3279	// these devices, this is a read-only property.
3280	HardwareId string `json:"hardwareId,omitempty"`
3281
3282	// Imei: The device's IMEI number.
3283	Imei string `json:"imei,omitempty"`
3284
3285	// KernelVersion: The device's kernel version.
3286	KernelVersion string `json:"kernelVersion,omitempty"`
3287
3288	// Kind: The type of the API resource. For Mobiledevices resources, the
3289	// value is `admin#directory#mobiledevice`.
3290	Kind string `json:"kind,omitempty"`
3291
3292	// LastSync: Date and time the device was last synchronized with the
3293	// policy settings in the G Suite administrator control panel
3294	// (Read-only)
3295	LastSync string `json:"lastSync,omitempty"`
3296
3297	// ManagedAccountIsOnOwnerProfile: Boolean indicating if this account is
3298	// on owner/primary profile or not.
3299	ManagedAccountIsOnOwnerProfile bool `json:"managedAccountIsOnOwnerProfile,omitempty"`
3300
3301	// Manufacturer: Mobile Device manufacturer (Read-only)
3302	Manufacturer string `json:"manufacturer,omitempty"`
3303
3304	// Meid: The device's MEID number.
3305	Meid string `json:"meid,omitempty"`
3306
3307	// Model: The mobile device's model name, for example Nexus S. This
3308	// property can be updated
3309	// (/admin-sdk/directory/v1/reference/mobiledevices/update.html). For
3310	// more information, see the Developer's Guide
3311	// (/admin-sdk/directory/v1/guides/manage-mobile=devices#update_mobile_de
3312	// vice).
3313	Model string `json:"model,omitempty"`
3314
3315	// Name: List of the owner's user names. If your application needs the
3316	// current list of device owner names, use the get
3317	// (/admin-sdk/directory/v1/reference/mobiledevices/get.html) method.
3318	// For more information about retrieving mobile device user information,
3319	// see the Developer's Guide
3320	// (/admin-sdk/directory/v1/guides/manage-users#get_user).
3321	Name []string `json:"name,omitempty"`
3322
3323	// NetworkOperator: Mobile Device mobile or network operator (if
3324	// available) (Read-only)
3325	NetworkOperator string `json:"networkOperator,omitempty"`
3326
3327	// Os: The mobile device's operating system, for example IOS 4.3 or
3328	// Android 2.3.5. This property can be updated
3329	// (/admin-sdk/directory/v1/reference/mobiledevices/update.html). For
3330	// more information, see the Developer's Guide
3331	// (/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_de
3332	// vice).
3333	Os string `json:"os,omitempty"`
3334
3335	// OtherAccountsInfo: List of accounts added on device (Read-only)
3336	OtherAccountsInfo []string `json:"otherAccountsInfo,omitempty"`
3337
3338	// Privilege: DMAgentPermission (Read-only)
3339	Privilege string `json:"privilege,omitempty"`
3340
3341	// ReleaseVersion: Mobile Device release version version (Read-only)
3342	ReleaseVersion string `json:"releaseVersion,omitempty"`
3343
3344	// ResourceId: The unique ID the API service uses to identify the mobile
3345	// device.
3346	ResourceId string `json:"resourceId,omitempty"`
3347
3348	// SecurityPatchLevel: Mobile Device Security patch level (Read-only)
3349	SecurityPatchLevel int64 `json:"securityPatchLevel,omitempty,string"`
3350
3351	// SerialNumber: The device's serial number.
3352	SerialNumber string `json:"serialNumber,omitempty"`
3353
3354	// Status: The device's status.
3355	Status string `json:"status,omitempty"`
3356
3357	// SupportsWorkProfile: Work profile supported on device (Read-only)
3358	SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
3359
3360	// Type: The type of mobile device.
3361	Type string `json:"type,omitempty"`
3362
3363	// UnknownSourcesStatus: Unknown sources enabled or disabled on device
3364	// (Read-only)
3365	UnknownSourcesStatus bool `json:"unknownSourcesStatus,omitempty"`
3366
3367	// UserAgent: Gives information about the device such as `os` version.
3368	// This property can be updated
3369	// (/admin-sdk/directory/v1/reference/mobiledevices/update.html). For
3370	// more information, see the Developer's Guide
3371	// (/admin-sdk/directory/v1/guides/manage-mobile-devices#update_mobile_de
3372	// vice).
3373	UserAgent string `json:"userAgent,omitempty"`
3374
3375	// WifiMacAddress: The device's MAC address on Wi-Fi networks.
3376	WifiMacAddress string `json:"wifiMacAddress,omitempty"`
3377
3378	// ServerResponse contains the HTTP response code and headers from the
3379	// server.
3380	googleapi.ServerResponse `json:"-"`
3381
3382	// ForceSendFields is a list of field names (e.g. "AdbStatus") to
3383	// unconditionally include in API requests. By default, fields with
3384	// empty or default values are omitted from API requests. However, any
3385	// non-pointer, non-interface field appearing in ForceSendFields will be
3386	// sent to the server regardless of whether the field is empty or not.
3387	// This may be used to include empty fields in Patch requests.
3388	ForceSendFields []string `json:"-"`
3389
3390	// NullFields is a list of field names (e.g. "AdbStatus") to include in
3391	// API requests with the JSON null value. By default, fields with empty
3392	// values are omitted from API requests. However, any field with an
3393	// empty value appearing in NullFields will be sent to the server as
3394	// null. It is an error if a field in this list has a non-empty value.
3395	// This may be used to include null fields in Patch requests.
3396	NullFields []string `json:"-"`
3397}
3398
3399func (s *MobileDevice) MarshalJSON() ([]byte, error) {
3400	type NoMethod MobileDevice
3401	raw := NoMethod(*s)
3402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3403}
3404
3405type MobileDeviceApplications struct {
3406	// DisplayName: The application's display name. An example is `Browser`.
3407	DisplayName string `json:"displayName,omitempty"`
3408
3409	// PackageName: The application's package name. An example is
3410	// `com.android.browser`.
3411	PackageName string `json:"packageName,omitempty"`
3412
3413	// Permission: The list of permissions of this application. These can be
3414	// either a standard Android permission or one defined by the
3415	// application, and are found in an application's Android manifest
3416	// (https://developer.android.com/guide/topics/manifest/uses-permission-element.html).
3417	// Examples of a Calendar application's permissions are `READ_CALENDAR`,
3418	// or `MANAGE_ACCOUNTS`.
3419	Permission []string `json:"permission,omitempty"`
3420
3421	// VersionCode: The application's version code. An example is `13`.
3422	VersionCode int64 `json:"versionCode,omitempty"`
3423
3424	// VersionName: The application's version name. An example is
3425	// `3.2-140714`.
3426	VersionName string `json:"versionName,omitempty"`
3427
3428	// ForceSendFields is a list of field names (e.g. "DisplayName") to
3429	// unconditionally include in API requests. By default, fields with
3430	// empty or default values are omitted from API requests. However, any
3431	// non-pointer, non-interface field appearing in ForceSendFields will be
3432	// sent to the server regardless of whether the field is empty or not.
3433	// This may be used to include empty fields in Patch requests.
3434	ForceSendFields []string `json:"-"`
3435
3436	// NullFields is a list of field names (e.g. "DisplayName") to include
3437	// in API requests with the JSON null value. By default, fields with
3438	// empty values are omitted from API requests. However, any field with
3439	// an empty value appearing in NullFields will be sent to the server as
3440	// null. It is an error if a field in this list has a non-empty value.
3441	// This may be used to include null fields in Patch requests.
3442	NullFields []string `json:"-"`
3443}
3444
3445func (s *MobileDeviceApplications) MarshalJSON() ([]byte, error) {
3446	type NoMethod MobileDeviceApplications
3447	raw := NoMethod(*s)
3448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3449}
3450
3451type MobileDeviceAction struct {
3452	// Action: The action to be performed on the device.
3453	Action string `json:"action,omitempty"`
3454
3455	// ForceSendFields is a list of field names (e.g. "Action") to
3456	// unconditionally include in API requests. By default, fields with
3457	// empty or default values are omitted from API requests. However, any
3458	// non-pointer, non-interface field appearing in ForceSendFields will be
3459	// sent to the server regardless of whether the field is empty or not.
3460	// This may be used to include empty fields in Patch requests.
3461	ForceSendFields []string `json:"-"`
3462
3463	// NullFields is a list of field names (e.g. "Action") to include in API
3464	// requests with the JSON null value. By default, fields with empty
3465	// values are omitted from API requests. However, any field with an
3466	// empty value appearing in NullFields will be sent to the server as
3467	// null. It is an error if a field in this list has a non-empty value.
3468	// This may be used to include null fields in Patch requests.
3469	NullFields []string `json:"-"`
3470}
3471
3472func (s *MobileDeviceAction) MarshalJSON() ([]byte, error) {
3473	type NoMethod MobileDeviceAction
3474	raw := NoMethod(*s)
3475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3476}
3477
3478type MobileDevices struct {
3479	// Etag: ETag of the resource.
3480	Etag string `json:"etag,omitempty"`
3481
3482	// Kind: Kind of resource this is.
3483	Kind string `json:"kind,omitempty"`
3484
3485	// Mobiledevices: List of Mobile Device objects.
3486	Mobiledevices []*MobileDevice `json:"mobiledevices,omitempty"`
3487
3488	// NextPageToken: Token used to access next page of this result.
3489	NextPageToken string `json:"nextPageToken,omitempty"`
3490
3491	// ServerResponse contains the HTTP response code and headers from the
3492	// server.
3493	googleapi.ServerResponse `json:"-"`
3494
3495	// ForceSendFields is a list of field names (e.g. "Etag") to
3496	// unconditionally include in API requests. By default, fields with
3497	// empty or default values are omitted from API requests. However, any
3498	// non-pointer, non-interface field appearing in ForceSendFields will be
3499	// sent to the server regardless of whether the field is empty or not.
3500	// This may be used to include empty fields in Patch requests.
3501	ForceSendFields []string `json:"-"`
3502
3503	// NullFields is a list of field names (e.g. "Etag") to include in API
3504	// requests with the JSON null value. By default, fields with empty
3505	// values are omitted from API requests. However, any field with an
3506	// empty value appearing in NullFields will be sent to the server as
3507	// null. It is an error if a field in this list has a non-empty value.
3508	// This may be used to include null fields in Patch requests.
3509	NullFields []string `json:"-"`
3510}
3511
3512func (s *MobileDevices) MarshalJSON() ([]byte, error) {
3513	type NoMethod MobileDevices
3514	raw := NoMethod(*s)
3515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3516}
3517
3518// OrgUnit: Managing your account's organizational units allows you to
3519// configure your users' access to services and custom settings. For
3520// more information about common organizational unit tasks, see the
3521// Developer's Guide
3522// (/admin-sdk/directory/v1/guides/manage-org-units.html).
3523type OrgUnit struct {
3524	// BlockInheritance: Determines if a sub-organizational unit can inherit
3525	// the settings of the parent organization. The default value is
3526	// `false`, meaning a sub-organizational unit inherits the settings of
3527	// the nearest parent organizational unit. For more information on
3528	// inheritance and users in an organization structure, see the
3529	// administration help center
3530	// (https://support.google.com/a/answer/4352075).
3531	BlockInheritance bool `json:"blockInheritance,omitempty"`
3532
3533	// Description: Description of the organizational unit.
3534	Description string `json:"description,omitempty"`
3535
3536	// Etag: ETag of the resource.
3537	Etag string `json:"etag,omitempty"`
3538
3539	// Kind: The type of the API resource. For Orgunits resources, the value
3540	// is `admin#directory#orgUnit`.
3541	Kind string `json:"kind,omitempty"`
3542
3543	// Name: The organizational unit's path name. For example, an
3544	// organizational unit's name within the /corp/support/sales_support
3545	// parent path is sales_support. Required.
3546	Name string `json:"name,omitempty"`
3547
3548	// OrgUnitId: The unique ID of the organizational unit.
3549	OrgUnitId string `json:"orgUnitId,omitempty"`
3550
3551	// OrgUnitPath: The full path to the organizational unit. The
3552	// `orgUnitPath` is a derived property. When listed, it is derived from
3553	// `parentOrgunitPath` and organizational unit's `name`. For example,
3554	// for an organizational unit named 'apps' under parent organization
3555	// '/engineering', the orgUnitPath is '/engineering/apps'. In order to
3556	// edit an `orgUnitPath`, either update the name of the organization or
3557	// the `parentOrgunitPath`. A user's organizational unit determines
3558	// which Google Workspace services the user has access to. If the user
3559	// is moved to a new organization, the user's access changes. For more
3560	// information about organization structures, see the administration
3561	// help center (https://support.google.com/a/answer/4352075). For more
3562	// information about moving a user to a different organization, see
3563	// Update a user
3564	// (/admin-sdk/directory/v1/guides/manage-users.html#update_user).
3565	OrgUnitPath string `json:"orgUnitPath,omitempty"`
3566
3567	// ParentOrgUnitId: The unique ID of the parent organizational unit.
3568	// Required, unless `parentOrgUnitPath` is set.
3569	ParentOrgUnitId string `json:"parentOrgUnitId,omitempty"`
3570
3571	// ParentOrgUnitPath: The organizational unit's parent path. For
3572	// example, /corp/sales is the parent path for /corp/sales/sales_support
3573	// organizational unit. Required, unless `parentOrgUnitId` is set.
3574	ParentOrgUnitPath string `json:"parentOrgUnitPath,omitempty"`
3575
3576	// ServerResponse contains the HTTP response code and headers from the
3577	// server.
3578	googleapi.ServerResponse `json:"-"`
3579
3580	// ForceSendFields is a list of field names (e.g. "BlockInheritance") to
3581	// unconditionally include in API requests. By default, fields with
3582	// empty or default values are omitted from API requests. However, any
3583	// non-pointer, non-interface field appearing in ForceSendFields will be
3584	// sent to the server regardless of whether the field is empty or not.
3585	// This may be used to include empty fields in Patch requests.
3586	ForceSendFields []string `json:"-"`
3587
3588	// NullFields is a list of field names (e.g. "BlockInheritance") to
3589	// include in API requests with the JSON null value. By default, fields
3590	// with empty values are omitted from API requests. However, any field
3591	// with an empty value appearing in NullFields will be sent to the
3592	// server as null. It is an error if a field in this list has a
3593	// non-empty value. This may be used to include null fields in Patch
3594	// requests.
3595	NullFields []string `json:"-"`
3596}
3597
3598func (s *OrgUnit) MarshalJSON() ([]byte, error) {
3599	type NoMethod OrgUnit
3600	raw := NoMethod(*s)
3601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3602}
3603
3604type OrgUnits struct {
3605	// Etag: ETag of the resource.
3606	Etag string `json:"etag,omitempty"`
3607
3608	// Kind: The type of the API resource. For Org Unit resources, the type
3609	// is `admin#directory#orgUnits`.
3610	Kind string `json:"kind,omitempty"`
3611
3612	// OrganizationUnits: List of organizational unit objects.
3613	OrganizationUnits []*OrgUnit `json:"organizationUnits,omitempty"`
3614
3615	// ServerResponse contains the HTTP response code and headers from the
3616	// server.
3617	googleapi.ServerResponse `json:"-"`
3618
3619	// ForceSendFields is a list of field names (e.g. "Etag") to
3620	// unconditionally include in API requests. By default, fields with
3621	// empty or default values are omitted from API requests. However, any
3622	// non-pointer, non-interface field appearing in ForceSendFields will be
3623	// sent to the server regardless of whether the field is empty or not.
3624	// This may be used to include empty fields in Patch requests.
3625	ForceSendFields []string `json:"-"`
3626
3627	// NullFields is a list of field names (e.g. "Etag") to include in API
3628	// requests with the JSON null value. By default, fields with empty
3629	// values are omitted from API requests. However, any field with an
3630	// empty value appearing in NullFields will be sent to the server as
3631	// null. It is an error if a field in this list has a non-empty value.
3632	// This may be used to include null fields in Patch requests.
3633	NullFields []string `json:"-"`
3634}
3635
3636func (s *OrgUnits) MarshalJSON() ([]byte, error) {
3637	type NoMethod OrgUnits
3638	raw := NoMethod(*s)
3639	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3640}
3641
3642// Printer: Printer configuration.
3643type Printer struct {
3644	// AuxiliaryMessages: Output only. Auxiliary messages about issues with
3645	// the printer configuration if any.
3646	AuxiliaryMessages []*AuxiliaryMessage `json:"auxiliaryMessages,omitempty"`
3647
3648	// CreateTime: Output only. Time when printer was created.
3649	CreateTime string `json:"createTime,omitempty"`
3650
3651	// Description: Editable. Description of printer.
3652	Description string `json:"description,omitempty"`
3653
3654	// DisplayName: Editable. Name of printer.
3655	DisplayName string `json:"displayName,omitempty"`
3656
3657	// Id: Id of the printer. (During printer creation leave empty)
3658	Id string `json:"id,omitempty"`
3659
3660	// MakeAndModel: Editable. Make and model of printer. e.g. Lexmark
3661	// MS610de Value must be in format as seen in ListPrinterModels
3662	// response.
3663	MakeAndModel string `json:"makeAndModel,omitempty"`
3664
3665	// Name: The resource name of the Printer object, in the format
3666	// customers/{customer-id}/printers/{printer-id} (During printer
3667	// creation leave empty)
3668	Name string `json:"name,omitempty"`
3669
3670	// OrgUnitId: Organization Unit that owns this printer (Only can be set
3671	// during Printer creation)
3672	OrgUnitId string `json:"orgUnitId,omitempty"`
3673
3674	// Uri: Editable. Printer URI.
3675	Uri string `json:"uri,omitempty"`
3676
3677	// UseDriverlessConfig: Editable. flag to use driverless configuration
3678	// or not. If it's set to be true, make_and_model can be ignored
3679	UseDriverlessConfig bool `json:"useDriverlessConfig,omitempty"`
3680
3681	// ServerResponse contains the HTTP response code and headers from the
3682	// server.
3683	googleapi.ServerResponse `json:"-"`
3684
3685	// ForceSendFields is a list of field names (e.g. "AuxiliaryMessages")
3686	// to unconditionally include in API requests. By default, fields with
3687	// empty or default values are omitted from API requests. However, any
3688	// non-pointer, non-interface field appearing in ForceSendFields will be
3689	// sent to the server regardless of whether the field is empty or not.
3690	// This may be used to include empty fields in Patch requests.
3691	ForceSendFields []string `json:"-"`
3692
3693	// NullFields is a list of field names (e.g. "AuxiliaryMessages") to
3694	// include in API requests with the JSON null value. By default, fields
3695	// with empty values are omitted from API requests. However, any field
3696	// with an empty value appearing in NullFields will be sent to the
3697	// server as null. It is an error if a field in this list has a
3698	// non-empty value. This may be used to include null fields in Patch
3699	// requests.
3700	NullFields []string `json:"-"`
3701}
3702
3703func (s *Printer) MarshalJSON() ([]byte, error) {
3704	type NoMethod Printer
3705	raw := NoMethod(*s)
3706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3707}
3708
3709// PrinterModel: Printer manufacturer and model
3710type PrinterModel struct {
3711	// DisplayName: Display name. eq. "Brother MFC-8840D"
3712	DisplayName string `json:"displayName,omitempty"`
3713
3714	// MakeAndModel: Make and model as represented in "make_and_model" field
3715	// in Printer object. eq. "brother mfc-8840d"
3716	MakeAndModel string `json:"makeAndModel,omitempty"`
3717
3718	// Manufacturer: Manufacturer. eq. "Brother"
3719	Manufacturer string `json:"manufacturer,omitempty"`
3720
3721	// ForceSendFields is a list of field names (e.g. "DisplayName") to
3722	// unconditionally include in API requests. By default, fields with
3723	// empty or default values are omitted from API requests. However, any
3724	// non-pointer, non-interface field appearing in ForceSendFields will be
3725	// sent to the server regardless of whether the field is empty or not.
3726	// This may be used to include empty fields in Patch requests.
3727	ForceSendFields []string `json:"-"`
3728
3729	// NullFields is a list of field names (e.g. "DisplayName") to include
3730	// in API requests with the JSON null value. By default, fields with
3731	// empty values are omitted from API requests. However, any field with
3732	// an empty value appearing in NullFields will be sent to the server as
3733	// null. It is an error if a field in this list has a non-empty value.
3734	// This may be used to include null fields in Patch requests.
3735	NullFields []string `json:"-"`
3736}
3737
3738func (s *PrinterModel) MarshalJSON() ([]byte, error) {
3739	type NoMethod PrinterModel
3740	raw := NoMethod(*s)
3741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3742}
3743
3744type Privilege struct {
3745	// ChildPrivileges: A list of child privileges. Privileges for a service
3746	// form a tree. Each privilege can have a list of child privileges; this
3747	// list is empty for a leaf privilege.
3748	ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"`
3749
3750	// Etag: ETag of the resource.
3751	Etag string `json:"etag,omitempty"`
3752
3753	// IsOuScopable: If the privilege can be restricted to an organization
3754	// unit.
3755	IsOuScopable bool `json:"isOuScopable,omitempty"`
3756
3757	// Kind: The type of the API resource. This is always
3758	// `admin#directory#privilege`.
3759	Kind string `json:"kind,omitempty"`
3760
3761	// PrivilegeName: The name of the privilege.
3762	PrivilegeName string `json:"privilegeName,omitempty"`
3763
3764	// ServiceId: The obfuscated ID of the service this privilege is for.
3765	// This value is returned with `Privileges.list()`
3766	// (/admin-sdk/directory/v1/reference/privileges/list).
3767	ServiceId string `json:"serviceId,omitempty"`
3768
3769	// ServiceName: The name of the service this privilege is for.
3770	ServiceName string `json:"serviceName,omitempty"`
3771
3772	// ForceSendFields is a list of field names (e.g. "ChildPrivileges") to
3773	// unconditionally include in API requests. By default, fields with
3774	// empty or default values are omitted from API requests. However, any
3775	// non-pointer, non-interface field appearing in ForceSendFields will be
3776	// sent to the server regardless of whether the field is empty or not.
3777	// This may be used to include empty fields in Patch requests.
3778	ForceSendFields []string `json:"-"`
3779
3780	// NullFields is a list of field names (e.g. "ChildPrivileges") to
3781	// include in API requests with the JSON null value. By default, fields
3782	// with empty values are omitted from API requests. However, any field
3783	// with an empty value appearing in NullFields will be sent to the
3784	// server as null. It is an error if a field in this list has a
3785	// non-empty value. This may be used to include null fields in Patch
3786	// requests.
3787	NullFields []string `json:"-"`
3788}
3789
3790func (s *Privilege) MarshalJSON() ([]byte, error) {
3791	type NoMethod Privilege
3792	raw := NoMethod(*s)
3793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3794}
3795
3796type Privileges struct {
3797	// Etag: ETag of the resource.
3798	Etag string `json:"etag,omitempty"`
3799
3800	// Items: A list of Privilege resources.
3801	Items []*Privilege `json:"items,omitempty"`
3802
3803	// Kind: The type of the API resource. This is always
3804	// `admin#directory#privileges`.
3805	Kind string `json:"kind,omitempty"`
3806
3807	// ServerResponse contains the HTTP response code and headers from the
3808	// server.
3809	googleapi.ServerResponse `json:"-"`
3810
3811	// ForceSendFields is a list of field names (e.g. "Etag") to
3812	// unconditionally include in API requests. By default, fields with
3813	// empty or default values are omitted from API requests. However, any
3814	// non-pointer, non-interface field appearing in ForceSendFields will be
3815	// sent to the server regardless of whether the field is empty or not.
3816	// This may be used to include empty fields in Patch requests.
3817	ForceSendFields []string `json:"-"`
3818
3819	// NullFields is a list of field names (e.g. "Etag") to include in API
3820	// requests with the JSON null value. By default, fields with empty
3821	// values are omitted from API requests. However, any field with an
3822	// empty value appearing in NullFields will be sent to the server as
3823	// null. It is an error if a field in this list has a non-empty value.
3824	// This may be used to include null fields in Patch requests.
3825	NullFields []string `json:"-"`
3826}
3827
3828func (s *Privileges) MarshalJSON() ([]byte, error) {
3829	type NoMethod Privileges
3830	raw := NoMethod(*s)
3831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3832}
3833
3834type Role struct {
3835	// Etag: ETag of the resource.
3836	Etag string `json:"etag,omitempty"`
3837
3838	// IsSuperAdminRole: Returns `true` if the role is a super admin role.
3839	IsSuperAdminRole bool `json:"isSuperAdminRole,omitempty"`
3840
3841	// IsSystemRole: Returns `true` if this is a pre-defined system role.
3842	IsSystemRole bool `json:"isSystemRole,omitempty"`
3843
3844	// Kind: The type of the API resource. This is always
3845	// `admin#directory#role`.
3846	Kind string `json:"kind,omitempty"`
3847
3848	// RoleDescription: A short description of the role.
3849	RoleDescription string `json:"roleDescription,omitempty"`
3850
3851	// RoleId: ID of the role.
3852	RoleId int64 `json:"roleId,omitempty,string"`
3853
3854	// RoleName: Name of the role.
3855	RoleName string `json:"roleName,omitempty"`
3856
3857	// RolePrivileges: The set of privileges that are granted to this role.
3858	RolePrivileges []*RoleRolePrivileges `json:"rolePrivileges,omitempty"`
3859
3860	// ServerResponse contains the HTTP response code and headers from the
3861	// server.
3862	googleapi.ServerResponse `json:"-"`
3863
3864	// ForceSendFields is a list of field names (e.g. "Etag") to
3865	// unconditionally include in API requests. By default, fields with
3866	// empty or default values are omitted from API requests. However, any
3867	// non-pointer, non-interface field appearing in ForceSendFields will be
3868	// sent to the server regardless of whether the field is empty or not.
3869	// This may be used to include empty fields in Patch requests.
3870	ForceSendFields []string `json:"-"`
3871
3872	// NullFields is a list of field names (e.g. "Etag") to include in API
3873	// requests with the JSON null value. By default, fields with empty
3874	// values are omitted from API requests. However, any field with an
3875	// empty value appearing in NullFields will be sent to the server as
3876	// null. It is an error if a field in this list has a non-empty value.
3877	// This may be used to include null fields in Patch requests.
3878	NullFields []string `json:"-"`
3879}
3880
3881func (s *Role) MarshalJSON() ([]byte, error) {
3882	type NoMethod Role
3883	raw := NoMethod(*s)
3884	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3885}
3886
3887type RoleRolePrivileges struct {
3888	// PrivilegeName: The name of the privilege.
3889	PrivilegeName string `json:"privilegeName,omitempty"`
3890
3891	// ServiceId: The obfuscated ID of the service this privilege is for.
3892	// This value is returned with `Privileges.list()`
3893	// (/admin-sdk/directory/v1/reference/privileges/list).
3894	ServiceId string `json:"serviceId,omitempty"`
3895
3896	// ForceSendFields is a list of field names (e.g. "PrivilegeName") to
3897	// unconditionally include in API requests. By default, fields with
3898	// empty or default values are omitted from API requests. However, any
3899	// non-pointer, non-interface field appearing in ForceSendFields will be
3900	// sent to the server regardless of whether the field is empty or not.
3901	// This may be used to include empty fields in Patch requests.
3902	ForceSendFields []string `json:"-"`
3903
3904	// NullFields is a list of field names (e.g. "PrivilegeName") to include
3905	// in API requests with the JSON null value. By default, fields with
3906	// empty values are omitted from API requests. However, any field with
3907	// an empty value appearing in NullFields will be sent to the server as
3908	// null. It is an error if a field in this list has a non-empty value.
3909	// This may be used to include null fields in Patch requests.
3910	NullFields []string `json:"-"`
3911}
3912
3913func (s *RoleRolePrivileges) MarshalJSON() ([]byte, error) {
3914	type NoMethod RoleRolePrivileges
3915	raw := NoMethod(*s)
3916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3917}
3918
3919// RoleAssignment: Defines an assignment of a role.
3920type RoleAssignment struct {
3921	// AssignedTo: The unique ID of the user this role is assigned to.
3922	AssignedTo string `json:"assignedTo,omitempty"`
3923
3924	// Etag: ETag of the resource.
3925	Etag string `json:"etag,omitempty"`
3926
3927	// Kind: The type of the API resource. This is always
3928	// `admin#directory#roleAssignment`.
3929	Kind string `json:"kind,omitempty"`
3930
3931	// OrgUnitId: If the role is restricted to an organization unit, this
3932	// contains the ID for the organization unit the exercise of this role
3933	// is restricted to.
3934	OrgUnitId string `json:"orgUnitId,omitempty"`
3935
3936	// RoleAssignmentId: ID of this roleAssignment.
3937	RoleAssignmentId int64 `json:"roleAssignmentId,omitempty,string"`
3938
3939	// RoleId: The ID of the role that is assigned.
3940	RoleId int64 `json:"roleId,omitempty,string"`
3941
3942	// ScopeType: The scope in which this role is assigned.
3943	ScopeType string `json:"scopeType,omitempty"`
3944
3945	// ServerResponse contains the HTTP response code and headers from the
3946	// server.
3947	googleapi.ServerResponse `json:"-"`
3948
3949	// ForceSendFields is a list of field names (e.g. "AssignedTo") to
3950	// unconditionally include in API requests. By default, fields with
3951	// empty or default values are omitted from API requests. However, any
3952	// non-pointer, non-interface field appearing in ForceSendFields will be
3953	// sent to the server regardless of whether the field is empty or not.
3954	// This may be used to include empty fields in Patch requests.
3955	ForceSendFields []string `json:"-"`
3956
3957	// NullFields is a list of field names (e.g. "AssignedTo") to include in
3958	// API requests with the JSON null value. By default, fields with empty
3959	// values are omitted from API requests. However, any field with an
3960	// empty value appearing in NullFields will be sent to the server as
3961	// null. It is an error if a field in this list has a non-empty value.
3962	// This may be used to include null fields in Patch requests.
3963	NullFields []string `json:"-"`
3964}
3965
3966func (s *RoleAssignment) MarshalJSON() ([]byte, error) {
3967	type NoMethod RoleAssignment
3968	raw := NoMethod(*s)
3969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3970}
3971
3972type RoleAssignments struct {
3973	// Etag: ETag of the resource.
3974	Etag string `json:"etag,omitempty"`
3975
3976	// Items: A list of RoleAssignment resources.
3977	Items []*RoleAssignment `json:"items,omitempty"`
3978
3979	// Kind: The type of the API resource. This is always
3980	// `admin#directory#roleAssignments`.
3981	Kind string `json:"kind,omitempty"`
3982
3983	NextPageToken string `json:"nextPageToken,omitempty"`
3984
3985	// ServerResponse contains the HTTP response code and headers from the
3986	// server.
3987	googleapi.ServerResponse `json:"-"`
3988
3989	// ForceSendFields is a list of field names (e.g. "Etag") to
3990	// unconditionally include in API requests. By default, fields with
3991	// empty or default values are omitted from API requests. However, any
3992	// non-pointer, non-interface field appearing in ForceSendFields will be
3993	// sent to the server regardless of whether the field is empty or not.
3994	// This may be used to include empty fields in Patch requests.
3995	ForceSendFields []string `json:"-"`
3996
3997	// NullFields is a list of field names (e.g. "Etag") to include in API
3998	// requests with the JSON null value. By default, fields with empty
3999	// values are omitted from API requests. However, any field with an
4000	// empty value appearing in NullFields will be sent to the server as
4001	// null. It is an error if a field in this list has a non-empty value.
4002	// This may be used to include null fields in Patch requests.
4003	NullFields []string `json:"-"`
4004}
4005
4006func (s *RoleAssignments) MarshalJSON() ([]byte, error) {
4007	type NoMethod RoleAssignments
4008	raw := NoMethod(*s)
4009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4010}
4011
4012type Roles struct {
4013	// Etag: ETag of the resource.
4014	Etag string `json:"etag,omitempty"`
4015
4016	// Items: A list of Role resources.
4017	Items []*Role `json:"items,omitempty"`
4018
4019	// Kind: The type of the API resource. This is always
4020	// `admin#directory#roles`.
4021	Kind string `json:"kind,omitempty"`
4022
4023	NextPageToken string `json:"nextPageToken,omitempty"`
4024
4025	// ServerResponse contains the HTTP response code and headers from the
4026	// server.
4027	googleapi.ServerResponse `json:"-"`
4028
4029	// ForceSendFields is a list of field names (e.g. "Etag") to
4030	// unconditionally include in API requests. By default, fields with
4031	// empty or default values are omitted from API requests. However, any
4032	// non-pointer, non-interface field appearing in ForceSendFields will be
4033	// sent to the server regardless of whether the field is empty or not.
4034	// This may be used to include empty fields in Patch requests.
4035	ForceSendFields []string `json:"-"`
4036
4037	// NullFields is a list of field names (e.g. "Etag") to include in API
4038	// requests with the JSON null value. By default, fields with empty
4039	// values are omitted from API requests. However, any field with an
4040	// empty value appearing in NullFields will be sent to the server as
4041	// null. It is an error if a field in this list has a non-empty value.
4042	// This may be used to include null fields in Patch requests.
4043	NullFields []string `json:"-"`
4044}
4045
4046func (s *Roles) MarshalJSON() ([]byte, error) {
4047	type NoMethod Roles
4048	raw := NoMethod(*s)
4049	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4050}
4051
4052// Schema: The type of API resource. For Schema resources, this is
4053// always `admin#directory#schema`.
4054type Schema struct {
4055	// DisplayName: Display name for the schema.
4056	DisplayName string `json:"displayName,omitempty"`
4057
4058	// Etag: The ETag of the resource.
4059	Etag string `json:"etag,omitempty"`
4060
4061	// Fields: A list of fields in the schema.
4062	Fields []*SchemaFieldSpec `json:"fields,omitempty"`
4063
4064	// Kind: Kind of resource this is.
4065	Kind string `json:"kind,omitempty"`
4066
4067	// SchemaId: The unique identifier of the schema (Read-only)
4068	SchemaId string `json:"schemaId,omitempty"`
4069
4070	// SchemaName: The schema's name.
4071	SchemaName string `json:"schemaName,omitempty"`
4072
4073	// ServerResponse contains the HTTP response code and headers from the
4074	// server.
4075	googleapi.ServerResponse `json:"-"`
4076
4077	// ForceSendFields is a list of field names (e.g. "DisplayName") to
4078	// unconditionally include in API requests. By default, fields with
4079	// empty or default values are omitted from API requests. However, any
4080	// non-pointer, non-interface field appearing in ForceSendFields will be
4081	// sent to the server regardless of whether the field is empty or not.
4082	// This may be used to include empty fields in Patch requests.
4083	ForceSendFields []string `json:"-"`
4084
4085	// NullFields is a list of field names (e.g. "DisplayName") to include
4086	// in API requests with the JSON null value. By default, fields with
4087	// empty values are omitted from API requests. However, any field with
4088	// an empty value appearing in NullFields will be sent to the server as
4089	// null. It is an error if a field in this list has a non-empty value.
4090	// This may be used to include null fields in Patch requests.
4091	NullFields []string `json:"-"`
4092}
4093
4094func (s *Schema) MarshalJSON() ([]byte, error) {
4095	type NoMethod Schema
4096	raw := NoMethod(*s)
4097	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4098}
4099
4100// SchemaFieldSpec: You can use schemas to add custom fields to user
4101// profiles. You can use these fields to store information such as the
4102// projects your users work on, their physical locations, their hire
4103// dates, or whatever else fits your business needs. For more
4104// information, see Custom User Fields
4105// (/admin-sdk/directory/v1/guides/manage-schemas).
4106type SchemaFieldSpec struct {
4107	// DisplayName: Display Name of the field.
4108	DisplayName string `json:"displayName,omitempty"`
4109
4110	// Etag: The ETag of the field.
4111	Etag string `json:"etag,omitempty"`
4112
4113	// FieldId: The unique identifier of the field (Read-only)
4114	FieldId string `json:"fieldId,omitempty"`
4115
4116	// FieldName: The name of the field.
4117	FieldName string `json:"fieldName,omitempty"`
4118
4119	// FieldType: The type of the field.
4120	FieldType string `json:"fieldType,omitempty"`
4121
4122	// Indexed: Boolean specifying whether the field is indexed or not.
4123	// Default: `true`.
4124	//
4125	// Default: true
4126	Indexed *bool `json:"indexed,omitempty"`
4127
4128	// Kind: The kind of resource this is. For schema fields this is always
4129	// `admin#directory#schema#fieldspec`.
4130	Kind string `json:"kind,omitempty"`
4131
4132	// MultiValued: A boolean specifying whether this is a multi-valued
4133	// field or not. Default: `false`.
4134	MultiValued bool `json:"multiValued,omitempty"`
4135
4136	// NumericIndexingSpec: Indexing spec for a numeric field. By default,
4137	// only exact match queries will be supported for numeric fields.
4138	// Setting the `numericIndexingSpec` allows range queries to be
4139	// supported.
4140	NumericIndexingSpec *SchemaFieldSpecNumericIndexingSpec `json:"numericIndexingSpec,omitempty"`
4141
4142	// ReadAccessType: Specifies who can view values of this field. See
4143	// Retrieve users as a non-administrator
4144	// (/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin)
4145	//  for more information. Note: It may take up to 24 hours for changes
4146	// to this field to be reflected.
4147	ReadAccessType string `json:"readAccessType,omitempty"`
4148
4149	// ForceSendFields is a list of field names (e.g. "DisplayName") to
4150	// unconditionally include in API requests. By default, fields with
4151	// empty or default values are omitted from API requests. However, any
4152	// non-pointer, non-interface field appearing in ForceSendFields will be
4153	// sent to the server regardless of whether the field is empty or not.
4154	// This may be used to include empty fields in Patch requests.
4155	ForceSendFields []string `json:"-"`
4156
4157	// NullFields is a list of field names (e.g. "DisplayName") to include
4158	// in API requests with the JSON null value. By default, fields with
4159	// empty values are omitted from API requests. However, any field with
4160	// an empty value appearing in NullFields will be sent to the server as
4161	// null. It is an error if a field in this list has a non-empty value.
4162	// This may be used to include null fields in Patch requests.
4163	NullFields []string `json:"-"`
4164}
4165
4166func (s *SchemaFieldSpec) MarshalJSON() ([]byte, error) {
4167	type NoMethod SchemaFieldSpec
4168	raw := NoMethod(*s)
4169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4170}
4171
4172// SchemaFieldSpecNumericIndexingSpec: Indexing spec for a numeric
4173// field. By default, only exact match queries will be supported for
4174// numeric fields. Setting the `numericIndexingSpec` allows range
4175// queries to be supported.
4176type SchemaFieldSpecNumericIndexingSpec struct {
4177	// MaxValue: Maximum value of this field. This is meant to be indicative
4178	// rather than enforced. Values outside this range will still be
4179	// indexed, but search may not be as performant.
4180	MaxValue float64 `json:"maxValue,omitempty"`
4181
4182	// MinValue: Minimum value of this field. This is meant to be indicative
4183	// rather than enforced. Values outside this range will still be
4184	// indexed, but search may not be as performant.
4185	MinValue float64 `json:"minValue,omitempty"`
4186
4187	// ForceSendFields is a list of field names (e.g. "MaxValue") to
4188	// unconditionally include in API requests. By default, fields with
4189	// empty or default values are omitted from API requests. However, any
4190	// non-pointer, non-interface field appearing in ForceSendFields will be
4191	// sent to the server regardless of whether the field is empty or not.
4192	// This may be used to include empty fields in Patch requests.
4193	ForceSendFields []string `json:"-"`
4194
4195	// NullFields is a list of field names (e.g. "MaxValue") to include in
4196	// API requests with the JSON null value. By default, fields with empty
4197	// values are omitted from API requests. However, any field with an
4198	// empty value appearing in NullFields will be sent to the server as
4199	// null. It is an error if a field in this list has a non-empty value.
4200	// This may be used to include null fields in Patch requests.
4201	NullFields []string `json:"-"`
4202}
4203
4204func (s *SchemaFieldSpecNumericIndexingSpec) MarshalJSON() ([]byte, error) {
4205	type NoMethod SchemaFieldSpecNumericIndexingSpec
4206	raw := NoMethod(*s)
4207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4208}
4209
4210func (s *SchemaFieldSpecNumericIndexingSpec) UnmarshalJSON(data []byte) error {
4211	type NoMethod SchemaFieldSpecNumericIndexingSpec
4212	var s1 struct {
4213		MaxValue gensupport.JSONFloat64 `json:"maxValue"`
4214		MinValue gensupport.JSONFloat64 `json:"minValue"`
4215		*NoMethod
4216	}
4217	s1.NoMethod = (*NoMethod)(s)
4218	if err := json.Unmarshal(data, &s1); err != nil {
4219		return err
4220	}
4221	s.MaxValue = float64(s1.MaxValue)
4222	s.MinValue = float64(s1.MinValue)
4223	return nil
4224}
4225
4226// Schemas: JSON response template for List Schema operation in
4227// Directory API.
4228type Schemas struct {
4229	// Etag: ETag of the resource.
4230	Etag string `json:"etag,omitempty"`
4231
4232	// Kind: Kind of resource this is.
4233	Kind string `json:"kind,omitempty"`
4234
4235	// Schemas: List of UserSchema objects.
4236	Schemas []*Schema `json:"schemas,omitempty"`
4237
4238	// ServerResponse contains the HTTP response code and headers from the
4239	// server.
4240	googleapi.ServerResponse `json:"-"`
4241
4242	// ForceSendFields is a list of field names (e.g. "Etag") to
4243	// unconditionally include in API requests. By default, fields with
4244	// empty or default values are omitted from API requests. However, any
4245	// non-pointer, non-interface field appearing in ForceSendFields will be
4246	// sent to the server regardless of whether the field is empty or not.
4247	// This may be used to include empty fields in Patch requests.
4248	ForceSendFields []string `json:"-"`
4249
4250	// NullFields is a list of field names (e.g. "Etag") to include in API
4251	// requests with the JSON null value. By default, fields with empty
4252	// values are omitted from API requests. However, any field with an
4253	// empty value appearing in NullFields will be sent to the server as
4254	// null. It is an error if a field in this list has a non-empty value.
4255	// This may be used to include null fields in Patch requests.
4256	NullFields []string `json:"-"`
4257}
4258
4259func (s *Schemas) MarshalJSON() ([]byte, error) {
4260	type NoMethod Schemas
4261	raw := NoMethod(*s)
4262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4263}
4264
4265// Token: JSON template for token resource in Directory API.
4266type Token struct {
4267	// Anonymous: Whether the application is registered with Google. The
4268	// value is `true` if the application has an anonymous Client ID.
4269	Anonymous bool `json:"anonymous,omitempty"`
4270
4271	// ClientId: The Client ID of the application the token is issued to.
4272	ClientId string `json:"clientId,omitempty"`
4273
4274	// DisplayText: The displayable name of the application the token is
4275	// issued to.
4276	DisplayText string `json:"displayText,omitempty"`
4277
4278	// Etag: ETag of the resource.
4279	Etag string `json:"etag,omitempty"`
4280
4281	// Kind: The type of the API resource. This is always
4282	// `admin#directory#token`.
4283	Kind string `json:"kind,omitempty"`
4284
4285	// NativeApp: Whether the token is issued to an installed application.
4286	// The value is `true` if the application is installed to a desktop or
4287	// mobile device.
4288	NativeApp bool `json:"nativeApp,omitempty"`
4289
4290	// Scopes: A list of authorization scopes the application is granted.
4291	Scopes []string `json:"scopes,omitempty"`
4292
4293	// UserKey: The unique ID of the user that issued the token.
4294	UserKey string `json:"userKey,omitempty"`
4295
4296	// ServerResponse contains the HTTP response code and headers from the
4297	// server.
4298	googleapi.ServerResponse `json:"-"`
4299
4300	// ForceSendFields is a list of field names (e.g. "Anonymous") to
4301	// unconditionally include in API requests. By default, fields with
4302	// empty or default values are omitted from API requests. However, any
4303	// non-pointer, non-interface field appearing in ForceSendFields will be
4304	// sent to the server regardless of whether the field is empty or not.
4305	// This may be used to include empty fields in Patch requests.
4306	ForceSendFields []string `json:"-"`
4307
4308	// NullFields is a list of field names (e.g. "Anonymous") to include in
4309	// API requests with the JSON null value. By default, fields with empty
4310	// values are omitted from API requests. However, any field with an
4311	// empty value appearing in NullFields will be sent to the server as
4312	// null. It is an error if a field in this list has a non-empty value.
4313	// This may be used to include null fields in Patch requests.
4314	NullFields []string `json:"-"`
4315}
4316
4317func (s *Token) MarshalJSON() ([]byte, error) {
4318	type NoMethod Token
4319	raw := NoMethod(*s)
4320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4321}
4322
4323// Tokens: JSON response template for List tokens operation in Directory
4324// API.
4325type Tokens struct {
4326	// Etag: ETag of the resource.
4327	Etag string `json:"etag,omitempty"`
4328
4329	// Items: A list of Token resources.
4330	Items []*Token `json:"items,omitempty"`
4331
4332	// Kind: The type of the API resource. This is always
4333	// `admin#directory#tokenList`.
4334	Kind string `json:"kind,omitempty"`
4335
4336	// ServerResponse contains the HTTP response code and headers from the
4337	// server.
4338	googleapi.ServerResponse `json:"-"`
4339
4340	// ForceSendFields is a list of field names (e.g. "Etag") to
4341	// unconditionally include in API requests. By default, fields with
4342	// empty or default values are omitted from API requests. However, any
4343	// non-pointer, non-interface field appearing in ForceSendFields will be
4344	// sent to the server regardless of whether the field is empty or not.
4345	// This may be used to include empty fields in Patch requests.
4346	ForceSendFields []string `json:"-"`
4347
4348	// NullFields is a list of field names (e.g. "Etag") to include in API
4349	// requests with the JSON null value. By default, fields with empty
4350	// values are omitted from API requests. However, any field with an
4351	// empty value appearing in NullFields will be sent to the server as
4352	// null. It is an error if a field in this list has a non-empty value.
4353	// This may be used to include null fields in Patch requests.
4354	NullFields []string `json:"-"`
4355}
4356
4357func (s *Tokens) MarshalJSON() ([]byte, error) {
4358	type NoMethod Tokens
4359	raw := NoMethod(*s)
4360	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4361}
4362
4363// User: The Directory API allows you to create and manage your
4364// account's users, user aliases, and user Gmail chat profile photos.
4365// For more information about common tasks, see the User Accounts
4366// Developer's Guide (/admin-sdk/directory/v1/guides/manage-users.html)
4367// and the User Aliases Developer's Guide
4368// (/admin-sdk/directory/v1/guides/manage-user-aliases.html).
4369type User struct {
4370	// Addresses: A list of the user's addresses. The maximum allowed data
4371	// size for this field is 10Kb.
4372	Addresses interface{} `json:"addresses,omitempty"`
4373
4374	// AgreedToTerms: Output only. This property is `true` if the user has
4375	// completed an initial login and accepted the Terms of Service
4376	// agreement.
4377	AgreedToTerms bool `json:"agreedToTerms,omitempty"`
4378
4379	// Aliases: Output only. A list of the user's alias email addresses.
4380	Aliases []string `json:"aliases,omitempty"`
4381
4382	// Archived: Indicates if user is archived.
4383	Archived bool `json:"archived,omitempty"`
4384
4385	// ChangePasswordAtNextLogin: Indicates if the user is forced to change
4386	// their password at next login. This setting doesn't apply when the
4387	// user signs in via a third-party identity provider
4388	// (https://support.google.com/a/answer/60224).
4389	ChangePasswordAtNextLogin bool `json:"changePasswordAtNextLogin,omitempty"`
4390
4391	// CreationTime: User's G Suite account creation time. (Read-only)
4392	CreationTime string `json:"creationTime,omitempty"`
4393
4394	// CustomSchemas: Custom fields of the user.
4395	CustomSchemas map[string]googleapi.RawMessage `json:"customSchemas,omitempty"`
4396
4397	// CustomerId: Output only. The customer ID to retrieve all account
4398	// users
4399	// (/admin-sdk/directory/v1/guides/manage-users.html#get_all_users). You
4400	// can use the alias `my_customer` to represent your account's
4401	// `customerId`. As a reseller administrator, you can use the resold
4402	// customer account's `customerId`. To get a `customerId`, use the
4403	// account's primary domain in the `domain` parameter of a users.list
4404	// (/admin-sdk/directory/v1/reference/users/list) request.
4405	CustomerId string `json:"customerId,omitempty"`
4406
4407	DeletionTime string `json:"deletionTime,omitempty"`
4408
4409	// Emails: A list of the user's email addresses. The maximum allowed
4410	// data size for this field is 10Kb.
4411	Emails interface{} `json:"emails,omitempty"`
4412
4413	// Etag: Output only. ETag of the resource.
4414	Etag string `json:"etag,omitempty"`
4415
4416	// ExternalIds: A list of external IDs for the user, such as an employee
4417	// or network ID. The maximum allowed data size for this field is 2Kb.
4418	ExternalIds interface{} `json:"externalIds,omitempty"`
4419
4420	// Gender: The user's gender. The maximum allowed data size for this
4421	// field is 1Kb.
4422	Gender interface{} `json:"gender,omitempty"`
4423
4424	// HashFunction: Stores the hash format of the password property. We
4425	// recommend sending the `password` property value as a base 16 bit
4426	// hexadecimal-encoded hash value. Set the `hashFunction` values as
4427	// either the SHA-1 (https://wikipedia.org/wiki/SHA-1), MD5
4428	// (https://wikipedia.org/wiki/MD5), or crypt
4429	// (https://en.wikipedia.org/wiki/Crypt_\(C\)) hash format.
4430	HashFunction string `json:"hashFunction,omitempty"`
4431
4432	// Id: The unique ID for the user. A user `id` can be used as a user
4433	// request URI's `userKey`.
4434	Id string `json:"id,omitempty"`
4435
4436	// Ims: The user's Instant Messenger (IM) accounts. A user account can
4437	// have multiple ims properties. But, only one of these ims properties
4438	// can be the primary IM contact. The maximum allowed data size for this
4439	// field is 2Kb.
4440	Ims interface{} `json:"ims,omitempty"`
4441
4442	// IncludeInGlobalAddressList: Indicates if the user's profile is
4443	// visible in the Google Workspace global address list when the contact
4444	// sharing feature is enabled for the domain. For more information about
4445	// excluding user profiles, see the administration help center
4446	// (https://support.google.com/a/answer/1285988).
4447	IncludeInGlobalAddressList bool `json:"includeInGlobalAddressList,omitempty"`
4448
4449	// IpWhitelisted: If `true`, the user's IP address is whitelisted
4450	// (https://support.google.com/a/answer/60752).
4451	IpWhitelisted bool `json:"ipWhitelisted,omitempty"`
4452
4453	// IsAdmin: Output only. Indicates a user with super admininistrator
4454	// privileges. The `isAdmin` property can only be edited in the Make a
4455	// user an administrator
4456	// (/admin-sdk/directory/v1/guides/manage-users.html#make_admin)
4457	// operation ( makeAdmin
4458	// (/admin-sdk/directory/v1/reference/users/makeAdmin.html) method). If
4459	// edited in the user insert
4460	// (/admin-sdk/directory/v1/reference/users/insert.html) or update
4461	// (/admin-sdk/directory/v1/reference/users/update.html) methods, the
4462	// edit is ignored by the API service.
4463	IsAdmin bool `json:"isAdmin,omitempty"`
4464
4465	// IsDelegatedAdmin: Output only. Indicates if the user is a delegated
4466	// administrator. Delegated administrators are supported by the API but
4467	// cannot create or undelete users, or make users administrators. These
4468	// requests are ignored by the API service. Roles and privileges for
4469	// administrators are assigned using the Admin console
4470	// (https://support.google.com/a/answer/33325).
4471	IsDelegatedAdmin bool `json:"isDelegatedAdmin,omitempty"`
4472
4473	// IsEnforcedIn2Sv: Output only. Is 2-step verification enforced
4474	// (Read-only)
4475	IsEnforcedIn2Sv bool `json:"isEnforcedIn2Sv,omitempty"`
4476
4477	// IsEnrolledIn2Sv: Output only. Is enrolled in 2-step verification
4478	// (Read-only)
4479	IsEnrolledIn2Sv bool `json:"isEnrolledIn2Sv,omitempty"`
4480
4481	// IsMailboxSetup: Output only. Indicates if the user's Google mailbox
4482	// is created. This property is only applicable if the user has been
4483	// assigned a Gmail license.
4484	IsMailboxSetup bool `json:"isMailboxSetup,omitempty"`
4485
4486	// Keywords: The user's keywords. The maximum allowed data size for this
4487	// field is 1Kb.
4488	Keywords interface{} `json:"keywords,omitempty"`
4489
4490	// Kind: Output only. The type of the API resource. For Users resources,
4491	// the value is `admin#directory#user`.
4492	Kind string `json:"kind,omitempty"`
4493
4494	// Languages: The user's languages. The maximum allowed data size for
4495	// this field is 1Kb.
4496	Languages interface{} `json:"languages,omitempty"`
4497
4498	// LastLoginTime: User's last login time. (Read-only)
4499	LastLoginTime string `json:"lastLoginTime,omitempty"`
4500
4501	// Locations: The user's locations. The maximum allowed data size for
4502	// this field is 10Kb.
4503	Locations interface{} `json:"locations,omitempty"`
4504
4505	// Name: Holds the given and family names of the user, and the read-only
4506	// `fullName` value. The maximum number of characters in the `givenName`
4507	// and in the `familyName` values is 60. In addition, name values
4508	// support unicode/UTF-8 characters, and can contain spaces, letters
4509	// (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods
4510	// (.). For more information about character usage rules, see the
4511	// administration help center
4512	// (https://support.google.com/a/answer/9193374). Maximum allowed data
4513	// size for this field is 1Kb.
4514	Name *UserName `json:"name,omitempty"`
4515
4516	// NonEditableAliases: Output only. List of the user's non-editable
4517	// alias email addresses. These are typically outside the account's
4518	// primary domain or sub-domain.
4519	NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
4520
4521	// Notes: Notes for the user.
4522	Notes interface{} `json:"notes,omitempty"`
4523
4524	// OrgUnitPath: The full path of the parent organization associated with
4525	// the user. If the parent organization is the top-level, it is
4526	// represented as a forward slash (`/`).
4527	OrgUnitPath string `json:"orgUnitPath,omitempty"`
4528
4529	// Organizations: A list of organizations the user belongs to. The
4530	// maximum allowed data size for this field is 10Kb.
4531	Organizations interface{} `json:"organizations,omitempty"`
4532
4533	// Password: User's password
4534	Password string `json:"password,omitempty"`
4535
4536	// Phones: A list of the user's phone numbers. The maximum allowed data
4537	// size for this field is 1Kb.
4538	Phones interface{} `json:"phones,omitempty"`
4539
4540	// PosixAccounts: A list of POSIX
4541	// (https://www.opengroup.org/austin/papers/posix_faq.html) account
4542	// information for the user.
4543	PosixAccounts interface{} `json:"posixAccounts,omitempty"`
4544
4545	// PrimaryEmail: The user's primary email address. This property is
4546	// required in a request to create a user account. The `primaryEmail`
4547	// must be unique and cannot be an alias of another user.
4548	PrimaryEmail string `json:"primaryEmail,omitempty"`
4549
4550	// RecoveryEmail: Recovery email of the user.
4551	RecoveryEmail string `json:"recoveryEmail,omitempty"`
4552
4553	// RecoveryPhone: Recovery phone of the user. The phone number must be
4554	// in the E.164 format, starting with the plus sign (+). Example:
4555	// *+16506661212*.
4556	RecoveryPhone string `json:"recoveryPhone,omitempty"`
4557
4558	// Relations: A list of the user's relationships to other users. The
4559	// maximum allowed data size for this field is 2Kb.
4560	Relations interface{} `json:"relations,omitempty"`
4561
4562	// SshPublicKeys: A list of SSH public keys.
4563	SshPublicKeys interface{} `json:"sshPublicKeys,omitempty"`
4564
4565	// Suspended: Indicates if user is suspended.
4566	Suspended bool `json:"suspended,omitempty"`
4567
4568	// SuspensionReason: Output only. Has the reason a user account is
4569	// suspended either by the administrator or by Google at the time of
4570	// suspension. The property is returned only if the `suspended` property
4571	// is `true`.
4572	SuspensionReason string `json:"suspensionReason,omitempty"`
4573
4574	// ThumbnailPhotoEtag: Output only. ETag of the user's photo (Read-only)
4575	ThumbnailPhotoEtag string `json:"thumbnailPhotoEtag,omitempty"`
4576
4577	// ThumbnailPhotoUrl: Output only. Photo Url of the user (Read-only)
4578	ThumbnailPhotoUrl string `json:"thumbnailPhotoUrl,omitempty"`
4579
4580	// Websites: The user's websites. The maximum allowed data size for this
4581	// field is 2Kb.
4582	Websites interface{} `json:"websites,omitempty"`
4583
4584	// ServerResponse contains the HTTP response code and headers from the
4585	// server.
4586	googleapi.ServerResponse `json:"-"`
4587
4588	// ForceSendFields is a list of field names (e.g. "Addresses") to
4589	// unconditionally include in API requests. By default, fields with
4590	// empty or default values are omitted from API requests. However, any
4591	// non-pointer, non-interface field appearing in ForceSendFields will be
4592	// sent to the server regardless of whether the field is empty or not.
4593	// This may be used to include empty fields in Patch requests.
4594	ForceSendFields []string `json:"-"`
4595
4596	// NullFields is a list of field names (e.g. "Addresses") to include in
4597	// API requests with the JSON null value. By default, fields with empty
4598	// values are omitted from API requests. However, any field with an
4599	// empty value appearing in NullFields will be sent to the server as
4600	// null. It is an error if a field in this list has a non-empty value.
4601	// This may be used to include null fields in Patch requests.
4602	NullFields []string `json:"-"`
4603}
4604
4605func (s *User) MarshalJSON() ([]byte, error) {
4606	type NoMethod User
4607	raw := NoMethod(*s)
4608	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4609}
4610
4611// UserAbout: JSON template for About (notes) of a user in Directory
4612// API.
4613type UserAbout struct {
4614	// ContentType: About entry can have a type which indicates the content
4615	// type. It can either be plain or html. By default, notes contents are
4616	// assumed to contain plain text.
4617	ContentType string `json:"contentType,omitempty"`
4618
4619	// Value: Actual value of notes.
4620	Value string `json:"value,omitempty"`
4621
4622	// ForceSendFields is a list of field names (e.g. "ContentType") to
4623	// unconditionally include in API requests. By default, fields with
4624	// empty or default values are omitted from API requests. However, any
4625	// non-pointer, non-interface field appearing in ForceSendFields will be
4626	// sent to the server regardless of whether the field is empty or not.
4627	// This may be used to include empty fields in Patch requests.
4628	ForceSendFields []string `json:"-"`
4629
4630	// NullFields is a list of field names (e.g. "ContentType") to include
4631	// in API requests with the JSON null value. By default, fields with
4632	// empty values are omitted from API requests. However, any field with
4633	// an empty value appearing in NullFields will be sent to the server as
4634	// null. It is an error if a field in this list has a non-empty value.
4635	// This may be used to include null fields in Patch requests.
4636	NullFields []string `json:"-"`
4637}
4638
4639func (s *UserAbout) MarshalJSON() ([]byte, error) {
4640	type NoMethod UserAbout
4641	raw := NoMethod(*s)
4642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4643}
4644
4645// UserAddress: JSON template for address.
4646type UserAddress struct {
4647	// Country: Country.
4648	Country string `json:"country,omitempty"`
4649
4650	// CountryCode: Country code.
4651	CountryCode string `json:"countryCode,omitempty"`
4652
4653	// CustomType: Custom type.
4654	CustomType string `json:"customType,omitempty"`
4655
4656	// ExtendedAddress: Extended Address.
4657	ExtendedAddress string `json:"extendedAddress,omitempty"`
4658
4659	// Formatted: Formatted address.
4660	Formatted string `json:"formatted,omitempty"`
4661
4662	// Locality: Locality.
4663	Locality string `json:"locality,omitempty"`
4664
4665	// PoBox: Other parts of address.
4666	PoBox string `json:"poBox,omitempty"`
4667
4668	// PostalCode: Postal code.
4669	PostalCode string `json:"postalCode,omitempty"`
4670
4671	// Primary: If this is user's primary address. Only one entry could be
4672	// marked as primary.
4673	Primary bool `json:"primary,omitempty"`
4674
4675	// Region: Region.
4676	Region string `json:"region,omitempty"`
4677
4678	// SourceIsStructured: User supplied address was structured. Structured
4679	// addresses are NOT supported at this time. You might be able to write
4680	// structured addresses but any values will eventually be clobbered.
4681	SourceIsStructured bool `json:"sourceIsStructured,omitempty"`
4682
4683	// StreetAddress: Street.
4684	StreetAddress string `json:"streetAddress,omitempty"`
4685
4686	// Type: Each entry can have a type which indicates standard values of
4687	// that entry. For example address could be of home work etc. In
4688	// addition to the standard type an entry can have a custom type and can
4689	// take any value. Such type should have the CUSTOM value as type and
4690	// also have a customType value.
4691	Type string `json:"type,omitempty"`
4692
4693	// ForceSendFields is a list of field names (e.g. "Country") to
4694	// unconditionally include in API requests. By default, fields with
4695	// empty or default values are omitted from API requests. However, any
4696	// non-pointer, non-interface field appearing in ForceSendFields will be
4697	// sent to the server regardless of whether the field is empty or not.
4698	// This may be used to include empty fields in Patch requests.
4699	ForceSendFields []string `json:"-"`
4700
4701	// NullFields is a list of field names (e.g. "Country") to include in
4702	// API requests with the JSON null value. By default, fields with empty
4703	// values are omitted from API requests. However, any field with an
4704	// empty value appearing in NullFields will be sent to the server as
4705	// null. It is an error if a field in this list has a non-empty value.
4706	// This may be used to include null fields in Patch requests.
4707	NullFields []string `json:"-"`
4708}
4709
4710func (s *UserAddress) MarshalJSON() ([]byte, error) {
4711	type NoMethod UserAddress
4712	raw := NoMethod(*s)
4713	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4714}
4715
4716// UserEmail: JSON template for an email.
4717type UserEmail struct {
4718	// Address: Email id of the user.
4719	Address string `json:"address,omitempty"`
4720
4721	// CustomType: Custom Type.
4722	CustomType string `json:"customType,omitempty"`
4723
4724	// Primary: If this is user's primary email. Only one entry could be
4725	// marked as primary.
4726	Primary bool `json:"primary,omitempty"`
4727
4728	// Type: Each entry can have a type which indicates standard types of
4729	// that entry. For example email could be of home, work etc. In addition
4730	// to the standard type, an entry can have a custom type and can take
4731	// any value Such types should have the CUSTOM value as type and also
4732	// have a customType value.
4733	Type string `json:"type,omitempty"`
4734
4735	// ForceSendFields is a list of field names (e.g. "Address") to
4736	// unconditionally include in API requests. By default, fields with
4737	// empty or default values are omitted from API requests. However, any
4738	// non-pointer, non-interface field appearing in ForceSendFields will be
4739	// sent to the server regardless of whether the field is empty or not.
4740	// This may be used to include empty fields in Patch requests.
4741	ForceSendFields []string `json:"-"`
4742
4743	// NullFields is a list of field names (e.g. "Address") to include in
4744	// API requests with the JSON null value. By default, fields with empty
4745	// values are omitted from API requests. However, any field with an
4746	// empty value appearing in NullFields will be sent to the server as
4747	// null. It is an error if a field in this list has a non-empty value.
4748	// This may be used to include null fields in Patch requests.
4749	NullFields []string `json:"-"`
4750}
4751
4752func (s *UserEmail) MarshalJSON() ([]byte, error) {
4753	type NoMethod UserEmail
4754	raw := NoMethod(*s)
4755	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4756}
4757
4758// UserExternalId: JSON template for an externalId entry.
4759type UserExternalId struct {
4760	// CustomType: Custom type.
4761	CustomType string `json:"customType,omitempty"`
4762
4763	// Type: The type of the Id.
4764	Type string `json:"type,omitempty"`
4765
4766	// Value: The value of the id.
4767	Value string `json:"value,omitempty"`
4768
4769	// ForceSendFields is a list of field names (e.g. "CustomType") to
4770	// unconditionally include in API requests. By default, fields with
4771	// empty or default values are omitted from API requests. However, any
4772	// non-pointer, non-interface field appearing in ForceSendFields will be
4773	// sent to the server regardless of whether the field is empty or not.
4774	// This may be used to include empty fields in Patch requests.
4775	ForceSendFields []string `json:"-"`
4776
4777	// NullFields is a list of field names (e.g. "CustomType") to include in
4778	// API requests with the JSON null value. By default, fields with empty
4779	// values are omitted from API requests. However, any field with an
4780	// empty value appearing in NullFields will be sent to the server as
4781	// null. It is an error if a field in this list has a non-empty value.
4782	// This may be used to include null fields in Patch requests.
4783	NullFields []string `json:"-"`
4784}
4785
4786func (s *UserExternalId) MarshalJSON() ([]byte, error) {
4787	type NoMethod UserExternalId
4788	raw := NoMethod(*s)
4789	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4790}
4791
4792type UserGender struct {
4793	// AddressMeAs: AddressMeAs. A human-readable string containing the
4794	// proper way to refer to the profile owner by humans for example
4795	// he/him/his or they/them/their.
4796	AddressMeAs string `json:"addressMeAs,omitempty"`
4797
4798	// CustomGender: Custom gender.
4799	CustomGender string `json:"customGender,omitempty"`
4800
4801	// Type: Gender.
4802	Type string `json:"type,omitempty"`
4803
4804	// ForceSendFields is a list of field names (e.g. "AddressMeAs") to
4805	// unconditionally include in API requests. By default, fields with
4806	// empty or default values are omitted from API requests. However, any
4807	// non-pointer, non-interface field appearing in ForceSendFields will be
4808	// sent to the server regardless of whether the field is empty or not.
4809	// This may be used to include empty fields in Patch requests.
4810	ForceSendFields []string `json:"-"`
4811
4812	// NullFields is a list of field names (e.g. "AddressMeAs") to include
4813	// in API requests with the JSON null value. By default, fields with
4814	// empty values are omitted from API requests. However, any field with
4815	// an empty value appearing in NullFields will be sent to the server as
4816	// null. It is an error if a field in this list has a non-empty value.
4817	// This may be used to include null fields in Patch requests.
4818	NullFields []string `json:"-"`
4819}
4820
4821func (s *UserGender) MarshalJSON() ([]byte, error) {
4822	type NoMethod UserGender
4823	raw := NoMethod(*s)
4824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4825}
4826
4827// UserIm: JSON template for instant messenger of an user.
4828type UserIm struct {
4829	// CustomProtocol: Custom protocol.
4830	CustomProtocol string `json:"customProtocol,omitempty"`
4831
4832	// CustomType: Custom type.
4833	CustomType string `json:"customType,omitempty"`
4834
4835	// Im: Instant messenger id.
4836	Im string `json:"im,omitempty"`
4837
4838	// Primary: If this is user's primary im. Only one entry could be marked
4839	// as primary.
4840	Primary bool `json:"primary,omitempty"`
4841
4842	// Protocol: Protocol used in the instant messenger. It should be one of
4843	// the values from ImProtocolTypes map. Similar to type it can take a
4844	// CUSTOM value and specify the custom name in customProtocol field.
4845	Protocol string `json:"protocol,omitempty"`
4846
4847	// Type: Each entry can have a type which indicates standard types of
4848	// that entry. For example instant messengers could be of home work etc.
4849	// In addition to the standard type an entry can have a custom type and
4850	// can take any value. Such types should have the CUSTOM value as type
4851	// and also have a customType value.
4852	Type string `json:"type,omitempty"`
4853
4854	// ForceSendFields is a list of field names (e.g. "CustomProtocol") to
4855	// unconditionally include in API requests. By default, fields with
4856	// empty or default values are omitted from API requests. However, any
4857	// non-pointer, non-interface field appearing in ForceSendFields will be
4858	// sent to the server regardless of whether the field is empty or not.
4859	// This may be used to include empty fields in Patch requests.
4860	ForceSendFields []string `json:"-"`
4861
4862	// NullFields is a list of field names (e.g. "CustomProtocol") to
4863	// include in API requests with the JSON null value. By default, fields
4864	// with empty values are omitted from API requests. However, any field
4865	// with an empty value appearing in NullFields will be sent to the
4866	// server as null. It is an error if a field in this list has a
4867	// non-empty value. This may be used to include null fields in Patch
4868	// requests.
4869	NullFields []string `json:"-"`
4870}
4871
4872func (s *UserIm) MarshalJSON() ([]byte, error) {
4873	type NoMethod UserIm
4874	raw := NoMethod(*s)
4875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4876}
4877
4878// UserKeyword: JSON template for a keyword entry.
4879type UserKeyword struct {
4880	// CustomType: Custom Type.
4881	CustomType string `json:"customType,omitempty"`
4882
4883	// Type: Each entry can have a type which indicates standard type of
4884	// that entry. For example keyword could be of type occupation or
4885	// outlook. In addition to the standard type an entry can have a custom
4886	// type and can give it any name. Such types should have the CUSTOM
4887	// value as type and also have a customType value.
4888	Type string `json:"type,omitempty"`
4889
4890	// Value: Keyword.
4891	Value string `json:"value,omitempty"`
4892
4893	// ForceSendFields is a list of field names (e.g. "CustomType") to
4894	// unconditionally include in API requests. By default, fields with
4895	// empty or default values are omitted from API requests. However, any
4896	// non-pointer, non-interface field appearing in ForceSendFields will be
4897	// sent to the server regardless of whether the field is empty or not.
4898	// This may be used to include empty fields in Patch requests.
4899	ForceSendFields []string `json:"-"`
4900
4901	// NullFields is a list of field names (e.g. "CustomType") to include in
4902	// API requests with the JSON null value. By default, fields with empty
4903	// values are omitted from API requests. However, any field with an
4904	// empty value appearing in NullFields will be sent to the server as
4905	// null. It is an error if a field in this list has a non-empty value.
4906	// This may be used to include null fields in Patch requests.
4907	NullFields []string `json:"-"`
4908}
4909
4910func (s *UserKeyword) MarshalJSON() ([]byte, error) {
4911	type NoMethod UserKeyword
4912	raw := NoMethod(*s)
4913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4914}
4915
4916// UserLanguage: JSON template for a language entry.
4917type UserLanguage struct {
4918	// CustomLanguage: Other language. User can provide own language name if
4919	// there is no corresponding Google III language code. If this is set
4920	// LanguageCode can't be set
4921	CustomLanguage string `json:"customLanguage,omitempty"`
4922
4923	// LanguageCode: Language Code. Should be used for storing Google III
4924	// LanguageCode string representation for language. Illegal values cause
4925	// SchemaException.
4926	LanguageCode string `json:"languageCode,omitempty"`
4927
4928	// ForceSendFields is a list of field names (e.g. "CustomLanguage") to
4929	// unconditionally include in API requests. By default, fields with
4930	// empty or default values are omitted from API requests. However, any
4931	// non-pointer, non-interface field appearing in ForceSendFields will be
4932	// sent to the server regardless of whether the field is empty or not.
4933	// This may be used to include empty fields in Patch requests.
4934	ForceSendFields []string `json:"-"`
4935
4936	// NullFields is a list of field names (e.g. "CustomLanguage") to
4937	// include in API requests with the JSON null value. By default, fields
4938	// with empty values are omitted from API requests. However, any field
4939	// with an empty value appearing in NullFields will be sent to the
4940	// server as null. It is an error if a field in this list has a
4941	// non-empty value. This may be used to include null fields in Patch
4942	// requests.
4943	NullFields []string `json:"-"`
4944}
4945
4946func (s *UserLanguage) MarshalJSON() ([]byte, error) {
4947	type NoMethod UserLanguage
4948	raw := NoMethod(*s)
4949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4950}
4951
4952// UserLocation: JSON template for a location entry.
4953type UserLocation struct {
4954	// Area: Textual location. This is most useful for display purposes to
4955	// concisely describe the location. For example 'Mountain View, CA',
4956	// 'Near Seattle', 'US-NYC-9TH 9A209A.''
4957	Area string `json:"area,omitempty"`
4958
4959	// BuildingId: Building Identifier.
4960	BuildingId string `json:"buildingId,omitempty"`
4961
4962	// CustomType: Custom Type.
4963	CustomType string `json:"customType,omitempty"`
4964
4965	// DeskCode: Most specific textual code of individual desk location.
4966	DeskCode string `json:"deskCode,omitempty"`
4967
4968	// FloorName: Floor name/number.
4969	FloorName string `json:"floorName,omitempty"`
4970
4971	// FloorSection: Floor section. More specific location within the floor.
4972	// For example if a floor is divided into sections 'A', 'B' and 'C' this
4973	// field would identify one of those values.
4974	FloorSection string `json:"floorSection,omitempty"`
4975
4976	// Type: Each entry can have a type which indicates standard types of
4977	// that entry. For example location could be of types default and desk.
4978	// In addition to standard type an entry can have a custom type and can
4979	// give it any name. Such types should have 'custom' as type and also
4980	// have a customType value.
4981	Type string `json:"type,omitempty"`
4982
4983	// ForceSendFields is a list of field names (e.g. "Area") to
4984	// unconditionally include in API requests. By default, fields with
4985	// empty or default values are omitted from API requests. However, any
4986	// non-pointer, non-interface field appearing in ForceSendFields will be
4987	// sent to the server regardless of whether the field is empty or not.
4988	// This may be used to include empty fields in Patch requests.
4989	ForceSendFields []string `json:"-"`
4990
4991	// NullFields is a list of field names (e.g. "Area") to include in API
4992	// requests with the JSON null value. By default, fields with empty
4993	// values are omitted from API requests. However, any field with an
4994	// empty value appearing in NullFields will be sent to the server as
4995	// null. It is an error if a field in this list has a non-empty value.
4996	// This may be used to include null fields in Patch requests.
4997	NullFields []string `json:"-"`
4998}
4999
5000func (s *UserLocation) MarshalJSON() ([]byte, error) {
5001	type NoMethod UserLocation
5002	raw := NoMethod(*s)
5003	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5004}
5005
5006type UserMakeAdmin struct {
5007	// Status: Indicates the administrator status of the user.
5008	Status bool `json:"status,omitempty"`
5009
5010	// ForceSendFields is a list of field names (e.g. "Status") to
5011	// unconditionally include in API requests. By default, fields with
5012	// empty or default values are omitted from API requests. However, any
5013	// non-pointer, non-interface field appearing in ForceSendFields will be
5014	// sent to the server regardless of whether the field is empty or not.
5015	// This may be used to include empty fields in Patch requests.
5016	ForceSendFields []string `json:"-"`
5017
5018	// NullFields is a list of field names (e.g. "Status") to include in API
5019	// requests with the JSON null value. By default, fields with empty
5020	// values are omitted from API requests. However, any field with an
5021	// empty value appearing in NullFields will be sent to the server as
5022	// null. It is an error if a field in this list has a non-empty value.
5023	// This may be used to include null fields in Patch requests.
5024	NullFields []string `json:"-"`
5025}
5026
5027func (s *UserMakeAdmin) MarshalJSON() ([]byte, error) {
5028	type NoMethod UserMakeAdmin
5029	raw := NoMethod(*s)
5030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5031}
5032
5033type UserName struct {
5034	// FamilyName: The user's last name. Required when creating a user
5035	// account.
5036	FamilyName string `json:"familyName,omitempty"`
5037
5038	// FullName: The user's full name formed by concatenating the first and
5039	// last name values.
5040	FullName string `json:"fullName,omitempty"`
5041
5042	// GivenName: The user's first name. Required when creating a user
5043	// account.
5044	GivenName string `json:"givenName,omitempty"`
5045
5046	// ForceSendFields is a list of field names (e.g. "FamilyName") to
5047	// unconditionally include in API requests. By default, fields with
5048	// empty or default values are omitted from API requests. However, any
5049	// non-pointer, non-interface field appearing in ForceSendFields will be
5050	// sent to the server regardless of whether the field is empty or not.
5051	// This may be used to include empty fields in Patch requests.
5052	ForceSendFields []string `json:"-"`
5053
5054	// NullFields is a list of field names (e.g. "FamilyName") to include in
5055	// API requests with the JSON null value. By default, fields with empty
5056	// values are omitted from API requests. However, any field with an
5057	// empty value appearing in NullFields will be sent to the server as
5058	// null. It is an error if a field in this list has a non-empty value.
5059	// This may be used to include null fields in Patch requests.
5060	NullFields []string `json:"-"`
5061}
5062
5063func (s *UserName) MarshalJSON() ([]byte, error) {
5064	type NoMethod UserName
5065	raw := NoMethod(*s)
5066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5067}
5068
5069// UserOrganization: JSON template for an organization entry.
5070type UserOrganization struct {
5071	// CostCenter: The cost center of the users department.
5072	CostCenter string `json:"costCenter,omitempty"`
5073
5074	// CustomType: Custom type.
5075	CustomType string `json:"customType,omitempty"`
5076
5077	// Department: Department within the organization.
5078	Department string `json:"department,omitempty"`
5079
5080	// Description: Description of the organization.
5081	Description string `json:"description,omitempty"`
5082
5083	// Domain: The domain to which the organization belongs to.
5084	Domain string `json:"domain,omitempty"`
5085
5086	// FullTimeEquivalent: The full-time equivalent millipercent within the
5087	// organization (100000 = 100%).
5088	FullTimeEquivalent int64 `json:"fullTimeEquivalent,omitempty"`
5089
5090	// Location: Location of the organization. This need not be fully
5091	// qualified address.
5092	Location string `json:"location,omitempty"`
5093
5094	// Name: Name of the organization
5095	Name string `json:"name,omitempty"`
5096
5097	// Primary: If it user's primary organization.
5098	Primary bool `json:"primary,omitempty"`
5099
5100	// Symbol: Symbol of the organization.
5101	Symbol string `json:"symbol,omitempty"`
5102
5103	// Title: Title (designation) of the user in the organization.
5104	Title string `json:"title,omitempty"`
5105
5106	// Type: Each entry can have a type which indicates standard types of
5107	// that entry. For example organization could be of school work etc. In
5108	// addition to the standard type an entry can have a custom type and can
5109	// give it any name. Such types should have the CUSTOM value as type and
5110	// also have a CustomType value.
5111	Type string `json:"type,omitempty"`
5112
5113	// ForceSendFields is a list of field names (e.g. "CostCenter") to
5114	// unconditionally include in API requests. By default, fields with
5115	// empty or default values are omitted from API requests. However, any
5116	// non-pointer, non-interface field appearing in ForceSendFields will be
5117	// sent to the server regardless of whether the field is empty or not.
5118	// This may be used to include empty fields in Patch requests.
5119	ForceSendFields []string `json:"-"`
5120
5121	// NullFields is a list of field names (e.g. "CostCenter") to include in
5122	// API requests with the JSON null value. By default, fields with empty
5123	// values are omitted from API requests. However, any field with an
5124	// empty value appearing in NullFields will be sent to the server as
5125	// null. It is an error if a field in this list has a non-empty value.
5126	// This may be used to include null fields in Patch requests.
5127	NullFields []string `json:"-"`
5128}
5129
5130func (s *UserOrganization) MarshalJSON() ([]byte, error) {
5131	type NoMethod UserOrganization
5132	raw := NoMethod(*s)
5133	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5134}
5135
5136// UserPhone: JSON template for a phone entry.
5137type UserPhone struct {
5138	// CustomType: Custom Type.
5139	CustomType string `json:"customType,omitempty"`
5140
5141	// Primary: If this is user's primary phone or not.
5142	Primary bool `json:"primary,omitempty"`
5143
5144	// Type: Each entry can have a type which indicates standard types of
5145	// that entry. For example phone could be of home_fax work mobile etc.
5146	// In addition to the standard type an entry can have a custom type and
5147	// can give it any name. Such types should have the CUSTOM value as type
5148	// and also have a customType value.
5149	Type string `json:"type,omitempty"`
5150
5151	// Value: Phone number.
5152	Value string `json:"value,omitempty"`
5153
5154	// ForceSendFields is a list of field names (e.g. "CustomType") to
5155	// unconditionally include in API requests. By default, fields with
5156	// empty or default values are omitted from API requests. However, any
5157	// non-pointer, non-interface field appearing in ForceSendFields will be
5158	// sent to the server regardless of whether the field is empty or not.
5159	// This may be used to include empty fields in Patch requests.
5160	ForceSendFields []string `json:"-"`
5161
5162	// NullFields is a list of field names (e.g. "CustomType") to include in
5163	// API requests with the JSON null value. By default, fields with empty
5164	// values are omitted from API requests. However, any field with an
5165	// empty value appearing in NullFields will be sent to the server as
5166	// null. It is an error if a field in this list has a non-empty value.
5167	// This may be used to include null fields in Patch requests.
5168	NullFields []string `json:"-"`
5169}
5170
5171func (s *UserPhone) MarshalJSON() ([]byte, error) {
5172	type NoMethod UserPhone
5173	raw := NoMethod(*s)
5174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5175}
5176
5177type UserPhoto struct {
5178	// Etag: ETag of the resource.
5179	Etag string `json:"etag,omitempty"`
5180
5181	// Height: Height of the photo in pixels.
5182	Height int64 `json:"height,omitempty"`
5183
5184	// Id: The ID the API uses to uniquely identify the user.
5185	Id string `json:"id,omitempty"`
5186
5187	// Kind: The type of the API resource. For Photo resources, this is
5188	// `admin#directory#user#photo`.
5189	Kind string `json:"kind,omitempty"`
5190
5191	// MimeType: The MIME type of the photo. Allowed values are `JPEG`,
5192	// `PNG`, `GIF`, `BMP`, `TIFF`, and web-safe base64 encoding.
5193	MimeType string `json:"mimeType,omitempty"`
5194
5195	// PhotoData: The user photo's upload data in web-safe Base64
5196	// (https://en.wikipedia.org/wiki/Base64#URL_applications) format in
5197	// bytes. This means: * The slash (/) character is replaced with the
5198	// underscore (_) character. * The plus sign (+) character is replaced
5199	// with the hyphen (-) character. * The equals sign (=) character is
5200	// replaced with the asterisk (*). * For padding, the period (.)
5201	// character is used instead of the RFC-4648 baseURL definition which
5202	// uses the equals sign (=) for padding. This is done to simplify
5203	// URL-parsing. * Whatever the size of the photo being uploaded, the API
5204	// downsizes it to 96x96 pixels.
5205	PhotoData string `json:"photoData,omitempty"`
5206
5207	// PrimaryEmail: The user's primary email address.
5208	PrimaryEmail string `json:"primaryEmail,omitempty"`
5209
5210	// Width: Width of the photo in pixels.
5211	Width int64 `json:"width,omitempty"`
5212
5213	// ServerResponse contains the HTTP response code and headers from the
5214	// server.
5215	googleapi.ServerResponse `json:"-"`
5216
5217	// ForceSendFields is a list of field names (e.g. "Etag") to
5218	// unconditionally include in API requests. By default, fields with
5219	// empty or default values are omitted from API requests. However, any
5220	// non-pointer, non-interface field appearing in ForceSendFields will be
5221	// sent to the server regardless of whether the field is empty or not.
5222	// This may be used to include empty fields in Patch requests.
5223	ForceSendFields []string `json:"-"`
5224
5225	// NullFields is a list of field names (e.g. "Etag") to include in API
5226	// requests with the JSON null value. By default, fields with empty
5227	// values are omitted from API requests. However, any field with an
5228	// empty value appearing in NullFields will be sent to the server as
5229	// null. It is an error if a field in this list has a non-empty value.
5230	// This may be used to include null fields in Patch requests.
5231	NullFields []string `json:"-"`
5232}
5233
5234func (s *UserPhoto) MarshalJSON() ([]byte, error) {
5235	type NoMethod UserPhoto
5236	raw := NoMethod(*s)
5237	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5238}
5239
5240// UserPosixAccount: JSON template for a POSIX account entry.
5241type UserPosixAccount struct {
5242	// AccountId: A POSIX account field identifier.
5243	AccountId string `json:"accountId,omitempty"`
5244
5245	// Gecos: The GECOS (user information) for this account.
5246	Gecos string `json:"gecos,omitempty"`
5247
5248	// Gid: The default group ID.
5249	Gid uint64 `json:"gid,omitempty,string"`
5250
5251	// HomeDirectory: The path to the home directory for this account.
5252	HomeDirectory string `json:"homeDirectory,omitempty"`
5253
5254	// OperatingSystemType: The operating system type for this account.
5255	OperatingSystemType string `json:"operatingSystemType,omitempty"`
5256
5257	// Primary: If this is user's primary account within the SystemId.
5258	Primary bool `json:"primary,omitempty"`
5259
5260	// Shell: The path to the login shell for this account.
5261	Shell string `json:"shell,omitempty"`
5262
5263	// SystemId: System identifier for which account Username or Uid apply
5264	// to.
5265	SystemId string `json:"systemId,omitempty"`
5266
5267	// Uid: The POSIX compliant user ID.
5268	Uid uint64 `json:"uid,omitempty,string"`
5269
5270	// Username: The username of the account.
5271	Username string `json:"username,omitempty"`
5272
5273	// ForceSendFields is a list of field names (e.g. "AccountId") to
5274	// unconditionally include in API requests. By default, fields with
5275	// empty or default values are omitted from API requests. However, any
5276	// non-pointer, non-interface field appearing in ForceSendFields will be
5277	// sent to the server regardless of whether the field is empty or not.
5278	// This may be used to include empty fields in Patch requests.
5279	ForceSendFields []string `json:"-"`
5280
5281	// NullFields is a list of field names (e.g. "AccountId") to include in
5282	// API requests with the JSON null value. By default, fields with empty
5283	// values are omitted from API requests. However, any field with an
5284	// empty value appearing in NullFields will be sent to the server as
5285	// null. It is an error if a field in this list has a non-empty value.
5286	// This may be used to include null fields in Patch requests.
5287	NullFields []string `json:"-"`
5288}
5289
5290func (s *UserPosixAccount) MarshalJSON() ([]byte, error) {
5291	type NoMethod UserPosixAccount
5292	raw := NoMethod(*s)
5293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5294}
5295
5296// UserRelation: JSON template for a relation entry.
5297type UserRelation struct {
5298	// CustomType: Custom Type.
5299	CustomType string `json:"customType,omitempty"`
5300
5301	// Type: The relation of the user. Some of the possible values are
5302	// mother father sister brother manager assistant partner.
5303	Type string `json:"type,omitempty"`
5304
5305	// Value: The name of the relation.
5306	Value string `json:"value,omitempty"`
5307
5308	// ForceSendFields is a list of field names (e.g. "CustomType") to
5309	// unconditionally include in API requests. By default, fields with
5310	// empty or default values are omitted from API requests. However, any
5311	// non-pointer, non-interface field appearing in ForceSendFields will be
5312	// sent to the server regardless of whether the field is empty or not.
5313	// This may be used to include empty fields in Patch requests.
5314	ForceSendFields []string `json:"-"`
5315
5316	// NullFields is a list of field names (e.g. "CustomType") to include in
5317	// API requests with the JSON null value. By default, fields with empty
5318	// values are omitted from API requests. However, any field with an
5319	// empty value appearing in NullFields will be sent to the server as
5320	// null. It is an error if a field in this list has a non-empty value.
5321	// This may be used to include null fields in Patch requests.
5322	NullFields []string `json:"-"`
5323}
5324
5325func (s *UserRelation) MarshalJSON() ([]byte, error) {
5326	type NoMethod UserRelation
5327	raw := NoMethod(*s)
5328	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5329}
5330
5331// UserSshPublicKey: JSON template for a POSIX account entry.
5332type UserSshPublicKey struct {
5333	// ExpirationTimeUsec: An expiration time in microseconds since epoch.
5334	ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"`
5335
5336	// Fingerprint: A SHA-256 fingerprint of the SSH public key. (Read-only)
5337	Fingerprint string `json:"fingerprint,omitempty"`
5338
5339	// Key: An SSH public key.
5340	Key string `json:"key,omitempty"`
5341
5342	// ForceSendFields is a list of field names (e.g. "ExpirationTimeUsec")
5343	// to unconditionally include in API requests. By default, fields with
5344	// empty or default values are omitted from API requests. However, any
5345	// non-pointer, non-interface field appearing in ForceSendFields will be
5346	// sent to the server regardless of whether the field is empty or not.
5347	// This may be used to include empty fields in Patch requests.
5348	ForceSendFields []string `json:"-"`
5349
5350	// NullFields is a list of field names (e.g. "ExpirationTimeUsec") to
5351	// include in API requests with the JSON null value. By default, fields
5352	// with empty values are omitted from API requests. However, any field
5353	// with an empty value appearing in NullFields will be sent to the
5354	// server as null. It is an error if a field in this list has a
5355	// non-empty value. This may be used to include null fields in Patch
5356	// requests.
5357	NullFields []string `json:"-"`
5358}
5359
5360func (s *UserSshPublicKey) MarshalJSON() ([]byte, error) {
5361	type NoMethod UserSshPublicKey
5362	raw := NoMethod(*s)
5363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5364}
5365
5366type UserUndelete struct {
5367	// OrgUnitPath: OrgUnit of User
5368	OrgUnitPath string `json:"orgUnitPath,omitempty"`
5369
5370	// ForceSendFields is a list of field names (e.g. "OrgUnitPath") to
5371	// unconditionally include in API requests. By default, fields with
5372	// empty or default values are omitted from API requests. However, any
5373	// non-pointer, non-interface field appearing in ForceSendFields will be
5374	// sent to the server regardless of whether the field is empty or not.
5375	// This may be used to include empty fields in Patch requests.
5376	ForceSendFields []string `json:"-"`
5377
5378	// NullFields is a list of field names (e.g. "OrgUnitPath") to include
5379	// in API requests with the JSON null value. By default, fields with
5380	// empty values are omitted from API requests. However, any field with
5381	// an empty value appearing in NullFields will be sent to the server as
5382	// null. It is an error if a field in this list has a non-empty value.
5383	// This may be used to include null fields in Patch requests.
5384	NullFields []string `json:"-"`
5385}
5386
5387func (s *UserUndelete) MarshalJSON() ([]byte, error) {
5388	type NoMethod UserUndelete
5389	raw := NoMethod(*s)
5390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5391}
5392
5393// UserWebsite: JSON template for a website entry.
5394type UserWebsite struct {
5395	// CustomType: Custom Type.
5396	CustomType string `json:"customType,omitempty"`
5397
5398	// Primary: If this is user's primary website or not.
5399	Primary bool `json:"primary,omitempty"`
5400
5401	// Type: Each entry can have a type which indicates standard types of
5402	// that entry. For example website could be of home work blog etc. In
5403	// addition to the standard type an entry can have a custom type and can
5404	// give it any name. Such types should have the CUSTOM value as type and
5405	// also have a customType value.
5406	Type string `json:"type,omitempty"`
5407
5408	// Value: Website.
5409	Value string `json:"value,omitempty"`
5410
5411	// ForceSendFields is a list of field names (e.g. "CustomType") to
5412	// unconditionally include in API requests. By default, fields with
5413	// empty or default values are omitted from API requests. However, any
5414	// non-pointer, non-interface field appearing in ForceSendFields will be
5415	// sent to the server regardless of whether the field is empty or not.
5416	// This may be used to include empty fields in Patch requests.
5417	ForceSendFields []string `json:"-"`
5418
5419	// NullFields is a list of field names (e.g. "CustomType") to include in
5420	// API requests with the JSON null value. By default, fields with empty
5421	// values are omitted from API requests. However, any field with an
5422	// empty value appearing in NullFields will be sent to the server as
5423	// null. It is an error if a field in this list has a non-empty value.
5424	// This may be used to include null fields in Patch requests.
5425	NullFields []string `json:"-"`
5426}
5427
5428func (s *UserWebsite) MarshalJSON() ([]byte, error) {
5429	type NoMethod UserWebsite
5430	raw := NoMethod(*s)
5431	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5432}
5433
5434type Users struct {
5435	// Etag: ETag of the resource.
5436	Etag string `json:"etag,omitempty"`
5437
5438	// Kind: Kind of resource this is.
5439	Kind string `json:"kind,omitempty"`
5440
5441	// NextPageToken: Token used to access next page of this result.
5442	NextPageToken string `json:"nextPageToken,omitempty"`
5443
5444	// TriggerEvent: Event that triggered this response (only used in case
5445	// of Push Response)
5446	TriggerEvent string `json:"trigger_event,omitempty"`
5447
5448	// Users: List of user objects.
5449	Users []*User `json:"users,omitempty"`
5450
5451	// ServerResponse contains the HTTP response code and headers from the
5452	// server.
5453	googleapi.ServerResponse `json:"-"`
5454
5455	// ForceSendFields is a list of field names (e.g. "Etag") to
5456	// unconditionally include in API requests. By default, fields with
5457	// empty or default values are omitted from API requests. However, any
5458	// non-pointer, non-interface field appearing in ForceSendFields will be
5459	// sent to the server regardless of whether the field is empty or not.
5460	// This may be used to include empty fields in Patch requests.
5461	ForceSendFields []string `json:"-"`
5462
5463	// NullFields is a list of field names (e.g. "Etag") to include in API
5464	// requests with the JSON null value. By default, fields with empty
5465	// values are omitted from API requests. However, any field with an
5466	// empty value appearing in NullFields will be sent to the server as
5467	// null. It is an error if a field in this list has a non-empty value.
5468	// This may be used to include null fields in Patch requests.
5469	NullFields []string `json:"-"`
5470}
5471
5472func (s *Users) MarshalJSON() ([]byte, error) {
5473	type NoMethod Users
5474	raw := NoMethod(*s)
5475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5476}
5477
5478// VerificationCode: The Directory API allows you to view, generate, and
5479// invalidate backup verification codes for a user.
5480type VerificationCode struct {
5481	// Etag: ETag of the resource.
5482	Etag string `json:"etag,omitempty"`
5483
5484	// Kind: The type of the resource. This is always
5485	// `admin#directory#verificationCode`.
5486	Kind string `json:"kind,omitempty"`
5487
5488	// UserId: The obfuscated unique ID of the user.
5489	UserId string `json:"userId,omitempty"`
5490
5491	// VerificationCode: A current verification code for the user.
5492	// Invalidated or used verification codes are not returned as part of
5493	// the result.
5494	VerificationCode string `json:"verificationCode,omitempty"`
5495
5496	// ForceSendFields is a list of field names (e.g. "Etag") to
5497	// unconditionally include in API requests. By default, fields with
5498	// empty or default values are omitted from API requests. However, any
5499	// non-pointer, non-interface field appearing in ForceSendFields will be
5500	// sent to the server regardless of whether the field is empty or not.
5501	// This may be used to include empty fields in Patch requests.
5502	ForceSendFields []string `json:"-"`
5503
5504	// NullFields is a list of field names (e.g. "Etag") to include in API
5505	// requests with the JSON null value. By default, fields with empty
5506	// values are omitted from API requests. However, any field with an
5507	// empty value appearing in NullFields will be sent to the server as
5508	// null. It is an error if a field in this list has a non-empty value.
5509	// This may be used to include null fields in Patch requests.
5510	NullFields []string `json:"-"`
5511}
5512
5513func (s *VerificationCode) MarshalJSON() ([]byte, error) {
5514	type NoMethod VerificationCode
5515	raw := NoMethod(*s)
5516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5517}
5518
5519// VerificationCodes: JSON response template for List verification codes
5520// operation in Directory API.
5521type VerificationCodes struct {
5522	// Etag: ETag of the resource.
5523	Etag string `json:"etag,omitempty"`
5524
5525	// Items: A list of verification code resources.
5526	Items []*VerificationCode `json:"items,omitempty"`
5527
5528	// Kind: The type of the resource. This is always
5529	// `admin#directory#verificationCodesList`.
5530	Kind string `json:"kind,omitempty"`
5531
5532	// ServerResponse contains the HTTP response code and headers from the
5533	// server.
5534	googleapi.ServerResponse `json:"-"`
5535
5536	// ForceSendFields is a list of field names (e.g. "Etag") to
5537	// unconditionally include in API requests. By default, fields with
5538	// empty or default values are omitted from API requests. However, any
5539	// non-pointer, non-interface field appearing in ForceSendFields will be
5540	// sent to the server regardless of whether the field is empty or not.
5541	// This may be used to include empty fields in Patch requests.
5542	ForceSendFields []string `json:"-"`
5543
5544	// NullFields is a list of field names (e.g. "Etag") to include in API
5545	// requests with the JSON null value. By default, fields with empty
5546	// values are omitted from API requests. However, any field with an
5547	// empty value appearing in NullFields will be sent to the server as
5548	// null. It is an error if a field in this list has a non-empty value.
5549	// This may be used to include null fields in Patch requests.
5550	NullFields []string `json:"-"`
5551}
5552
5553func (s *VerificationCodes) MarshalJSON() ([]byte, error) {
5554	type NoMethod VerificationCodes
5555	raw := NoMethod(*s)
5556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5557}
5558
5559// method id "directory.asps.delete":
5560
5561type AspsDeleteCall struct {
5562	s          *Service
5563	userKey    string
5564	codeId     int64
5565	urlParams_ gensupport.URLParams
5566	ctx_       context.Context
5567	header_    http.Header
5568}
5569
5570// Delete: Deletes an ASP issued by a user.
5571//
5572// - codeId: The unique ID of the ASP to be deleted.
5573// - userKey: Identifies the user in the API request. The value can be
5574//   the user's primary email address, alias email address, or unique
5575//   user ID.
5576func (r *AspsService) Delete(userKey string, codeId int64) *AspsDeleteCall {
5577	c := &AspsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5578	c.userKey = userKey
5579	c.codeId = codeId
5580	return c
5581}
5582
5583// Fields allows partial responses to be retrieved. See
5584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5585// for more information.
5586func (c *AspsDeleteCall) Fields(s ...googleapi.Field) *AspsDeleteCall {
5587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5588	return c
5589}
5590
5591// Context sets the context to be used in this call's Do method. Any
5592// pending HTTP request will be aborted if the provided context is
5593// canceled.
5594func (c *AspsDeleteCall) Context(ctx context.Context) *AspsDeleteCall {
5595	c.ctx_ = ctx
5596	return c
5597}
5598
5599// Header returns an http.Header that can be modified by the caller to
5600// add HTTP headers to the request.
5601func (c *AspsDeleteCall) Header() http.Header {
5602	if c.header_ == nil {
5603		c.header_ = make(http.Header)
5604	}
5605	return c.header_
5606}
5607
5608func (c *AspsDeleteCall) doRequest(alt string) (*http.Response, error) {
5609	reqHeaders := make(http.Header)
5610	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
5611	for k, v := range c.header_ {
5612		reqHeaders[k] = v
5613	}
5614	reqHeaders.Set("User-Agent", c.s.userAgent())
5615	var body io.Reader = nil
5616	c.urlParams_.Set("alt", alt)
5617	c.urlParams_.Set("prettyPrint", "false")
5618	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps/{codeId}")
5619	urls += "?" + c.urlParams_.Encode()
5620	req, err := http.NewRequest("DELETE", urls, body)
5621	if err != nil {
5622		return nil, err
5623	}
5624	req.Header = reqHeaders
5625	googleapi.Expand(req.URL, map[string]string{
5626		"userKey": c.userKey,
5627		"codeId":  strconv.FormatInt(c.codeId, 10),
5628	})
5629	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5630}
5631
5632// Do executes the "directory.asps.delete" call.
5633func (c *AspsDeleteCall) Do(opts ...googleapi.CallOption) error {
5634	gensupport.SetOptions(c.urlParams_, opts...)
5635	res, err := c.doRequest("json")
5636	if err != nil {
5637		return err
5638	}
5639	defer googleapi.CloseBody(res)
5640	if err := googleapi.CheckResponse(res); err != nil {
5641		return err
5642	}
5643	return nil
5644	// {
5645	//   "description": "Deletes an ASP issued by a user.",
5646	//   "flatPath": "admin/directory/v1/users/{userKey}/asps/{codeId}",
5647	//   "httpMethod": "DELETE",
5648	//   "id": "directory.asps.delete",
5649	//   "parameterOrder": [
5650	//     "userKey",
5651	//     "codeId"
5652	//   ],
5653	//   "parameters": {
5654	//     "codeId": {
5655	//       "description": "The unique ID of the ASP to be deleted.",
5656	//       "format": "int32",
5657	//       "location": "path",
5658	//       "required": true,
5659	//       "type": "integer"
5660	//     },
5661	//     "userKey": {
5662	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
5663	//       "location": "path",
5664	//       "required": true,
5665	//       "type": "string"
5666	//     }
5667	//   },
5668	//   "path": "admin/directory/v1/users/{userKey}/asps/{codeId}",
5669	//   "scopes": [
5670	//     "https://www.googleapis.com/auth/admin.directory.user.security"
5671	//   ]
5672	// }
5673
5674}
5675
5676// method id "directory.asps.get":
5677
5678type AspsGetCall struct {
5679	s            *Service
5680	userKey      string
5681	codeId       int64
5682	urlParams_   gensupport.URLParams
5683	ifNoneMatch_ string
5684	ctx_         context.Context
5685	header_      http.Header
5686}
5687
5688// Get: Gets information about an ASP issued by a user.
5689//
5690// - codeId: The unique ID of the ASP.
5691// - userKey: Identifies the user in the API request. The value can be
5692//   the user's primary email address, alias email address, or unique
5693//   user ID.
5694func (r *AspsService) Get(userKey string, codeId int64) *AspsGetCall {
5695	c := &AspsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5696	c.userKey = userKey
5697	c.codeId = codeId
5698	return c
5699}
5700
5701// Fields allows partial responses to be retrieved. See
5702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5703// for more information.
5704func (c *AspsGetCall) Fields(s ...googleapi.Field) *AspsGetCall {
5705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5706	return c
5707}
5708
5709// IfNoneMatch sets the optional parameter which makes the operation
5710// fail if the object's ETag matches the given value. This is useful for
5711// getting updates only after the object has changed since the last
5712// request. Use googleapi.IsNotModified to check whether the response
5713// error from Do is the result of In-None-Match.
5714func (c *AspsGetCall) IfNoneMatch(entityTag string) *AspsGetCall {
5715	c.ifNoneMatch_ = entityTag
5716	return c
5717}
5718
5719// Context sets the context to be used in this call's Do method. Any
5720// pending HTTP request will be aborted if the provided context is
5721// canceled.
5722func (c *AspsGetCall) Context(ctx context.Context) *AspsGetCall {
5723	c.ctx_ = ctx
5724	return c
5725}
5726
5727// Header returns an http.Header that can be modified by the caller to
5728// add HTTP headers to the request.
5729func (c *AspsGetCall) Header() http.Header {
5730	if c.header_ == nil {
5731		c.header_ = make(http.Header)
5732	}
5733	return c.header_
5734}
5735
5736func (c *AspsGetCall) doRequest(alt string) (*http.Response, error) {
5737	reqHeaders := make(http.Header)
5738	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
5739	for k, v := range c.header_ {
5740		reqHeaders[k] = v
5741	}
5742	reqHeaders.Set("User-Agent", c.s.userAgent())
5743	if c.ifNoneMatch_ != "" {
5744		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5745	}
5746	var body io.Reader = nil
5747	c.urlParams_.Set("alt", alt)
5748	c.urlParams_.Set("prettyPrint", "false")
5749	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps/{codeId}")
5750	urls += "?" + c.urlParams_.Encode()
5751	req, err := http.NewRequest("GET", urls, body)
5752	if err != nil {
5753		return nil, err
5754	}
5755	req.Header = reqHeaders
5756	googleapi.Expand(req.URL, map[string]string{
5757		"userKey": c.userKey,
5758		"codeId":  strconv.FormatInt(c.codeId, 10),
5759	})
5760	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5761}
5762
5763// Do executes the "directory.asps.get" call.
5764// Exactly one of *Asp or error will be non-nil. Any non-2xx status code
5765// is an error. Response headers are in either
5766// *Asp.ServerResponse.Header or (if a response was returned at all) in
5767// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5768// whether the returned error was because http.StatusNotModified was
5769// returned.
5770func (c *AspsGetCall) Do(opts ...googleapi.CallOption) (*Asp, error) {
5771	gensupport.SetOptions(c.urlParams_, opts...)
5772	res, err := c.doRequest("json")
5773	if res != nil && res.StatusCode == http.StatusNotModified {
5774		if res.Body != nil {
5775			res.Body.Close()
5776		}
5777		return nil, &googleapi.Error{
5778			Code:   res.StatusCode,
5779			Header: res.Header,
5780		}
5781	}
5782	if err != nil {
5783		return nil, err
5784	}
5785	defer googleapi.CloseBody(res)
5786	if err := googleapi.CheckResponse(res); err != nil {
5787		return nil, err
5788	}
5789	ret := &Asp{
5790		ServerResponse: googleapi.ServerResponse{
5791			Header:         res.Header,
5792			HTTPStatusCode: res.StatusCode,
5793		},
5794	}
5795	target := &ret
5796	if err := gensupport.DecodeResponse(target, res); err != nil {
5797		return nil, err
5798	}
5799	return ret, nil
5800	// {
5801	//   "description": "Gets information about an ASP issued by a user.",
5802	//   "flatPath": "admin/directory/v1/users/{userKey}/asps/{codeId}",
5803	//   "httpMethod": "GET",
5804	//   "id": "directory.asps.get",
5805	//   "parameterOrder": [
5806	//     "userKey",
5807	//     "codeId"
5808	//   ],
5809	//   "parameters": {
5810	//     "codeId": {
5811	//       "description": "The unique ID of the ASP.",
5812	//       "format": "int32",
5813	//       "location": "path",
5814	//       "required": true,
5815	//       "type": "integer"
5816	//     },
5817	//     "userKey": {
5818	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
5819	//       "location": "path",
5820	//       "required": true,
5821	//       "type": "string"
5822	//     }
5823	//   },
5824	//   "path": "admin/directory/v1/users/{userKey}/asps/{codeId}",
5825	//   "response": {
5826	//     "$ref": "Asp"
5827	//   },
5828	//   "scopes": [
5829	//     "https://www.googleapis.com/auth/admin.directory.user.security"
5830	//   ]
5831	// }
5832
5833}
5834
5835// method id "directory.asps.list":
5836
5837type AspsListCall struct {
5838	s            *Service
5839	userKey      string
5840	urlParams_   gensupport.URLParams
5841	ifNoneMatch_ string
5842	ctx_         context.Context
5843	header_      http.Header
5844}
5845
5846// List: Lists the ASPs issued by a user.
5847//
5848// - userKey: Identifies the user in the API request. The value can be
5849//   the user's primary email address, alias email address, or unique
5850//   user ID.
5851func (r *AspsService) List(userKey string) *AspsListCall {
5852	c := &AspsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5853	c.userKey = userKey
5854	return c
5855}
5856
5857// Fields allows partial responses to be retrieved. See
5858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5859// for more information.
5860func (c *AspsListCall) Fields(s ...googleapi.Field) *AspsListCall {
5861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5862	return c
5863}
5864
5865// IfNoneMatch sets the optional parameter which makes the operation
5866// fail if the object's ETag matches the given value. This is useful for
5867// getting updates only after the object has changed since the last
5868// request. Use googleapi.IsNotModified to check whether the response
5869// error from Do is the result of In-None-Match.
5870func (c *AspsListCall) IfNoneMatch(entityTag string) *AspsListCall {
5871	c.ifNoneMatch_ = entityTag
5872	return c
5873}
5874
5875// Context sets the context to be used in this call's Do method. Any
5876// pending HTTP request will be aborted if the provided context is
5877// canceled.
5878func (c *AspsListCall) Context(ctx context.Context) *AspsListCall {
5879	c.ctx_ = ctx
5880	return c
5881}
5882
5883// Header returns an http.Header that can be modified by the caller to
5884// add HTTP headers to the request.
5885func (c *AspsListCall) Header() http.Header {
5886	if c.header_ == nil {
5887		c.header_ = make(http.Header)
5888	}
5889	return c.header_
5890}
5891
5892func (c *AspsListCall) doRequest(alt string) (*http.Response, error) {
5893	reqHeaders := make(http.Header)
5894	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
5895	for k, v := range c.header_ {
5896		reqHeaders[k] = v
5897	}
5898	reqHeaders.Set("User-Agent", c.s.userAgent())
5899	if c.ifNoneMatch_ != "" {
5900		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5901	}
5902	var body io.Reader = nil
5903	c.urlParams_.Set("alt", alt)
5904	c.urlParams_.Set("prettyPrint", "false")
5905	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/asps")
5906	urls += "?" + c.urlParams_.Encode()
5907	req, err := http.NewRequest("GET", urls, body)
5908	if err != nil {
5909		return nil, err
5910	}
5911	req.Header = reqHeaders
5912	googleapi.Expand(req.URL, map[string]string{
5913		"userKey": c.userKey,
5914	})
5915	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5916}
5917
5918// Do executes the "directory.asps.list" call.
5919// Exactly one of *Asps or error will be non-nil. Any non-2xx status
5920// code is an error. Response headers are in either
5921// *Asps.ServerResponse.Header or (if a response was returned at all) in
5922// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5923// whether the returned error was because http.StatusNotModified was
5924// returned.
5925func (c *AspsListCall) Do(opts ...googleapi.CallOption) (*Asps, error) {
5926	gensupport.SetOptions(c.urlParams_, opts...)
5927	res, err := c.doRequest("json")
5928	if res != nil && res.StatusCode == http.StatusNotModified {
5929		if res.Body != nil {
5930			res.Body.Close()
5931		}
5932		return nil, &googleapi.Error{
5933			Code:   res.StatusCode,
5934			Header: res.Header,
5935		}
5936	}
5937	if err != nil {
5938		return nil, err
5939	}
5940	defer googleapi.CloseBody(res)
5941	if err := googleapi.CheckResponse(res); err != nil {
5942		return nil, err
5943	}
5944	ret := &Asps{
5945		ServerResponse: googleapi.ServerResponse{
5946			Header:         res.Header,
5947			HTTPStatusCode: res.StatusCode,
5948		},
5949	}
5950	target := &ret
5951	if err := gensupport.DecodeResponse(target, res); err != nil {
5952		return nil, err
5953	}
5954	return ret, nil
5955	// {
5956	//   "description": "Lists the ASPs issued by a user.",
5957	//   "flatPath": "admin/directory/v1/users/{userKey}/asps",
5958	//   "httpMethod": "GET",
5959	//   "id": "directory.asps.list",
5960	//   "parameterOrder": [
5961	//     "userKey"
5962	//   ],
5963	//   "parameters": {
5964	//     "userKey": {
5965	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
5966	//       "location": "path",
5967	//       "required": true,
5968	//       "type": "string"
5969	//     }
5970	//   },
5971	//   "path": "admin/directory/v1/users/{userKey}/asps",
5972	//   "response": {
5973	//     "$ref": "Asps"
5974	//   },
5975	//   "scopes": [
5976	//     "https://www.googleapis.com/auth/admin.directory.user.security"
5977	//   ]
5978	// }
5979
5980}
5981
5982// method id "admin.channels.stop":
5983
5984type ChannelsStopCall struct {
5985	s          *Service
5986	channel    *Channel
5987	urlParams_ gensupport.URLParams
5988	ctx_       context.Context
5989	header_    http.Header
5990}
5991
5992// Stop: Stops watching resources through this channel.
5993func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall {
5994	c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5995	c.channel = channel
5996	return c
5997}
5998
5999// Fields allows partial responses to be retrieved. See
6000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6001// for more information.
6002func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall {
6003	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6004	return c
6005}
6006
6007// Context sets the context to be used in this call's Do method. Any
6008// pending HTTP request will be aborted if the provided context is
6009// canceled.
6010func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
6011	c.ctx_ = ctx
6012	return c
6013}
6014
6015// Header returns an http.Header that can be modified by the caller to
6016// add HTTP headers to the request.
6017func (c *ChannelsStopCall) Header() http.Header {
6018	if c.header_ == nil {
6019		c.header_ = make(http.Header)
6020	}
6021	return c.header_
6022}
6023
6024func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
6025	reqHeaders := make(http.Header)
6026	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6027	for k, v := range c.header_ {
6028		reqHeaders[k] = v
6029	}
6030	reqHeaders.Set("User-Agent", c.s.userAgent())
6031	var body io.Reader = nil
6032	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
6033	if err != nil {
6034		return nil, err
6035	}
6036	reqHeaders.Set("Content-Type", "application/json")
6037	c.urlParams_.Set("alt", alt)
6038	c.urlParams_.Set("prettyPrint", "false")
6039	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory_v1/channels/stop")
6040	urls += "?" + c.urlParams_.Encode()
6041	req, err := http.NewRequest("POST", urls, body)
6042	if err != nil {
6043		return nil, err
6044	}
6045	req.Header = reqHeaders
6046	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6047}
6048
6049// Do executes the "admin.channels.stop" call.
6050func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error {
6051	gensupport.SetOptions(c.urlParams_, opts...)
6052	res, err := c.doRequest("json")
6053	if err != nil {
6054		return err
6055	}
6056	defer googleapi.CloseBody(res)
6057	if err := googleapi.CheckResponse(res); err != nil {
6058		return err
6059	}
6060	return nil
6061	// {
6062	//   "description": "Stops watching resources through this channel.",
6063	//   "flatPath": "admin/directory_v1/channels/stop",
6064	//   "httpMethod": "POST",
6065	//   "id": "admin.channels.stop",
6066	//   "parameterOrder": [],
6067	//   "parameters": {},
6068	//   "path": "admin/directory_v1/channels/stop",
6069	//   "request": {
6070	//     "$ref": "Channel"
6071	//   },
6072	//   "scopes": [
6073	//     "https://www.googleapis.com/auth/admin.directory.user",
6074	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
6075	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
6076	//     "https://www.googleapis.com/auth/admin.directory.user.readonly",
6077	//     "https://www.googleapis.com/auth/cloud-platform"
6078	//   ]
6079	// }
6080
6081}
6082
6083// method id "directory.chromeosdevices.action":
6084
6085type ChromeosdevicesActionCall struct {
6086	s                    *Service
6087	customerId           string
6088	resourceId           string
6089	chromeosdeviceaction *ChromeOsDeviceAction
6090	urlParams_           gensupport.URLParams
6091	ctx_                 context.Context
6092	header_              http.Header
6093}
6094
6095// Action: Takes an action that affects a Chrome OS Device. This
6096// includes deprovisioning, disabling, and re-enabling devices.
6097// *Warning:* * Deprovisioning a device will stop device policy syncing
6098// and remove device-level printers. After a device is deprovisioned, it
6099// must be wiped before it can be re-enrolled. * Lost or stolen devices
6100// should use the disable action. * Re-enabling a disabled device will
6101// consume a device license. If you do not have sufficient licenses
6102// available when completing the re-enable action, you will receive an
6103// error. For more information about deprovisioning and disabling
6104// devices, visit the help center
6105// (https://support.google.com/chrome/a/answer/3523633).
6106//
6107// - customerId: The unique ID for the customer's Google Workspace
6108//   account. As an account administrator, you can also use the
6109//   `my_customer` alias to represent your account's `customerId`. The
6110//   `customerId` is also returned as part of the Users resource
6111//   (/admin-sdk/directory/v1/reference/users).
6112// - resourceId: The unique ID of the device. The `resourceId`s are
6113//   returned in the response from the chromeosdevices.list
6114//   (/admin-sdk/directory/v1/reference/chromeosdevices/list) method.
6115func (r *ChromeosdevicesService) Action(customerId string, resourceId string, chromeosdeviceaction *ChromeOsDeviceAction) *ChromeosdevicesActionCall {
6116	c := &ChromeosdevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6117	c.customerId = customerId
6118	c.resourceId = resourceId
6119	c.chromeosdeviceaction = chromeosdeviceaction
6120	return c
6121}
6122
6123// Fields allows partial responses to be retrieved. See
6124// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6125// for more information.
6126func (c *ChromeosdevicesActionCall) Fields(s ...googleapi.Field) *ChromeosdevicesActionCall {
6127	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6128	return c
6129}
6130
6131// Context sets the context to be used in this call's Do method. Any
6132// pending HTTP request will be aborted if the provided context is
6133// canceled.
6134func (c *ChromeosdevicesActionCall) Context(ctx context.Context) *ChromeosdevicesActionCall {
6135	c.ctx_ = ctx
6136	return c
6137}
6138
6139// Header returns an http.Header that can be modified by the caller to
6140// add HTTP headers to the request.
6141func (c *ChromeosdevicesActionCall) Header() http.Header {
6142	if c.header_ == nil {
6143		c.header_ = make(http.Header)
6144	}
6145	return c.header_
6146}
6147
6148func (c *ChromeosdevicesActionCall) doRequest(alt string) (*http.Response, error) {
6149	reqHeaders := make(http.Header)
6150	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6151	for k, v := range c.header_ {
6152		reqHeaders[k] = v
6153	}
6154	reqHeaders.Set("User-Agent", c.s.userAgent())
6155	var body io.Reader = nil
6156	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdeviceaction)
6157	if err != nil {
6158		return nil, err
6159	}
6160	reqHeaders.Set("Content-Type", "application/json")
6161	c.urlParams_.Set("alt", alt)
6162	c.urlParams_.Set("prettyPrint", "false")
6163	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action")
6164	urls += "?" + c.urlParams_.Encode()
6165	req, err := http.NewRequest("POST", urls, body)
6166	if err != nil {
6167		return nil, err
6168	}
6169	req.Header = reqHeaders
6170	googleapi.Expand(req.URL, map[string]string{
6171		"customerId": c.customerId,
6172		"resourceId": c.resourceId,
6173	})
6174	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6175}
6176
6177// Do executes the "directory.chromeosdevices.action" call.
6178func (c *ChromeosdevicesActionCall) Do(opts ...googleapi.CallOption) error {
6179	gensupport.SetOptions(c.urlParams_, opts...)
6180	res, err := c.doRequest("json")
6181	if err != nil {
6182		return err
6183	}
6184	defer googleapi.CloseBody(res)
6185	if err := googleapi.CheckResponse(res); err != nil {
6186		return err
6187	}
6188	return nil
6189	// {
6190	//   "description": "Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * Deprovisioning a device will stop device policy syncing and remove device-level printers. After a device is deprovisioned, it must be wiped before it can be re-enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a disabled device will consume a device license. If you do not have sufficient licenses available when completing the re-enable action, you will receive an error. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).",
6191	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action",
6192	//   "httpMethod": "POST",
6193	//   "id": "directory.chromeosdevices.action",
6194	//   "parameterOrder": [
6195	//     "customerId",
6196	//     "resourceId"
6197	//   ],
6198	//   "parameters": {
6199	//     "customerId": {
6200	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
6201	//       "location": "path",
6202	//       "required": true,
6203	//       "type": "string"
6204	//     },
6205	//     "resourceId": {
6206	//       "description": "The unique ID of the device. The `resourceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method.",
6207	//       "location": "path",
6208	//       "required": true,
6209	//       "type": "string"
6210	//     }
6211	//   },
6212	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action",
6213	//   "request": {
6214	//     "$ref": "ChromeOsDeviceAction"
6215	//   },
6216	//   "scopes": [
6217	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
6218	//   ]
6219	// }
6220
6221}
6222
6223// method id "directory.chromeosdevices.get":
6224
6225type ChromeosdevicesGetCall struct {
6226	s            *Service
6227	customerId   string
6228	deviceId     string
6229	urlParams_   gensupport.URLParams
6230	ifNoneMatch_ string
6231	ctx_         context.Context
6232	header_      http.Header
6233}
6234
6235// Get: Retrieves a Chrome OS device's properties.
6236//
6237// - customerId: The unique ID for the customer's Google Workspace
6238//   account. As an account administrator, you can also use the
6239//   `my_customer` alias to represent your account's `customerId`. The
6240//   `customerId` is also returned as part of the Users resource
6241//   (/admin-sdk/directory/v1/reference/users).
6242// - deviceId: The unique ID of the device. The `deviceId`s are returned
6243//   in the response from the chromeosdevices.list
6244//   (/admin-sdk/directory/v1/reference/chromeosdevices/list) method.
6245func (r *ChromeosdevicesService) Get(customerId string, deviceId string) *ChromeosdevicesGetCall {
6246	c := &ChromeosdevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6247	c.customerId = customerId
6248	c.deviceId = deviceId
6249	return c
6250}
6251
6252// Projection sets the optional parameter "projection": Determines
6253// whether the response contains the full list of properties or only a
6254// subset.
6255//
6256// Possible values:
6257//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
6258// serialNumber, status, and user)
6259//   "FULL" - Includes all metadata fields
6260func (c *ChromeosdevicesGetCall) Projection(projection string) *ChromeosdevicesGetCall {
6261	c.urlParams_.Set("projection", projection)
6262	return c
6263}
6264
6265// Fields allows partial responses to be retrieved. See
6266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6267// for more information.
6268func (c *ChromeosdevicesGetCall) Fields(s ...googleapi.Field) *ChromeosdevicesGetCall {
6269	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6270	return c
6271}
6272
6273// IfNoneMatch sets the optional parameter which makes the operation
6274// fail if the object's ETag matches the given value. This is useful for
6275// getting updates only after the object has changed since the last
6276// request. Use googleapi.IsNotModified to check whether the response
6277// error from Do is the result of In-None-Match.
6278func (c *ChromeosdevicesGetCall) IfNoneMatch(entityTag string) *ChromeosdevicesGetCall {
6279	c.ifNoneMatch_ = entityTag
6280	return c
6281}
6282
6283// Context sets the context to be used in this call's Do method. Any
6284// pending HTTP request will be aborted if the provided context is
6285// canceled.
6286func (c *ChromeosdevicesGetCall) Context(ctx context.Context) *ChromeosdevicesGetCall {
6287	c.ctx_ = ctx
6288	return c
6289}
6290
6291// Header returns an http.Header that can be modified by the caller to
6292// add HTTP headers to the request.
6293func (c *ChromeosdevicesGetCall) Header() http.Header {
6294	if c.header_ == nil {
6295		c.header_ = make(http.Header)
6296	}
6297	return c.header_
6298}
6299
6300func (c *ChromeosdevicesGetCall) doRequest(alt string) (*http.Response, error) {
6301	reqHeaders := make(http.Header)
6302	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6303	for k, v := range c.header_ {
6304		reqHeaders[k] = v
6305	}
6306	reqHeaders.Set("User-Agent", c.s.userAgent())
6307	if c.ifNoneMatch_ != "" {
6308		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6309	}
6310	var body io.Reader = nil
6311	c.urlParams_.Set("alt", alt)
6312	c.urlParams_.Set("prettyPrint", "false")
6313	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
6314	urls += "?" + c.urlParams_.Encode()
6315	req, err := http.NewRequest("GET", urls, body)
6316	if err != nil {
6317		return nil, err
6318	}
6319	req.Header = reqHeaders
6320	googleapi.Expand(req.URL, map[string]string{
6321		"customerId": c.customerId,
6322		"deviceId":   c.deviceId,
6323	})
6324	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6325}
6326
6327// Do executes the "directory.chromeosdevices.get" call.
6328// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
6329// status code is an error. Response headers are in either
6330// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
6331// at all) in error.(*googleapi.Error).Header. Use
6332// googleapi.IsNotModified to check whether the returned error was
6333// because http.StatusNotModified was returned.
6334func (c *ChromeosdevicesGetCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
6335	gensupport.SetOptions(c.urlParams_, opts...)
6336	res, err := c.doRequest("json")
6337	if res != nil && res.StatusCode == http.StatusNotModified {
6338		if res.Body != nil {
6339			res.Body.Close()
6340		}
6341		return nil, &googleapi.Error{
6342			Code:   res.StatusCode,
6343			Header: res.Header,
6344		}
6345	}
6346	if err != nil {
6347		return nil, err
6348	}
6349	defer googleapi.CloseBody(res)
6350	if err := googleapi.CheckResponse(res); err != nil {
6351		return nil, err
6352	}
6353	ret := &ChromeOsDevice{
6354		ServerResponse: googleapi.ServerResponse{
6355			Header:         res.Header,
6356			HTTPStatusCode: res.StatusCode,
6357		},
6358	}
6359	target := &ret
6360	if err := gensupport.DecodeResponse(target, res); err != nil {
6361		return nil, err
6362	}
6363	return ret, nil
6364	// {
6365	//   "description": "Retrieves a Chrome OS device's properties.",
6366	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
6367	//   "httpMethod": "GET",
6368	//   "id": "directory.chromeosdevices.get",
6369	//   "parameterOrder": [
6370	//     "customerId",
6371	//     "deviceId"
6372	//   ],
6373	//   "parameters": {
6374	//     "customerId": {
6375	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
6376	//       "location": "path",
6377	//       "required": true,
6378	//       "type": "string"
6379	//     },
6380	//     "deviceId": {
6381	//       "description": "The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/directory/v1/reference/chromeosdevices/list) method.",
6382	//       "location": "path",
6383	//       "required": true,
6384	//       "type": "string"
6385	//     },
6386	//     "projection": {
6387	//       "description": "Determines whether the response contains the full list of properties or only a subset.",
6388	//       "enum": [
6389	//         "BASIC",
6390	//         "FULL"
6391	//       ],
6392	//       "enumDescriptions": [
6393	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
6394	//         "Includes all metadata fields"
6395	//       ],
6396	//       "location": "query",
6397	//       "type": "string"
6398	//     }
6399	//   },
6400	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
6401	//   "response": {
6402	//     "$ref": "ChromeOsDevice"
6403	//   },
6404	//   "scopes": [
6405	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos",
6406	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
6407	//   ]
6408	// }
6409
6410}
6411
6412// method id "directory.chromeosdevices.list":
6413
6414type ChromeosdevicesListCall struct {
6415	s            *Service
6416	customerId   string
6417	urlParams_   gensupport.URLParams
6418	ifNoneMatch_ string
6419	ctx_         context.Context
6420	header_      http.Header
6421}
6422
6423// List: Retrieves a paginated list of Chrome OS devices within an
6424// account.
6425//
6426// - customerId: The unique ID for the customer's Google Workspace
6427//   account. As an account administrator, you can also use the
6428//   `my_customer` alias to represent your account's `customerId`. The
6429//   `customerId` is also returned as part of the Users resource
6430//   (/admin-sdk/directory/v1/reference/users).
6431func (r *ChromeosdevicesService) List(customerId string) *ChromeosdevicesListCall {
6432	c := &ChromeosdevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6433	c.customerId = customerId
6434	return c
6435}
6436
6437// MaxResults sets the optional parameter "maxResults": Maximum number
6438// of results to return.
6439func (c *ChromeosdevicesListCall) MaxResults(maxResults int64) *ChromeosdevicesListCall {
6440	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6441	return c
6442}
6443
6444// OrderBy sets the optional parameter "orderBy": Device property to use
6445// for sorting results.
6446//
6447// Possible values:
6448//   "annotatedLocation" - Chrome device location as annotated by the
6449// administrator.
6450//   "annotatedUser" - Chromebook user as annotated by administrator.
6451//   "lastSync" - The date and time the Chrome device was last
6452// synchronized with the policy settings in the Admin console.
6453//   "notes" - Chrome device notes as annotated by the administrator.
6454//   "serialNumber" - The Chrome device serial number entered when the
6455// device was enabled.
6456//   "status" - Chrome device status. For more information, see the <a
6457// [chromeosdevices](/admin-sdk/directory/v1/reference/chromeosdevices.ht
6458// ml).
6459//   "supportEndDate" - Chrome device support end date. This is
6460// applicable only for devices purchased directly from Google.
6461func (c *ChromeosdevicesListCall) OrderBy(orderBy string) *ChromeosdevicesListCall {
6462	c.urlParams_.Set("orderBy", orderBy)
6463	return c
6464}
6465
6466// OrgUnitPath sets the optional parameter "orgUnitPath": The full path
6467// of the organizational unit or its unique ID.
6468func (c *ChromeosdevicesListCall) OrgUnitPath(orgUnitPath string) *ChromeosdevicesListCall {
6469	c.urlParams_.Set("orgUnitPath", orgUnitPath)
6470	return c
6471}
6472
6473// PageToken sets the optional parameter "pageToken": The `pageToken`
6474// query parameter is used to request the next page of query results.
6475// The follow-on request's `pageToken` query parameter is the
6476// `nextPageToken` from your previous response.
6477func (c *ChromeosdevicesListCall) PageToken(pageToken string) *ChromeosdevicesListCall {
6478	c.urlParams_.Set("pageToken", pageToken)
6479	return c
6480}
6481
6482// Projection sets the optional parameter "projection": Restrict
6483// information returned to a set of selected fields.
6484//
6485// Possible values:
6486//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
6487// serialNumber, status, and user)
6488//   "FULL" - Includes all metadata fields
6489func (c *ChromeosdevicesListCall) Projection(projection string) *ChromeosdevicesListCall {
6490	c.urlParams_.Set("projection", projection)
6491	return c
6492}
6493
6494// Query sets the optional parameter "query": Search string in the
6495// format given at
6496// http://support.google.com/chromeos/a/bin/answer.py?answer=1698333
6497func (c *ChromeosdevicesListCall) Query(query string) *ChromeosdevicesListCall {
6498	c.urlParams_.Set("query", query)
6499	return c
6500}
6501
6502// SortOrder sets the optional parameter "sortOrder": Whether to return
6503// results in ascending or descending order. Must be used with the
6504// `orderBy` parameter.
6505//
6506// Possible values:
6507//   "ASCENDING" - Ascending order.
6508//   "DESCENDING" - Descending order.
6509func (c *ChromeosdevicesListCall) SortOrder(sortOrder string) *ChromeosdevicesListCall {
6510	c.urlParams_.Set("sortOrder", sortOrder)
6511	return c
6512}
6513
6514// Fields allows partial responses to be retrieved. See
6515// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6516// for more information.
6517func (c *ChromeosdevicesListCall) Fields(s ...googleapi.Field) *ChromeosdevicesListCall {
6518	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6519	return c
6520}
6521
6522// IfNoneMatch sets the optional parameter which makes the operation
6523// fail if the object's ETag matches the given value. This is useful for
6524// getting updates only after the object has changed since the last
6525// request. Use googleapi.IsNotModified to check whether the response
6526// error from Do is the result of In-None-Match.
6527func (c *ChromeosdevicesListCall) IfNoneMatch(entityTag string) *ChromeosdevicesListCall {
6528	c.ifNoneMatch_ = entityTag
6529	return c
6530}
6531
6532// Context sets the context to be used in this call's Do method. Any
6533// pending HTTP request will be aborted if the provided context is
6534// canceled.
6535func (c *ChromeosdevicesListCall) Context(ctx context.Context) *ChromeosdevicesListCall {
6536	c.ctx_ = ctx
6537	return c
6538}
6539
6540// Header returns an http.Header that can be modified by the caller to
6541// add HTTP headers to the request.
6542func (c *ChromeosdevicesListCall) Header() http.Header {
6543	if c.header_ == nil {
6544		c.header_ = make(http.Header)
6545	}
6546	return c.header_
6547}
6548
6549func (c *ChromeosdevicesListCall) doRequest(alt string) (*http.Response, error) {
6550	reqHeaders := make(http.Header)
6551	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6552	for k, v := range c.header_ {
6553		reqHeaders[k] = v
6554	}
6555	reqHeaders.Set("User-Agent", c.s.userAgent())
6556	if c.ifNoneMatch_ != "" {
6557		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6558	}
6559	var body io.Reader = nil
6560	c.urlParams_.Set("alt", alt)
6561	c.urlParams_.Set("prettyPrint", "false")
6562	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos")
6563	urls += "?" + c.urlParams_.Encode()
6564	req, err := http.NewRequest("GET", urls, body)
6565	if err != nil {
6566		return nil, err
6567	}
6568	req.Header = reqHeaders
6569	googleapi.Expand(req.URL, map[string]string{
6570		"customerId": c.customerId,
6571	})
6572	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6573}
6574
6575// Do executes the "directory.chromeosdevices.list" call.
6576// Exactly one of *ChromeOsDevices or error will be non-nil. Any non-2xx
6577// status code is an error. Response headers are in either
6578// *ChromeOsDevices.ServerResponse.Header or (if a response was returned
6579// at all) in error.(*googleapi.Error).Header. Use
6580// googleapi.IsNotModified to check whether the returned error was
6581// because http.StatusNotModified was returned.
6582func (c *ChromeosdevicesListCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevices, error) {
6583	gensupport.SetOptions(c.urlParams_, opts...)
6584	res, err := c.doRequest("json")
6585	if res != nil && res.StatusCode == http.StatusNotModified {
6586		if res.Body != nil {
6587			res.Body.Close()
6588		}
6589		return nil, &googleapi.Error{
6590			Code:   res.StatusCode,
6591			Header: res.Header,
6592		}
6593	}
6594	if err != nil {
6595		return nil, err
6596	}
6597	defer googleapi.CloseBody(res)
6598	if err := googleapi.CheckResponse(res); err != nil {
6599		return nil, err
6600	}
6601	ret := &ChromeOsDevices{
6602		ServerResponse: googleapi.ServerResponse{
6603			Header:         res.Header,
6604			HTTPStatusCode: res.StatusCode,
6605		},
6606	}
6607	target := &ret
6608	if err := gensupport.DecodeResponse(target, res); err != nil {
6609		return nil, err
6610	}
6611	return ret, nil
6612	// {
6613	//   "description": "Retrieves a paginated list of Chrome OS devices within an account.",
6614	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos",
6615	//   "httpMethod": "GET",
6616	//   "id": "directory.chromeosdevices.list",
6617	//   "parameterOrder": [
6618	//     "customerId"
6619	//   ],
6620	//   "parameters": {
6621	//     "customerId": {
6622	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
6623	//       "location": "path",
6624	//       "required": true,
6625	//       "type": "string"
6626	//     },
6627	//     "maxResults": {
6628	//       "default": "100",
6629	//       "description": "Maximum number of results to return.",
6630	//       "format": "int32",
6631	//       "location": "query",
6632	//       "minimum": "1",
6633	//       "type": "integer"
6634	//     },
6635	//     "orderBy": {
6636	//       "description": "Device property to use for sorting results.",
6637	//       "enum": [
6638	//         "annotatedLocation",
6639	//         "annotatedUser",
6640	//         "lastSync",
6641	//         "notes",
6642	//         "serialNumber",
6643	//         "status",
6644	//         "supportEndDate"
6645	//       ],
6646	//       "enumDescriptions": [
6647	//         "Chrome device location as annotated by the administrator.",
6648	//         "Chromebook user as annotated by administrator.",
6649	//         "The date and time the Chrome device was last synchronized with the policy settings in the Admin console.",
6650	//         "Chrome device notes as annotated by the administrator.",
6651	//         "The Chrome device serial number entered when the device was enabled.",
6652	//         "Chrome device status. For more information, see the \u003ca [chromeosdevices](/admin-sdk/directory/v1/reference/chromeosdevices.html).",
6653	//         "Chrome device support end date. This is applicable only for devices purchased directly from Google."
6654	//       ],
6655	//       "location": "query",
6656	//       "type": "string"
6657	//     },
6658	//     "orgUnitPath": {
6659	//       "description": "The full path of the organizational unit or its unique ID.",
6660	//       "location": "query",
6661	//       "type": "string"
6662	//     },
6663	//     "pageToken": {
6664	//       "description": "The `pageToken` query parameter is used to request the next page of query results. The follow-on request's `pageToken` query parameter is the `nextPageToken` from your previous response.",
6665	//       "location": "query",
6666	//       "type": "string"
6667	//     },
6668	//     "projection": {
6669	//       "description": "Restrict information returned to a set of selected fields.",
6670	//       "enum": [
6671	//         "BASIC",
6672	//         "FULL"
6673	//       ],
6674	//       "enumDescriptions": [
6675	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
6676	//         "Includes all metadata fields"
6677	//       ],
6678	//       "location": "query",
6679	//       "type": "string"
6680	//     },
6681	//     "query": {
6682	//       "description": "Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?answer=1698333",
6683	//       "location": "query",
6684	//       "type": "string"
6685	//     },
6686	//     "sortOrder": {
6687	//       "description": "Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.",
6688	//       "enum": [
6689	//         "ASCENDING",
6690	//         "DESCENDING"
6691	//       ],
6692	//       "enumDescriptions": [
6693	//         "Ascending order.",
6694	//         "Descending order."
6695	//       ],
6696	//       "location": "query",
6697	//       "type": "string"
6698	//     }
6699	//   },
6700	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos",
6701	//   "response": {
6702	//     "$ref": "ChromeOsDevices"
6703	//   },
6704	//   "scopes": [
6705	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos",
6706	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
6707	//   ]
6708	// }
6709
6710}
6711
6712// Pages invokes f for each page of results.
6713// A non-nil error returned from f will halt the iteration.
6714// The provided context supersedes any context provided to the Context method.
6715func (c *ChromeosdevicesListCall) Pages(ctx context.Context, f func(*ChromeOsDevices) error) error {
6716	c.ctx_ = ctx
6717	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6718	for {
6719		x, err := c.Do()
6720		if err != nil {
6721			return err
6722		}
6723		if err := f(x); err != nil {
6724			return err
6725		}
6726		if x.NextPageToken == "" {
6727			return nil
6728		}
6729		c.PageToken(x.NextPageToken)
6730	}
6731}
6732
6733// method id "directory.chromeosdevices.moveDevicesToOu":
6734
6735type ChromeosdevicesMoveDevicesToOuCall struct {
6736	s                       *Service
6737	customerId              string
6738	chromeosmovedevicestoou *ChromeOsMoveDevicesToOu
6739	urlParams_              gensupport.URLParams
6740	ctx_                    context.Context
6741	header_                 http.Header
6742}
6743
6744// MoveDevicesToOu: Moves or inserts multiple Chrome OS devices to an
6745// organizational unit. You can move up to 50 devices at once.
6746//
6747// - customerId: Immutable ID of the Google Workspace account.
6748// - orgUnitPath: Full path of the target organizational unit or its ID.
6749func (r *ChromeosdevicesService) MoveDevicesToOu(customerId string, orgUnitPath string, chromeosmovedevicestoou *ChromeOsMoveDevicesToOu) *ChromeosdevicesMoveDevicesToOuCall {
6750	c := &ChromeosdevicesMoveDevicesToOuCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6751	c.customerId = customerId
6752	c.urlParams_.Set("orgUnitPath", orgUnitPath)
6753	c.chromeosmovedevicestoou = chromeosmovedevicestoou
6754	return c
6755}
6756
6757// Fields allows partial responses to be retrieved. See
6758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6759// for more information.
6760func (c *ChromeosdevicesMoveDevicesToOuCall) Fields(s ...googleapi.Field) *ChromeosdevicesMoveDevicesToOuCall {
6761	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6762	return c
6763}
6764
6765// Context sets the context to be used in this call's Do method. Any
6766// pending HTTP request will be aborted if the provided context is
6767// canceled.
6768func (c *ChromeosdevicesMoveDevicesToOuCall) Context(ctx context.Context) *ChromeosdevicesMoveDevicesToOuCall {
6769	c.ctx_ = ctx
6770	return c
6771}
6772
6773// Header returns an http.Header that can be modified by the caller to
6774// add HTTP headers to the request.
6775func (c *ChromeosdevicesMoveDevicesToOuCall) Header() http.Header {
6776	if c.header_ == nil {
6777		c.header_ = make(http.Header)
6778	}
6779	return c.header_
6780}
6781
6782func (c *ChromeosdevicesMoveDevicesToOuCall) doRequest(alt string) (*http.Response, error) {
6783	reqHeaders := make(http.Header)
6784	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6785	for k, v := range c.header_ {
6786		reqHeaders[k] = v
6787	}
6788	reqHeaders.Set("User-Agent", c.s.userAgent())
6789	var body io.Reader = nil
6790	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosmovedevicestoou)
6791	if err != nil {
6792		return nil, err
6793	}
6794	reqHeaders.Set("Content-Type", "application/json")
6795	c.urlParams_.Set("alt", alt)
6796	c.urlParams_.Set("prettyPrint", "false")
6797	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu")
6798	urls += "?" + c.urlParams_.Encode()
6799	req, err := http.NewRequest("POST", urls, body)
6800	if err != nil {
6801		return nil, err
6802	}
6803	req.Header = reqHeaders
6804	googleapi.Expand(req.URL, map[string]string{
6805		"customerId": c.customerId,
6806	})
6807	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6808}
6809
6810// Do executes the "directory.chromeosdevices.moveDevicesToOu" call.
6811func (c *ChromeosdevicesMoveDevicesToOuCall) Do(opts ...googleapi.CallOption) error {
6812	gensupport.SetOptions(c.urlParams_, opts...)
6813	res, err := c.doRequest("json")
6814	if err != nil {
6815		return err
6816	}
6817	defer googleapi.CloseBody(res)
6818	if err := googleapi.CheckResponse(res); err != nil {
6819		return err
6820	}
6821	return nil
6822	// {
6823	//   "description": "Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.",
6824	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu",
6825	//   "httpMethod": "POST",
6826	//   "id": "directory.chromeosdevices.moveDevicesToOu",
6827	//   "parameterOrder": [
6828	//     "customerId",
6829	//     "orgUnitPath"
6830	//   ],
6831	//   "parameters": {
6832	//     "customerId": {
6833	//       "description": "Immutable ID of the Google Workspace account",
6834	//       "location": "path",
6835	//       "required": true,
6836	//       "type": "string"
6837	//     },
6838	//     "orgUnitPath": {
6839	//       "description": "Full path of the target organizational unit or its ID",
6840	//       "location": "query",
6841	//       "required": true,
6842	//       "type": "string"
6843	//     }
6844	//   },
6845	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu",
6846	//   "request": {
6847	//     "$ref": "ChromeOsMoveDevicesToOu"
6848	//   },
6849	//   "scopes": [
6850	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
6851	//   ]
6852	// }
6853
6854}
6855
6856// method id "directory.chromeosdevices.patch":
6857
6858type ChromeosdevicesPatchCall struct {
6859	s              *Service
6860	customerId     string
6861	deviceId       string
6862	chromeosdevice *ChromeOsDevice
6863	urlParams_     gensupport.URLParams
6864	ctx_           context.Context
6865	header_        http.Header
6866}
6867
6868// Patch: Updates a device's updatable properties, such as
6869// `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or
6870// `annotatedAssetId`. This method supports patch semantics
6871// (/admin-sdk/directory/v1/guides/performance#patch).
6872//
6873// - customerId: The unique ID for the customer's Google Workspace
6874//   account. As an account administrator, you can also use the
6875//   `my_customer` alias to represent your account's `customerId`. The
6876//   `customerId` is also returned as part of the Users resource
6877//   (/admin-sdk/directory/v1/reference/users).
6878// - deviceId: The unique ID of the device. The `deviceId`s are returned
6879//   in the response from the chromeosdevices.list
6880//   (/admin-sdk/v1/reference/chromeosdevices/list) method.
6881func (r *ChromeosdevicesService) Patch(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesPatchCall {
6882	c := &ChromeosdevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6883	c.customerId = customerId
6884	c.deviceId = deviceId
6885	c.chromeosdevice = chromeosdevice
6886	return c
6887}
6888
6889// Projection sets the optional parameter "projection": Restrict
6890// information returned to a set of selected fields.
6891//
6892// Possible values:
6893//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
6894// serialNumber, status, and user)
6895//   "FULL" - Includes all metadata fields
6896func (c *ChromeosdevicesPatchCall) Projection(projection string) *ChromeosdevicesPatchCall {
6897	c.urlParams_.Set("projection", projection)
6898	return c
6899}
6900
6901// Fields allows partial responses to be retrieved. See
6902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6903// for more information.
6904func (c *ChromeosdevicesPatchCall) Fields(s ...googleapi.Field) *ChromeosdevicesPatchCall {
6905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6906	return c
6907}
6908
6909// Context sets the context to be used in this call's Do method. Any
6910// pending HTTP request will be aborted if the provided context is
6911// canceled.
6912func (c *ChromeosdevicesPatchCall) Context(ctx context.Context) *ChromeosdevicesPatchCall {
6913	c.ctx_ = ctx
6914	return c
6915}
6916
6917// Header returns an http.Header that can be modified by the caller to
6918// add HTTP headers to the request.
6919func (c *ChromeosdevicesPatchCall) Header() http.Header {
6920	if c.header_ == nil {
6921		c.header_ = make(http.Header)
6922	}
6923	return c.header_
6924}
6925
6926func (c *ChromeosdevicesPatchCall) doRequest(alt string) (*http.Response, error) {
6927	reqHeaders := make(http.Header)
6928	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
6929	for k, v := range c.header_ {
6930		reqHeaders[k] = v
6931	}
6932	reqHeaders.Set("User-Agent", c.s.userAgent())
6933	var body io.Reader = nil
6934	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
6935	if err != nil {
6936		return nil, err
6937	}
6938	reqHeaders.Set("Content-Type", "application/json")
6939	c.urlParams_.Set("alt", alt)
6940	c.urlParams_.Set("prettyPrint", "false")
6941	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
6942	urls += "?" + c.urlParams_.Encode()
6943	req, err := http.NewRequest("PATCH", urls, body)
6944	if err != nil {
6945		return nil, err
6946	}
6947	req.Header = reqHeaders
6948	googleapi.Expand(req.URL, map[string]string{
6949		"customerId": c.customerId,
6950		"deviceId":   c.deviceId,
6951	})
6952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6953}
6954
6955// Do executes the "directory.chromeosdevices.patch" call.
6956// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
6957// status code is an error. Response headers are in either
6958// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
6959// at all) in error.(*googleapi.Error).Header. Use
6960// googleapi.IsNotModified to check whether the returned error was
6961// because http.StatusNotModified was returned.
6962func (c *ChromeosdevicesPatchCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
6963	gensupport.SetOptions(c.urlParams_, opts...)
6964	res, err := c.doRequest("json")
6965	if res != nil && res.StatusCode == http.StatusNotModified {
6966		if res.Body != nil {
6967			res.Body.Close()
6968		}
6969		return nil, &googleapi.Error{
6970			Code:   res.StatusCode,
6971			Header: res.Header,
6972		}
6973	}
6974	if err != nil {
6975		return nil, err
6976	}
6977	defer googleapi.CloseBody(res)
6978	if err := googleapi.CheckResponse(res); err != nil {
6979		return nil, err
6980	}
6981	ret := &ChromeOsDevice{
6982		ServerResponse: googleapi.ServerResponse{
6983			Header:         res.Header,
6984			HTTPStatusCode: res.StatusCode,
6985		},
6986	}
6987	target := &ret
6988	if err := gensupport.DecodeResponse(target, res); err != nil {
6989		return nil, err
6990	}
6991	return ret, nil
6992	// {
6993	//   "description": "Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or `annotatedAssetId`. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).",
6994	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
6995	//   "httpMethod": "PATCH",
6996	//   "id": "directory.chromeosdevices.patch",
6997	//   "parameterOrder": [
6998	//     "customerId",
6999	//     "deviceId"
7000	//   ],
7001	//   "parameters": {
7002	//     "customerId": {
7003	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
7004	//       "location": "path",
7005	//       "required": true,
7006	//       "type": "string"
7007	//     },
7008	//     "deviceId": {
7009	//       "description": "The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method.",
7010	//       "location": "path",
7011	//       "required": true,
7012	//       "type": "string"
7013	//     },
7014	//     "projection": {
7015	//       "description": "Restrict information returned to a set of selected fields.",
7016	//       "enum": [
7017	//         "BASIC",
7018	//         "FULL"
7019	//       ],
7020	//       "enumDescriptions": [
7021	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
7022	//         "Includes all metadata fields"
7023	//       ],
7024	//       "location": "query",
7025	//       "type": "string"
7026	//     }
7027	//   },
7028	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
7029	//   "request": {
7030	//     "$ref": "ChromeOsDevice"
7031	//   },
7032	//   "response": {
7033	//     "$ref": "ChromeOsDevice"
7034	//   },
7035	//   "scopes": [
7036	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
7037	//   ]
7038	// }
7039
7040}
7041
7042// method id "directory.chromeosdevices.update":
7043
7044type ChromeosdevicesUpdateCall struct {
7045	s              *Service
7046	customerId     string
7047	deviceId       string
7048	chromeosdevice *ChromeOsDevice
7049	urlParams_     gensupport.URLParams
7050	ctx_           context.Context
7051	header_        http.Header
7052}
7053
7054// Update: Updates a device's updatable properties, such as
7055// `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or
7056// `annotatedAssetId`.
7057//
7058// - customerId: The unique ID for the customer's Google Workspace
7059//   account. As an account administrator, you can also use the
7060//   `my_customer` alias to represent your account's `customerId`. The
7061//   `customerId` is also returned as part of the Users resource
7062//   (/admin-sdk/directory/v1/reference/users).
7063// - deviceId: The unique ID of the device. The `deviceId`s are returned
7064//   in the response from the chromeosdevices.list
7065//   (/admin-sdk/v1/reference/chromeosdevices/list) method.
7066func (r *ChromeosdevicesService) Update(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesUpdateCall {
7067	c := &ChromeosdevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7068	c.customerId = customerId
7069	c.deviceId = deviceId
7070	c.chromeosdevice = chromeosdevice
7071	return c
7072}
7073
7074// Projection sets the optional parameter "projection": Restrict
7075// information returned to a set of selected fields.
7076//
7077// Possible values:
7078//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
7079// serialNumber, status, and user)
7080//   "FULL" - Includes all metadata fields
7081func (c *ChromeosdevicesUpdateCall) Projection(projection string) *ChromeosdevicesUpdateCall {
7082	c.urlParams_.Set("projection", projection)
7083	return c
7084}
7085
7086// Fields allows partial responses to be retrieved. See
7087// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7088// for more information.
7089func (c *ChromeosdevicesUpdateCall) Fields(s ...googleapi.Field) *ChromeosdevicesUpdateCall {
7090	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7091	return c
7092}
7093
7094// Context sets the context to be used in this call's Do method. Any
7095// pending HTTP request will be aborted if the provided context is
7096// canceled.
7097func (c *ChromeosdevicesUpdateCall) Context(ctx context.Context) *ChromeosdevicesUpdateCall {
7098	c.ctx_ = ctx
7099	return c
7100}
7101
7102// Header returns an http.Header that can be modified by the caller to
7103// add HTTP headers to the request.
7104func (c *ChromeosdevicesUpdateCall) Header() http.Header {
7105	if c.header_ == nil {
7106		c.header_ = make(http.Header)
7107	}
7108	return c.header_
7109}
7110
7111func (c *ChromeosdevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
7112	reqHeaders := make(http.Header)
7113	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7114	for k, v := range c.header_ {
7115		reqHeaders[k] = v
7116	}
7117	reqHeaders.Set("User-Agent", c.s.userAgent())
7118	var body io.Reader = nil
7119	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
7120	if err != nil {
7121		return nil, err
7122	}
7123	reqHeaders.Set("Content-Type", "application/json")
7124	c.urlParams_.Set("alt", alt)
7125	c.urlParams_.Set("prettyPrint", "false")
7126	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}")
7127	urls += "?" + c.urlParams_.Encode()
7128	req, err := http.NewRequest("PUT", urls, body)
7129	if err != nil {
7130		return nil, err
7131	}
7132	req.Header = reqHeaders
7133	googleapi.Expand(req.URL, map[string]string{
7134		"customerId": c.customerId,
7135		"deviceId":   c.deviceId,
7136	})
7137	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7138}
7139
7140// Do executes the "directory.chromeosdevices.update" call.
7141// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
7142// status code is an error. Response headers are in either
7143// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
7144// at all) in error.(*googleapi.Error).Header. Use
7145// googleapi.IsNotModified to check whether the returned error was
7146// because http.StatusNotModified was returned.
7147func (c *ChromeosdevicesUpdateCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
7148	gensupport.SetOptions(c.urlParams_, opts...)
7149	res, err := c.doRequest("json")
7150	if res != nil && res.StatusCode == http.StatusNotModified {
7151		if res.Body != nil {
7152			res.Body.Close()
7153		}
7154		return nil, &googleapi.Error{
7155			Code:   res.StatusCode,
7156			Header: res.Header,
7157		}
7158	}
7159	if err != nil {
7160		return nil, err
7161	}
7162	defer googleapi.CloseBody(res)
7163	if err := googleapi.CheckResponse(res); err != nil {
7164		return nil, err
7165	}
7166	ret := &ChromeOsDevice{
7167		ServerResponse: googleapi.ServerResponse{
7168			Header:         res.Header,
7169			HTTPStatusCode: res.StatusCode,
7170		},
7171	}
7172	target := &ret
7173	if err := gensupport.DecodeResponse(target, res); err != nil {
7174		return nil, err
7175	}
7176	return ret, nil
7177	// {
7178	//   "description": "Updates a device's updatable properties, such as `annotatedUser`, `annotatedLocation`, `notes`, `orgUnitPath`, or `annotatedAssetId`.",
7179	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
7180	//   "httpMethod": "PUT",
7181	//   "id": "directory.chromeosdevices.update",
7182	//   "parameterOrder": [
7183	//     "customerId",
7184	//     "deviceId"
7185	//   ],
7186	//   "parameters": {
7187	//     "customerId": {
7188	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
7189	//       "location": "path",
7190	//       "required": true,
7191	//       "type": "string"
7192	//     },
7193	//     "deviceId": {
7194	//       "description": "The unique ID of the device. The `deviceId`s are returned in the response from the [chromeosdevices.list](/admin-sdk/v1/reference/chromeosdevices/list) method.",
7195	//       "location": "path",
7196	//       "required": true,
7197	//       "type": "string"
7198	//     },
7199	//     "projection": {
7200	//       "description": "Restrict information returned to a set of selected fields.",
7201	//       "enum": [
7202	//         "BASIC",
7203	//         "FULL"
7204	//       ],
7205	//       "enumDescriptions": [
7206	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
7207	//         "Includes all metadata fields"
7208	//       ],
7209	//       "location": "query",
7210	//       "type": "string"
7211	//     }
7212	//   },
7213	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}",
7214	//   "request": {
7215	//     "$ref": "ChromeOsDevice"
7216	//   },
7217	//   "response": {
7218	//     "$ref": "ChromeOsDevice"
7219	//   },
7220	//   "scopes": [
7221	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
7222	//   ]
7223	// }
7224
7225}
7226
7227// method id "admin.customer.devices.chromeos.issueCommand":
7228
7229type CustomerDevicesChromeosIssueCommandCall struct {
7230	s                                           *Service
7231	customerId                                  string
7232	deviceId                                    string
7233	directorychromeosdevicesissuecommandrequest *DirectoryChromeosdevicesIssueCommandRequest
7234	urlParams_                                  gensupport.URLParams
7235	ctx_                                        context.Context
7236	header_                                     http.Header
7237}
7238
7239// IssueCommand: Issues a command for the device to execute.
7240//
7241// - customerId: Immutable. Immutable ID of the Google Workspace
7242//   account.
7243// - deviceId: Immutable. Immutable ID of Chrome OS Device.
7244func (r *CustomerDevicesChromeosService) IssueCommand(customerId string, deviceId string, directorychromeosdevicesissuecommandrequest *DirectoryChromeosdevicesIssueCommandRequest) *CustomerDevicesChromeosIssueCommandCall {
7245	c := &CustomerDevicesChromeosIssueCommandCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7246	c.customerId = customerId
7247	c.deviceId = deviceId
7248	c.directorychromeosdevicesissuecommandrequest = directorychromeosdevicesissuecommandrequest
7249	return c
7250}
7251
7252// Fields allows partial responses to be retrieved. See
7253// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7254// for more information.
7255func (c *CustomerDevicesChromeosIssueCommandCall) Fields(s ...googleapi.Field) *CustomerDevicesChromeosIssueCommandCall {
7256	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7257	return c
7258}
7259
7260// Context sets the context to be used in this call's Do method. Any
7261// pending HTTP request will be aborted if the provided context is
7262// canceled.
7263func (c *CustomerDevicesChromeosIssueCommandCall) Context(ctx context.Context) *CustomerDevicesChromeosIssueCommandCall {
7264	c.ctx_ = ctx
7265	return c
7266}
7267
7268// Header returns an http.Header that can be modified by the caller to
7269// add HTTP headers to the request.
7270func (c *CustomerDevicesChromeosIssueCommandCall) Header() http.Header {
7271	if c.header_ == nil {
7272		c.header_ = make(http.Header)
7273	}
7274	return c.header_
7275}
7276
7277func (c *CustomerDevicesChromeosIssueCommandCall) doRequest(alt string) (*http.Response, error) {
7278	reqHeaders := make(http.Header)
7279	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7280	for k, v := range c.header_ {
7281		reqHeaders[k] = v
7282	}
7283	reqHeaders.Set("User-Agent", c.s.userAgent())
7284	var body io.Reader = nil
7285	body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorychromeosdevicesissuecommandrequest)
7286	if err != nil {
7287		return nil, err
7288	}
7289	reqHeaders.Set("Content-Type", "application/json")
7290	c.urlParams_.Set("alt", alt)
7291	c.urlParams_.Set("prettyPrint", "false")
7292	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand")
7293	urls += "?" + c.urlParams_.Encode()
7294	req, err := http.NewRequest("POST", urls, body)
7295	if err != nil {
7296		return nil, err
7297	}
7298	req.Header = reqHeaders
7299	googleapi.Expand(req.URL, map[string]string{
7300		"customerId": c.customerId,
7301		"deviceId":   c.deviceId,
7302	})
7303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7304}
7305
7306// Do executes the "admin.customer.devices.chromeos.issueCommand" call.
7307// Exactly one of *DirectoryChromeosdevicesIssueCommandResponse or error
7308// will be non-nil. Any non-2xx status code is an error. Response
7309// headers are in either
7310// *DirectoryChromeosdevicesIssueCommandResponse.ServerResponse.Header
7311// or (if a response was returned at all) in
7312// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7313// whether the returned error was because http.StatusNotModified was
7314// returned.
7315func (c *CustomerDevicesChromeosIssueCommandCall) Do(opts ...googleapi.CallOption) (*DirectoryChromeosdevicesIssueCommandResponse, error) {
7316	gensupport.SetOptions(c.urlParams_, opts...)
7317	res, err := c.doRequest("json")
7318	if res != nil && res.StatusCode == http.StatusNotModified {
7319		if res.Body != nil {
7320			res.Body.Close()
7321		}
7322		return nil, &googleapi.Error{
7323			Code:   res.StatusCode,
7324			Header: res.Header,
7325		}
7326	}
7327	if err != nil {
7328		return nil, err
7329	}
7330	defer googleapi.CloseBody(res)
7331	if err := googleapi.CheckResponse(res); err != nil {
7332		return nil, err
7333	}
7334	ret := &DirectoryChromeosdevicesIssueCommandResponse{
7335		ServerResponse: googleapi.ServerResponse{
7336			Header:         res.Header,
7337			HTTPStatusCode: res.StatusCode,
7338		},
7339	}
7340	target := &ret
7341	if err := gensupport.DecodeResponse(target, res); err != nil {
7342		return nil, err
7343	}
7344	return ret, nil
7345	// {
7346	//   "description": "Issues a command for the device to execute.",
7347	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand",
7348	//   "httpMethod": "POST",
7349	//   "id": "admin.customer.devices.chromeos.issueCommand",
7350	//   "parameterOrder": [
7351	//     "customerId",
7352	//     "deviceId"
7353	//   ],
7354	//   "parameters": {
7355	//     "customerId": {
7356	//       "description": "Immutable. Immutable ID of the Google Workspace account.",
7357	//       "location": "path",
7358	//       "required": true,
7359	//       "type": "string"
7360	//     },
7361	//     "deviceId": {
7362	//       "description": "Immutable. Immutable ID of Chrome OS Device.",
7363	//       "location": "path",
7364	//       "required": true,
7365	//       "type": "string"
7366	//     }
7367	//   },
7368	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand",
7369	//   "request": {
7370	//     "$ref": "DirectoryChromeosdevicesIssueCommandRequest"
7371	//   },
7372	//   "response": {
7373	//     "$ref": "DirectoryChromeosdevicesIssueCommandResponse"
7374	//   },
7375	//   "scopes": [
7376	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
7377	//   ]
7378	// }
7379
7380}
7381
7382// method id "admin.customer.devices.chromeos.commands.get":
7383
7384type CustomerDevicesChromeosCommandsGetCall struct {
7385	s            *Service
7386	customerId   string
7387	deviceId     string
7388	commandId    int64
7389	urlParams_   gensupport.URLParams
7390	ifNoneMatch_ string
7391	ctx_         context.Context
7392	header_      http.Header
7393}
7394
7395// Get: Gets command data a specific command issued to the device.
7396//
7397// - commandId: Immutable. Immutable ID of Chrome OS Device Command.
7398// - customerId: Immutable. Immutable ID of the Google Workspace
7399//   account.
7400// - deviceId: Immutable. Immutable ID of Chrome OS Device.
7401func (r *CustomerDevicesChromeosCommandsService) Get(customerId string, deviceId string, commandId int64) *CustomerDevicesChromeosCommandsGetCall {
7402	c := &CustomerDevicesChromeosCommandsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7403	c.customerId = customerId
7404	c.deviceId = deviceId
7405	c.commandId = commandId
7406	return c
7407}
7408
7409// Fields allows partial responses to be retrieved. See
7410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7411// for more information.
7412func (c *CustomerDevicesChromeosCommandsGetCall) Fields(s ...googleapi.Field) *CustomerDevicesChromeosCommandsGetCall {
7413	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7414	return c
7415}
7416
7417// IfNoneMatch sets the optional parameter which makes the operation
7418// fail if the object's ETag matches the given value. This is useful for
7419// getting updates only after the object has changed since the last
7420// request. Use googleapi.IsNotModified to check whether the response
7421// error from Do is the result of In-None-Match.
7422func (c *CustomerDevicesChromeosCommandsGetCall) IfNoneMatch(entityTag string) *CustomerDevicesChromeosCommandsGetCall {
7423	c.ifNoneMatch_ = entityTag
7424	return c
7425}
7426
7427// Context sets the context to be used in this call's Do method. Any
7428// pending HTTP request will be aborted if the provided context is
7429// canceled.
7430func (c *CustomerDevicesChromeosCommandsGetCall) Context(ctx context.Context) *CustomerDevicesChromeosCommandsGetCall {
7431	c.ctx_ = ctx
7432	return c
7433}
7434
7435// Header returns an http.Header that can be modified by the caller to
7436// add HTTP headers to the request.
7437func (c *CustomerDevicesChromeosCommandsGetCall) Header() http.Header {
7438	if c.header_ == nil {
7439		c.header_ = make(http.Header)
7440	}
7441	return c.header_
7442}
7443
7444func (c *CustomerDevicesChromeosCommandsGetCall) doRequest(alt string) (*http.Response, error) {
7445	reqHeaders := make(http.Header)
7446	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7447	for k, v := range c.header_ {
7448		reqHeaders[k] = v
7449	}
7450	reqHeaders.Set("User-Agent", c.s.userAgent())
7451	if c.ifNoneMatch_ != "" {
7452		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7453	}
7454	var body io.Reader = nil
7455	c.urlParams_.Set("alt", alt)
7456	c.urlParams_.Set("prettyPrint", "false")
7457	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}")
7458	urls += "?" + c.urlParams_.Encode()
7459	req, err := http.NewRequest("GET", urls, body)
7460	if err != nil {
7461		return nil, err
7462	}
7463	req.Header = reqHeaders
7464	googleapi.Expand(req.URL, map[string]string{
7465		"customerId": c.customerId,
7466		"deviceId":   c.deviceId,
7467		"commandId":  strconv.FormatInt(c.commandId, 10),
7468	})
7469	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7470}
7471
7472// Do executes the "admin.customer.devices.chromeos.commands.get" call.
7473// Exactly one of *DirectoryChromeosdevicesCommand or error will be
7474// non-nil. Any non-2xx status code is an error. Response headers are in
7475// either *DirectoryChromeosdevicesCommand.ServerResponse.Header or (if
7476// a response was returned at all) in error.(*googleapi.Error).Header.
7477// Use googleapi.IsNotModified to check whether the returned error was
7478// because http.StatusNotModified was returned.
7479func (c *CustomerDevicesChromeosCommandsGetCall) Do(opts ...googleapi.CallOption) (*DirectoryChromeosdevicesCommand, error) {
7480	gensupport.SetOptions(c.urlParams_, opts...)
7481	res, err := c.doRequest("json")
7482	if res != nil && res.StatusCode == http.StatusNotModified {
7483		if res.Body != nil {
7484			res.Body.Close()
7485		}
7486		return nil, &googleapi.Error{
7487			Code:   res.StatusCode,
7488			Header: res.Header,
7489		}
7490	}
7491	if err != nil {
7492		return nil, err
7493	}
7494	defer googleapi.CloseBody(res)
7495	if err := googleapi.CheckResponse(res); err != nil {
7496		return nil, err
7497	}
7498	ret := &DirectoryChromeosdevicesCommand{
7499		ServerResponse: googleapi.ServerResponse{
7500			Header:         res.Header,
7501			HTTPStatusCode: res.StatusCode,
7502		},
7503	}
7504	target := &ret
7505	if err := gensupport.DecodeResponse(target, res); err != nil {
7506		return nil, err
7507	}
7508	return ret, nil
7509	// {
7510	//   "description": "Gets command data a specific command issued to the device.",
7511	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}",
7512	//   "httpMethod": "GET",
7513	//   "id": "admin.customer.devices.chromeos.commands.get",
7514	//   "parameterOrder": [
7515	//     "customerId",
7516	//     "deviceId",
7517	//     "commandId"
7518	//   ],
7519	//   "parameters": {
7520	//     "commandId": {
7521	//       "description": "Immutable. Immutable ID of Chrome OS Device Command.",
7522	//       "format": "int64",
7523	//       "location": "path",
7524	//       "required": true,
7525	//       "type": "string"
7526	//     },
7527	//     "customerId": {
7528	//       "description": "Immutable. Immutable ID of the Google Workspace account.",
7529	//       "location": "path",
7530	//       "required": true,
7531	//       "type": "string"
7532	//     },
7533	//     "deviceId": {
7534	//       "description": "Immutable. Immutable ID of Chrome OS Device.",
7535	//       "location": "path",
7536	//       "required": true,
7537	//       "type": "string"
7538	//     }
7539	//   },
7540	//   "path": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}",
7541	//   "response": {
7542	//     "$ref": "DirectoryChromeosdevicesCommand"
7543	//   },
7544	//   "scopes": [
7545	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos",
7546	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
7547	//   ]
7548	// }
7549
7550}
7551
7552// method id "directory.customers.get":
7553
7554type CustomersGetCall struct {
7555	s            *Service
7556	customerKey  string
7557	urlParams_   gensupport.URLParams
7558	ifNoneMatch_ string
7559	ctx_         context.Context
7560	header_      http.Header
7561}
7562
7563// Get: Retrieves a customer.
7564//
7565// - customerKey: Id of the customer to be retrieved.
7566func (r *CustomersService) Get(customerKey string) *CustomersGetCall {
7567	c := &CustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7568	c.customerKey = customerKey
7569	return c
7570}
7571
7572// Fields allows partial responses to be retrieved. See
7573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7574// for more information.
7575func (c *CustomersGetCall) Fields(s ...googleapi.Field) *CustomersGetCall {
7576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7577	return c
7578}
7579
7580// IfNoneMatch sets the optional parameter which makes the operation
7581// fail if the object's ETag matches the given value. This is useful for
7582// getting updates only after the object has changed since the last
7583// request. Use googleapi.IsNotModified to check whether the response
7584// error from Do is the result of In-None-Match.
7585func (c *CustomersGetCall) IfNoneMatch(entityTag string) *CustomersGetCall {
7586	c.ifNoneMatch_ = entityTag
7587	return c
7588}
7589
7590// Context sets the context to be used in this call's Do method. Any
7591// pending HTTP request will be aborted if the provided context is
7592// canceled.
7593func (c *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
7594	c.ctx_ = ctx
7595	return c
7596}
7597
7598// Header returns an http.Header that can be modified by the caller to
7599// add HTTP headers to the request.
7600func (c *CustomersGetCall) Header() http.Header {
7601	if c.header_ == nil {
7602		c.header_ = make(http.Header)
7603	}
7604	return c.header_
7605}
7606
7607func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
7608	reqHeaders := make(http.Header)
7609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7610	for k, v := range c.header_ {
7611		reqHeaders[k] = v
7612	}
7613	reqHeaders.Set("User-Agent", c.s.userAgent())
7614	if c.ifNoneMatch_ != "" {
7615		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7616	}
7617	var body io.Reader = nil
7618	c.urlParams_.Set("alt", alt)
7619	c.urlParams_.Set("prettyPrint", "false")
7620	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
7621	urls += "?" + c.urlParams_.Encode()
7622	req, err := http.NewRequest("GET", urls, body)
7623	if err != nil {
7624		return nil, err
7625	}
7626	req.Header = reqHeaders
7627	googleapi.Expand(req.URL, map[string]string{
7628		"customerKey": c.customerKey,
7629	})
7630	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7631}
7632
7633// Do executes the "directory.customers.get" call.
7634// Exactly one of *Customer or error will be non-nil. Any non-2xx status
7635// code is an error. Response headers are in either
7636// *Customer.ServerResponse.Header or (if a response was returned at
7637// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7638// to check whether the returned error was because
7639// http.StatusNotModified was returned.
7640func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
7641	gensupport.SetOptions(c.urlParams_, opts...)
7642	res, err := c.doRequest("json")
7643	if res != nil && res.StatusCode == http.StatusNotModified {
7644		if res.Body != nil {
7645			res.Body.Close()
7646		}
7647		return nil, &googleapi.Error{
7648			Code:   res.StatusCode,
7649			Header: res.Header,
7650		}
7651	}
7652	if err != nil {
7653		return nil, err
7654	}
7655	defer googleapi.CloseBody(res)
7656	if err := googleapi.CheckResponse(res); err != nil {
7657		return nil, err
7658	}
7659	ret := &Customer{
7660		ServerResponse: googleapi.ServerResponse{
7661			Header:         res.Header,
7662			HTTPStatusCode: res.StatusCode,
7663		},
7664	}
7665	target := &ret
7666	if err := gensupport.DecodeResponse(target, res); err != nil {
7667		return nil, err
7668	}
7669	return ret, nil
7670	// {
7671	//   "description": "Retrieves a customer.",
7672	//   "flatPath": "admin/directory/v1/customers/{customerKey}",
7673	//   "httpMethod": "GET",
7674	//   "id": "directory.customers.get",
7675	//   "parameterOrder": [
7676	//     "customerKey"
7677	//   ],
7678	//   "parameters": {
7679	//     "customerKey": {
7680	//       "description": "Id of the customer to be retrieved",
7681	//       "location": "path",
7682	//       "required": true,
7683	//       "type": "string"
7684	//     }
7685	//   },
7686	//   "path": "admin/directory/v1/customers/{customerKey}",
7687	//   "response": {
7688	//     "$ref": "Customer"
7689	//   },
7690	//   "scopes": [
7691	//     "https://www.googleapis.com/auth/admin.directory.customer",
7692	//     "https://www.googleapis.com/auth/admin.directory.customer.readonly"
7693	//   ]
7694	// }
7695
7696}
7697
7698// method id "directory.customers.patch":
7699
7700type CustomersPatchCall struct {
7701	s           *Service
7702	customerKey string
7703	customer    *Customer
7704	urlParams_  gensupport.URLParams
7705	ctx_        context.Context
7706	header_     http.Header
7707}
7708
7709// Patch: Patches a customer.
7710//
7711// - customerKey: Id of the customer to be updated.
7712func (r *CustomersService) Patch(customerKey string, customer *Customer) *CustomersPatchCall {
7713	c := &CustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7714	c.customerKey = customerKey
7715	c.customer = customer
7716	return c
7717}
7718
7719// Fields allows partial responses to be retrieved. See
7720// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7721// for more information.
7722func (c *CustomersPatchCall) Fields(s ...googleapi.Field) *CustomersPatchCall {
7723	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7724	return c
7725}
7726
7727// Context sets the context to be used in this call's Do method. Any
7728// pending HTTP request will be aborted if the provided context is
7729// canceled.
7730func (c *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
7731	c.ctx_ = ctx
7732	return c
7733}
7734
7735// Header returns an http.Header that can be modified by the caller to
7736// add HTTP headers to the request.
7737func (c *CustomersPatchCall) Header() http.Header {
7738	if c.header_ == nil {
7739		c.header_ = make(http.Header)
7740	}
7741	return c.header_
7742}
7743
7744func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
7745	reqHeaders := make(http.Header)
7746	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7747	for k, v := range c.header_ {
7748		reqHeaders[k] = v
7749	}
7750	reqHeaders.Set("User-Agent", c.s.userAgent())
7751	var body io.Reader = nil
7752	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
7753	if err != nil {
7754		return nil, err
7755	}
7756	reqHeaders.Set("Content-Type", "application/json")
7757	c.urlParams_.Set("alt", alt)
7758	c.urlParams_.Set("prettyPrint", "false")
7759	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
7760	urls += "?" + c.urlParams_.Encode()
7761	req, err := http.NewRequest("PATCH", urls, body)
7762	if err != nil {
7763		return nil, err
7764	}
7765	req.Header = reqHeaders
7766	googleapi.Expand(req.URL, map[string]string{
7767		"customerKey": c.customerKey,
7768	})
7769	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7770}
7771
7772// Do executes the "directory.customers.patch" call.
7773// Exactly one of *Customer or error will be non-nil. Any non-2xx status
7774// code is an error. Response headers are in either
7775// *Customer.ServerResponse.Header or (if a response was returned at
7776// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7777// to check whether the returned error was because
7778// http.StatusNotModified was returned.
7779func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
7780	gensupport.SetOptions(c.urlParams_, opts...)
7781	res, err := c.doRequest("json")
7782	if res != nil && res.StatusCode == http.StatusNotModified {
7783		if res.Body != nil {
7784			res.Body.Close()
7785		}
7786		return nil, &googleapi.Error{
7787			Code:   res.StatusCode,
7788			Header: res.Header,
7789		}
7790	}
7791	if err != nil {
7792		return nil, err
7793	}
7794	defer googleapi.CloseBody(res)
7795	if err := googleapi.CheckResponse(res); err != nil {
7796		return nil, err
7797	}
7798	ret := &Customer{
7799		ServerResponse: googleapi.ServerResponse{
7800			Header:         res.Header,
7801			HTTPStatusCode: res.StatusCode,
7802		},
7803	}
7804	target := &ret
7805	if err := gensupport.DecodeResponse(target, res); err != nil {
7806		return nil, err
7807	}
7808	return ret, nil
7809	// {
7810	//   "description": "Patches a customer.",
7811	//   "flatPath": "admin/directory/v1/customers/{customerKey}",
7812	//   "httpMethod": "PATCH",
7813	//   "id": "directory.customers.patch",
7814	//   "parameterOrder": [
7815	//     "customerKey"
7816	//   ],
7817	//   "parameters": {
7818	//     "customerKey": {
7819	//       "description": "Id of the customer to be updated",
7820	//       "location": "path",
7821	//       "required": true,
7822	//       "type": "string"
7823	//     }
7824	//   },
7825	//   "path": "admin/directory/v1/customers/{customerKey}",
7826	//   "request": {
7827	//     "$ref": "Customer"
7828	//   },
7829	//   "response": {
7830	//     "$ref": "Customer"
7831	//   },
7832	//   "scopes": [
7833	//     "https://www.googleapis.com/auth/admin.directory.customer"
7834	//   ]
7835	// }
7836
7837}
7838
7839// method id "directory.customers.update":
7840
7841type CustomersUpdateCall struct {
7842	s           *Service
7843	customerKey string
7844	customer    *Customer
7845	urlParams_  gensupport.URLParams
7846	ctx_        context.Context
7847	header_     http.Header
7848}
7849
7850// Update: Updates a customer.
7851//
7852// - customerKey: Id of the customer to be updated.
7853func (r *CustomersService) Update(customerKey string, customer *Customer) *CustomersUpdateCall {
7854	c := &CustomersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7855	c.customerKey = customerKey
7856	c.customer = customer
7857	return c
7858}
7859
7860// Fields allows partial responses to be retrieved. See
7861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7862// for more information.
7863func (c *CustomersUpdateCall) Fields(s ...googleapi.Field) *CustomersUpdateCall {
7864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7865	return c
7866}
7867
7868// Context sets the context to be used in this call's Do method. Any
7869// pending HTTP request will be aborted if the provided context is
7870// canceled.
7871func (c *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall {
7872	c.ctx_ = ctx
7873	return c
7874}
7875
7876// Header returns an http.Header that can be modified by the caller to
7877// add HTTP headers to the request.
7878func (c *CustomersUpdateCall) Header() http.Header {
7879	if c.header_ == nil {
7880		c.header_ = make(http.Header)
7881	}
7882	return c.header_
7883}
7884
7885func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) {
7886	reqHeaders := make(http.Header)
7887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
7888	for k, v := range c.header_ {
7889		reqHeaders[k] = v
7890	}
7891	reqHeaders.Set("User-Agent", c.s.userAgent())
7892	var body io.Reader = nil
7893	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
7894	if err != nil {
7895		return nil, err
7896	}
7897	reqHeaders.Set("Content-Type", "application/json")
7898	c.urlParams_.Set("alt", alt)
7899	c.urlParams_.Set("prettyPrint", "false")
7900	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customers/{customerKey}")
7901	urls += "?" + c.urlParams_.Encode()
7902	req, err := http.NewRequest("PUT", urls, body)
7903	if err != nil {
7904		return nil, err
7905	}
7906	req.Header = reqHeaders
7907	googleapi.Expand(req.URL, map[string]string{
7908		"customerKey": c.customerKey,
7909	})
7910	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7911}
7912
7913// Do executes the "directory.customers.update" call.
7914// Exactly one of *Customer or error will be non-nil. Any non-2xx status
7915// code is an error. Response headers are in either
7916// *Customer.ServerResponse.Header or (if a response was returned at
7917// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7918// to check whether the returned error was because
7919// http.StatusNotModified was returned.
7920func (c *CustomersUpdateCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
7921	gensupport.SetOptions(c.urlParams_, opts...)
7922	res, err := c.doRequest("json")
7923	if res != nil && res.StatusCode == http.StatusNotModified {
7924		if res.Body != nil {
7925			res.Body.Close()
7926		}
7927		return nil, &googleapi.Error{
7928			Code:   res.StatusCode,
7929			Header: res.Header,
7930		}
7931	}
7932	if err != nil {
7933		return nil, err
7934	}
7935	defer googleapi.CloseBody(res)
7936	if err := googleapi.CheckResponse(res); err != nil {
7937		return nil, err
7938	}
7939	ret := &Customer{
7940		ServerResponse: googleapi.ServerResponse{
7941			Header:         res.Header,
7942			HTTPStatusCode: res.StatusCode,
7943		},
7944	}
7945	target := &ret
7946	if err := gensupport.DecodeResponse(target, res); err != nil {
7947		return nil, err
7948	}
7949	return ret, nil
7950	// {
7951	//   "description": "Updates a customer.",
7952	//   "flatPath": "admin/directory/v1/customers/{customerKey}",
7953	//   "httpMethod": "PUT",
7954	//   "id": "directory.customers.update",
7955	//   "parameterOrder": [
7956	//     "customerKey"
7957	//   ],
7958	//   "parameters": {
7959	//     "customerKey": {
7960	//       "description": "Id of the customer to be updated",
7961	//       "location": "path",
7962	//       "required": true,
7963	//       "type": "string"
7964	//     }
7965	//   },
7966	//   "path": "admin/directory/v1/customers/{customerKey}",
7967	//   "request": {
7968	//     "$ref": "Customer"
7969	//   },
7970	//   "response": {
7971	//     "$ref": "Customer"
7972	//   },
7973	//   "scopes": [
7974	//     "https://www.googleapis.com/auth/admin.directory.customer"
7975	//   ]
7976	// }
7977
7978}
7979
7980// method id "admin.customers.chrome.printers.batchCreatePrinters":
7981
7982type CustomersChromePrintersBatchCreatePrintersCall struct {
7983	s                          *Service
7984	parent                     string
7985	batchcreateprintersrequest *BatchCreatePrintersRequest
7986	urlParams_                 gensupport.URLParams
7987	ctx_                       context.Context
7988	header_                    http.Header
7989}
7990
7991// BatchCreatePrinters: Creates printers under given Organization Unit.
7992//
7993// - parent: The name of the customer. Format: customers/{customer_id}.
7994func (r *CustomersChromePrintersService) BatchCreatePrinters(parent string, batchcreateprintersrequest *BatchCreatePrintersRequest) *CustomersChromePrintersBatchCreatePrintersCall {
7995	c := &CustomersChromePrintersBatchCreatePrintersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7996	c.parent = parent
7997	c.batchcreateprintersrequest = batchcreateprintersrequest
7998	return c
7999}
8000
8001// Fields allows partial responses to be retrieved. See
8002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8003// for more information.
8004func (c *CustomersChromePrintersBatchCreatePrintersCall) Fields(s ...googleapi.Field) *CustomersChromePrintersBatchCreatePrintersCall {
8005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8006	return c
8007}
8008
8009// Context sets the context to be used in this call's Do method. Any
8010// pending HTTP request will be aborted if the provided context is
8011// canceled.
8012func (c *CustomersChromePrintersBatchCreatePrintersCall) Context(ctx context.Context) *CustomersChromePrintersBatchCreatePrintersCall {
8013	c.ctx_ = ctx
8014	return c
8015}
8016
8017// Header returns an http.Header that can be modified by the caller to
8018// add HTTP headers to the request.
8019func (c *CustomersChromePrintersBatchCreatePrintersCall) Header() http.Header {
8020	if c.header_ == nil {
8021		c.header_ = make(http.Header)
8022	}
8023	return c.header_
8024}
8025
8026func (c *CustomersChromePrintersBatchCreatePrintersCall) doRequest(alt string) (*http.Response, error) {
8027	reqHeaders := make(http.Header)
8028	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8029	for k, v := range c.header_ {
8030		reqHeaders[k] = v
8031	}
8032	reqHeaders.Set("User-Agent", c.s.userAgent())
8033	var body io.Reader = nil
8034	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateprintersrequest)
8035	if err != nil {
8036		return nil, err
8037	}
8038	reqHeaders.Set("Content-Type", "application/json")
8039	c.urlParams_.Set("alt", alt)
8040	c.urlParams_.Set("prettyPrint", "false")
8041	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters")
8042	urls += "?" + c.urlParams_.Encode()
8043	req, err := http.NewRequest("POST", urls, body)
8044	if err != nil {
8045		return nil, err
8046	}
8047	req.Header = reqHeaders
8048	googleapi.Expand(req.URL, map[string]string{
8049		"parent": c.parent,
8050	})
8051	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8052}
8053
8054// Do executes the "admin.customers.chrome.printers.batchCreatePrinters" call.
8055// Exactly one of *BatchCreatePrintersResponse or error will be non-nil.
8056// Any non-2xx status code is an error. Response headers are in either
8057// *BatchCreatePrintersResponse.ServerResponse.Header or (if a response
8058// was returned at all) in error.(*googleapi.Error).Header. Use
8059// googleapi.IsNotModified to check whether the returned error was
8060// because http.StatusNotModified was returned.
8061func (c *CustomersChromePrintersBatchCreatePrintersCall) Do(opts ...googleapi.CallOption) (*BatchCreatePrintersResponse, error) {
8062	gensupport.SetOptions(c.urlParams_, opts...)
8063	res, err := c.doRequest("json")
8064	if res != nil && res.StatusCode == http.StatusNotModified {
8065		if res.Body != nil {
8066			res.Body.Close()
8067		}
8068		return nil, &googleapi.Error{
8069			Code:   res.StatusCode,
8070			Header: res.Header,
8071		}
8072	}
8073	if err != nil {
8074		return nil, err
8075	}
8076	defer googleapi.CloseBody(res)
8077	if err := googleapi.CheckResponse(res); err != nil {
8078		return nil, err
8079	}
8080	ret := &BatchCreatePrintersResponse{
8081		ServerResponse: googleapi.ServerResponse{
8082			Header:         res.Header,
8083			HTTPStatusCode: res.StatusCode,
8084		},
8085	}
8086	target := &ret
8087	if err := gensupport.DecodeResponse(target, res); err != nil {
8088		return nil, err
8089	}
8090	return ret, nil
8091	// {
8092	//   "description": "Creates printers under given Organization Unit.",
8093	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:batchCreatePrinters",
8094	//   "httpMethod": "POST",
8095	//   "id": "admin.customers.chrome.printers.batchCreatePrinters",
8096	//   "parameterOrder": [
8097	//     "parent"
8098	//   ],
8099	//   "parameters": {
8100	//     "parent": {
8101	//       "description": "Required. The name of the customer. Format: customers/{customer_id}",
8102	//       "location": "path",
8103	//       "pattern": "^customers/[^/]+$",
8104	//       "required": true,
8105	//       "type": "string"
8106	//     }
8107	//   },
8108	//   "path": "admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters",
8109	//   "request": {
8110	//     "$ref": "BatchCreatePrintersRequest"
8111	//   },
8112	//   "response": {
8113	//     "$ref": "BatchCreatePrintersResponse"
8114	//   },
8115	//   "scopes": [
8116	//     "https://www.googleapis.com/auth/admin.chrome.printers"
8117	//   ]
8118	// }
8119
8120}
8121
8122// method id "admin.customers.chrome.printers.batchDeletePrinters":
8123
8124type CustomersChromePrintersBatchDeletePrintersCall struct {
8125	s                          *Service
8126	parent                     string
8127	batchdeleteprintersrequest *BatchDeletePrintersRequest
8128	urlParams_                 gensupport.URLParams
8129	ctx_                       context.Context
8130	header_                    http.Header
8131}
8132
8133// BatchDeletePrinters: Deletes printers in batch.
8134//
8135// - parent: The name of the customer. Format: customers/{customer_id}.
8136func (r *CustomersChromePrintersService) BatchDeletePrinters(parent string, batchdeleteprintersrequest *BatchDeletePrintersRequest) *CustomersChromePrintersBatchDeletePrintersCall {
8137	c := &CustomersChromePrintersBatchDeletePrintersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8138	c.parent = parent
8139	c.batchdeleteprintersrequest = batchdeleteprintersrequest
8140	return c
8141}
8142
8143// Fields allows partial responses to be retrieved. See
8144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8145// for more information.
8146func (c *CustomersChromePrintersBatchDeletePrintersCall) Fields(s ...googleapi.Field) *CustomersChromePrintersBatchDeletePrintersCall {
8147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8148	return c
8149}
8150
8151// Context sets the context to be used in this call's Do method. Any
8152// pending HTTP request will be aborted if the provided context is
8153// canceled.
8154func (c *CustomersChromePrintersBatchDeletePrintersCall) Context(ctx context.Context) *CustomersChromePrintersBatchDeletePrintersCall {
8155	c.ctx_ = ctx
8156	return c
8157}
8158
8159// Header returns an http.Header that can be modified by the caller to
8160// add HTTP headers to the request.
8161func (c *CustomersChromePrintersBatchDeletePrintersCall) Header() http.Header {
8162	if c.header_ == nil {
8163		c.header_ = make(http.Header)
8164	}
8165	return c.header_
8166}
8167
8168func (c *CustomersChromePrintersBatchDeletePrintersCall) doRequest(alt string) (*http.Response, error) {
8169	reqHeaders := make(http.Header)
8170	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8171	for k, v := range c.header_ {
8172		reqHeaders[k] = v
8173	}
8174	reqHeaders.Set("User-Agent", c.s.userAgent())
8175	var body io.Reader = nil
8176	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeleteprintersrequest)
8177	if err != nil {
8178		return nil, err
8179	}
8180	reqHeaders.Set("Content-Type", "application/json")
8181	c.urlParams_.Set("alt", alt)
8182	c.urlParams_.Set("prettyPrint", "false")
8183	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters")
8184	urls += "?" + c.urlParams_.Encode()
8185	req, err := http.NewRequest("POST", urls, body)
8186	if err != nil {
8187		return nil, err
8188	}
8189	req.Header = reqHeaders
8190	googleapi.Expand(req.URL, map[string]string{
8191		"parent": c.parent,
8192	})
8193	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8194}
8195
8196// Do executes the "admin.customers.chrome.printers.batchDeletePrinters" call.
8197// Exactly one of *BatchDeletePrintersResponse or error will be non-nil.
8198// Any non-2xx status code is an error. Response headers are in either
8199// *BatchDeletePrintersResponse.ServerResponse.Header or (if a response
8200// was returned at all) in error.(*googleapi.Error).Header. Use
8201// googleapi.IsNotModified to check whether the returned error was
8202// because http.StatusNotModified was returned.
8203func (c *CustomersChromePrintersBatchDeletePrintersCall) Do(opts ...googleapi.CallOption) (*BatchDeletePrintersResponse, error) {
8204	gensupport.SetOptions(c.urlParams_, opts...)
8205	res, err := c.doRequest("json")
8206	if res != nil && res.StatusCode == http.StatusNotModified {
8207		if res.Body != nil {
8208			res.Body.Close()
8209		}
8210		return nil, &googleapi.Error{
8211			Code:   res.StatusCode,
8212			Header: res.Header,
8213		}
8214	}
8215	if err != nil {
8216		return nil, err
8217	}
8218	defer googleapi.CloseBody(res)
8219	if err := googleapi.CheckResponse(res); err != nil {
8220		return nil, err
8221	}
8222	ret := &BatchDeletePrintersResponse{
8223		ServerResponse: googleapi.ServerResponse{
8224			Header:         res.Header,
8225			HTTPStatusCode: res.StatusCode,
8226		},
8227	}
8228	target := &ret
8229	if err := gensupport.DecodeResponse(target, res); err != nil {
8230		return nil, err
8231	}
8232	return ret, nil
8233	// {
8234	//   "description": "Deletes printers in batch.",
8235	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:batchDeletePrinters",
8236	//   "httpMethod": "POST",
8237	//   "id": "admin.customers.chrome.printers.batchDeletePrinters",
8238	//   "parameterOrder": [
8239	//     "parent"
8240	//   ],
8241	//   "parameters": {
8242	//     "parent": {
8243	//       "description": "Required. The name of the customer. Format: customers/{customer_id}",
8244	//       "location": "path",
8245	//       "pattern": "^customers/[^/]+$",
8246	//       "required": true,
8247	//       "type": "string"
8248	//     }
8249	//   },
8250	//   "path": "admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters",
8251	//   "request": {
8252	//     "$ref": "BatchDeletePrintersRequest"
8253	//   },
8254	//   "response": {
8255	//     "$ref": "BatchDeletePrintersResponse"
8256	//   },
8257	//   "scopes": [
8258	//     "https://www.googleapis.com/auth/admin.chrome.printers"
8259	//   ]
8260	// }
8261
8262}
8263
8264// method id "admin.customers.chrome.printers.create":
8265
8266type CustomersChromePrintersCreateCall struct {
8267	s          *Service
8268	parent     string
8269	printer    *Printer
8270	urlParams_ gensupport.URLParams
8271	ctx_       context.Context
8272	header_    http.Header
8273}
8274
8275// Create: Creates a printer under given Organization Unit.
8276//
8277// - parent: The name of the customer. Format: customers/{customer_id}.
8278func (r *CustomersChromePrintersService) Create(parent string, printer *Printer) *CustomersChromePrintersCreateCall {
8279	c := &CustomersChromePrintersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8280	c.parent = parent
8281	c.printer = printer
8282	return c
8283}
8284
8285// Fields allows partial responses to be retrieved. See
8286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8287// for more information.
8288func (c *CustomersChromePrintersCreateCall) Fields(s ...googleapi.Field) *CustomersChromePrintersCreateCall {
8289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8290	return c
8291}
8292
8293// Context sets the context to be used in this call's Do method. Any
8294// pending HTTP request will be aborted if the provided context is
8295// canceled.
8296func (c *CustomersChromePrintersCreateCall) Context(ctx context.Context) *CustomersChromePrintersCreateCall {
8297	c.ctx_ = ctx
8298	return c
8299}
8300
8301// Header returns an http.Header that can be modified by the caller to
8302// add HTTP headers to the request.
8303func (c *CustomersChromePrintersCreateCall) Header() http.Header {
8304	if c.header_ == nil {
8305		c.header_ = make(http.Header)
8306	}
8307	return c.header_
8308}
8309
8310func (c *CustomersChromePrintersCreateCall) doRequest(alt string) (*http.Response, error) {
8311	reqHeaders := make(http.Header)
8312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8313	for k, v := range c.header_ {
8314		reqHeaders[k] = v
8315	}
8316	reqHeaders.Set("User-Agent", c.s.userAgent())
8317	var body io.Reader = nil
8318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.printer)
8319	if err != nil {
8320		return nil, err
8321	}
8322	reqHeaders.Set("Content-Type", "application/json")
8323	c.urlParams_.Set("alt", alt)
8324	c.urlParams_.Set("prettyPrint", "false")
8325	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers")
8326	urls += "?" + c.urlParams_.Encode()
8327	req, err := http.NewRequest("POST", urls, body)
8328	if err != nil {
8329		return nil, err
8330	}
8331	req.Header = reqHeaders
8332	googleapi.Expand(req.URL, map[string]string{
8333		"parent": c.parent,
8334	})
8335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8336}
8337
8338// Do executes the "admin.customers.chrome.printers.create" call.
8339// Exactly one of *Printer or error will be non-nil. Any non-2xx status
8340// code is an error. Response headers are in either
8341// *Printer.ServerResponse.Header or (if a response was returned at all)
8342// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8343// check whether the returned error was because http.StatusNotModified
8344// was returned.
8345func (c *CustomersChromePrintersCreateCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
8346	gensupport.SetOptions(c.urlParams_, opts...)
8347	res, err := c.doRequest("json")
8348	if res != nil && res.StatusCode == http.StatusNotModified {
8349		if res.Body != nil {
8350			res.Body.Close()
8351		}
8352		return nil, &googleapi.Error{
8353			Code:   res.StatusCode,
8354			Header: res.Header,
8355		}
8356	}
8357	if err != nil {
8358		return nil, err
8359	}
8360	defer googleapi.CloseBody(res)
8361	if err := googleapi.CheckResponse(res); err != nil {
8362		return nil, err
8363	}
8364	ret := &Printer{
8365		ServerResponse: googleapi.ServerResponse{
8366			Header:         res.Header,
8367			HTTPStatusCode: res.StatusCode,
8368		},
8369	}
8370	target := &ret
8371	if err := gensupport.DecodeResponse(target, res); err != nil {
8372		return nil, err
8373	}
8374	return ret, nil
8375	// {
8376	//   "description": "Creates a printer under given Organization Unit.",
8377	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers",
8378	//   "httpMethod": "POST",
8379	//   "id": "admin.customers.chrome.printers.create",
8380	//   "parameterOrder": [
8381	//     "parent"
8382	//   ],
8383	//   "parameters": {
8384	//     "parent": {
8385	//       "description": "Required. The name of the customer. Format: customers/{customer_id}",
8386	//       "location": "path",
8387	//       "pattern": "^customers/[^/]+$",
8388	//       "required": true,
8389	//       "type": "string"
8390	//     }
8391	//   },
8392	//   "path": "admin/directory/v1/{+parent}/chrome/printers",
8393	//   "request": {
8394	//     "$ref": "Printer"
8395	//   },
8396	//   "response": {
8397	//     "$ref": "Printer"
8398	//   },
8399	//   "scopes": [
8400	//     "https://www.googleapis.com/auth/admin.chrome.printers"
8401	//   ]
8402	// }
8403
8404}
8405
8406// method id "admin.customers.chrome.printers.delete":
8407
8408type CustomersChromePrintersDeleteCall struct {
8409	s          *Service
8410	name       string
8411	urlParams_ gensupport.URLParams
8412	ctx_       context.Context
8413	header_    http.Header
8414}
8415
8416// Delete: Deletes a `Printer`.
8417//
8418// - name: The name of the printer to be updated. Format:
8419//   customers/{customer_id}/chrome/printers/{printer_id}.
8420func (r *CustomersChromePrintersService) Delete(name string) *CustomersChromePrintersDeleteCall {
8421	c := &CustomersChromePrintersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8422	c.name = name
8423	return c
8424}
8425
8426// Fields allows partial responses to be retrieved. See
8427// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8428// for more information.
8429func (c *CustomersChromePrintersDeleteCall) Fields(s ...googleapi.Field) *CustomersChromePrintersDeleteCall {
8430	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8431	return c
8432}
8433
8434// Context sets the context to be used in this call's Do method. Any
8435// pending HTTP request will be aborted if the provided context is
8436// canceled.
8437func (c *CustomersChromePrintersDeleteCall) Context(ctx context.Context) *CustomersChromePrintersDeleteCall {
8438	c.ctx_ = ctx
8439	return c
8440}
8441
8442// Header returns an http.Header that can be modified by the caller to
8443// add HTTP headers to the request.
8444func (c *CustomersChromePrintersDeleteCall) Header() http.Header {
8445	if c.header_ == nil {
8446		c.header_ = make(http.Header)
8447	}
8448	return c.header_
8449}
8450
8451func (c *CustomersChromePrintersDeleteCall) doRequest(alt string) (*http.Response, error) {
8452	reqHeaders := make(http.Header)
8453	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8454	for k, v := range c.header_ {
8455		reqHeaders[k] = v
8456	}
8457	reqHeaders.Set("User-Agent", c.s.userAgent())
8458	var body io.Reader = nil
8459	c.urlParams_.Set("alt", alt)
8460	c.urlParams_.Set("prettyPrint", "false")
8461	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
8462	urls += "?" + c.urlParams_.Encode()
8463	req, err := http.NewRequest("DELETE", urls, body)
8464	if err != nil {
8465		return nil, err
8466	}
8467	req.Header = reqHeaders
8468	googleapi.Expand(req.URL, map[string]string{
8469		"name": c.name,
8470	})
8471	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8472}
8473
8474// Do executes the "admin.customers.chrome.printers.delete" call.
8475// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8476// code is an error. Response headers are in either
8477// *Empty.ServerResponse.Header or (if a response was returned at all)
8478// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8479// check whether the returned error was because http.StatusNotModified
8480// was returned.
8481func (c *CustomersChromePrintersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8482	gensupport.SetOptions(c.urlParams_, opts...)
8483	res, err := c.doRequest("json")
8484	if res != nil && res.StatusCode == http.StatusNotModified {
8485		if res.Body != nil {
8486			res.Body.Close()
8487		}
8488		return nil, &googleapi.Error{
8489			Code:   res.StatusCode,
8490			Header: res.Header,
8491		}
8492	}
8493	if err != nil {
8494		return nil, err
8495	}
8496	defer googleapi.CloseBody(res)
8497	if err := googleapi.CheckResponse(res); err != nil {
8498		return nil, err
8499	}
8500	ret := &Empty{
8501		ServerResponse: googleapi.ServerResponse{
8502			Header:         res.Header,
8503			HTTPStatusCode: res.StatusCode,
8504		},
8505	}
8506	target := &ret
8507	if err := gensupport.DecodeResponse(target, res); err != nil {
8508		return nil, err
8509	}
8510	return ret, nil
8511	// {
8512	//   "description": "Deletes a `Printer`.",
8513	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}",
8514	//   "httpMethod": "DELETE",
8515	//   "id": "admin.customers.chrome.printers.delete",
8516	//   "parameterOrder": [
8517	//     "name"
8518	//   ],
8519	//   "parameters": {
8520	//     "name": {
8521	//       "description": "Required. The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id}",
8522	//       "location": "path",
8523	//       "pattern": "^customers/[^/]+/chrome/printers/[^/]+$",
8524	//       "required": true,
8525	//       "type": "string"
8526	//     }
8527	//   },
8528	//   "path": "admin/directory/v1/{+name}",
8529	//   "response": {
8530	//     "$ref": "Empty"
8531	//   },
8532	//   "scopes": [
8533	//     "https://www.googleapis.com/auth/admin.chrome.printers"
8534	//   ]
8535	// }
8536
8537}
8538
8539// method id "admin.customers.chrome.printers.get":
8540
8541type CustomersChromePrintersGetCall struct {
8542	s            *Service
8543	name         string
8544	urlParams_   gensupport.URLParams
8545	ifNoneMatch_ string
8546	ctx_         context.Context
8547	header_      http.Header
8548}
8549
8550// Get: Returns a `Printer` resource (printer's config).
8551//
8552// - name: The name of the printer to retrieve. Format:
8553//   customers/{customer_id}/chrome/printers/{printer_id}.
8554func (r *CustomersChromePrintersService) Get(name string) *CustomersChromePrintersGetCall {
8555	c := &CustomersChromePrintersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8556	c.name = name
8557	return c
8558}
8559
8560// Fields allows partial responses to be retrieved. See
8561// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8562// for more information.
8563func (c *CustomersChromePrintersGetCall) Fields(s ...googleapi.Field) *CustomersChromePrintersGetCall {
8564	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8565	return c
8566}
8567
8568// IfNoneMatch sets the optional parameter which makes the operation
8569// fail if the object's ETag matches the given value. This is useful for
8570// getting updates only after the object has changed since the last
8571// request. Use googleapi.IsNotModified to check whether the response
8572// error from Do is the result of In-None-Match.
8573func (c *CustomersChromePrintersGetCall) IfNoneMatch(entityTag string) *CustomersChromePrintersGetCall {
8574	c.ifNoneMatch_ = entityTag
8575	return c
8576}
8577
8578// Context sets the context to be used in this call's Do method. Any
8579// pending HTTP request will be aborted if the provided context is
8580// canceled.
8581func (c *CustomersChromePrintersGetCall) Context(ctx context.Context) *CustomersChromePrintersGetCall {
8582	c.ctx_ = ctx
8583	return c
8584}
8585
8586// Header returns an http.Header that can be modified by the caller to
8587// add HTTP headers to the request.
8588func (c *CustomersChromePrintersGetCall) Header() http.Header {
8589	if c.header_ == nil {
8590		c.header_ = make(http.Header)
8591	}
8592	return c.header_
8593}
8594
8595func (c *CustomersChromePrintersGetCall) doRequest(alt string) (*http.Response, error) {
8596	reqHeaders := make(http.Header)
8597	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8598	for k, v := range c.header_ {
8599		reqHeaders[k] = v
8600	}
8601	reqHeaders.Set("User-Agent", c.s.userAgent())
8602	if c.ifNoneMatch_ != "" {
8603		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8604	}
8605	var body io.Reader = nil
8606	c.urlParams_.Set("alt", alt)
8607	c.urlParams_.Set("prettyPrint", "false")
8608	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
8609	urls += "?" + c.urlParams_.Encode()
8610	req, err := http.NewRequest("GET", urls, body)
8611	if err != nil {
8612		return nil, err
8613	}
8614	req.Header = reqHeaders
8615	googleapi.Expand(req.URL, map[string]string{
8616		"name": c.name,
8617	})
8618	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8619}
8620
8621// Do executes the "admin.customers.chrome.printers.get" call.
8622// Exactly one of *Printer or error will be non-nil. Any non-2xx status
8623// code is an error. Response headers are in either
8624// *Printer.ServerResponse.Header or (if a response was returned at all)
8625// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8626// check whether the returned error was because http.StatusNotModified
8627// was returned.
8628func (c *CustomersChromePrintersGetCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
8629	gensupport.SetOptions(c.urlParams_, opts...)
8630	res, err := c.doRequest("json")
8631	if res != nil && res.StatusCode == http.StatusNotModified {
8632		if res.Body != nil {
8633			res.Body.Close()
8634		}
8635		return nil, &googleapi.Error{
8636			Code:   res.StatusCode,
8637			Header: res.Header,
8638		}
8639	}
8640	if err != nil {
8641		return nil, err
8642	}
8643	defer googleapi.CloseBody(res)
8644	if err := googleapi.CheckResponse(res); err != nil {
8645		return nil, err
8646	}
8647	ret := &Printer{
8648		ServerResponse: googleapi.ServerResponse{
8649			Header:         res.Header,
8650			HTTPStatusCode: res.StatusCode,
8651		},
8652	}
8653	target := &ret
8654	if err := gensupport.DecodeResponse(target, res); err != nil {
8655		return nil, err
8656	}
8657	return ret, nil
8658	// {
8659	//   "description": "Returns a `Printer` resource (printer's config).",
8660	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}",
8661	//   "httpMethod": "GET",
8662	//   "id": "admin.customers.chrome.printers.get",
8663	//   "parameterOrder": [
8664	//     "name"
8665	//   ],
8666	//   "parameters": {
8667	//     "name": {
8668	//       "description": "Required. The name of the printer to retrieve. Format: customers/{customer_id}/chrome/printers/{printer_id}",
8669	//       "location": "path",
8670	//       "pattern": "^customers/[^/]+/chrome/printers/[^/]+$",
8671	//       "required": true,
8672	//       "type": "string"
8673	//     }
8674	//   },
8675	//   "path": "admin/directory/v1/{+name}",
8676	//   "response": {
8677	//     "$ref": "Printer"
8678	//   },
8679	//   "scopes": [
8680	//     "https://www.googleapis.com/auth/admin.chrome.printers",
8681	//     "https://www.googleapis.com/auth/admin.chrome.printers.readonly"
8682	//   ]
8683	// }
8684
8685}
8686
8687// method id "admin.customers.chrome.printers.list":
8688
8689type CustomersChromePrintersListCall struct {
8690	s            *Service
8691	parent       string
8692	urlParams_   gensupport.URLParams
8693	ifNoneMatch_ string
8694	ctx_         context.Context
8695	header_      http.Header
8696}
8697
8698// List: List printers configs.
8699//
8700// - parent: The name of the customer who owns this collection of
8701//   printers. Format: customers/{customer_id}.
8702func (r *CustomersChromePrintersService) List(parent string) *CustomersChromePrintersListCall {
8703	c := &CustomersChromePrintersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8704	c.parent = parent
8705	return c
8706}
8707
8708// Filter sets the optional parameter "filter": Search query. Search
8709// syntax is shared between this api and Admin Console printers pages.
8710func (c *CustomersChromePrintersListCall) Filter(filter string) *CustomersChromePrintersListCall {
8711	c.urlParams_.Set("filter", filter)
8712	return c
8713}
8714
8715// OrgUnitId sets the optional parameter "orgUnitId": Organization Unit
8716// that we want to list the printers for. When org_unit is not present
8717// in the request then all printers of the customer are returned (or
8718// filtered). When org_unit is present in the request then only printers
8719// available to this OU will be returned (owned or inherited). You may
8720// see if printer is owned or inherited for this OU by looking at
8721// Printer.org_unit_id.
8722func (c *CustomersChromePrintersListCall) OrgUnitId(orgUnitId string) *CustomersChromePrintersListCall {
8723	c.urlParams_.Set("orgUnitId", orgUnitId)
8724	return c
8725}
8726
8727// PageSize sets the optional parameter "pageSize": The maximum number
8728// of objects to return. The service may return fewer than this value.
8729func (c *CustomersChromePrintersListCall) PageSize(pageSize int64) *CustomersChromePrintersListCall {
8730	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8731	return c
8732}
8733
8734// PageToken sets the optional parameter "pageToken": A page token,
8735// received from a previous call.
8736func (c *CustomersChromePrintersListCall) PageToken(pageToken string) *CustomersChromePrintersListCall {
8737	c.urlParams_.Set("pageToken", pageToken)
8738	return c
8739}
8740
8741// Fields allows partial responses to be retrieved. See
8742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8743// for more information.
8744func (c *CustomersChromePrintersListCall) Fields(s ...googleapi.Field) *CustomersChromePrintersListCall {
8745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8746	return c
8747}
8748
8749// IfNoneMatch sets the optional parameter which makes the operation
8750// fail if the object's ETag matches the given value. This is useful for
8751// getting updates only after the object has changed since the last
8752// request. Use googleapi.IsNotModified to check whether the response
8753// error from Do is the result of In-None-Match.
8754func (c *CustomersChromePrintersListCall) IfNoneMatch(entityTag string) *CustomersChromePrintersListCall {
8755	c.ifNoneMatch_ = entityTag
8756	return c
8757}
8758
8759// Context sets the context to be used in this call's Do method. Any
8760// pending HTTP request will be aborted if the provided context is
8761// canceled.
8762func (c *CustomersChromePrintersListCall) Context(ctx context.Context) *CustomersChromePrintersListCall {
8763	c.ctx_ = ctx
8764	return c
8765}
8766
8767// Header returns an http.Header that can be modified by the caller to
8768// add HTTP headers to the request.
8769func (c *CustomersChromePrintersListCall) Header() http.Header {
8770	if c.header_ == nil {
8771		c.header_ = make(http.Header)
8772	}
8773	return c.header_
8774}
8775
8776func (c *CustomersChromePrintersListCall) doRequest(alt string) (*http.Response, error) {
8777	reqHeaders := make(http.Header)
8778	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8779	for k, v := range c.header_ {
8780		reqHeaders[k] = v
8781	}
8782	reqHeaders.Set("User-Agent", c.s.userAgent())
8783	if c.ifNoneMatch_ != "" {
8784		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8785	}
8786	var body io.Reader = nil
8787	c.urlParams_.Set("alt", alt)
8788	c.urlParams_.Set("prettyPrint", "false")
8789	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers")
8790	urls += "?" + c.urlParams_.Encode()
8791	req, err := http.NewRequest("GET", urls, body)
8792	if err != nil {
8793		return nil, err
8794	}
8795	req.Header = reqHeaders
8796	googleapi.Expand(req.URL, map[string]string{
8797		"parent": c.parent,
8798	})
8799	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8800}
8801
8802// Do executes the "admin.customers.chrome.printers.list" call.
8803// Exactly one of *ListPrintersResponse or error will be non-nil. Any
8804// non-2xx status code is an error. Response headers are in either
8805// *ListPrintersResponse.ServerResponse.Header or (if a response was
8806// returned at all) in error.(*googleapi.Error).Header. Use
8807// googleapi.IsNotModified to check whether the returned error was
8808// because http.StatusNotModified was returned.
8809func (c *CustomersChromePrintersListCall) Do(opts ...googleapi.CallOption) (*ListPrintersResponse, error) {
8810	gensupport.SetOptions(c.urlParams_, opts...)
8811	res, err := c.doRequest("json")
8812	if res != nil && res.StatusCode == http.StatusNotModified {
8813		if res.Body != nil {
8814			res.Body.Close()
8815		}
8816		return nil, &googleapi.Error{
8817			Code:   res.StatusCode,
8818			Header: res.Header,
8819		}
8820	}
8821	if err != nil {
8822		return nil, err
8823	}
8824	defer googleapi.CloseBody(res)
8825	if err := googleapi.CheckResponse(res); err != nil {
8826		return nil, err
8827	}
8828	ret := &ListPrintersResponse{
8829		ServerResponse: googleapi.ServerResponse{
8830			Header:         res.Header,
8831			HTTPStatusCode: res.StatusCode,
8832		},
8833	}
8834	target := &ret
8835	if err := gensupport.DecodeResponse(target, res); err != nil {
8836		return nil, err
8837	}
8838	return ret, nil
8839	// {
8840	//   "description": "List printers configs.",
8841	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers",
8842	//   "httpMethod": "GET",
8843	//   "id": "admin.customers.chrome.printers.list",
8844	//   "parameterOrder": [
8845	//     "parent"
8846	//   ],
8847	//   "parameters": {
8848	//     "filter": {
8849	//       "description": "Search query. Search syntax is shared between this api and Admin Console printers pages.",
8850	//       "location": "query",
8851	//       "type": "string"
8852	//     },
8853	//     "orgUnitId": {
8854	//       "description": "Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.",
8855	//       "location": "query",
8856	//       "type": "string"
8857	//     },
8858	//     "pageSize": {
8859	//       "description": "The maximum number of objects to return. The service may return fewer than this value.",
8860	//       "format": "int32",
8861	//       "location": "query",
8862	//       "type": "integer"
8863	//     },
8864	//     "pageToken": {
8865	//       "description": "A page token, received from a previous call.",
8866	//       "location": "query",
8867	//       "type": "string"
8868	//     },
8869	//     "parent": {
8870	//       "description": "Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}",
8871	//       "location": "path",
8872	//       "pattern": "^customers/[^/]+$",
8873	//       "required": true,
8874	//       "type": "string"
8875	//     }
8876	//   },
8877	//   "path": "admin/directory/v1/{+parent}/chrome/printers",
8878	//   "response": {
8879	//     "$ref": "ListPrintersResponse"
8880	//   },
8881	//   "scopes": [
8882	//     "https://www.googleapis.com/auth/admin.chrome.printers",
8883	//     "https://www.googleapis.com/auth/admin.chrome.printers.readonly"
8884	//   ]
8885	// }
8886
8887}
8888
8889// Pages invokes f for each page of results.
8890// A non-nil error returned from f will halt the iteration.
8891// The provided context supersedes any context provided to the Context method.
8892func (c *CustomersChromePrintersListCall) Pages(ctx context.Context, f func(*ListPrintersResponse) error) error {
8893	c.ctx_ = ctx
8894	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8895	for {
8896		x, err := c.Do()
8897		if err != nil {
8898			return err
8899		}
8900		if err := f(x); err != nil {
8901			return err
8902		}
8903		if x.NextPageToken == "" {
8904			return nil
8905		}
8906		c.PageToken(x.NextPageToken)
8907	}
8908}
8909
8910// method id "admin.customers.chrome.printers.listPrinterModels":
8911
8912type CustomersChromePrintersListPrinterModelsCall struct {
8913	s            *Service
8914	parent       string
8915	urlParams_   gensupport.URLParams
8916	ifNoneMatch_ string
8917	ctx_         context.Context
8918	header_      http.Header
8919}
8920
8921// ListPrinterModels: Lists the supported printer models.
8922//
8923// - parent: The name of the customer who owns this collection of
8924//   printers. Format: customers/{customer_id}.
8925func (r *CustomersChromePrintersService) ListPrinterModels(parent string) *CustomersChromePrintersListPrinterModelsCall {
8926	c := &CustomersChromePrintersListPrinterModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8927	c.parent = parent
8928	return c
8929}
8930
8931// Filter sets the optional parameter "filter": Filer to list only
8932// models by a given manufacturer in format: "manufacturer:Brother".
8933// Search syntax is shared between this api and Admin Console printers
8934// pages.
8935func (c *CustomersChromePrintersListPrinterModelsCall) Filter(filter string) *CustomersChromePrintersListPrinterModelsCall {
8936	c.urlParams_.Set("filter", filter)
8937	return c
8938}
8939
8940// PageSize sets the optional parameter "pageSize": The maximum number
8941// of objects to return. The service may return fewer than this value.
8942func (c *CustomersChromePrintersListPrinterModelsCall) PageSize(pageSize int64) *CustomersChromePrintersListPrinterModelsCall {
8943	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8944	return c
8945}
8946
8947// PageToken sets the optional parameter "pageToken": A page token,
8948// received from a previous call.
8949func (c *CustomersChromePrintersListPrinterModelsCall) PageToken(pageToken string) *CustomersChromePrintersListPrinterModelsCall {
8950	c.urlParams_.Set("pageToken", pageToken)
8951	return c
8952}
8953
8954// Fields allows partial responses to be retrieved. See
8955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8956// for more information.
8957func (c *CustomersChromePrintersListPrinterModelsCall) Fields(s ...googleapi.Field) *CustomersChromePrintersListPrinterModelsCall {
8958	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8959	return c
8960}
8961
8962// IfNoneMatch sets the optional parameter which makes the operation
8963// fail if the object's ETag matches the given value. This is useful for
8964// getting updates only after the object has changed since the last
8965// request. Use googleapi.IsNotModified to check whether the response
8966// error from Do is the result of In-None-Match.
8967func (c *CustomersChromePrintersListPrinterModelsCall) IfNoneMatch(entityTag string) *CustomersChromePrintersListPrinterModelsCall {
8968	c.ifNoneMatch_ = entityTag
8969	return c
8970}
8971
8972// Context sets the context to be used in this call's Do method. Any
8973// pending HTTP request will be aborted if the provided context is
8974// canceled.
8975func (c *CustomersChromePrintersListPrinterModelsCall) Context(ctx context.Context) *CustomersChromePrintersListPrinterModelsCall {
8976	c.ctx_ = ctx
8977	return c
8978}
8979
8980// Header returns an http.Header that can be modified by the caller to
8981// add HTTP headers to the request.
8982func (c *CustomersChromePrintersListPrinterModelsCall) Header() http.Header {
8983	if c.header_ == nil {
8984		c.header_ = make(http.Header)
8985	}
8986	return c.header_
8987}
8988
8989func (c *CustomersChromePrintersListPrinterModelsCall) doRequest(alt string) (*http.Response, error) {
8990	reqHeaders := make(http.Header)
8991	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
8992	for k, v := range c.header_ {
8993		reqHeaders[k] = v
8994	}
8995	reqHeaders.Set("User-Agent", c.s.userAgent())
8996	if c.ifNoneMatch_ != "" {
8997		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8998	}
8999	var body io.Reader = nil
9000	c.urlParams_.Set("alt", alt)
9001	c.urlParams_.Set("prettyPrint", "false")
9002	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+parent}/chrome/printers:listPrinterModels")
9003	urls += "?" + c.urlParams_.Encode()
9004	req, err := http.NewRequest("GET", urls, body)
9005	if err != nil {
9006		return nil, err
9007	}
9008	req.Header = reqHeaders
9009	googleapi.Expand(req.URL, map[string]string{
9010		"parent": c.parent,
9011	})
9012	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9013}
9014
9015// Do executes the "admin.customers.chrome.printers.listPrinterModels" call.
9016// Exactly one of *ListPrinterModelsResponse or error will be non-nil.
9017// Any non-2xx status code is an error. Response headers are in either
9018// *ListPrinterModelsResponse.ServerResponse.Header or (if a response
9019// was returned at all) in error.(*googleapi.Error).Header. Use
9020// googleapi.IsNotModified to check whether the returned error was
9021// because http.StatusNotModified was returned.
9022func (c *CustomersChromePrintersListPrinterModelsCall) Do(opts ...googleapi.CallOption) (*ListPrinterModelsResponse, error) {
9023	gensupport.SetOptions(c.urlParams_, opts...)
9024	res, err := c.doRequest("json")
9025	if res != nil && res.StatusCode == http.StatusNotModified {
9026		if res.Body != nil {
9027			res.Body.Close()
9028		}
9029		return nil, &googleapi.Error{
9030			Code:   res.StatusCode,
9031			Header: res.Header,
9032		}
9033	}
9034	if err != nil {
9035		return nil, err
9036	}
9037	defer googleapi.CloseBody(res)
9038	if err := googleapi.CheckResponse(res); err != nil {
9039		return nil, err
9040	}
9041	ret := &ListPrinterModelsResponse{
9042		ServerResponse: googleapi.ServerResponse{
9043			Header:         res.Header,
9044			HTTPStatusCode: res.StatusCode,
9045		},
9046	}
9047	target := &ret
9048	if err := gensupport.DecodeResponse(target, res); err != nil {
9049		return nil, err
9050	}
9051	return ret, nil
9052	// {
9053	//   "description": "Lists the supported printer models.",
9054	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers:listPrinterModels",
9055	//   "httpMethod": "GET",
9056	//   "id": "admin.customers.chrome.printers.listPrinterModels",
9057	//   "parameterOrder": [
9058	//     "parent"
9059	//   ],
9060	//   "parameters": {
9061	//     "filter": {
9062	//       "description": "Filer to list only models by a given manufacturer in format: \"manufacturer:Brother\". Search syntax is shared between this api and Admin Console printers pages.",
9063	//       "location": "query",
9064	//       "type": "string"
9065	//     },
9066	//     "pageSize": {
9067	//       "description": "The maximum number of objects to return. The service may return fewer than this value.",
9068	//       "format": "int32",
9069	//       "location": "query",
9070	//       "type": "integer"
9071	//     },
9072	//     "pageToken": {
9073	//       "description": "A page token, received from a previous call.",
9074	//       "location": "query",
9075	//       "type": "string"
9076	//     },
9077	//     "parent": {
9078	//       "description": "Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id}",
9079	//       "location": "path",
9080	//       "pattern": "^customers/[^/]+$",
9081	//       "required": true,
9082	//       "type": "string"
9083	//     }
9084	//   },
9085	//   "path": "admin/directory/v1/{+parent}/chrome/printers:listPrinterModels",
9086	//   "response": {
9087	//     "$ref": "ListPrinterModelsResponse"
9088	//   },
9089	//   "scopes": [
9090	//     "https://www.googleapis.com/auth/admin.chrome.printers",
9091	//     "https://www.googleapis.com/auth/admin.chrome.printers.readonly"
9092	//   ]
9093	// }
9094
9095}
9096
9097// Pages invokes f for each page of results.
9098// A non-nil error returned from f will halt the iteration.
9099// The provided context supersedes any context provided to the Context method.
9100func (c *CustomersChromePrintersListPrinterModelsCall) Pages(ctx context.Context, f func(*ListPrinterModelsResponse) error) error {
9101	c.ctx_ = ctx
9102	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9103	for {
9104		x, err := c.Do()
9105		if err != nil {
9106			return err
9107		}
9108		if err := f(x); err != nil {
9109			return err
9110		}
9111		if x.NextPageToken == "" {
9112			return nil
9113		}
9114		c.PageToken(x.NextPageToken)
9115	}
9116}
9117
9118// method id "admin.customers.chrome.printers.patch":
9119
9120type CustomersChromePrintersPatchCall struct {
9121	s          *Service
9122	name       string
9123	printer    *Printer
9124	urlParams_ gensupport.URLParams
9125	ctx_       context.Context
9126	header_    http.Header
9127}
9128
9129// Patch: Updates a `Printer` resource.
9130//
9131// - name: The resource name of the Printer object, in the format
9132//   customers/{customer-id}/printers/{printer-id} (During printer
9133//   creation leave empty).
9134func (r *CustomersChromePrintersService) Patch(name string, printer *Printer) *CustomersChromePrintersPatchCall {
9135	c := &CustomersChromePrintersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9136	c.name = name
9137	c.printer = printer
9138	return c
9139}
9140
9141// ClearMask sets the optional parameter "clearMask": The list of fields
9142// to be cleared. Note, some of the fields are read only and cannot be
9143// updated. Values for not specified fields will be patched.
9144func (c *CustomersChromePrintersPatchCall) ClearMask(clearMask string) *CustomersChromePrintersPatchCall {
9145	c.urlParams_.Set("clearMask", clearMask)
9146	return c
9147}
9148
9149// UpdateMask sets the optional parameter "updateMask": The list of
9150// fields to be updated. Note, some of the fields are read only and
9151// cannot be updated. Values for not specified fields will be patched.
9152func (c *CustomersChromePrintersPatchCall) UpdateMask(updateMask string) *CustomersChromePrintersPatchCall {
9153	c.urlParams_.Set("updateMask", updateMask)
9154	return c
9155}
9156
9157// Fields allows partial responses to be retrieved. See
9158// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9159// for more information.
9160func (c *CustomersChromePrintersPatchCall) Fields(s ...googleapi.Field) *CustomersChromePrintersPatchCall {
9161	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9162	return c
9163}
9164
9165// Context sets the context to be used in this call's Do method. Any
9166// pending HTTP request will be aborted if the provided context is
9167// canceled.
9168func (c *CustomersChromePrintersPatchCall) Context(ctx context.Context) *CustomersChromePrintersPatchCall {
9169	c.ctx_ = ctx
9170	return c
9171}
9172
9173// Header returns an http.Header that can be modified by the caller to
9174// add HTTP headers to the request.
9175func (c *CustomersChromePrintersPatchCall) Header() http.Header {
9176	if c.header_ == nil {
9177		c.header_ = make(http.Header)
9178	}
9179	return c.header_
9180}
9181
9182func (c *CustomersChromePrintersPatchCall) doRequest(alt string) (*http.Response, error) {
9183	reqHeaders := make(http.Header)
9184	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9185	for k, v := range c.header_ {
9186		reqHeaders[k] = v
9187	}
9188	reqHeaders.Set("User-Agent", c.s.userAgent())
9189	var body io.Reader = nil
9190	body, err := googleapi.WithoutDataWrapper.JSONReader(c.printer)
9191	if err != nil {
9192		return nil, err
9193	}
9194	reqHeaders.Set("Content-Type", "application/json")
9195	c.urlParams_.Set("alt", alt)
9196	c.urlParams_.Set("prettyPrint", "false")
9197	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/{+name}")
9198	urls += "?" + c.urlParams_.Encode()
9199	req, err := http.NewRequest("PATCH", urls, body)
9200	if err != nil {
9201		return nil, err
9202	}
9203	req.Header = reqHeaders
9204	googleapi.Expand(req.URL, map[string]string{
9205		"name": c.name,
9206	})
9207	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9208}
9209
9210// Do executes the "admin.customers.chrome.printers.patch" call.
9211// Exactly one of *Printer or error will be non-nil. Any non-2xx status
9212// code is an error. Response headers are in either
9213// *Printer.ServerResponse.Header or (if a response was returned at all)
9214// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9215// check whether the returned error was because http.StatusNotModified
9216// was returned.
9217func (c *CustomersChromePrintersPatchCall) Do(opts ...googleapi.CallOption) (*Printer, error) {
9218	gensupport.SetOptions(c.urlParams_, opts...)
9219	res, err := c.doRequest("json")
9220	if res != nil && res.StatusCode == http.StatusNotModified {
9221		if res.Body != nil {
9222			res.Body.Close()
9223		}
9224		return nil, &googleapi.Error{
9225			Code:   res.StatusCode,
9226			Header: res.Header,
9227		}
9228	}
9229	if err != nil {
9230		return nil, err
9231	}
9232	defer googleapi.CloseBody(res)
9233	if err := googleapi.CheckResponse(res); err != nil {
9234		return nil, err
9235	}
9236	ret := &Printer{
9237		ServerResponse: googleapi.ServerResponse{
9238			Header:         res.Header,
9239			HTTPStatusCode: res.StatusCode,
9240		},
9241	}
9242	target := &ret
9243	if err := gensupport.DecodeResponse(target, res); err != nil {
9244		return nil, err
9245	}
9246	return ret, nil
9247	// {
9248	//   "description": "Updates a `Printer` resource.",
9249	//   "flatPath": "admin/directory/v1/customers/{customersId}/chrome/printers/{printersId}",
9250	//   "httpMethod": "PATCH",
9251	//   "id": "admin.customers.chrome.printers.patch",
9252	//   "parameterOrder": [
9253	//     "name"
9254	//   ],
9255	//   "parameters": {
9256	//     "clearMask": {
9257	//       "description": "The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.",
9258	//       "format": "google-fieldmask",
9259	//       "location": "query",
9260	//       "type": "string"
9261	//     },
9262	//     "name": {
9263	//       "description": "The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)",
9264	//       "location": "path",
9265	//       "pattern": "^customers/[^/]+/chrome/printers/[^/]+$",
9266	//       "required": true,
9267	//       "type": "string"
9268	//     },
9269	//     "updateMask": {
9270	//       "description": "The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.",
9271	//       "format": "google-fieldmask",
9272	//       "location": "query",
9273	//       "type": "string"
9274	//     }
9275	//   },
9276	//   "path": "admin/directory/v1/{+name}",
9277	//   "request": {
9278	//     "$ref": "Printer"
9279	//   },
9280	//   "response": {
9281	//     "$ref": "Printer"
9282	//   },
9283	//   "scopes": [
9284	//     "https://www.googleapis.com/auth/admin.chrome.printers"
9285	//   ]
9286	// }
9287
9288}
9289
9290// method id "directory.domainAliases.delete":
9291
9292type DomainAliasesDeleteCall struct {
9293	s               *Service
9294	customer        string
9295	domainAliasName string
9296	urlParams_      gensupport.URLParams
9297	ctx_            context.Context
9298	header_         http.Header
9299}
9300
9301// Delete: Deletes a domain Alias of the customer.
9302//
9303// - customer: Immutable ID of the Google Workspace account.
9304// - domainAliasName: Name of domain alias to be retrieved.
9305func (r *DomainAliasesService) Delete(customer string, domainAliasName string) *DomainAliasesDeleteCall {
9306	c := &DomainAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9307	c.customer = customer
9308	c.domainAliasName = domainAliasName
9309	return c
9310}
9311
9312// Fields allows partial responses to be retrieved. See
9313// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9314// for more information.
9315func (c *DomainAliasesDeleteCall) Fields(s ...googleapi.Field) *DomainAliasesDeleteCall {
9316	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9317	return c
9318}
9319
9320// Context sets the context to be used in this call's Do method. Any
9321// pending HTTP request will be aborted if the provided context is
9322// canceled.
9323func (c *DomainAliasesDeleteCall) Context(ctx context.Context) *DomainAliasesDeleteCall {
9324	c.ctx_ = ctx
9325	return c
9326}
9327
9328// Header returns an http.Header that can be modified by the caller to
9329// add HTTP headers to the request.
9330func (c *DomainAliasesDeleteCall) Header() http.Header {
9331	if c.header_ == nil {
9332		c.header_ = make(http.Header)
9333	}
9334	return c.header_
9335}
9336
9337func (c *DomainAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
9338	reqHeaders := make(http.Header)
9339	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9340	for k, v := range c.header_ {
9341		reqHeaders[k] = v
9342	}
9343	reqHeaders.Set("User-Agent", c.s.userAgent())
9344	var body io.Reader = nil
9345	c.urlParams_.Set("alt", alt)
9346	c.urlParams_.Set("prettyPrint", "false")
9347	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}")
9348	urls += "?" + c.urlParams_.Encode()
9349	req, err := http.NewRequest("DELETE", urls, body)
9350	if err != nil {
9351		return nil, err
9352	}
9353	req.Header = reqHeaders
9354	googleapi.Expand(req.URL, map[string]string{
9355		"customer":        c.customer,
9356		"domainAliasName": c.domainAliasName,
9357	})
9358	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9359}
9360
9361// Do executes the "directory.domainAliases.delete" call.
9362func (c *DomainAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
9363	gensupport.SetOptions(c.urlParams_, opts...)
9364	res, err := c.doRequest("json")
9365	if err != nil {
9366		return err
9367	}
9368	defer googleapi.CloseBody(res)
9369	if err := googleapi.CheckResponse(res); err != nil {
9370		return err
9371	}
9372	return nil
9373	// {
9374	//   "description": "Deletes a domain Alias of the customer.",
9375	//   "flatPath": "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}",
9376	//   "httpMethod": "DELETE",
9377	//   "id": "directory.domainAliases.delete",
9378	//   "parameterOrder": [
9379	//     "customer",
9380	//     "domainAliasName"
9381	//   ],
9382	//   "parameters": {
9383	//     "customer": {
9384	//       "description": "Immutable ID of the Google Workspace account.",
9385	//       "location": "path",
9386	//       "required": true,
9387	//       "type": "string"
9388	//     },
9389	//     "domainAliasName": {
9390	//       "description": "Name of domain alias to be retrieved.",
9391	//       "location": "path",
9392	//       "required": true,
9393	//       "type": "string"
9394	//     }
9395	//   },
9396	//   "path": "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}",
9397	//   "scopes": [
9398	//     "https://www.googleapis.com/auth/admin.directory.domain"
9399	//   ]
9400	// }
9401
9402}
9403
9404// method id "directory.domainAliases.get":
9405
9406type DomainAliasesGetCall struct {
9407	s               *Service
9408	customer        string
9409	domainAliasName string
9410	urlParams_      gensupport.URLParams
9411	ifNoneMatch_    string
9412	ctx_            context.Context
9413	header_         http.Header
9414}
9415
9416// Get: Retrieves a domain alias of the customer.
9417//
9418// - customer: Immutable ID of the Google Workspace account.
9419// - domainAliasName: Name of domain alias to be retrieved.
9420func (r *DomainAliasesService) Get(customer string, domainAliasName string) *DomainAliasesGetCall {
9421	c := &DomainAliasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9422	c.customer = customer
9423	c.domainAliasName = domainAliasName
9424	return c
9425}
9426
9427// Fields allows partial responses to be retrieved. See
9428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9429// for more information.
9430func (c *DomainAliasesGetCall) Fields(s ...googleapi.Field) *DomainAliasesGetCall {
9431	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9432	return c
9433}
9434
9435// IfNoneMatch sets the optional parameter which makes the operation
9436// fail if the object's ETag matches the given value. This is useful for
9437// getting updates only after the object has changed since the last
9438// request. Use googleapi.IsNotModified to check whether the response
9439// error from Do is the result of In-None-Match.
9440func (c *DomainAliasesGetCall) IfNoneMatch(entityTag string) *DomainAliasesGetCall {
9441	c.ifNoneMatch_ = entityTag
9442	return c
9443}
9444
9445// Context sets the context to be used in this call's Do method. Any
9446// pending HTTP request will be aborted if the provided context is
9447// canceled.
9448func (c *DomainAliasesGetCall) Context(ctx context.Context) *DomainAliasesGetCall {
9449	c.ctx_ = ctx
9450	return c
9451}
9452
9453// Header returns an http.Header that can be modified by the caller to
9454// add HTTP headers to the request.
9455func (c *DomainAliasesGetCall) Header() http.Header {
9456	if c.header_ == nil {
9457		c.header_ = make(http.Header)
9458	}
9459	return c.header_
9460}
9461
9462func (c *DomainAliasesGetCall) doRequest(alt string) (*http.Response, error) {
9463	reqHeaders := make(http.Header)
9464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9465	for k, v := range c.header_ {
9466		reqHeaders[k] = v
9467	}
9468	reqHeaders.Set("User-Agent", c.s.userAgent())
9469	if c.ifNoneMatch_ != "" {
9470		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9471	}
9472	var body io.Reader = nil
9473	c.urlParams_.Set("alt", alt)
9474	c.urlParams_.Set("prettyPrint", "false")
9475	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}")
9476	urls += "?" + c.urlParams_.Encode()
9477	req, err := http.NewRequest("GET", urls, body)
9478	if err != nil {
9479		return nil, err
9480	}
9481	req.Header = reqHeaders
9482	googleapi.Expand(req.URL, map[string]string{
9483		"customer":        c.customer,
9484		"domainAliasName": c.domainAliasName,
9485	})
9486	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9487}
9488
9489// Do executes the "directory.domainAliases.get" call.
9490// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx
9491// status code is an error. Response headers are in either
9492// *DomainAlias.ServerResponse.Header or (if a response was returned at
9493// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9494// to check whether the returned error was because
9495// http.StatusNotModified was returned.
9496func (c *DomainAliasesGetCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
9497	gensupport.SetOptions(c.urlParams_, opts...)
9498	res, err := c.doRequest("json")
9499	if res != nil && res.StatusCode == http.StatusNotModified {
9500		if res.Body != nil {
9501			res.Body.Close()
9502		}
9503		return nil, &googleapi.Error{
9504			Code:   res.StatusCode,
9505			Header: res.Header,
9506		}
9507	}
9508	if err != nil {
9509		return nil, err
9510	}
9511	defer googleapi.CloseBody(res)
9512	if err := googleapi.CheckResponse(res); err != nil {
9513		return nil, err
9514	}
9515	ret := &DomainAlias{
9516		ServerResponse: googleapi.ServerResponse{
9517			Header:         res.Header,
9518			HTTPStatusCode: res.StatusCode,
9519		},
9520	}
9521	target := &ret
9522	if err := gensupport.DecodeResponse(target, res); err != nil {
9523		return nil, err
9524	}
9525	return ret, nil
9526	// {
9527	//   "description": "Retrieves a domain alias of the customer.",
9528	//   "flatPath": "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}",
9529	//   "httpMethod": "GET",
9530	//   "id": "directory.domainAliases.get",
9531	//   "parameterOrder": [
9532	//     "customer",
9533	//     "domainAliasName"
9534	//   ],
9535	//   "parameters": {
9536	//     "customer": {
9537	//       "description": "Immutable ID of the Google Workspace account.",
9538	//       "location": "path",
9539	//       "required": true,
9540	//       "type": "string"
9541	//     },
9542	//     "domainAliasName": {
9543	//       "description": "Name of domain alias to be retrieved.",
9544	//       "location": "path",
9545	//       "required": true,
9546	//       "type": "string"
9547	//     }
9548	//   },
9549	//   "path": "admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}",
9550	//   "response": {
9551	//     "$ref": "DomainAlias"
9552	//   },
9553	//   "scopes": [
9554	//     "https://www.googleapis.com/auth/admin.directory.domain",
9555	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
9556	//   ]
9557	// }
9558
9559}
9560
9561// method id "directory.domainAliases.insert":
9562
9563type DomainAliasesInsertCall struct {
9564	s           *Service
9565	customer    string
9566	domainalias *DomainAlias
9567	urlParams_  gensupport.URLParams
9568	ctx_        context.Context
9569	header_     http.Header
9570}
9571
9572// Insert: Inserts a domain alias of the customer.
9573//
9574// - customer: Immutable ID of the Google Workspace account.
9575func (r *DomainAliasesService) Insert(customer string, domainalias *DomainAlias) *DomainAliasesInsertCall {
9576	c := &DomainAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9577	c.customer = customer
9578	c.domainalias = domainalias
9579	return c
9580}
9581
9582// Fields allows partial responses to be retrieved. See
9583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9584// for more information.
9585func (c *DomainAliasesInsertCall) Fields(s ...googleapi.Field) *DomainAliasesInsertCall {
9586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9587	return c
9588}
9589
9590// Context sets the context to be used in this call's Do method. Any
9591// pending HTTP request will be aborted if the provided context is
9592// canceled.
9593func (c *DomainAliasesInsertCall) Context(ctx context.Context) *DomainAliasesInsertCall {
9594	c.ctx_ = ctx
9595	return c
9596}
9597
9598// Header returns an http.Header that can be modified by the caller to
9599// add HTTP headers to the request.
9600func (c *DomainAliasesInsertCall) Header() http.Header {
9601	if c.header_ == nil {
9602		c.header_ = make(http.Header)
9603	}
9604	return c.header_
9605}
9606
9607func (c *DomainAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
9608	reqHeaders := make(http.Header)
9609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9610	for k, v := range c.header_ {
9611		reqHeaders[k] = v
9612	}
9613	reqHeaders.Set("User-Agent", c.s.userAgent())
9614	var body io.Reader = nil
9615	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainalias)
9616	if err != nil {
9617		return nil, err
9618	}
9619	reqHeaders.Set("Content-Type", "application/json")
9620	c.urlParams_.Set("alt", alt)
9621	c.urlParams_.Set("prettyPrint", "false")
9622	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases")
9623	urls += "?" + c.urlParams_.Encode()
9624	req, err := http.NewRequest("POST", urls, body)
9625	if err != nil {
9626		return nil, err
9627	}
9628	req.Header = reqHeaders
9629	googleapi.Expand(req.URL, map[string]string{
9630		"customer": c.customer,
9631	})
9632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9633}
9634
9635// Do executes the "directory.domainAliases.insert" call.
9636// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx
9637// status code is an error. Response headers are in either
9638// *DomainAlias.ServerResponse.Header or (if a response was returned at
9639// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9640// to check whether the returned error was because
9641// http.StatusNotModified was returned.
9642func (c *DomainAliasesInsertCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
9643	gensupport.SetOptions(c.urlParams_, opts...)
9644	res, err := c.doRequest("json")
9645	if res != nil && res.StatusCode == http.StatusNotModified {
9646		if res.Body != nil {
9647			res.Body.Close()
9648		}
9649		return nil, &googleapi.Error{
9650			Code:   res.StatusCode,
9651			Header: res.Header,
9652		}
9653	}
9654	if err != nil {
9655		return nil, err
9656	}
9657	defer googleapi.CloseBody(res)
9658	if err := googleapi.CheckResponse(res); err != nil {
9659		return nil, err
9660	}
9661	ret := &DomainAlias{
9662		ServerResponse: googleapi.ServerResponse{
9663			Header:         res.Header,
9664			HTTPStatusCode: res.StatusCode,
9665		},
9666	}
9667	target := &ret
9668	if err := gensupport.DecodeResponse(target, res); err != nil {
9669		return nil, err
9670	}
9671	return ret, nil
9672	// {
9673	//   "description": "Inserts a domain alias of the customer.",
9674	//   "flatPath": "admin/directory/v1/customer/{customer}/domainaliases",
9675	//   "httpMethod": "POST",
9676	//   "id": "directory.domainAliases.insert",
9677	//   "parameterOrder": [
9678	//     "customer"
9679	//   ],
9680	//   "parameters": {
9681	//     "customer": {
9682	//       "description": "Immutable ID of the Google Workspace account.",
9683	//       "location": "path",
9684	//       "required": true,
9685	//       "type": "string"
9686	//     }
9687	//   },
9688	//   "path": "admin/directory/v1/customer/{customer}/domainaliases",
9689	//   "request": {
9690	//     "$ref": "DomainAlias"
9691	//   },
9692	//   "response": {
9693	//     "$ref": "DomainAlias"
9694	//   },
9695	//   "scopes": [
9696	//     "https://www.googleapis.com/auth/admin.directory.domain"
9697	//   ]
9698	// }
9699
9700}
9701
9702// method id "directory.domainAliases.list":
9703
9704type DomainAliasesListCall struct {
9705	s            *Service
9706	customer     string
9707	urlParams_   gensupport.URLParams
9708	ifNoneMatch_ string
9709	ctx_         context.Context
9710	header_      http.Header
9711}
9712
9713// List: Lists the domain aliases of the customer.
9714//
9715// - customer: Immutable ID of the Google Workspace account.
9716func (r *DomainAliasesService) List(customer string) *DomainAliasesListCall {
9717	c := &DomainAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9718	c.customer = customer
9719	return c
9720}
9721
9722// ParentDomainName sets the optional parameter "parentDomainName": Name
9723// of the parent domain for which domain aliases are to be fetched.
9724func (c *DomainAliasesListCall) ParentDomainName(parentDomainName string) *DomainAliasesListCall {
9725	c.urlParams_.Set("parentDomainName", parentDomainName)
9726	return c
9727}
9728
9729// Fields allows partial responses to be retrieved. See
9730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9731// for more information.
9732func (c *DomainAliasesListCall) Fields(s ...googleapi.Field) *DomainAliasesListCall {
9733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9734	return c
9735}
9736
9737// IfNoneMatch sets the optional parameter which makes the operation
9738// fail if the object's ETag matches the given value. This is useful for
9739// getting updates only after the object has changed since the last
9740// request. Use googleapi.IsNotModified to check whether the response
9741// error from Do is the result of In-None-Match.
9742func (c *DomainAliasesListCall) IfNoneMatch(entityTag string) *DomainAliasesListCall {
9743	c.ifNoneMatch_ = entityTag
9744	return c
9745}
9746
9747// Context sets the context to be used in this call's Do method. Any
9748// pending HTTP request will be aborted if the provided context is
9749// canceled.
9750func (c *DomainAliasesListCall) Context(ctx context.Context) *DomainAliasesListCall {
9751	c.ctx_ = ctx
9752	return c
9753}
9754
9755// Header returns an http.Header that can be modified by the caller to
9756// add HTTP headers to the request.
9757func (c *DomainAliasesListCall) Header() http.Header {
9758	if c.header_ == nil {
9759		c.header_ = make(http.Header)
9760	}
9761	return c.header_
9762}
9763
9764func (c *DomainAliasesListCall) doRequest(alt string) (*http.Response, error) {
9765	reqHeaders := make(http.Header)
9766	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9767	for k, v := range c.header_ {
9768		reqHeaders[k] = v
9769	}
9770	reqHeaders.Set("User-Agent", c.s.userAgent())
9771	if c.ifNoneMatch_ != "" {
9772		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9773	}
9774	var body io.Reader = nil
9775	c.urlParams_.Set("alt", alt)
9776	c.urlParams_.Set("prettyPrint", "false")
9777	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domainaliases")
9778	urls += "?" + c.urlParams_.Encode()
9779	req, err := http.NewRequest("GET", urls, body)
9780	if err != nil {
9781		return nil, err
9782	}
9783	req.Header = reqHeaders
9784	googleapi.Expand(req.URL, map[string]string{
9785		"customer": c.customer,
9786	})
9787	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9788}
9789
9790// Do executes the "directory.domainAliases.list" call.
9791// Exactly one of *DomainAliases or error will be non-nil. Any non-2xx
9792// status code is an error. Response headers are in either
9793// *DomainAliases.ServerResponse.Header or (if a response was returned
9794// at all) in error.(*googleapi.Error).Header. Use
9795// googleapi.IsNotModified to check whether the returned error was
9796// because http.StatusNotModified was returned.
9797func (c *DomainAliasesListCall) Do(opts ...googleapi.CallOption) (*DomainAliases, error) {
9798	gensupport.SetOptions(c.urlParams_, opts...)
9799	res, err := c.doRequest("json")
9800	if res != nil && res.StatusCode == http.StatusNotModified {
9801		if res.Body != nil {
9802			res.Body.Close()
9803		}
9804		return nil, &googleapi.Error{
9805			Code:   res.StatusCode,
9806			Header: res.Header,
9807		}
9808	}
9809	if err != nil {
9810		return nil, err
9811	}
9812	defer googleapi.CloseBody(res)
9813	if err := googleapi.CheckResponse(res); err != nil {
9814		return nil, err
9815	}
9816	ret := &DomainAliases{
9817		ServerResponse: googleapi.ServerResponse{
9818			Header:         res.Header,
9819			HTTPStatusCode: res.StatusCode,
9820		},
9821	}
9822	target := &ret
9823	if err := gensupport.DecodeResponse(target, res); err != nil {
9824		return nil, err
9825	}
9826	return ret, nil
9827	// {
9828	//   "description": "Lists the domain aliases of the customer.",
9829	//   "flatPath": "admin/directory/v1/customer/{customer}/domainaliases",
9830	//   "httpMethod": "GET",
9831	//   "id": "directory.domainAliases.list",
9832	//   "parameterOrder": [
9833	//     "customer"
9834	//   ],
9835	//   "parameters": {
9836	//     "customer": {
9837	//       "description": "Immutable ID of the Google Workspace account.",
9838	//       "location": "path",
9839	//       "required": true,
9840	//       "type": "string"
9841	//     },
9842	//     "parentDomainName": {
9843	//       "description": "Name of the parent domain for which domain aliases are to be fetched.",
9844	//       "location": "query",
9845	//       "type": "string"
9846	//     }
9847	//   },
9848	//   "path": "admin/directory/v1/customer/{customer}/domainaliases",
9849	//   "response": {
9850	//     "$ref": "DomainAliases"
9851	//   },
9852	//   "scopes": [
9853	//     "https://www.googleapis.com/auth/admin.directory.domain",
9854	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
9855	//   ]
9856	// }
9857
9858}
9859
9860// method id "directory.domains.delete":
9861
9862type DomainsDeleteCall struct {
9863	s          *Service
9864	customer   string
9865	domainName string
9866	urlParams_ gensupport.URLParams
9867	ctx_       context.Context
9868	header_    http.Header
9869}
9870
9871// Delete: Deletes a domain of the customer.
9872//
9873// - customer: Immutable ID of the Google Workspace account.
9874// - domainName: Name of domain to be deleted.
9875func (r *DomainsService) Delete(customer string, domainName string) *DomainsDeleteCall {
9876	c := &DomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9877	c.customer = customer
9878	c.domainName = domainName
9879	return c
9880}
9881
9882// Fields allows partial responses to be retrieved. See
9883// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9884// for more information.
9885func (c *DomainsDeleteCall) Fields(s ...googleapi.Field) *DomainsDeleteCall {
9886	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9887	return c
9888}
9889
9890// Context sets the context to be used in this call's Do method. Any
9891// pending HTTP request will be aborted if the provided context is
9892// canceled.
9893func (c *DomainsDeleteCall) Context(ctx context.Context) *DomainsDeleteCall {
9894	c.ctx_ = ctx
9895	return c
9896}
9897
9898// Header returns an http.Header that can be modified by the caller to
9899// add HTTP headers to the request.
9900func (c *DomainsDeleteCall) Header() http.Header {
9901	if c.header_ == nil {
9902		c.header_ = make(http.Header)
9903	}
9904	return c.header_
9905}
9906
9907func (c *DomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
9908	reqHeaders := make(http.Header)
9909	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
9910	for k, v := range c.header_ {
9911		reqHeaders[k] = v
9912	}
9913	reqHeaders.Set("User-Agent", c.s.userAgent())
9914	var body io.Reader = nil
9915	c.urlParams_.Set("alt", alt)
9916	c.urlParams_.Set("prettyPrint", "false")
9917	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains/{domainName}")
9918	urls += "?" + c.urlParams_.Encode()
9919	req, err := http.NewRequest("DELETE", urls, body)
9920	if err != nil {
9921		return nil, err
9922	}
9923	req.Header = reqHeaders
9924	googleapi.Expand(req.URL, map[string]string{
9925		"customer":   c.customer,
9926		"domainName": c.domainName,
9927	})
9928	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9929}
9930
9931// Do executes the "directory.domains.delete" call.
9932func (c *DomainsDeleteCall) Do(opts ...googleapi.CallOption) error {
9933	gensupport.SetOptions(c.urlParams_, opts...)
9934	res, err := c.doRequest("json")
9935	if err != nil {
9936		return err
9937	}
9938	defer googleapi.CloseBody(res)
9939	if err := googleapi.CheckResponse(res); err != nil {
9940		return err
9941	}
9942	return nil
9943	// {
9944	//   "description": "Deletes a domain of the customer.",
9945	//   "flatPath": "admin/directory/v1/customer/{customer}/domains/{domainName}",
9946	//   "httpMethod": "DELETE",
9947	//   "id": "directory.domains.delete",
9948	//   "parameterOrder": [
9949	//     "customer",
9950	//     "domainName"
9951	//   ],
9952	//   "parameters": {
9953	//     "customer": {
9954	//       "description": "Immutable ID of the Google Workspace account.",
9955	//       "location": "path",
9956	//       "required": true,
9957	//       "type": "string"
9958	//     },
9959	//     "domainName": {
9960	//       "description": "Name of domain to be deleted",
9961	//       "location": "path",
9962	//       "required": true,
9963	//       "type": "string"
9964	//     }
9965	//   },
9966	//   "path": "admin/directory/v1/customer/{customer}/domains/{domainName}",
9967	//   "scopes": [
9968	//     "https://www.googleapis.com/auth/admin.directory.domain"
9969	//   ]
9970	// }
9971
9972}
9973
9974// method id "directory.domains.get":
9975
9976type DomainsGetCall struct {
9977	s            *Service
9978	customer     string
9979	domainName   string
9980	urlParams_   gensupport.URLParams
9981	ifNoneMatch_ string
9982	ctx_         context.Context
9983	header_      http.Header
9984}
9985
9986// Get: Retrieves a domain of the customer.
9987//
9988// - customer: Immutable ID of the Google Workspace account.
9989// - domainName: Name of domain to be retrieved.
9990func (r *DomainsService) Get(customer string, domainName string) *DomainsGetCall {
9991	c := &DomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9992	c.customer = customer
9993	c.domainName = domainName
9994	return c
9995}
9996
9997// Fields allows partial responses to be retrieved. See
9998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9999// for more information.
10000func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall {
10001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10002	return c
10003}
10004
10005// IfNoneMatch sets the optional parameter which makes the operation
10006// fail if the object's ETag matches the given value. This is useful for
10007// getting updates only after the object has changed since the last
10008// request. Use googleapi.IsNotModified to check whether the response
10009// error from Do is the result of In-None-Match.
10010func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall {
10011	c.ifNoneMatch_ = entityTag
10012	return c
10013}
10014
10015// Context sets the context to be used in this call's Do method. Any
10016// pending HTTP request will be aborted if the provided context is
10017// canceled.
10018func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall {
10019	c.ctx_ = ctx
10020	return c
10021}
10022
10023// Header returns an http.Header that can be modified by the caller to
10024// add HTTP headers to the request.
10025func (c *DomainsGetCall) Header() http.Header {
10026	if c.header_ == nil {
10027		c.header_ = make(http.Header)
10028	}
10029	return c.header_
10030}
10031
10032func (c *DomainsGetCall) doRequest(alt string) (*http.Response, error) {
10033	reqHeaders := make(http.Header)
10034	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10035	for k, v := range c.header_ {
10036		reqHeaders[k] = v
10037	}
10038	reqHeaders.Set("User-Agent", c.s.userAgent())
10039	if c.ifNoneMatch_ != "" {
10040		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10041	}
10042	var body io.Reader = nil
10043	c.urlParams_.Set("alt", alt)
10044	c.urlParams_.Set("prettyPrint", "false")
10045	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains/{domainName}")
10046	urls += "?" + c.urlParams_.Encode()
10047	req, err := http.NewRequest("GET", urls, body)
10048	if err != nil {
10049		return nil, err
10050	}
10051	req.Header = reqHeaders
10052	googleapi.Expand(req.URL, map[string]string{
10053		"customer":   c.customer,
10054		"domainName": c.domainName,
10055	})
10056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10057}
10058
10059// Do executes the "directory.domains.get" call.
10060// Exactly one of *Domains or error will be non-nil. Any non-2xx status
10061// code is an error. Response headers are in either
10062// *Domains.ServerResponse.Header or (if a response was returned at all)
10063// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10064// check whether the returned error was because http.StatusNotModified
10065// was returned.
10066func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
10067	gensupport.SetOptions(c.urlParams_, opts...)
10068	res, err := c.doRequest("json")
10069	if res != nil && res.StatusCode == http.StatusNotModified {
10070		if res.Body != nil {
10071			res.Body.Close()
10072		}
10073		return nil, &googleapi.Error{
10074			Code:   res.StatusCode,
10075			Header: res.Header,
10076		}
10077	}
10078	if err != nil {
10079		return nil, err
10080	}
10081	defer googleapi.CloseBody(res)
10082	if err := googleapi.CheckResponse(res); err != nil {
10083		return nil, err
10084	}
10085	ret := &Domains{
10086		ServerResponse: googleapi.ServerResponse{
10087			Header:         res.Header,
10088			HTTPStatusCode: res.StatusCode,
10089		},
10090	}
10091	target := &ret
10092	if err := gensupport.DecodeResponse(target, res); err != nil {
10093		return nil, err
10094	}
10095	return ret, nil
10096	// {
10097	//   "description": "Retrieves a domain of the customer.",
10098	//   "flatPath": "admin/directory/v1/customer/{customer}/domains/{domainName}",
10099	//   "httpMethod": "GET",
10100	//   "id": "directory.domains.get",
10101	//   "parameterOrder": [
10102	//     "customer",
10103	//     "domainName"
10104	//   ],
10105	//   "parameters": {
10106	//     "customer": {
10107	//       "description": "Immutable ID of the Google Workspace account.",
10108	//       "location": "path",
10109	//       "required": true,
10110	//       "type": "string"
10111	//     },
10112	//     "domainName": {
10113	//       "description": "Name of domain to be retrieved",
10114	//       "location": "path",
10115	//       "required": true,
10116	//       "type": "string"
10117	//     }
10118	//   },
10119	//   "path": "admin/directory/v1/customer/{customer}/domains/{domainName}",
10120	//   "response": {
10121	//     "$ref": "Domains"
10122	//   },
10123	//   "scopes": [
10124	//     "https://www.googleapis.com/auth/admin.directory.domain",
10125	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
10126	//   ]
10127	// }
10128
10129}
10130
10131// method id "directory.domains.insert":
10132
10133type DomainsInsertCall struct {
10134	s          *Service
10135	customer   string
10136	domains    *Domains
10137	urlParams_ gensupport.URLParams
10138	ctx_       context.Context
10139	header_    http.Header
10140}
10141
10142// Insert: Inserts a domain of the customer.
10143//
10144// - customer: Immutable ID of the Google Workspace account.
10145func (r *DomainsService) Insert(customer string, domains *Domains) *DomainsInsertCall {
10146	c := &DomainsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10147	c.customer = customer
10148	c.domains = domains
10149	return c
10150}
10151
10152// Fields allows partial responses to be retrieved. See
10153// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10154// for more information.
10155func (c *DomainsInsertCall) Fields(s ...googleapi.Field) *DomainsInsertCall {
10156	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10157	return c
10158}
10159
10160// Context sets the context to be used in this call's Do method. Any
10161// pending HTTP request will be aborted if the provided context is
10162// canceled.
10163func (c *DomainsInsertCall) Context(ctx context.Context) *DomainsInsertCall {
10164	c.ctx_ = ctx
10165	return c
10166}
10167
10168// Header returns an http.Header that can be modified by the caller to
10169// add HTTP headers to the request.
10170func (c *DomainsInsertCall) Header() http.Header {
10171	if c.header_ == nil {
10172		c.header_ = make(http.Header)
10173	}
10174	return c.header_
10175}
10176
10177func (c *DomainsInsertCall) doRequest(alt string) (*http.Response, error) {
10178	reqHeaders := make(http.Header)
10179	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10180	for k, v := range c.header_ {
10181		reqHeaders[k] = v
10182	}
10183	reqHeaders.Set("User-Agent", c.s.userAgent())
10184	var body io.Reader = nil
10185	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domains)
10186	if err != nil {
10187		return nil, err
10188	}
10189	reqHeaders.Set("Content-Type", "application/json")
10190	c.urlParams_.Set("alt", alt)
10191	c.urlParams_.Set("prettyPrint", "false")
10192	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains")
10193	urls += "?" + c.urlParams_.Encode()
10194	req, err := http.NewRequest("POST", urls, body)
10195	if err != nil {
10196		return nil, err
10197	}
10198	req.Header = reqHeaders
10199	googleapi.Expand(req.URL, map[string]string{
10200		"customer": c.customer,
10201	})
10202	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10203}
10204
10205// Do executes the "directory.domains.insert" call.
10206// Exactly one of *Domains or error will be non-nil. Any non-2xx status
10207// code is an error. Response headers are in either
10208// *Domains.ServerResponse.Header or (if a response was returned at all)
10209// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10210// check whether the returned error was because http.StatusNotModified
10211// was returned.
10212func (c *DomainsInsertCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
10213	gensupport.SetOptions(c.urlParams_, opts...)
10214	res, err := c.doRequest("json")
10215	if res != nil && res.StatusCode == http.StatusNotModified {
10216		if res.Body != nil {
10217			res.Body.Close()
10218		}
10219		return nil, &googleapi.Error{
10220			Code:   res.StatusCode,
10221			Header: res.Header,
10222		}
10223	}
10224	if err != nil {
10225		return nil, err
10226	}
10227	defer googleapi.CloseBody(res)
10228	if err := googleapi.CheckResponse(res); err != nil {
10229		return nil, err
10230	}
10231	ret := &Domains{
10232		ServerResponse: googleapi.ServerResponse{
10233			Header:         res.Header,
10234			HTTPStatusCode: res.StatusCode,
10235		},
10236	}
10237	target := &ret
10238	if err := gensupport.DecodeResponse(target, res); err != nil {
10239		return nil, err
10240	}
10241	return ret, nil
10242	// {
10243	//   "description": "Inserts a domain of the customer.",
10244	//   "flatPath": "admin/directory/v1/customer/{customer}/domains",
10245	//   "httpMethod": "POST",
10246	//   "id": "directory.domains.insert",
10247	//   "parameterOrder": [
10248	//     "customer"
10249	//   ],
10250	//   "parameters": {
10251	//     "customer": {
10252	//       "description": "Immutable ID of the Google Workspace account.",
10253	//       "location": "path",
10254	//       "required": true,
10255	//       "type": "string"
10256	//     }
10257	//   },
10258	//   "path": "admin/directory/v1/customer/{customer}/domains",
10259	//   "request": {
10260	//     "$ref": "Domains"
10261	//   },
10262	//   "response": {
10263	//     "$ref": "Domains"
10264	//   },
10265	//   "scopes": [
10266	//     "https://www.googleapis.com/auth/admin.directory.domain"
10267	//   ]
10268	// }
10269
10270}
10271
10272// method id "directory.domains.list":
10273
10274type DomainsListCall struct {
10275	s            *Service
10276	customer     string
10277	urlParams_   gensupport.URLParams
10278	ifNoneMatch_ string
10279	ctx_         context.Context
10280	header_      http.Header
10281}
10282
10283// List: Lists the domains of the customer.
10284//
10285// - customer: Immutable ID of the Google Workspace account.
10286func (r *DomainsService) List(customer string) *DomainsListCall {
10287	c := &DomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10288	c.customer = customer
10289	return c
10290}
10291
10292// Fields allows partial responses to be retrieved. See
10293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10294// for more information.
10295func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall {
10296	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10297	return c
10298}
10299
10300// IfNoneMatch sets the optional parameter which makes the operation
10301// fail if the object's ETag matches the given value. This is useful for
10302// getting updates only after the object has changed since the last
10303// request. Use googleapi.IsNotModified to check whether the response
10304// error from Do is the result of In-None-Match.
10305func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall {
10306	c.ifNoneMatch_ = entityTag
10307	return c
10308}
10309
10310// Context sets the context to be used in this call's Do method. Any
10311// pending HTTP request will be aborted if the provided context is
10312// canceled.
10313func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall {
10314	c.ctx_ = ctx
10315	return c
10316}
10317
10318// Header returns an http.Header that can be modified by the caller to
10319// add HTTP headers to the request.
10320func (c *DomainsListCall) Header() http.Header {
10321	if c.header_ == nil {
10322		c.header_ = make(http.Header)
10323	}
10324	return c.header_
10325}
10326
10327func (c *DomainsListCall) doRequest(alt string) (*http.Response, error) {
10328	reqHeaders := make(http.Header)
10329	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10330	for k, v := range c.header_ {
10331		reqHeaders[k] = v
10332	}
10333	reqHeaders.Set("User-Agent", c.s.userAgent())
10334	if c.ifNoneMatch_ != "" {
10335		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10336	}
10337	var body io.Reader = nil
10338	c.urlParams_.Set("alt", alt)
10339	c.urlParams_.Set("prettyPrint", "false")
10340	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/domains")
10341	urls += "?" + c.urlParams_.Encode()
10342	req, err := http.NewRequest("GET", urls, body)
10343	if err != nil {
10344		return nil, err
10345	}
10346	req.Header = reqHeaders
10347	googleapi.Expand(req.URL, map[string]string{
10348		"customer": c.customer,
10349	})
10350	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10351}
10352
10353// Do executes the "directory.domains.list" call.
10354// Exactly one of *Domains2 or error will be non-nil. Any non-2xx status
10355// code is an error. Response headers are in either
10356// *Domains2.ServerResponse.Header or (if a response was returned at
10357// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10358// to check whether the returned error was because
10359// http.StatusNotModified was returned.
10360func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*Domains2, error) {
10361	gensupport.SetOptions(c.urlParams_, opts...)
10362	res, err := c.doRequest("json")
10363	if res != nil && res.StatusCode == http.StatusNotModified {
10364		if res.Body != nil {
10365			res.Body.Close()
10366		}
10367		return nil, &googleapi.Error{
10368			Code:   res.StatusCode,
10369			Header: res.Header,
10370		}
10371	}
10372	if err != nil {
10373		return nil, err
10374	}
10375	defer googleapi.CloseBody(res)
10376	if err := googleapi.CheckResponse(res); err != nil {
10377		return nil, err
10378	}
10379	ret := &Domains2{
10380		ServerResponse: googleapi.ServerResponse{
10381			Header:         res.Header,
10382			HTTPStatusCode: res.StatusCode,
10383		},
10384	}
10385	target := &ret
10386	if err := gensupport.DecodeResponse(target, res); err != nil {
10387		return nil, err
10388	}
10389	return ret, nil
10390	// {
10391	//   "description": "Lists the domains of the customer.",
10392	//   "flatPath": "admin/directory/v1/customer/{customer}/domains",
10393	//   "httpMethod": "GET",
10394	//   "id": "directory.domains.list",
10395	//   "parameterOrder": [
10396	//     "customer"
10397	//   ],
10398	//   "parameters": {
10399	//     "customer": {
10400	//       "description": "Immutable ID of the Google Workspace account.",
10401	//       "location": "path",
10402	//       "required": true,
10403	//       "type": "string"
10404	//     }
10405	//   },
10406	//   "path": "admin/directory/v1/customer/{customer}/domains",
10407	//   "response": {
10408	//     "$ref": "Domains2"
10409	//   },
10410	//   "scopes": [
10411	//     "https://www.googleapis.com/auth/admin.directory.domain",
10412	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
10413	//   ]
10414	// }
10415
10416}
10417
10418// method id "directory.groups.delete":
10419
10420type GroupsDeleteCall struct {
10421	s          *Service
10422	groupKey   string
10423	urlParams_ gensupport.URLParams
10424	ctx_       context.Context
10425	header_    http.Header
10426}
10427
10428// Delete: Deletes a group.
10429//
10430// - groupKey: Identifies the group in the API request. The value can be
10431//   the group's email address, group alias, or the unique group ID.
10432func (r *GroupsService) Delete(groupKey string) *GroupsDeleteCall {
10433	c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10434	c.groupKey = groupKey
10435	return c
10436}
10437
10438// Fields allows partial responses to be retrieved. See
10439// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10440// for more information.
10441func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall {
10442	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10443	return c
10444}
10445
10446// Context sets the context to be used in this call's Do method. Any
10447// pending HTTP request will be aborted if the provided context is
10448// canceled.
10449func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
10450	c.ctx_ = ctx
10451	return c
10452}
10453
10454// Header returns an http.Header that can be modified by the caller to
10455// add HTTP headers to the request.
10456func (c *GroupsDeleteCall) Header() http.Header {
10457	if c.header_ == nil {
10458		c.header_ = make(http.Header)
10459	}
10460	return c.header_
10461}
10462
10463func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
10464	reqHeaders := make(http.Header)
10465	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10466	for k, v := range c.header_ {
10467		reqHeaders[k] = v
10468	}
10469	reqHeaders.Set("User-Agent", c.s.userAgent())
10470	var body io.Reader = nil
10471	c.urlParams_.Set("alt", alt)
10472	c.urlParams_.Set("prettyPrint", "false")
10473	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
10474	urls += "?" + c.urlParams_.Encode()
10475	req, err := http.NewRequest("DELETE", urls, body)
10476	if err != nil {
10477		return nil, err
10478	}
10479	req.Header = reqHeaders
10480	googleapi.Expand(req.URL, map[string]string{
10481		"groupKey": c.groupKey,
10482	})
10483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10484}
10485
10486// Do executes the "directory.groups.delete" call.
10487func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
10488	gensupport.SetOptions(c.urlParams_, opts...)
10489	res, err := c.doRequest("json")
10490	if err != nil {
10491		return err
10492	}
10493	defer googleapi.CloseBody(res)
10494	if err := googleapi.CheckResponse(res); err != nil {
10495		return err
10496	}
10497	return nil
10498	// {
10499	//   "description": "Deletes a group.",
10500	//   "flatPath": "admin/directory/v1/groups/{groupKey}",
10501	//   "httpMethod": "DELETE",
10502	//   "id": "directory.groups.delete",
10503	//   "parameterOrder": [
10504	//     "groupKey"
10505	//   ],
10506	//   "parameters": {
10507	//     "groupKey": {
10508	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
10509	//       "location": "path",
10510	//       "required": true,
10511	//       "type": "string"
10512	//     }
10513	//   },
10514	//   "path": "admin/directory/v1/groups/{groupKey}",
10515	//   "scopes": [
10516	//     "https://www.googleapis.com/auth/admin.directory.group"
10517	//   ]
10518	// }
10519
10520}
10521
10522// method id "directory.groups.get":
10523
10524type GroupsGetCall struct {
10525	s            *Service
10526	groupKey     string
10527	urlParams_   gensupport.URLParams
10528	ifNoneMatch_ string
10529	ctx_         context.Context
10530	header_      http.Header
10531}
10532
10533// Get: Retrieves a group's properties.
10534//
10535// - groupKey: Identifies the group in the API request. The value can be
10536//   the group's email address, group alias, or the unique group ID.
10537func (r *GroupsService) Get(groupKey string) *GroupsGetCall {
10538	c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10539	c.groupKey = groupKey
10540	return c
10541}
10542
10543// Fields allows partial responses to be retrieved. See
10544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10545// for more information.
10546func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
10547	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10548	return c
10549}
10550
10551// IfNoneMatch sets the optional parameter which makes the operation
10552// fail if the object's ETag matches the given value. This is useful for
10553// getting updates only after the object has changed since the last
10554// request. Use googleapi.IsNotModified to check whether the response
10555// error from Do is the result of In-None-Match.
10556func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
10557	c.ifNoneMatch_ = entityTag
10558	return c
10559}
10560
10561// Context sets the context to be used in this call's Do method. Any
10562// pending HTTP request will be aborted if the provided context is
10563// canceled.
10564func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
10565	c.ctx_ = ctx
10566	return c
10567}
10568
10569// Header returns an http.Header that can be modified by the caller to
10570// add HTTP headers to the request.
10571func (c *GroupsGetCall) Header() http.Header {
10572	if c.header_ == nil {
10573		c.header_ = make(http.Header)
10574	}
10575	return c.header_
10576}
10577
10578func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
10579	reqHeaders := make(http.Header)
10580	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10581	for k, v := range c.header_ {
10582		reqHeaders[k] = v
10583	}
10584	reqHeaders.Set("User-Agent", c.s.userAgent())
10585	if c.ifNoneMatch_ != "" {
10586		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10587	}
10588	var body io.Reader = nil
10589	c.urlParams_.Set("alt", alt)
10590	c.urlParams_.Set("prettyPrint", "false")
10591	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
10592	urls += "?" + c.urlParams_.Encode()
10593	req, err := http.NewRequest("GET", urls, body)
10594	if err != nil {
10595		return nil, err
10596	}
10597	req.Header = reqHeaders
10598	googleapi.Expand(req.URL, map[string]string{
10599		"groupKey": c.groupKey,
10600	})
10601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10602}
10603
10604// Do executes the "directory.groups.get" call.
10605// Exactly one of *Group or error will be non-nil. Any non-2xx status
10606// code is an error. Response headers are in either
10607// *Group.ServerResponse.Header or (if a response was returned at all)
10608// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10609// check whether the returned error was because http.StatusNotModified
10610// was returned.
10611func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
10612	gensupport.SetOptions(c.urlParams_, opts...)
10613	res, err := c.doRequest("json")
10614	if res != nil && res.StatusCode == http.StatusNotModified {
10615		if res.Body != nil {
10616			res.Body.Close()
10617		}
10618		return nil, &googleapi.Error{
10619			Code:   res.StatusCode,
10620			Header: res.Header,
10621		}
10622	}
10623	if err != nil {
10624		return nil, err
10625	}
10626	defer googleapi.CloseBody(res)
10627	if err := googleapi.CheckResponse(res); err != nil {
10628		return nil, err
10629	}
10630	ret := &Group{
10631		ServerResponse: googleapi.ServerResponse{
10632			Header:         res.Header,
10633			HTTPStatusCode: res.StatusCode,
10634		},
10635	}
10636	target := &ret
10637	if err := gensupport.DecodeResponse(target, res); err != nil {
10638		return nil, err
10639	}
10640	return ret, nil
10641	// {
10642	//   "description": "Retrieves a group's properties.",
10643	//   "flatPath": "admin/directory/v1/groups/{groupKey}",
10644	//   "httpMethod": "GET",
10645	//   "id": "directory.groups.get",
10646	//   "parameterOrder": [
10647	//     "groupKey"
10648	//   ],
10649	//   "parameters": {
10650	//     "groupKey": {
10651	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
10652	//       "location": "path",
10653	//       "required": true,
10654	//       "type": "string"
10655	//     }
10656	//   },
10657	//   "path": "admin/directory/v1/groups/{groupKey}",
10658	//   "response": {
10659	//     "$ref": "Group"
10660	//   },
10661	//   "scopes": [
10662	//     "https://www.googleapis.com/auth/admin.directory.group",
10663	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
10664	//   ]
10665	// }
10666
10667}
10668
10669// method id "directory.groups.insert":
10670
10671type GroupsInsertCall struct {
10672	s          *Service
10673	group      *Group
10674	urlParams_ gensupport.URLParams
10675	ctx_       context.Context
10676	header_    http.Header
10677}
10678
10679// Insert: Creates a group.
10680func (r *GroupsService) Insert(group *Group) *GroupsInsertCall {
10681	c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10682	c.group = group
10683	return c
10684}
10685
10686// Fields allows partial responses to be retrieved. See
10687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10688// for more information.
10689func (c *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall {
10690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10691	return c
10692}
10693
10694// Context sets the context to be used in this call's Do method. Any
10695// pending HTTP request will be aborted if the provided context is
10696// canceled.
10697func (c *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
10698	c.ctx_ = ctx
10699	return c
10700}
10701
10702// Header returns an http.Header that can be modified by the caller to
10703// add HTTP headers to the request.
10704func (c *GroupsInsertCall) Header() http.Header {
10705	if c.header_ == nil {
10706		c.header_ = make(http.Header)
10707	}
10708	return c.header_
10709}
10710
10711func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
10712	reqHeaders := make(http.Header)
10713	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10714	for k, v := range c.header_ {
10715		reqHeaders[k] = v
10716	}
10717	reqHeaders.Set("User-Agent", c.s.userAgent())
10718	var body io.Reader = nil
10719	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
10720	if err != nil {
10721		return nil, err
10722	}
10723	reqHeaders.Set("Content-Type", "application/json")
10724	c.urlParams_.Set("alt", alt)
10725	c.urlParams_.Set("prettyPrint", "false")
10726	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups")
10727	urls += "?" + c.urlParams_.Encode()
10728	req, err := http.NewRequest("POST", urls, body)
10729	if err != nil {
10730		return nil, err
10731	}
10732	req.Header = reqHeaders
10733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10734}
10735
10736// Do executes the "directory.groups.insert" call.
10737// Exactly one of *Group or error will be non-nil. Any non-2xx status
10738// code is an error. Response headers are in either
10739// *Group.ServerResponse.Header or (if a response was returned at all)
10740// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10741// check whether the returned error was because http.StatusNotModified
10742// was returned.
10743func (c *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Group, error) {
10744	gensupport.SetOptions(c.urlParams_, opts...)
10745	res, err := c.doRequest("json")
10746	if res != nil && res.StatusCode == http.StatusNotModified {
10747		if res.Body != nil {
10748			res.Body.Close()
10749		}
10750		return nil, &googleapi.Error{
10751			Code:   res.StatusCode,
10752			Header: res.Header,
10753		}
10754	}
10755	if err != nil {
10756		return nil, err
10757	}
10758	defer googleapi.CloseBody(res)
10759	if err := googleapi.CheckResponse(res); err != nil {
10760		return nil, err
10761	}
10762	ret := &Group{
10763		ServerResponse: googleapi.ServerResponse{
10764			Header:         res.Header,
10765			HTTPStatusCode: res.StatusCode,
10766		},
10767	}
10768	target := &ret
10769	if err := gensupport.DecodeResponse(target, res); err != nil {
10770		return nil, err
10771	}
10772	return ret, nil
10773	// {
10774	//   "description": "Creates a group.",
10775	//   "flatPath": "admin/directory/v1/groups",
10776	//   "httpMethod": "POST",
10777	//   "id": "directory.groups.insert",
10778	//   "parameterOrder": [],
10779	//   "parameters": {},
10780	//   "path": "admin/directory/v1/groups",
10781	//   "request": {
10782	//     "$ref": "Group"
10783	//   },
10784	//   "response": {
10785	//     "$ref": "Group"
10786	//   },
10787	//   "scopes": [
10788	//     "https://www.googleapis.com/auth/admin.directory.group"
10789	//   ]
10790	// }
10791
10792}
10793
10794// method id "directory.groups.list":
10795
10796type GroupsListCall struct {
10797	s            *Service
10798	urlParams_   gensupport.URLParams
10799	ifNoneMatch_ string
10800	ctx_         context.Context
10801	header_      http.Header
10802}
10803
10804// List: Retrieves all groups of a domain or of a user given a userKey
10805// (paginated).
10806func (r *GroupsService) List() *GroupsListCall {
10807	c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10808	return c
10809}
10810
10811// Customer sets the optional parameter "customer": The unique ID for
10812// the customer's Google Workspace account. In case of a multi-domain
10813// account, to fetch all groups for a customer, fill this field instead
10814// of domain. As an account administrator, you can also use the
10815// `my_customer` alias to represent your account's `customerId`. The
10816// `customerId` is also returned as part of the Users
10817// (/admin-sdk/directory/v1/reference/users)
10818func (c *GroupsListCall) Customer(customer string) *GroupsListCall {
10819	c.urlParams_.Set("customer", customer)
10820	return c
10821}
10822
10823// Domain sets the optional parameter "domain": The domain name. Use
10824// this field to get fields from only one domain. To return all domains
10825// for a customer account, use the `customer` query parameter instead.
10826func (c *GroupsListCall) Domain(domain string) *GroupsListCall {
10827	c.urlParams_.Set("domain", domain)
10828	return c
10829}
10830
10831// MaxResults sets the optional parameter "maxResults": Maximum number
10832// of results to return. Max allowed value is 200.
10833func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall {
10834	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10835	return c
10836}
10837
10838// OrderBy sets the optional parameter "orderBy": Column to use for
10839// sorting results
10840//
10841// Possible values:
10842//   "email" - Email of the group.
10843func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall {
10844	c.urlParams_.Set("orderBy", orderBy)
10845	return c
10846}
10847
10848// PageToken sets the optional parameter "pageToken": Token to specify
10849// next page in the list
10850func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall {
10851	c.urlParams_.Set("pageToken", pageToken)
10852	return c
10853}
10854
10855// Query sets the optional parameter "query": Query string search.
10856// Should be of the form "". Complete documentation is at https:
10857// //developers.google.com/admin-sdk/directory/v1/guides/search-groups
10858func (c *GroupsListCall) Query(query string) *GroupsListCall {
10859	c.urlParams_.Set("query", query)
10860	return c
10861}
10862
10863// SortOrder sets the optional parameter "sortOrder": Whether to return
10864// results in ascending or descending order. Only of use when orderBy is
10865// also used
10866//
10867// Possible values:
10868//   "ASCENDING" - Ascending order.
10869//   "DESCENDING" - Descending order.
10870func (c *GroupsListCall) SortOrder(sortOrder string) *GroupsListCall {
10871	c.urlParams_.Set("sortOrder", sortOrder)
10872	return c
10873}
10874
10875// UserKey sets the optional parameter "userKey": Email or immutable ID
10876// of the user if only those groups are to be listed, the given user is
10877// a member of. If it's an ID, it should match with the ID of the user
10878// object.
10879func (c *GroupsListCall) UserKey(userKey string) *GroupsListCall {
10880	c.urlParams_.Set("userKey", userKey)
10881	return c
10882}
10883
10884// Fields allows partial responses to be retrieved. See
10885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10886// for more information.
10887func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall {
10888	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10889	return c
10890}
10891
10892// IfNoneMatch sets the optional parameter which makes the operation
10893// fail if the object's ETag matches the given value. This is useful for
10894// getting updates only after the object has changed since the last
10895// request. Use googleapi.IsNotModified to check whether the response
10896// error from Do is the result of In-None-Match.
10897func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall {
10898	c.ifNoneMatch_ = entityTag
10899	return c
10900}
10901
10902// Context sets the context to be used in this call's Do method. Any
10903// pending HTTP request will be aborted if the provided context is
10904// canceled.
10905func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
10906	c.ctx_ = ctx
10907	return c
10908}
10909
10910// Header returns an http.Header that can be modified by the caller to
10911// add HTTP headers to the request.
10912func (c *GroupsListCall) Header() http.Header {
10913	if c.header_ == nil {
10914		c.header_ = make(http.Header)
10915	}
10916	return c.header_
10917}
10918
10919func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
10920	reqHeaders := make(http.Header)
10921	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
10922	for k, v := range c.header_ {
10923		reqHeaders[k] = v
10924	}
10925	reqHeaders.Set("User-Agent", c.s.userAgent())
10926	if c.ifNoneMatch_ != "" {
10927		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10928	}
10929	var body io.Reader = nil
10930	c.urlParams_.Set("alt", alt)
10931	c.urlParams_.Set("prettyPrint", "false")
10932	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups")
10933	urls += "?" + c.urlParams_.Encode()
10934	req, err := http.NewRequest("GET", urls, body)
10935	if err != nil {
10936		return nil, err
10937	}
10938	req.Header = reqHeaders
10939	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10940}
10941
10942// Do executes the "directory.groups.list" call.
10943// Exactly one of *Groups or error will be non-nil. Any non-2xx status
10944// code is an error. Response headers are in either
10945// *Groups.ServerResponse.Header or (if a response was returned at all)
10946// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10947// check whether the returned error was because http.StatusNotModified
10948// was returned.
10949func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
10950	gensupport.SetOptions(c.urlParams_, opts...)
10951	res, err := c.doRequest("json")
10952	if res != nil && res.StatusCode == http.StatusNotModified {
10953		if res.Body != nil {
10954			res.Body.Close()
10955		}
10956		return nil, &googleapi.Error{
10957			Code:   res.StatusCode,
10958			Header: res.Header,
10959		}
10960	}
10961	if err != nil {
10962		return nil, err
10963	}
10964	defer googleapi.CloseBody(res)
10965	if err := googleapi.CheckResponse(res); err != nil {
10966		return nil, err
10967	}
10968	ret := &Groups{
10969		ServerResponse: googleapi.ServerResponse{
10970			Header:         res.Header,
10971			HTTPStatusCode: res.StatusCode,
10972		},
10973	}
10974	target := &ret
10975	if err := gensupport.DecodeResponse(target, res); err != nil {
10976		return nil, err
10977	}
10978	return ret, nil
10979	// {
10980	//   "description": "Retrieves all groups of a domain or of a user given a userKey (paginated).",
10981	//   "flatPath": "admin/directory/v1/groups",
10982	//   "httpMethod": "GET",
10983	//   "id": "directory.groups.list",
10984	//   "parameterOrder": [],
10985	//   "parameters": {
10986	//     "customer": {
10987	//       "description": "The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](/admin-sdk/directory/v1/reference/users)",
10988	//       "location": "query",
10989	//       "type": "string"
10990	//     },
10991	//     "domain": {
10992	//       "description": "The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the `customer` query parameter instead.",
10993	//       "location": "query",
10994	//       "type": "string"
10995	//     },
10996	//     "maxResults": {
10997	//       "default": "200",
10998	//       "description": "Maximum number of results to return. Max allowed value is 200.",
10999	//       "format": "int32",
11000	//       "location": "query",
11001	//       "minimum": "1",
11002	//       "type": "integer"
11003	//     },
11004	//     "orderBy": {
11005	//       "description": "Column to use for sorting results",
11006	//       "enum": [
11007	//         "email"
11008	//       ],
11009	//       "enumDescriptions": [
11010	//         "Email of the group."
11011	//       ],
11012	//       "location": "query",
11013	//       "type": "string"
11014	//     },
11015	//     "pageToken": {
11016	//       "description": "Token to specify next page in the list",
11017	//       "location": "query",
11018	//       "type": "string"
11019	//     },
11020	//     "query": {
11021	//       "description": "Query string search. Should be of the form \"\". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups",
11022	//       "location": "query",
11023	//       "type": "string"
11024	//     },
11025	//     "sortOrder": {
11026	//       "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used",
11027	//       "enum": [
11028	//         "ASCENDING",
11029	//         "DESCENDING"
11030	//       ],
11031	//       "enumDescriptions": [
11032	//         "Ascending order.",
11033	//         "Descending order."
11034	//       ],
11035	//       "location": "query",
11036	//       "type": "string"
11037	//     },
11038	//     "userKey": {
11039	//       "description": "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.",
11040	//       "location": "query",
11041	//       "type": "string"
11042	//     }
11043	//   },
11044	//   "path": "admin/directory/v1/groups",
11045	//   "response": {
11046	//     "$ref": "Groups"
11047	//   },
11048	//   "scopes": [
11049	//     "https://www.googleapis.com/auth/admin.directory.group",
11050	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
11051	//   ]
11052	// }
11053
11054}
11055
11056// Pages invokes f for each page of results.
11057// A non-nil error returned from f will halt the iteration.
11058// The provided context supersedes any context provided to the Context method.
11059func (c *GroupsListCall) Pages(ctx context.Context, f func(*Groups) error) error {
11060	c.ctx_ = ctx
11061	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11062	for {
11063		x, err := c.Do()
11064		if err != nil {
11065			return err
11066		}
11067		if err := f(x); err != nil {
11068			return err
11069		}
11070		if x.NextPageToken == "" {
11071			return nil
11072		}
11073		c.PageToken(x.NextPageToken)
11074	}
11075}
11076
11077// method id "directory.groups.patch":
11078
11079type GroupsPatchCall struct {
11080	s          *Service
11081	groupKey   string
11082	group      *Group
11083	urlParams_ gensupport.URLParams
11084	ctx_       context.Context
11085	header_    http.Header
11086}
11087
11088// Patch: Updates a group's properties. This method supports patch
11089// semantics (/admin-sdk/directory/v1/guides/performance#patch).
11090//
11091// - groupKey: Identifies the group in the API request. The value can be
11092//   the group's email address, group alias, or the unique group ID.
11093func (r *GroupsService) Patch(groupKey string, group *Group) *GroupsPatchCall {
11094	c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11095	c.groupKey = groupKey
11096	c.group = group
11097	return c
11098}
11099
11100// Fields allows partial responses to be retrieved. See
11101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11102// for more information.
11103func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
11104	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11105	return c
11106}
11107
11108// Context sets the context to be used in this call's Do method. Any
11109// pending HTTP request will be aborted if the provided context is
11110// canceled.
11111func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
11112	c.ctx_ = ctx
11113	return c
11114}
11115
11116// Header returns an http.Header that can be modified by the caller to
11117// add HTTP headers to the request.
11118func (c *GroupsPatchCall) Header() http.Header {
11119	if c.header_ == nil {
11120		c.header_ = make(http.Header)
11121	}
11122	return c.header_
11123}
11124
11125func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
11126	reqHeaders := make(http.Header)
11127	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11128	for k, v := range c.header_ {
11129		reqHeaders[k] = v
11130	}
11131	reqHeaders.Set("User-Agent", c.s.userAgent())
11132	var body io.Reader = nil
11133	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
11134	if err != nil {
11135		return nil, err
11136	}
11137	reqHeaders.Set("Content-Type", "application/json")
11138	c.urlParams_.Set("alt", alt)
11139	c.urlParams_.Set("prettyPrint", "false")
11140	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
11141	urls += "?" + c.urlParams_.Encode()
11142	req, err := http.NewRequest("PATCH", urls, body)
11143	if err != nil {
11144		return nil, err
11145	}
11146	req.Header = reqHeaders
11147	googleapi.Expand(req.URL, map[string]string{
11148		"groupKey": c.groupKey,
11149	})
11150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11151}
11152
11153// Do executes the "directory.groups.patch" call.
11154// Exactly one of *Group or error will be non-nil. Any non-2xx status
11155// code is an error. Response headers are in either
11156// *Group.ServerResponse.Header or (if a response was returned at all)
11157// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11158// check whether the returned error was because http.StatusNotModified
11159// was returned.
11160func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Group, error) {
11161	gensupport.SetOptions(c.urlParams_, opts...)
11162	res, err := c.doRequest("json")
11163	if res != nil && res.StatusCode == http.StatusNotModified {
11164		if res.Body != nil {
11165			res.Body.Close()
11166		}
11167		return nil, &googleapi.Error{
11168			Code:   res.StatusCode,
11169			Header: res.Header,
11170		}
11171	}
11172	if err != nil {
11173		return nil, err
11174	}
11175	defer googleapi.CloseBody(res)
11176	if err := googleapi.CheckResponse(res); err != nil {
11177		return nil, err
11178	}
11179	ret := &Group{
11180		ServerResponse: googleapi.ServerResponse{
11181			Header:         res.Header,
11182			HTTPStatusCode: res.StatusCode,
11183		},
11184	}
11185	target := &ret
11186	if err := gensupport.DecodeResponse(target, res); err != nil {
11187		return nil, err
11188	}
11189	return ret, nil
11190	// {
11191	//   "description": "Updates a group's properties. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).",
11192	//   "flatPath": "admin/directory/v1/groups/{groupKey}",
11193	//   "httpMethod": "PATCH",
11194	//   "id": "directory.groups.patch",
11195	//   "parameterOrder": [
11196	//     "groupKey"
11197	//   ],
11198	//   "parameters": {
11199	//     "groupKey": {
11200	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11201	//       "location": "path",
11202	//       "required": true,
11203	//       "type": "string"
11204	//     }
11205	//   },
11206	//   "path": "admin/directory/v1/groups/{groupKey}",
11207	//   "request": {
11208	//     "$ref": "Group"
11209	//   },
11210	//   "response": {
11211	//     "$ref": "Group"
11212	//   },
11213	//   "scopes": [
11214	//     "https://www.googleapis.com/auth/admin.directory.group"
11215	//   ]
11216	// }
11217
11218}
11219
11220// method id "directory.groups.update":
11221
11222type GroupsUpdateCall struct {
11223	s          *Service
11224	groupKey   string
11225	group      *Group
11226	urlParams_ gensupport.URLParams
11227	ctx_       context.Context
11228	header_    http.Header
11229}
11230
11231// Update: Updates a group's properties.
11232//
11233// - groupKey: Identifies the group in the API request. The value can be
11234//   the group's email address, group alias, or the unique group ID.
11235func (r *GroupsService) Update(groupKey string, group *Group) *GroupsUpdateCall {
11236	c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11237	c.groupKey = groupKey
11238	c.group = group
11239	return c
11240}
11241
11242// Fields allows partial responses to be retrieved. See
11243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11244// for more information.
11245func (c *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall {
11246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11247	return c
11248}
11249
11250// Context sets the context to be used in this call's Do method. Any
11251// pending HTTP request will be aborted if the provided context is
11252// canceled.
11253func (c *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
11254	c.ctx_ = ctx
11255	return c
11256}
11257
11258// Header returns an http.Header that can be modified by the caller to
11259// add HTTP headers to the request.
11260func (c *GroupsUpdateCall) Header() http.Header {
11261	if c.header_ == nil {
11262		c.header_ = make(http.Header)
11263	}
11264	return c.header_
11265}
11266
11267func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
11268	reqHeaders := make(http.Header)
11269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11270	for k, v := range c.header_ {
11271		reqHeaders[k] = v
11272	}
11273	reqHeaders.Set("User-Agent", c.s.userAgent())
11274	var body io.Reader = nil
11275	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
11276	if err != nil {
11277		return nil, err
11278	}
11279	reqHeaders.Set("Content-Type", "application/json")
11280	c.urlParams_.Set("alt", alt)
11281	c.urlParams_.Set("prettyPrint", "false")
11282	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}")
11283	urls += "?" + c.urlParams_.Encode()
11284	req, err := http.NewRequest("PUT", urls, body)
11285	if err != nil {
11286		return nil, err
11287	}
11288	req.Header = reqHeaders
11289	googleapi.Expand(req.URL, map[string]string{
11290		"groupKey": c.groupKey,
11291	})
11292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11293}
11294
11295// Do executes the "directory.groups.update" call.
11296// Exactly one of *Group or error will be non-nil. Any non-2xx status
11297// code is an error. Response headers are in either
11298// *Group.ServerResponse.Header or (if a response was returned at all)
11299// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11300// check whether the returned error was because http.StatusNotModified
11301// was returned.
11302func (c *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, error) {
11303	gensupport.SetOptions(c.urlParams_, opts...)
11304	res, err := c.doRequest("json")
11305	if res != nil && res.StatusCode == http.StatusNotModified {
11306		if res.Body != nil {
11307			res.Body.Close()
11308		}
11309		return nil, &googleapi.Error{
11310			Code:   res.StatusCode,
11311			Header: res.Header,
11312		}
11313	}
11314	if err != nil {
11315		return nil, err
11316	}
11317	defer googleapi.CloseBody(res)
11318	if err := googleapi.CheckResponse(res); err != nil {
11319		return nil, err
11320	}
11321	ret := &Group{
11322		ServerResponse: googleapi.ServerResponse{
11323			Header:         res.Header,
11324			HTTPStatusCode: res.StatusCode,
11325		},
11326	}
11327	target := &ret
11328	if err := gensupport.DecodeResponse(target, res); err != nil {
11329		return nil, err
11330	}
11331	return ret, nil
11332	// {
11333	//   "description": "Updates a group's properties.",
11334	//   "flatPath": "admin/directory/v1/groups/{groupKey}",
11335	//   "httpMethod": "PUT",
11336	//   "id": "directory.groups.update",
11337	//   "parameterOrder": [
11338	//     "groupKey"
11339	//   ],
11340	//   "parameters": {
11341	//     "groupKey": {
11342	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11343	//       "location": "path",
11344	//       "required": true,
11345	//       "type": "string"
11346	//     }
11347	//   },
11348	//   "path": "admin/directory/v1/groups/{groupKey}",
11349	//   "request": {
11350	//     "$ref": "Group"
11351	//   },
11352	//   "response": {
11353	//     "$ref": "Group"
11354	//   },
11355	//   "scopes": [
11356	//     "https://www.googleapis.com/auth/admin.directory.group"
11357	//   ]
11358	// }
11359
11360}
11361
11362// method id "directory.groups.aliases.delete":
11363
11364type GroupsAliasesDeleteCall struct {
11365	s          *Service
11366	groupKey   string
11367	alias      string
11368	urlParams_ gensupport.URLParams
11369	ctx_       context.Context
11370	header_    http.Header
11371}
11372
11373// Delete: Removes an alias.
11374//
11375// - alias: The alias to be removed.
11376// - groupKey: Identifies the group in the API request. The value can be
11377//   the group's email address, group alias, or the unique group ID.
11378func (r *GroupsAliasesService) Delete(groupKey string, alias string) *GroupsAliasesDeleteCall {
11379	c := &GroupsAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11380	c.groupKey = groupKey
11381	c.alias = alias
11382	return c
11383}
11384
11385// Fields allows partial responses to be retrieved. See
11386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11387// for more information.
11388func (c *GroupsAliasesDeleteCall) Fields(s ...googleapi.Field) *GroupsAliasesDeleteCall {
11389	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11390	return c
11391}
11392
11393// Context sets the context to be used in this call's Do method. Any
11394// pending HTTP request will be aborted if the provided context is
11395// canceled.
11396func (c *GroupsAliasesDeleteCall) Context(ctx context.Context) *GroupsAliasesDeleteCall {
11397	c.ctx_ = ctx
11398	return c
11399}
11400
11401// Header returns an http.Header that can be modified by the caller to
11402// add HTTP headers to the request.
11403func (c *GroupsAliasesDeleteCall) Header() http.Header {
11404	if c.header_ == nil {
11405		c.header_ = make(http.Header)
11406	}
11407	return c.header_
11408}
11409
11410func (c *GroupsAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
11411	reqHeaders := make(http.Header)
11412	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11413	for k, v := range c.header_ {
11414		reqHeaders[k] = v
11415	}
11416	reqHeaders.Set("User-Agent", c.s.userAgent())
11417	var body io.Reader = nil
11418	c.urlParams_.Set("alt", alt)
11419	c.urlParams_.Set("prettyPrint", "false")
11420	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases/{alias}")
11421	urls += "?" + c.urlParams_.Encode()
11422	req, err := http.NewRequest("DELETE", urls, body)
11423	if err != nil {
11424		return nil, err
11425	}
11426	req.Header = reqHeaders
11427	googleapi.Expand(req.URL, map[string]string{
11428		"groupKey": c.groupKey,
11429		"alias":    c.alias,
11430	})
11431	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11432}
11433
11434// Do executes the "directory.groups.aliases.delete" call.
11435func (c *GroupsAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
11436	gensupport.SetOptions(c.urlParams_, opts...)
11437	res, err := c.doRequest("json")
11438	if err != nil {
11439		return err
11440	}
11441	defer googleapi.CloseBody(res)
11442	if err := googleapi.CheckResponse(res); err != nil {
11443		return err
11444	}
11445	return nil
11446	// {
11447	//   "description": "Removes an alias.",
11448	//   "flatPath": "admin/directory/v1/groups/{groupKey}/aliases/{alias}",
11449	//   "httpMethod": "DELETE",
11450	//   "id": "directory.groups.aliases.delete",
11451	//   "parameterOrder": [
11452	//     "groupKey",
11453	//     "alias"
11454	//   ],
11455	//   "parameters": {
11456	//     "alias": {
11457	//       "description": "The alias to be removed",
11458	//       "location": "path",
11459	//       "required": true,
11460	//       "type": "string"
11461	//     },
11462	//     "groupKey": {
11463	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11464	//       "location": "path",
11465	//       "required": true,
11466	//       "type": "string"
11467	//     }
11468	//   },
11469	//   "path": "admin/directory/v1/groups/{groupKey}/aliases/{alias}",
11470	//   "scopes": [
11471	//     "https://www.googleapis.com/auth/admin.directory.group"
11472	//   ]
11473	// }
11474
11475}
11476
11477// method id "directory.groups.aliases.insert":
11478
11479type GroupsAliasesInsertCall struct {
11480	s          *Service
11481	groupKey   string
11482	alias      *Alias
11483	urlParams_ gensupport.URLParams
11484	ctx_       context.Context
11485	header_    http.Header
11486}
11487
11488// Insert: Adds an alias for the group.
11489//
11490// - groupKey: Identifies the group in the API request. The value can be
11491//   the group's email address, group alias, or the unique group ID.
11492func (r *GroupsAliasesService) Insert(groupKey string, alias *Alias) *GroupsAliasesInsertCall {
11493	c := &GroupsAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11494	c.groupKey = groupKey
11495	c.alias = alias
11496	return c
11497}
11498
11499// Fields allows partial responses to be retrieved. See
11500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11501// for more information.
11502func (c *GroupsAliasesInsertCall) Fields(s ...googleapi.Field) *GroupsAliasesInsertCall {
11503	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11504	return c
11505}
11506
11507// Context sets the context to be used in this call's Do method. Any
11508// pending HTTP request will be aborted if the provided context is
11509// canceled.
11510func (c *GroupsAliasesInsertCall) Context(ctx context.Context) *GroupsAliasesInsertCall {
11511	c.ctx_ = ctx
11512	return c
11513}
11514
11515// Header returns an http.Header that can be modified by the caller to
11516// add HTTP headers to the request.
11517func (c *GroupsAliasesInsertCall) Header() http.Header {
11518	if c.header_ == nil {
11519		c.header_ = make(http.Header)
11520	}
11521	return c.header_
11522}
11523
11524func (c *GroupsAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
11525	reqHeaders := make(http.Header)
11526	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11527	for k, v := range c.header_ {
11528		reqHeaders[k] = v
11529	}
11530	reqHeaders.Set("User-Agent", c.s.userAgent())
11531	var body io.Reader = nil
11532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
11533	if err != nil {
11534		return nil, err
11535	}
11536	reqHeaders.Set("Content-Type", "application/json")
11537	c.urlParams_.Set("alt", alt)
11538	c.urlParams_.Set("prettyPrint", "false")
11539	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases")
11540	urls += "?" + c.urlParams_.Encode()
11541	req, err := http.NewRequest("POST", urls, body)
11542	if err != nil {
11543		return nil, err
11544	}
11545	req.Header = reqHeaders
11546	googleapi.Expand(req.URL, map[string]string{
11547		"groupKey": c.groupKey,
11548	})
11549	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11550}
11551
11552// Do executes the "directory.groups.aliases.insert" call.
11553// Exactly one of *Alias or error will be non-nil. Any non-2xx status
11554// code is an error. Response headers are in either
11555// *Alias.ServerResponse.Header or (if a response was returned at all)
11556// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11557// check whether the returned error was because http.StatusNotModified
11558// was returned.
11559func (c *GroupsAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
11560	gensupport.SetOptions(c.urlParams_, opts...)
11561	res, err := c.doRequest("json")
11562	if res != nil && res.StatusCode == http.StatusNotModified {
11563		if res.Body != nil {
11564			res.Body.Close()
11565		}
11566		return nil, &googleapi.Error{
11567			Code:   res.StatusCode,
11568			Header: res.Header,
11569		}
11570	}
11571	if err != nil {
11572		return nil, err
11573	}
11574	defer googleapi.CloseBody(res)
11575	if err := googleapi.CheckResponse(res); err != nil {
11576		return nil, err
11577	}
11578	ret := &Alias{
11579		ServerResponse: googleapi.ServerResponse{
11580			Header:         res.Header,
11581			HTTPStatusCode: res.StatusCode,
11582		},
11583	}
11584	target := &ret
11585	if err := gensupport.DecodeResponse(target, res); err != nil {
11586		return nil, err
11587	}
11588	return ret, nil
11589	// {
11590	//   "description": "Adds an alias for the group.",
11591	//   "flatPath": "admin/directory/v1/groups/{groupKey}/aliases",
11592	//   "httpMethod": "POST",
11593	//   "id": "directory.groups.aliases.insert",
11594	//   "parameterOrder": [
11595	//     "groupKey"
11596	//   ],
11597	//   "parameters": {
11598	//     "groupKey": {
11599	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11600	//       "location": "path",
11601	//       "required": true,
11602	//       "type": "string"
11603	//     }
11604	//   },
11605	//   "path": "admin/directory/v1/groups/{groupKey}/aliases",
11606	//   "request": {
11607	//     "$ref": "Alias"
11608	//   },
11609	//   "response": {
11610	//     "$ref": "Alias"
11611	//   },
11612	//   "scopes": [
11613	//     "https://www.googleapis.com/auth/admin.directory.group"
11614	//   ]
11615	// }
11616
11617}
11618
11619// method id "directory.groups.aliases.list":
11620
11621type GroupsAliasesListCall struct {
11622	s            *Service
11623	groupKey     string
11624	urlParams_   gensupport.URLParams
11625	ifNoneMatch_ string
11626	ctx_         context.Context
11627	header_      http.Header
11628}
11629
11630// List: Lists all aliases for a group.
11631//
11632// - groupKey: Identifies the group in the API request. The value can be
11633//   the group's email address, group alias, or the unique group ID.
11634func (r *GroupsAliasesService) List(groupKey string) *GroupsAliasesListCall {
11635	c := &GroupsAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11636	c.groupKey = groupKey
11637	return c
11638}
11639
11640// Fields allows partial responses to be retrieved. See
11641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11642// for more information.
11643func (c *GroupsAliasesListCall) Fields(s ...googleapi.Field) *GroupsAliasesListCall {
11644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11645	return c
11646}
11647
11648// IfNoneMatch sets the optional parameter which makes the operation
11649// fail if the object's ETag matches the given value. This is useful for
11650// getting updates only after the object has changed since the last
11651// request. Use googleapi.IsNotModified to check whether the response
11652// error from Do is the result of In-None-Match.
11653func (c *GroupsAliasesListCall) IfNoneMatch(entityTag string) *GroupsAliasesListCall {
11654	c.ifNoneMatch_ = entityTag
11655	return c
11656}
11657
11658// Context sets the context to be used in this call's Do method. Any
11659// pending HTTP request will be aborted if the provided context is
11660// canceled.
11661func (c *GroupsAliasesListCall) Context(ctx context.Context) *GroupsAliasesListCall {
11662	c.ctx_ = ctx
11663	return c
11664}
11665
11666// Header returns an http.Header that can be modified by the caller to
11667// add HTTP headers to the request.
11668func (c *GroupsAliasesListCall) Header() http.Header {
11669	if c.header_ == nil {
11670		c.header_ = make(http.Header)
11671	}
11672	return c.header_
11673}
11674
11675func (c *GroupsAliasesListCall) doRequest(alt string) (*http.Response, error) {
11676	reqHeaders := make(http.Header)
11677	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11678	for k, v := range c.header_ {
11679		reqHeaders[k] = v
11680	}
11681	reqHeaders.Set("User-Agent", c.s.userAgent())
11682	if c.ifNoneMatch_ != "" {
11683		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11684	}
11685	var body io.Reader = nil
11686	c.urlParams_.Set("alt", alt)
11687	c.urlParams_.Set("prettyPrint", "false")
11688	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/aliases")
11689	urls += "?" + c.urlParams_.Encode()
11690	req, err := http.NewRequest("GET", urls, body)
11691	if err != nil {
11692		return nil, err
11693	}
11694	req.Header = reqHeaders
11695	googleapi.Expand(req.URL, map[string]string{
11696		"groupKey": c.groupKey,
11697	})
11698	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11699}
11700
11701// Do executes the "directory.groups.aliases.list" call.
11702// Exactly one of *Aliases or error will be non-nil. Any non-2xx status
11703// code is an error. Response headers are in either
11704// *Aliases.ServerResponse.Header or (if a response was returned at all)
11705// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11706// check whether the returned error was because http.StatusNotModified
11707// was returned.
11708func (c *GroupsAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
11709	gensupport.SetOptions(c.urlParams_, opts...)
11710	res, err := c.doRequest("json")
11711	if res != nil && res.StatusCode == http.StatusNotModified {
11712		if res.Body != nil {
11713			res.Body.Close()
11714		}
11715		return nil, &googleapi.Error{
11716			Code:   res.StatusCode,
11717			Header: res.Header,
11718		}
11719	}
11720	if err != nil {
11721		return nil, err
11722	}
11723	defer googleapi.CloseBody(res)
11724	if err := googleapi.CheckResponse(res); err != nil {
11725		return nil, err
11726	}
11727	ret := &Aliases{
11728		ServerResponse: googleapi.ServerResponse{
11729			Header:         res.Header,
11730			HTTPStatusCode: res.StatusCode,
11731		},
11732	}
11733	target := &ret
11734	if err := gensupport.DecodeResponse(target, res); err != nil {
11735		return nil, err
11736	}
11737	return ret, nil
11738	// {
11739	//   "description": "Lists all aliases for a group.",
11740	//   "flatPath": "admin/directory/v1/groups/{groupKey}/aliases",
11741	//   "httpMethod": "GET",
11742	//   "id": "directory.groups.aliases.list",
11743	//   "parameterOrder": [
11744	//     "groupKey"
11745	//   ],
11746	//   "parameters": {
11747	//     "groupKey": {
11748	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11749	//       "location": "path",
11750	//       "required": true,
11751	//       "type": "string"
11752	//     }
11753	//   },
11754	//   "path": "admin/directory/v1/groups/{groupKey}/aliases",
11755	//   "response": {
11756	//     "$ref": "Aliases"
11757	//   },
11758	//   "scopes": [
11759	//     "https://www.googleapis.com/auth/admin.directory.group",
11760	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
11761	//   ]
11762	// }
11763
11764}
11765
11766// method id "directory.members.delete":
11767
11768type MembersDeleteCall struct {
11769	s          *Service
11770	groupKey   string
11771	memberKey  string
11772	urlParams_ gensupport.URLParams
11773	ctx_       context.Context
11774	header_    http.Header
11775}
11776
11777// Delete: Removes a member from a group.
11778//
11779// - groupKey: Identifies the group in the API request. The value can be
11780//   the group's email address, group alias, or the unique group ID.
11781// - memberKey: Identifies the group member in the API request. A group
11782//   member can be a user or another group. The value can be the
11783//   member's (group or user) primary email address, alias, or unique
11784//   ID.
11785func (r *MembersService) Delete(groupKey string, memberKey string) *MembersDeleteCall {
11786	c := &MembersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11787	c.groupKey = groupKey
11788	c.memberKey = memberKey
11789	return c
11790}
11791
11792// Fields allows partial responses to be retrieved. See
11793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11794// for more information.
11795func (c *MembersDeleteCall) Fields(s ...googleapi.Field) *MembersDeleteCall {
11796	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11797	return c
11798}
11799
11800// Context sets the context to be used in this call's Do method. Any
11801// pending HTTP request will be aborted if the provided context is
11802// canceled.
11803func (c *MembersDeleteCall) Context(ctx context.Context) *MembersDeleteCall {
11804	c.ctx_ = ctx
11805	return c
11806}
11807
11808// Header returns an http.Header that can be modified by the caller to
11809// add HTTP headers to the request.
11810func (c *MembersDeleteCall) Header() http.Header {
11811	if c.header_ == nil {
11812		c.header_ = make(http.Header)
11813	}
11814	return c.header_
11815}
11816
11817func (c *MembersDeleteCall) doRequest(alt string) (*http.Response, error) {
11818	reqHeaders := make(http.Header)
11819	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11820	for k, v := range c.header_ {
11821		reqHeaders[k] = v
11822	}
11823	reqHeaders.Set("User-Agent", c.s.userAgent())
11824	var body io.Reader = nil
11825	c.urlParams_.Set("alt", alt)
11826	c.urlParams_.Set("prettyPrint", "false")
11827	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
11828	urls += "?" + c.urlParams_.Encode()
11829	req, err := http.NewRequest("DELETE", urls, body)
11830	if err != nil {
11831		return nil, err
11832	}
11833	req.Header = reqHeaders
11834	googleapi.Expand(req.URL, map[string]string{
11835		"groupKey":  c.groupKey,
11836		"memberKey": c.memberKey,
11837	})
11838	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11839}
11840
11841// Do executes the "directory.members.delete" call.
11842func (c *MembersDeleteCall) Do(opts ...googleapi.CallOption) error {
11843	gensupport.SetOptions(c.urlParams_, opts...)
11844	res, err := c.doRequest("json")
11845	if err != nil {
11846		return err
11847	}
11848	defer googleapi.CloseBody(res)
11849	if err := googleapi.CheckResponse(res); err != nil {
11850		return err
11851	}
11852	return nil
11853	// {
11854	//   "description": "Removes a member from a group.",
11855	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
11856	//   "httpMethod": "DELETE",
11857	//   "id": "directory.members.delete",
11858	//   "parameterOrder": [
11859	//     "groupKey",
11860	//     "memberKey"
11861	//   ],
11862	//   "parameters": {
11863	//     "groupKey": {
11864	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
11865	//       "location": "path",
11866	//       "required": true,
11867	//       "type": "string"
11868	//     },
11869	//     "memberKey": {
11870	//       "description": "Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.",
11871	//       "location": "path",
11872	//       "required": true,
11873	//       "type": "string"
11874	//     }
11875	//   },
11876	//   "path": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
11877	//   "scopes": [
11878	//     "https://www.googleapis.com/auth/admin.directory.group",
11879	//     "https://www.googleapis.com/auth/admin.directory.group.member"
11880	//   ]
11881	// }
11882
11883}
11884
11885// method id "directory.members.get":
11886
11887type MembersGetCall struct {
11888	s            *Service
11889	groupKey     string
11890	memberKey    string
11891	urlParams_   gensupport.URLParams
11892	ifNoneMatch_ string
11893	ctx_         context.Context
11894	header_      http.Header
11895}
11896
11897// Get: Retrieves a group member's properties.
11898//
11899// - groupKey: Identifies the group in the API request. The value can be
11900//   the group's email address, group alias, or the unique group ID.
11901// - memberKey: Identifies the group member in the API request. A group
11902//   member can be a user or another group. The value can be the
11903//   member's (group or user) primary email address, alias, or unique
11904//   ID.
11905func (r *MembersService) Get(groupKey string, memberKey string) *MembersGetCall {
11906	c := &MembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11907	c.groupKey = groupKey
11908	c.memberKey = memberKey
11909	return c
11910}
11911
11912// Fields allows partial responses to be retrieved. See
11913// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11914// for more information.
11915func (c *MembersGetCall) Fields(s ...googleapi.Field) *MembersGetCall {
11916	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11917	return c
11918}
11919
11920// IfNoneMatch sets the optional parameter which makes the operation
11921// fail if the object's ETag matches the given value. This is useful for
11922// getting updates only after the object has changed since the last
11923// request. Use googleapi.IsNotModified to check whether the response
11924// error from Do is the result of In-None-Match.
11925func (c *MembersGetCall) IfNoneMatch(entityTag string) *MembersGetCall {
11926	c.ifNoneMatch_ = entityTag
11927	return c
11928}
11929
11930// Context sets the context to be used in this call's Do method. Any
11931// pending HTTP request will be aborted if the provided context is
11932// canceled.
11933func (c *MembersGetCall) Context(ctx context.Context) *MembersGetCall {
11934	c.ctx_ = ctx
11935	return c
11936}
11937
11938// Header returns an http.Header that can be modified by the caller to
11939// add HTTP headers to the request.
11940func (c *MembersGetCall) Header() http.Header {
11941	if c.header_ == nil {
11942		c.header_ = make(http.Header)
11943	}
11944	return c.header_
11945}
11946
11947func (c *MembersGetCall) doRequest(alt string) (*http.Response, error) {
11948	reqHeaders := make(http.Header)
11949	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
11950	for k, v := range c.header_ {
11951		reqHeaders[k] = v
11952	}
11953	reqHeaders.Set("User-Agent", c.s.userAgent())
11954	if c.ifNoneMatch_ != "" {
11955		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11956	}
11957	var body io.Reader = nil
11958	c.urlParams_.Set("alt", alt)
11959	c.urlParams_.Set("prettyPrint", "false")
11960	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
11961	urls += "?" + c.urlParams_.Encode()
11962	req, err := http.NewRequest("GET", urls, body)
11963	if err != nil {
11964		return nil, err
11965	}
11966	req.Header = reqHeaders
11967	googleapi.Expand(req.URL, map[string]string{
11968		"groupKey":  c.groupKey,
11969		"memberKey": c.memberKey,
11970	})
11971	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11972}
11973
11974// Do executes the "directory.members.get" call.
11975// Exactly one of *Member or error will be non-nil. Any non-2xx status
11976// code is an error. Response headers are in either
11977// *Member.ServerResponse.Header or (if a response was returned at all)
11978// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11979// check whether the returned error was because http.StatusNotModified
11980// was returned.
11981func (c *MembersGetCall) Do(opts ...googleapi.CallOption) (*Member, error) {
11982	gensupport.SetOptions(c.urlParams_, opts...)
11983	res, err := c.doRequest("json")
11984	if res != nil && res.StatusCode == http.StatusNotModified {
11985		if res.Body != nil {
11986			res.Body.Close()
11987		}
11988		return nil, &googleapi.Error{
11989			Code:   res.StatusCode,
11990			Header: res.Header,
11991		}
11992	}
11993	if err != nil {
11994		return nil, err
11995	}
11996	defer googleapi.CloseBody(res)
11997	if err := googleapi.CheckResponse(res); err != nil {
11998		return nil, err
11999	}
12000	ret := &Member{
12001		ServerResponse: googleapi.ServerResponse{
12002			Header:         res.Header,
12003			HTTPStatusCode: res.StatusCode,
12004		},
12005	}
12006	target := &ret
12007	if err := gensupport.DecodeResponse(target, res); err != nil {
12008		return nil, err
12009	}
12010	return ret, nil
12011	// {
12012	//   "description": "Retrieves a group member's properties.",
12013	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12014	//   "httpMethod": "GET",
12015	//   "id": "directory.members.get",
12016	//   "parameterOrder": [
12017	//     "groupKey",
12018	//     "memberKey"
12019	//   ],
12020	//   "parameters": {
12021	//     "groupKey": {
12022	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12023	//       "location": "path",
12024	//       "required": true,
12025	//       "type": "string"
12026	//     },
12027	//     "memberKey": {
12028	//       "description": "Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.",
12029	//       "location": "path",
12030	//       "required": true,
12031	//       "type": "string"
12032	//     }
12033	//   },
12034	//   "path": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12035	//   "response": {
12036	//     "$ref": "Member"
12037	//   },
12038	//   "scopes": [
12039	//     "https://www.googleapis.com/auth/admin.directory.group",
12040	//     "https://www.googleapis.com/auth/admin.directory.group.member",
12041	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
12042	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
12043	//   ]
12044	// }
12045
12046}
12047
12048// method id "directory.members.hasMember":
12049
12050type MembersHasMemberCall struct {
12051	s            *Service
12052	groupKey     string
12053	memberKey    string
12054	urlParams_   gensupport.URLParams
12055	ifNoneMatch_ string
12056	ctx_         context.Context
12057	header_      http.Header
12058}
12059
12060// HasMember: Checks whether the given user is a member of the group.
12061// Membership can be direct or nested.
12062//
12063// - groupKey: Identifies the group in the API request. The value can be
12064//   the group's email address, group alias, or the unique group ID.
12065// - memberKey: Identifies the user member in the API request. The value
12066//   can be the user's primary email address, alias, or unique ID.
12067func (r *MembersService) HasMember(groupKey string, memberKey string) *MembersHasMemberCall {
12068	c := &MembersHasMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12069	c.groupKey = groupKey
12070	c.memberKey = memberKey
12071	return c
12072}
12073
12074// Fields allows partial responses to be retrieved. See
12075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12076// for more information.
12077func (c *MembersHasMemberCall) Fields(s ...googleapi.Field) *MembersHasMemberCall {
12078	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12079	return c
12080}
12081
12082// IfNoneMatch sets the optional parameter which makes the operation
12083// fail if the object's ETag matches the given value. This is useful for
12084// getting updates only after the object has changed since the last
12085// request. Use googleapi.IsNotModified to check whether the response
12086// error from Do is the result of In-None-Match.
12087func (c *MembersHasMemberCall) IfNoneMatch(entityTag string) *MembersHasMemberCall {
12088	c.ifNoneMatch_ = entityTag
12089	return c
12090}
12091
12092// Context sets the context to be used in this call's Do method. Any
12093// pending HTTP request will be aborted if the provided context is
12094// canceled.
12095func (c *MembersHasMemberCall) Context(ctx context.Context) *MembersHasMemberCall {
12096	c.ctx_ = ctx
12097	return c
12098}
12099
12100// Header returns an http.Header that can be modified by the caller to
12101// add HTTP headers to the request.
12102func (c *MembersHasMemberCall) Header() http.Header {
12103	if c.header_ == nil {
12104		c.header_ = make(http.Header)
12105	}
12106	return c.header_
12107}
12108
12109func (c *MembersHasMemberCall) doRequest(alt string) (*http.Response, error) {
12110	reqHeaders := make(http.Header)
12111	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12112	for k, v := range c.header_ {
12113		reqHeaders[k] = v
12114	}
12115	reqHeaders.Set("User-Agent", c.s.userAgent())
12116	if c.ifNoneMatch_ != "" {
12117		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12118	}
12119	var body io.Reader = nil
12120	c.urlParams_.Set("alt", alt)
12121	c.urlParams_.Set("prettyPrint", "false")
12122	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}")
12123	urls += "?" + c.urlParams_.Encode()
12124	req, err := http.NewRequest("GET", urls, body)
12125	if err != nil {
12126		return nil, err
12127	}
12128	req.Header = reqHeaders
12129	googleapi.Expand(req.URL, map[string]string{
12130		"groupKey":  c.groupKey,
12131		"memberKey": c.memberKey,
12132	})
12133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12134}
12135
12136// Do executes the "directory.members.hasMember" call.
12137// Exactly one of *MembersHasMember or error will be non-nil. Any
12138// non-2xx status code is an error. Response headers are in either
12139// *MembersHasMember.ServerResponse.Header or (if a response was
12140// returned at all) in error.(*googleapi.Error).Header. Use
12141// googleapi.IsNotModified to check whether the returned error was
12142// because http.StatusNotModified was returned.
12143func (c *MembersHasMemberCall) Do(opts ...googleapi.CallOption) (*MembersHasMember, error) {
12144	gensupport.SetOptions(c.urlParams_, opts...)
12145	res, err := c.doRequest("json")
12146	if res != nil && res.StatusCode == http.StatusNotModified {
12147		if res.Body != nil {
12148			res.Body.Close()
12149		}
12150		return nil, &googleapi.Error{
12151			Code:   res.StatusCode,
12152			Header: res.Header,
12153		}
12154	}
12155	if err != nil {
12156		return nil, err
12157	}
12158	defer googleapi.CloseBody(res)
12159	if err := googleapi.CheckResponse(res); err != nil {
12160		return nil, err
12161	}
12162	ret := &MembersHasMember{
12163		ServerResponse: googleapi.ServerResponse{
12164			Header:         res.Header,
12165			HTTPStatusCode: res.StatusCode,
12166		},
12167	}
12168	target := &ret
12169	if err := gensupport.DecodeResponse(target, res); err != nil {
12170		return nil, err
12171	}
12172	return ret, nil
12173	// {
12174	//   "description": "Checks whether the given user is a member of the group. Membership can be direct or nested.",
12175	//   "flatPath": "admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}",
12176	//   "httpMethod": "GET",
12177	//   "id": "directory.members.hasMember",
12178	//   "parameterOrder": [
12179	//     "groupKey",
12180	//     "memberKey"
12181	//   ],
12182	//   "parameters": {
12183	//     "groupKey": {
12184	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12185	//       "location": "path",
12186	//       "required": true,
12187	//       "type": "string"
12188	//     },
12189	//     "memberKey": {
12190	//       "description": "Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.",
12191	//       "location": "path",
12192	//       "required": true,
12193	//       "type": "string"
12194	//     }
12195	//   },
12196	//   "path": "admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}",
12197	//   "response": {
12198	//     "$ref": "MembersHasMember"
12199	//   },
12200	//   "scopes": [
12201	//     "https://www.googleapis.com/auth/admin.directory.group",
12202	//     "https://www.googleapis.com/auth/admin.directory.group.member",
12203	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
12204	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
12205	//   ]
12206	// }
12207
12208}
12209
12210// method id "directory.members.insert":
12211
12212type MembersInsertCall struct {
12213	s          *Service
12214	groupKey   string
12215	member     *Member
12216	urlParams_ gensupport.URLParams
12217	ctx_       context.Context
12218	header_    http.Header
12219}
12220
12221// Insert: Adds a user to the specified group.
12222//
12223// - groupKey: Identifies the group in the API request. The value can be
12224//   the group's email address, group alias, or the unique group ID.
12225func (r *MembersService) Insert(groupKey string, member *Member) *MembersInsertCall {
12226	c := &MembersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12227	c.groupKey = groupKey
12228	c.member = member
12229	return c
12230}
12231
12232// Fields allows partial responses to be retrieved. See
12233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12234// for more information.
12235func (c *MembersInsertCall) Fields(s ...googleapi.Field) *MembersInsertCall {
12236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12237	return c
12238}
12239
12240// Context sets the context to be used in this call's Do method. Any
12241// pending HTTP request will be aborted if the provided context is
12242// canceled.
12243func (c *MembersInsertCall) Context(ctx context.Context) *MembersInsertCall {
12244	c.ctx_ = ctx
12245	return c
12246}
12247
12248// Header returns an http.Header that can be modified by the caller to
12249// add HTTP headers to the request.
12250func (c *MembersInsertCall) Header() http.Header {
12251	if c.header_ == nil {
12252		c.header_ = make(http.Header)
12253	}
12254	return c.header_
12255}
12256
12257func (c *MembersInsertCall) doRequest(alt string) (*http.Response, error) {
12258	reqHeaders := make(http.Header)
12259	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12260	for k, v := range c.header_ {
12261		reqHeaders[k] = v
12262	}
12263	reqHeaders.Set("User-Agent", c.s.userAgent())
12264	var body io.Reader = nil
12265	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
12266	if err != nil {
12267		return nil, err
12268	}
12269	reqHeaders.Set("Content-Type", "application/json")
12270	c.urlParams_.Set("alt", alt)
12271	c.urlParams_.Set("prettyPrint", "false")
12272	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members")
12273	urls += "?" + c.urlParams_.Encode()
12274	req, err := http.NewRequest("POST", urls, body)
12275	if err != nil {
12276		return nil, err
12277	}
12278	req.Header = reqHeaders
12279	googleapi.Expand(req.URL, map[string]string{
12280		"groupKey": c.groupKey,
12281	})
12282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12283}
12284
12285// Do executes the "directory.members.insert" call.
12286// Exactly one of *Member or error will be non-nil. Any non-2xx status
12287// code is an error. Response headers are in either
12288// *Member.ServerResponse.Header or (if a response was returned at all)
12289// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12290// check whether the returned error was because http.StatusNotModified
12291// was returned.
12292func (c *MembersInsertCall) Do(opts ...googleapi.CallOption) (*Member, error) {
12293	gensupport.SetOptions(c.urlParams_, opts...)
12294	res, err := c.doRequest("json")
12295	if res != nil && res.StatusCode == http.StatusNotModified {
12296		if res.Body != nil {
12297			res.Body.Close()
12298		}
12299		return nil, &googleapi.Error{
12300			Code:   res.StatusCode,
12301			Header: res.Header,
12302		}
12303	}
12304	if err != nil {
12305		return nil, err
12306	}
12307	defer googleapi.CloseBody(res)
12308	if err := googleapi.CheckResponse(res); err != nil {
12309		return nil, err
12310	}
12311	ret := &Member{
12312		ServerResponse: googleapi.ServerResponse{
12313			Header:         res.Header,
12314			HTTPStatusCode: res.StatusCode,
12315		},
12316	}
12317	target := &ret
12318	if err := gensupport.DecodeResponse(target, res); err != nil {
12319		return nil, err
12320	}
12321	return ret, nil
12322	// {
12323	//   "description": "Adds a user to the specified group.",
12324	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members",
12325	//   "httpMethod": "POST",
12326	//   "id": "directory.members.insert",
12327	//   "parameterOrder": [
12328	//     "groupKey"
12329	//   ],
12330	//   "parameters": {
12331	//     "groupKey": {
12332	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12333	//       "location": "path",
12334	//       "required": true,
12335	//       "type": "string"
12336	//     }
12337	//   },
12338	//   "path": "admin/directory/v1/groups/{groupKey}/members",
12339	//   "request": {
12340	//     "$ref": "Member"
12341	//   },
12342	//   "response": {
12343	//     "$ref": "Member"
12344	//   },
12345	//   "scopes": [
12346	//     "https://www.googleapis.com/auth/admin.directory.group",
12347	//     "https://www.googleapis.com/auth/admin.directory.group.member"
12348	//   ]
12349	// }
12350
12351}
12352
12353// method id "directory.members.list":
12354
12355type MembersListCall struct {
12356	s            *Service
12357	groupKey     string
12358	urlParams_   gensupport.URLParams
12359	ifNoneMatch_ string
12360	ctx_         context.Context
12361	header_      http.Header
12362}
12363
12364// List: Retrieves a paginated list of all members in a group.
12365//
12366// - groupKey: Identifies the group in the API request. The value can be
12367//   the group's email address, group alias, or the unique group ID.
12368func (r *MembersService) List(groupKey string) *MembersListCall {
12369	c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12370	c.groupKey = groupKey
12371	return c
12372}
12373
12374// IncludeDerivedMembership sets the optional parameter
12375// "includeDerivedMembership": Whether to list indirect memberships.
12376// Default: false.
12377func (c *MembersListCall) IncludeDerivedMembership(includeDerivedMembership bool) *MembersListCall {
12378	c.urlParams_.Set("includeDerivedMembership", fmt.Sprint(includeDerivedMembership))
12379	return c
12380}
12381
12382// MaxResults sets the optional parameter "maxResults": Maximum number
12383// of results to return. Max allowed value is 200.
12384func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall {
12385	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12386	return c
12387}
12388
12389// PageToken sets the optional parameter "pageToken": Token to specify
12390// next page in the list.
12391func (c *MembersListCall) PageToken(pageToken string) *MembersListCall {
12392	c.urlParams_.Set("pageToken", pageToken)
12393	return c
12394}
12395
12396// Roles sets the optional parameter "roles": The `roles` query
12397// parameter allows you to retrieve group members by role. Allowed
12398// values are `OWNER`, `MANAGER`, and `MEMBER`.
12399func (c *MembersListCall) Roles(roles string) *MembersListCall {
12400	c.urlParams_.Set("roles", roles)
12401	return c
12402}
12403
12404// Fields allows partial responses to be retrieved. See
12405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12406// for more information.
12407func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall {
12408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12409	return c
12410}
12411
12412// IfNoneMatch sets the optional parameter which makes the operation
12413// fail if the object's ETag matches the given value. This is useful for
12414// getting updates only after the object has changed since the last
12415// request. Use googleapi.IsNotModified to check whether the response
12416// error from Do is the result of In-None-Match.
12417func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall {
12418	c.ifNoneMatch_ = entityTag
12419	return c
12420}
12421
12422// Context sets the context to be used in this call's Do method. Any
12423// pending HTTP request will be aborted if the provided context is
12424// canceled.
12425func (c *MembersListCall) Context(ctx context.Context) *MembersListCall {
12426	c.ctx_ = ctx
12427	return c
12428}
12429
12430// Header returns an http.Header that can be modified by the caller to
12431// add HTTP headers to the request.
12432func (c *MembersListCall) Header() http.Header {
12433	if c.header_ == nil {
12434		c.header_ = make(http.Header)
12435	}
12436	return c.header_
12437}
12438
12439func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
12440	reqHeaders := make(http.Header)
12441	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12442	for k, v := range c.header_ {
12443		reqHeaders[k] = v
12444	}
12445	reqHeaders.Set("User-Agent", c.s.userAgent())
12446	if c.ifNoneMatch_ != "" {
12447		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12448	}
12449	var body io.Reader = nil
12450	c.urlParams_.Set("alt", alt)
12451	c.urlParams_.Set("prettyPrint", "false")
12452	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members")
12453	urls += "?" + c.urlParams_.Encode()
12454	req, err := http.NewRequest("GET", urls, body)
12455	if err != nil {
12456		return nil, err
12457	}
12458	req.Header = reqHeaders
12459	googleapi.Expand(req.URL, map[string]string{
12460		"groupKey": c.groupKey,
12461	})
12462	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12463}
12464
12465// Do executes the "directory.members.list" call.
12466// Exactly one of *Members or error will be non-nil. Any non-2xx status
12467// code is an error. Response headers are in either
12468// *Members.ServerResponse.Header or (if a response was returned at all)
12469// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12470// check whether the returned error was because http.StatusNotModified
12471// was returned.
12472func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*Members, error) {
12473	gensupport.SetOptions(c.urlParams_, opts...)
12474	res, err := c.doRequest("json")
12475	if res != nil && res.StatusCode == http.StatusNotModified {
12476		if res.Body != nil {
12477			res.Body.Close()
12478		}
12479		return nil, &googleapi.Error{
12480			Code:   res.StatusCode,
12481			Header: res.Header,
12482		}
12483	}
12484	if err != nil {
12485		return nil, err
12486	}
12487	defer googleapi.CloseBody(res)
12488	if err := googleapi.CheckResponse(res); err != nil {
12489		return nil, err
12490	}
12491	ret := &Members{
12492		ServerResponse: googleapi.ServerResponse{
12493			Header:         res.Header,
12494			HTTPStatusCode: res.StatusCode,
12495		},
12496	}
12497	target := &ret
12498	if err := gensupport.DecodeResponse(target, res); err != nil {
12499		return nil, err
12500	}
12501	return ret, nil
12502	// {
12503	//   "description": "Retrieves a paginated list of all members in a group.",
12504	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members",
12505	//   "httpMethod": "GET",
12506	//   "id": "directory.members.list",
12507	//   "parameterOrder": [
12508	//     "groupKey"
12509	//   ],
12510	//   "parameters": {
12511	//     "groupKey": {
12512	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12513	//       "location": "path",
12514	//       "required": true,
12515	//       "type": "string"
12516	//     },
12517	//     "includeDerivedMembership": {
12518	//       "description": "Whether to list indirect memberships. Default: false.",
12519	//       "location": "query",
12520	//       "type": "boolean"
12521	//     },
12522	//     "maxResults": {
12523	//       "default": "200",
12524	//       "description": "Maximum number of results to return. Max allowed value is 200.",
12525	//       "format": "int32",
12526	//       "location": "query",
12527	//       "minimum": "1",
12528	//       "type": "integer"
12529	//     },
12530	//     "pageToken": {
12531	//       "description": "Token to specify next page in the list.",
12532	//       "location": "query",
12533	//       "type": "string"
12534	//     },
12535	//     "roles": {
12536	//       "description": "The `roles` query parameter allows you to retrieve group members by role. Allowed values are `OWNER`, `MANAGER`, and `MEMBER`.",
12537	//       "location": "query",
12538	//       "type": "string"
12539	//     }
12540	//   },
12541	//   "path": "admin/directory/v1/groups/{groupKey}/members",
12542	//   "response": {
12543	//     "$ref": "Members"
12544	//   },
12545	//   "scopes": [
12546	//     "https://www.googleapis.com/auth/admin.directory.group",
12547	//     "https://www.googleapis.com/auth/admin.directory.group.member",
12548	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
12549	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
12550	//   ]
12551	// }
12552
12553}
12554
12555// Pages invokes f for each page of results.
12556// A non-nil error returned from f will halt the iteration.
12557// The provided context supersedes any context provided to the Context method.
12558func (c *MembersListCall) Pages(ctx context.Context, f func(*Members) error) error {
12559	c.ctx_ = ctx
12560	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12561	for {
12562		x, err := c.Do()
12563		if err != nil {
12564			return err
12565		}
12566		if err := f(x); err != nil {
12567			return err
12568		}
12569		if x.NextPageToken == "" {
12570			return nil
12571		}
12572		c.PageToken(x.NextPageToken)
12573	}
12574}
12575
12576// method id "directory.members.patch":
12577
12578type MembersPatchCall struct {
12579	s          *Service
12580	groupKey   string
12581	memberKey  string
12582	member     *Member
12583	urlParams_ gensupport.URLParams
12584	ctx_       context.Context
12585	header_    http.Header
12586}
12587
12588// Patch: Updates the membership properties of a user in the specified
12589// group. This method supports patch semantics
12590// (/admin-sdk/directory/v1/guides/performance#patch).
12591//
12592// - groupKey: Identifies the group in the API request. The value can be
12593//   the group's email address, group alias, or the unique group ID.
12594// - memberKey: Identifies the group member in the API request. A group
12595//   member can be a user or another group. The value can be the
12596//   member's (group or user) primary email address, alias, or unique
12597//   ID.
12598func (r *MembersService) Patch(groupKey string, memberKey string, member *Member) *MembersPatchCall {
12599	c := &MembersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12600	c.groupKey = groupKey
12601	c.memberKey = memberKey
12602	c.member = member
12603	return c
12604}
12605
12606// Fields allows partial responses to be retrieved. See
12607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12608// for more information.
12609func (c *MembersPatchCall) Fields(s ...googleapi.Field) *MembersPatchCall {
12610	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12611	return c
12612}
12613
12614// Context sets the context to be used in this call's Do method. Any
12615// pending HTTP request will be aborted if the provided context is
12616// canceled.
12617func (c *MembersPatchCall) Context(ctx context.Context) *MembersPatchCall {
12618	c.ctx_ = ctx
12619	return c
12620}
12621
12622// Header returns an http.Header that can be modified by the caller to
12623// add HTTP headers to the request.
12624func (c *MembersPatchCall) Header() http.Header {
12625	if c.header_ == nil {
12626		c.header_ = make(http.Header)
12627	}
12628	return c.header_
12629}
12630
12631func (c *MembersPatchCall) doRequest(alt string) (*http.Response, error) {
12632	reqHeaders := make(http.Header)
12633	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12634	for k, v := range c.header_ {
12635		reqHeaders[k] = v
12636	}
12637	reqHeaders.Set("User-Agent", c.s.userAgent())
12638	var body io.Reader = nil
12639	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
12640	if err != nil {
12641		return nil, err
12642	}
12643	reqHeaders.Set("Content-Type", "application/json")
12644	c.urlParams_.Set("alt", alt)
12645	c.urlParams_.Set("prettyPrint", "false")
12646	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
12647	urls += "?" + c.urlParams_.Encode()
12648	req, err := http.NewRequest("PATCH", urls, body)
12649	if err != nil {
12650		return nil, err
12651	}
12652	req.Header = reqHeaders
12653	googleapi.Expand(req.URL, map[string]string{
12654		"groupKey":  c.groupKey,
12655		"memberKey": c.memberKey,
12656	})
12657	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12658}
12659
12660// Do executes the "directory.members.patch" call.
12661// Exactly one of *Member or error will be non-nil. Any non-2xx status
12662// code is an error. Response headers are in either
12663// *Member.ServerResponse.Header or (if a response was returned at all)
12664// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12665// check whether the returned error was because http.StatusNotModified
12666// was returned.
12667func (c *MembersPatchCall) Do(opts ...googleapi.CallOption) (*Member, error) {
12668	gensupport.SetOptions(c.urlParams_, opts...)
12669	res, err := c.doRequest("json")
12670	if res != nil && res.StatusCode == http.StatusNotModified {
12671		if res.Body != nil {
12672			res.Body.Close()
12673		}
12674		return nil, &googleapi.Error{
12675			Code:   res.StatusCode,
12676			Header: res.Header,
12677		}
12678	}
12679	if err != nil {
12680		return nil, err
12681	}
12682	defer googleapi.CloseBody(res)
12683	if err := googleapi.CheckResponse(res); err != nil {
12684		return nil, err
12685	}
12686	ret := &Member{
12687		ServerResponse: googleapi.ServerResponse{
12688			Header:         res.Header,
12689			HTTPStatusCode: res.StatusCode,
12690		},
12691	}
12692	target := &ret
12693	if err := gensupport.DecodeResponse(target, res); err != nil {
12694		return nil, err
12695	}
12696	return ret, nil
12697	// {
12698	//   "description": "Updates the membership properties of a user in the specified group. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).",
12699	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12700	//   "httpMethod": "PATCH",
12701	//   "id": "directory.members.patch",
12702	//   "parameterOrder": [
12703	//     "groupKey",
12704	//     "memberKey"
12705	//   ],
12706	//   "parameters": {
12707	//     "groupKey": {
12708	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12709	//       "location": "path",
12710	//       "required": true,
12711	//       "type": "string"
12712	//     },
12713	//     "memberKey": {
12714	//       "description": "Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.",
12715	//       "location": "path",
12716	//       "required": true,
12717	//       "type": "string"
12718	//     }
12719	//   },
12720	//   "path": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12721	//   "request": {
12722	//     "$ref": "Member"
12723	//   },
12724	//   "response": {
12725	//     "$ref": "Member"
12726	//   },
12727	//   "scopes": [
12728	//     "https://www.googleapis.com/auth/admin.directory.group",
12729	//     "https://www.googleapis.com/auth/admin.directory.group.member"
12730	//   ]
12731	// }
12732
12733}
12734
12735// method id "directory.members.update":
12736
12737type MembersUpdateCall struct {
12738	s          *Service
12739	groupKey   string
12740	memberKey  string
12741	member     *Member
12742	urlParams_ gensupport.URLParams
12743	ctx_       context.Context
12744	header_    http.Header
12745}
12746
12747// Update: Updates the membership of a user in the specified group.
12748//
12749// - groupKey: Identifies the group in the API request. The value can be
12750//   the group's email address, group alias, or the unique group ID.
12751// - memberKey: Identifies the group member in the API request. A group
12752//   member can be a user or another group. The value can be the
12753//   member's (group or user) primary email address, alias, or unique
12754//   ID.
12755func (r *MembersService) Update(groupKey string, memberKey string, member *Member) *MembersUpdateCall {
12756	c := &MembersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12757	c.groupKey = groupKey
12758	c.memberKey = memberKey
12759	c.member = member
12760	return c
12761}
12762
12763// Fields allows partial responses to be retrieved. See
12764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12765// for more information.
12766func (c *MembersUpdateCall) Fields(s ...googleapi.Field) *MembersUpdateCall {
12767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12768	return c
12769}
12770
12771// Context sets the context to be used in this call's Do method. Any
12772// pending HTTP request will be aborted if the provided context is
12773// canceled.
12774func (c *MembersUpdateCall) Context(ctx context.Context) *MembersUpdateCall {
12775	c.ctx_ = ctx
12776	return c
12777}
12778
12779// Header returns an http.Header that can be modified by the caller to
12780// add HTTP headers to the request.
12781func (c *MembersUpdateCall) Header() http.Header {
12782	if c.header_ == nil {
12783		c.header_ = make(http.Header)
12784	}
12785	return c.header_
12786}
12787
12788func (c *MembersUpdateCall) doRequest(alt string) (*http.Response, error) {
12789	reqHeaders := make(http.Header)
12790	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12791	for k, v := range c.header_ {
12792		reqHeaders[k] = v
12793	}
12794	reqHeaders.Set("User-Agent", c.s.userAgent())
12795	var body io.Reader = nil
12796	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
12797	if err != nil {
12798		return nil, err
12799	}
12800	reqHeaders.Set("Content-Type", "application/json")
12801	c.urlParams_.Set("alt", alt)
12802	c.urlParams_.Set("prettyPrint", "false")
12803	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/groups/{groupKey}/members/{memberKey}")
12804	urls += "?" + c.urlParams_.Encode()
12805	req, err := http.NewRequest("PUT", urls, body)
12806	if err != nil {
12807		return nil, err
12808	}
12809	req.Header = reqHeaders
12810	googleapi.Expand(req.URL, map[string]string{
12811		"groupKey":  c.groupKey,
12812		"memberKey": c.memberKey,
12813	})
12814	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12815}
12816
12817// Do executes the "directory.members.update" call.
12818// Exactly one of *Member or error will be non-nil. Any non-2xx status
12819// code is an error. Response headers are in either
12820// *Member.ServerResponse.Header or (if a response was returned at all)
12821// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12822// check whether the returned error was because http.StatusNotModified
12823// was returned.
12824func (c *MembersUpdateCall) Do(opts ...googleapi.CallOption) (*Member, error) {
12825	gensupport.SetOptions(c.urlParams_, opts...)
12826	res, err := c.doRequest("json")
12827	if res != nil && res.StatusCode == http.StatusNotModified {
12828		if res.Body != nil {
12829			res.Body.Close()
12830		}
12831		return nil, &googleapi.Error{
12832			Code:   res.StatusCode,
12833			Header: res.Header,
12834		}
12835	}
12836	if err != nil {
12837		return nil, err
12838	}
12839	defer googleapi.CloseBody(res)
12840	if err := googleapi.CheckResponse(res); err != nil {
12841		return nil, err
12842	}
12843	ret := &Member{
12844		ServerResponse: googleapi.ServerResponse{
12845			Header:         res.Header,
12846			HTTPStatusCode: res.StatusCode,
12847		},
12848	}
12849	target := &ret
12850	if err := gensupport.DecodeResponse(target, res); err != nil {
12851		return nil, err
12852	}
12853	return ret, nil
12854	// {
12855	//   "description": "Updates the membership of a user in the specified group.",
12856	//   "flatPath": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12857	//   "httpMethod": "PUT",
12858	//   "id": "directory.members.update",
12859	//   "parameterOrder": [
12860	//     "groupKey",
12861	//     "memberKey"
12862	//   ],
12863	//   "parameters": {
12864	//     "groupKey": {
12865	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
12866	//       "location": "path",
12867	//       "required": true,
12868	//       "type": "string"
12869	//     },
12870	//     "memberKey": {
12871	//       "description": "Identifies the group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.",
12872	//       "location": "path",
12873	//       "required": true,
12874	//       "type": "string"
12875	//     }
12876	//   },
12877	//   "path": "admin/directory/v1/groups/{groupKey}/members/{memberKey}",
12878	//   "request": {
12879	//     "$ref": "Member"
12880	//   },
12881	//   "response": {
12882	//     "$ref": "Member"
12883	//   },
12884	//   "scopes": [
12885	//     "https://www.googleapis.com/auth/admin.directory.group",
12886	//     "https://www.googleapis.com/auth/admin.directory.group.member"
12887	//   ]
12888	// }
12889
12890}
12891
12892// method id "directory.mobiledevices.action":
12893
12894type MobiledevicesActionCall struct {
12895	s                  *Service
12896	customerId         string
12897	resourceId         string
12898	mobiledeviceaction *MobileDeviceAction
12899	urlParams_         gensupport.URLParams
12900	ctx_               context.Context
12901	header_            http.Header
12902}
12903
12904// Action: Takes an action that affects a mobile device. For example,
12905// remotely wiping a device.
12906//
12907// - customerId: The unique ID for the customer's Google Workspace
12908//   account. As an account administrator, you can also use the
12909//   `my_customer` alias to represent your account's `customerId`. The
12910//   `customerId` is also returned as part of the Users resource
12911//   (/admin-sdk/directory/v1/reference/users).
12912// - resourceId: The unique ID the API service uses to identify the
12913//   mobile device.
12914func (r *MobiledevicesService) Action(customerId string, resourceId string, mobiledeviceaction *MobileDeviceAction) *MobiledevicesActionCall {
12915	c := &MobiledevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12916	c.customerId = customerId
12917	c.resourceId = resourceId
12918	c.mobiledeviceaction = mobiledeviceaction
12919	return c
12920}
12921
12922// Fields allows partial responses to be retrieved. See
12923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12924// for more information.
12925func (c *MobiledevicesActionCall) Fields(s ...googleapi.Field) *MobiledevicesActionCall {
12926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12927	return c
12928}
12929
12930// Context sets the context to be used in this call's Do method. Any
12931// pending HTTP request will be aborted if the provided context is
12932// canceled.
12933func (c *MobiledevicesActionCall) Context(ctx context.Context) *MobiledevicesActionCall {
12934	c.ctx_ = ctx
12935	return c
12936}
12937
12938// Header returns an http.Header that can be modified by the caller to
12939// add HTTP headers to the request.
12940func (c *MobiledevicesActionCall) Header() http.Header {
12941	if c.header_ == nil {
12942		c.header_ = make(http.Header)
12943	}
12944	return c.header_
12945}
12946
12947func (c *MobiledevicesActionCall) doRequest(alt string) (*http.Response, error) {
12948	reqHeaders := make(http.Header)
12949	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
12950	for k, v := range c.header_ {
12951		reqHeaders[k] = v
12952	}
12953	reqHeaders.Set("User-Agent", c.s.userAgent())
12954	var body io.Reader = nil
12955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mobiledeviceaction)
12956	if err != nil {
12957		return nil, err
12958	}
12959	reqHeaders.Set("Content-Type", "application/json")
12960	c.urlParams_.Set("alt", alt)
12961	c.urlParams_.Set("prettyPrint", "false")
12962	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action")
12963	urls += "?" + c.urlParams_.Encode()
12964	req, err := http.NewRequest("POST", urls, body)
12965	if err != nil {
12966		return nil, err
12967	}
12968	req.Header = reqHeaders
12969	googleapi.Expand(req.URL, map[string]string{
12970		"customerId": c.customerId,
12971		"resourceId": c.resourceId,
12972	})
12973	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12974}
12975
12976// Do executes the "directory.mobiledevices.action" call.
12977func (c *MobiledevicesActionCall) Do(opts ...googleapi.CallOption) error {
12978	gensupport.SetOptions(c.urlParams_, opts...)
12979	res, err := c.doRequest("json")
12980	if err != nil {
12981		return err
12982	}
12983	defer googleapi.CloseBody(res)
12984	if err := googleapi.CheckResponse(res); err != nil {
12985		return err
12986	}
12987	return nil
12988	// {
12989	//   "description": "Takes an action that affects a mobile device. For example, remotely wiping a device.",
12990	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action",
12991	//   "httpMethod": "POST",
12992	//   "id": "directory.mobiledevices.action",
12993	//   "parameterOrder": [
12994	//     "customerId",
12995	//     "resourceId"
12996	//   ],
12997	//   "parameters": {
12998	//     "customerId": {
12999	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13000	//       "location": "path",
13001	//       "required": true,
13002	//       "type": "string"
13003	//     },
13004	//     "resourceId": {
13005	//       "description": "The unique ID the API service uses to identify the mobile device.",
13006	//       "location": "path",
13007	//       "required": true,
13008	//       "type": "string"
13009	//     }
13010	//   },
13011	//   "path": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action",
13012	//   "request": {
13013	//     "$ref": "MobileDeviceAction"
13014	//   },
13015	//   "scopes": [
13016	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
13017	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action"
13018	//   ]
13019	// }
13020
13021}
13022
13023// method id "directory.mobiledevices.delete":
13024
13025type MobiledevicesDeleteCall struct {
13026	s          *Service
13027	customerId string
13028	resourceId string
13029	urlParams_ gensupport.URLParams
13030	ctx_       context.Context
13031	header_    http.Header
13032}
13033
13034// Delete: Removes a mobile device.
13035//
13036// - customerId: The unique ID for the customer's Google Workspace
13037//   account. As an account administrator, you can also use the
13038//   `my_customer` alias to represent your account's `customerId`. The
13039//   `customerId` is also returned as part of the Users resource
13040//   (/admin-sdk/directory/v1/reference/users).
13041// - resourceId: The unique ID the API service uses to identify the
13042//   mobile device.
13043func (r *MobiledevicesService) Delete(customerId string, resourceId string) *MobiledevicesDeleteCall {
13044	c := &MobiledevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13045	c.customerId = customerId
13046	c.resourceId = resourceId
13047	return c
13048}
13049
13050// Fields allows partial responses to be retrieved. See
13051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13052// for more information.
13053func (c *MobiledevicesDeleteCall) Fields(s ...googleapi.Field) *MobiledevicesDeleteCall {
13054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13055	return c
13056}
13057
13058// Context sets the context to be used in this call's Do method. Any
13059// pending HTTP request will be aborted if the provided context is
13060// canceled.
13061func (c *MobiledevicesDeleteCall) Context(ctx context.Context) *MobiledevicesDeleteCall {
13062	c.ctx_ = ctx
13063	return c
13064}
13065
13066// Header returns an http.Header that can be modified by the caller to
13067// add HTTP headers to the request.
13068func (c *MobiledevicesDeleteCall) Header() http.Header {
13069	if c.header_ == nil {
13070		c.header_ = make(http.Header)
13071	}
13072	return c.header_
13073}
13074
13075func (c *MobiledevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
13076	reqHeaders := make(http.Header)
13077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13078	for k, v := range c.header_ {
13079		reqHeaders[k] = v
13080	}
13081	reqHeaders.Set("User-Agent", c.s.userAgent())
13082	var body io.Reader = nil
13083	c.urlParams_.Set("alt", alt)
13084	c.urlParams_.Set("prettyPrint", "false")
13085	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}")
13086	urls += "?" + c.urlParams_.Encode()
13087	req, err := http.NewRequest("DELETE", urls, body)
13088	if err != nil {
13089		return nil, err
13090	}
13091	req.Header = reqHeaders
13092	googleapi.Expand(req.URL, map[string]string{
13093		"customerId": c.customerId,
13094		"resourceId": c.resourceId,
13095	})
13096	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13097}
13098
13099// Do executes the "directory.mobiledevices.delete" call.
13100func (c *MobiledevicesDeleteCall) Do(opts ...googleapi.CallOption) error {
13101	gensupport.SetOptions(c.urlParams_, opts...)
13102	res, err := c.doRequest("json")
13103	if err != nil {
13104		return err
13105	}
13106	defer googleapi.CloseBody(res)
13107	if err := googleapi.CheckResponse(res); err != nil {
13108		return err
13109	}
13110	return nil
13111	// {
13112	//   "description": "Removes a mobile device.",
13113	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}",
13114	//   "httpMethod": "DELETE",
13115	//   "id": "directory.mobiledevices.delete",
13116	//   "parameterOrder": [
13117	//     "customerId",
13118	//     "resourceId"
13119	//   ],
13120	//   "parameters": {
13121	//     "customerId": {
13122	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13123	//       "location": "path",
13124	//       "required": true,
13125	//       "type": "string"
13126	//     },
13127	//     "resourceId": {
13128	//       "description": "The unique ID the API service uses to identify the mobile device.",
13129	//       "location": "path",
13130	//       "required": true,
13131	//       "type": "string"
13132	//     }
13133	//   },
13134	//   "path": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}",
13135	//   "scopes": [
13136	//     "https://www.googleapis.com/auth/admin.directory.device.mobile"
13137	//   ]
13138	// }
13139
13140}
13141
13142// method id "directory.mobiledevices.get":
13143
13144type MobiledevicesGetCall struct {
13145	s            *Service
13146	customerId   string
13147	resourceId   string
13148	urlParams_   gensupport.URLParams
13149	ifNoneMatch_ string
13150	ctx_         context.Context
13151	header_      http.Header
13152}
13153
13154// Get: Retrieves a mobile device's properties.
13155//
13156// - customerId: The unique ID for the customer's Google Workspace
13157//   account. As an account administrator, you can also use the
13158//   `my_customer` alias to represent your account's `customerId`. The
13159//   `customerId` is also returned as part of the Users resource
13160//   (/admin-sdk/directory/v1/reference/users).
13161// - resourceId: The unique ID the API service uses to identify the
13162//   mobile device.
13163func (r *MobiledevicesService) Get(customerId string, resourceId string) *MobiledevicesGetCall {
13164	c := &MobiledevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13165	c.customerId = customerId
13166	c.resourceId = resourceId
13167	return c
13168}
13169
13170// Projection sets the optional parameter "projection": Restrict
13171// information returned to a set of selected fields.
13172//
13173// Possible values:
13174//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
13175// model, status, type, and status)
13176//   "FULL" - Includes all metadata fields
13177func (c *MobiledevicesGetCall) Projection(projection string) *MobiledevicesGetCall {
13178	c.urlParams_.Set("projection", projection)
13179	return c
13180}
13181
13182// Fields allows partial responses to be retrieved. See
13183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13184// for more information.
13185func (c *MobiledevicesGetCall) Fields(s ...googleapi.Field) *MobiledevicesGetCall {
13186	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13187	return c
13188}
13189
13190// IfNoneMatch sets the optional parameter which makes the operation
13191// fail if the object's ETag matches the given value. This is useful for
13192// getting updates only after the object has changed since the last
13193// request. Use googleapi.IsNotModified to check whether the response
13194// error from Do is the result of In-None-Match.
13195func (c *MobiledevicesGetCall) IfNoneMatch(entityTag string) *MobiledevicesGetCall {
13196	c.ifNoneMatch_ = entityTag
13197	return c
13198}
13199
13200// Context sets the context to be used in this call's Do method. Any
13201// pending HTTP request will be aborted if the provided context is
13202// canceled.
13203func (c *MobiledevicesGetCall) Context(ctx context.Context) *MobiledevicesGetCall {
13204	c.ctx_ = ctx
13205	return c
13206}
13207
13208// Header returns an http.Header that can be modified by the caller to
13209// add HTTP headers to the request.
13210func (c *MobiledevicesGetCall) Header() http.Header {
13211	if c.header_ == nil {
13212		c.header_ = make(http.Header)
13213	}
13214	return c.header_
13215}
13216
13217func (c *MobiledevicesGetCall) doRequest(alt string) (*http.Response, error) {
13218	reqHeaders := make(http.Header)
13219	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13220	for k, v := range c.header_ {
13221		reqHeaders[k] = v
13222	}
13223	reqHeaders.Set("User-Agent", c.s.userAgent())
13224	if c.ifNoneMatch_ != "" {
13225		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13226	}
13227	var body io.Reader = nil
13228	c.urlParams_.Set("alt", alt)
13229	c.urlParams_.Set("prettyPrint", "false")
13230	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}")
13231	urls += "?" + c.urlParams_.Encode()
13232	req, err := http.NewRequest("GET", urls, body)
13233	if err != nil {
13234		return nil, err
13235	}
13236	req.Header = reqHeaders
13237	googleapi.Expand(req.URL, map[string]string{
13238		"customerId": c.customerId,
13239		"resourceId": c.resourceId,
13240	})
13241	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13242}
13243
13244// Do executes the "directory.mobiledevices.get" call.
13245// Exactly one of *MobileDevice or error will be non-nil. Any non-2xx
13246// status code is an error. Response headers are in either
13247// *MobileDevice.ServerResponse.Header or (if a response was returned at
13248// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13249// to check whether the returned error was because
13250// http.StatusNotModified was returned.
13251func (c *MobiledevicesGetCall) Do(opts ...googleapi.CallOption) (*MobileDevice, error) {
13252	gensupport.SetOptions(c.urlParams_, opts...)
13253	res, err := c.doRequest("json")
13254	if res != nil && res.StatusCode == http.StatusNotModified {
13255		if res.Body != nil {
13256			res.Body.Close()
13257		}
13258		return nil, &googleapi.Error{
13259			Code:   res.StatusCode,
13260			Header: res.Header,
13261		}
13262	}
13263	if err != nil {
13264		return nil, err
13265	}
13266	defer googleapi.CloseBody(res)
13267	if err := googleapi.CheckResponse(res); err != nil {
13268		return nil, err
13269	}
13270	ret := &MobileDevice{
13271		ServerResponse: googleapi.ServerResponse{
13272			Header:         res.Header,
13273			HTTPStatusCode: res.StatusCode,
13274		},
13275	}
13276	target := &ret
13277	if err := gensupport.DecodeResponse(target, res); err != nil {
13278		return nil, err
13279	}
13280	return ret, nil
13281	// {
13282	//   "description": "Retrieves a mobile device's properties.",
13283	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}",
13284	//   "httpMethod": "GET",
13285	//   "id": "directory.mobiledevices.get",
13286	//   "parameterOrder": [
13287	//     "customerId",
13288	//     "resourceId"
13289	//   ],
13290	//   "parameters": {
13291	//     "customerId": {
13292	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13293	//       "location": "path",
13294	//       "required": true,
13295	//       "type": "string"
13296	//     },
13297	//     "projection": {
13298	//       "description": "Restrict information returned to a set of selected fields.",
13299	//       "enum": [
13300	//         "BASIC",
13301	//         "FULL"
13302	//       ],
13303	//       "enumDescriptions": [
13304	//         "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)",
13305	//         "Includes all metadata fields"
13306	//       ],
13307	//       "location": "query",
13308	//       "type": "string"
13309	//     },
13310	//     "resourceId": {
13311	//       "description": "The unique ID the API service uses to identify the mobile device.",
13312	//       "location": "path",
13313	//       "required": true,
13314	//       "type": "string"
13315	//     }
13316	//   },
13317	//   "path": "admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}",
13318	//   "response": {
13319	//     "$ref": "MobileDevice"
13320	//   },
13321	//   "scopes": [
13322	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
13323	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action",
13324	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
13325	//   ]
13326	// }
13327
13328}
13329
13330// method id "directory.mobiledevices.list":
13331
13332type MobiledevicesListCall struct {
13333	s            *Service
13334	customerId   string
13335	urlParams_   gensupport.URLParams
13336	ifNoneMatch_ string
13337	ctx_         context.Context
13338	header_      http.Header
13339}
13340
13341// List: Retrieves a paginated list of all mobile devices for an
13342// account.
13343//
13344// - customerId: The unique ID for the customer's Google Workspace
13345//   account. As an account administrator, you can also use the
13346//   `my_customer` alias to represent your account's `customerId`. The
13347//   `customerId` is also returned as part of the Users resource
13348//   (/admin-sdk/directory/v1/reference/users).
13349func (r *MobiledevicesService) List(customerId string) *MobiledevicesListCall {
13350	c := &MobiledevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13351	c.customerId = customerId
13352	return c
13353}
13354
13355// MaxResults sets the optional parameter "maxResults": Maximum number
13356// of results to return. Max allowed value is 100.
13357func (c *MobiledevicesListCall) MaxResults(maxResults int64) *MobiledevicesListCall {
13358	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13359	return c
13360}
13361
13362// OrderBy sets the optional parameter "orderBy": Device property to use
13363// for sorting results.
13364//
13365// Possible values:
13366//   "deviceId" - The serial number for a Google Sync mobile device. For
13367// Android devices, this is a software generated unique identifier.
13368//   "email" - The device owner's email address.
13369//   "lastSync" - Last policy settings sync date time of the device.
13370//   "model" - The mobile device's model.
13371//   "name" - The device owner's user name.
13372//   "os" - The device's operating system.
13373//   "status" - The device status.
13374//   "type" - Type of the device.
13375func (c *MobiledevicesListCall) OrderBy(orderBy string) *MobiledevicesListCall {
13376	c.urlParams_.Set("orderBy", orderBy)
13377	return c
13378}
13379
13380// PageToken sets the optional parameter "pageToken": Token to specify
13381// next page in the list
13382func (c *MobiledevicesListCall) PageToken(pageToken string) *MobiledevicesListCall {
13383	c.urlParams_.Set("pageToken", pageToken)
13384	return c
13385}
13386
13387// Projection sets the optional parameter "projection": Restrict
13388// information returned to a set of selected fields.
13389//
13390// Possible values:
13391//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
13392// model, status, type, and status)
13393//   "FULL" - Includes all metadata fields
13394func (c *MobiledevicesListCall) Projection(projection string) *MobiledevicesListCall {
13395	c.urlParams_.Set("projection", projection)
13396	return c
13397}
13398
13399// Query sets the optional parameter "query": Search string in the
13400// format given at
13401// https://developers.google.com/admin-sdk/directory/v1/search-operators
13402func (c *MobiledevicesListCall) Query(query string) *MobiledevicesListCall {
13403	c.urlParams_.Set("query", query)
13404	return c
13405}
13406
13407// SortOrder sets the optional parameter "sortOrder": Whether to return
13408// results in ascending or descending order. Must be used with the
13409// `orderBy` parameter.
13410//
13411// Possible values:
13412//   "ASCENDING" - Ascending order.
13413//   "DESCENDING" - Descending order.
13414func (c *MobiledevicesListCall) SortOrder(sortOrder string) *MobiledevicesListCall {
13415	c.urlParams_.Set("sortOrder", sortOrder)
13416	return c
13417}
13418
13419// Fields allows partial responses to be retrieved. See
13420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13421// for more information.
13422func (c *MobiledevicesListCall) Fields(s ...googleapi.Field) *MobiledevicesListCall {
13423	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13424	return c
13425}
13426
13427// IfNoneMatch sets the optional parameter which makes the operation
13428// fail if the object's ETag matches the given value. This is useful for
13429// getting updates only after the object has changed since the last
13430// request. Use googleapi.IsNotModified to check whether the response
13431// error from Do is the result of In-None-Match.
13432func (c *MobiledevicesListCall) IfNoneMatch(entityTag string) *MobiledevicesListCall {
13433	c.ifNoneMatch_ = entityTag
13434	return c
13435}
13436
13437// Context sets the context to be used in this call's Do method. Any
13438// pending HTTP request will be aborted if the provided context is
13439// canceled.
13440func (c *MobiledevicesListCall) Context(ctx context.Context) *MobiledevicesListCall {
13441	c.ctx_ = ctx
13442	return c
13443}
13444
13445// Header returns an http.Header that can be modified by the caller to
13446// add HTTP headers to the request.
13447func (c *MobiledevicesListCall) Header() http.Header {
13448	if c.header_ == nil {
13449		c.header_ = make(http.Header)
13450	}
13451	return c.header_
13452}
13453
13454func (c *MobiledevicesListCall) doRequest(alt string) (*http.Response, error) {
13455	reqHeaders := make(http.Header)
13456	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13457	for k, v := range c.header_ {
13458		reqHeaders[k] = v
13459	}
13460	reqHeaders.Set("User-Agent", c.s.userAgent())
13461	if c.ifNoneMatch_ != "" {
13462		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13463	}
13464	var body io.Reader = nil
13465	c.urlParams_.Set("alt", alt)
13466	c.urlParams_.Set("prettyPrint", "false")
13467	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/devices/mobile")
13468	urls += "?" + c.urlParams_.Encode()
13469	req, err := http.NewRequest("GET", urls, body)
13470	if err != nil {
13471		return nil, err
13472	}
13473	req.Header = reqHeaders
13474	googleapi.Expand(req.URL, map[string]string{
13475		"customerId": c.customerId,
13476	})
13477	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13478}
13479
13480// Do executes the "directory.mobiledevices.list" call.
13481// Exactly one of *MobileDevices or error will be non-nil. Any non-2xx
13482// status code is an error. Response headers are in either
13483// *MobileDevices.ServerResponse.Header or (if a response was returned
13484// at all) in error.(*googleapi.Error).Header. Use
13485// googleapi.IsNotModified to check whether the returned error was
13486// because http.StatusNotModified was returned.
13487func (c *MobiledevicesListCall) Do(opts ...googleapi.CallOption) (*MobileDevices, error) {
13488	gensupport.SetOptions(c.urlParams_, opts...)
13489	res, err := c.doRequest("json")
13490	if res != nil && res.StatusCode == http.StatusNotModified {
13491		if res.Body != nil {
13492			res.Body.Close()
13493		}
13494		return nil, &googleapi.Error{
13495			Code:   res.StatusCode,
13496			Header: res.Header,
13497		}
13498	}
13499	if err != nil {
13500		return nil, err
13501	}
13502	defer googleapi.CloseBody(res)
13503	if err := googleapi.CheckResponse(res); err != nil {
13504		return nil, err
13505	}
13506	ret := &MobileDevices{
13507		ServerResponse: googleapi.ServerResponse{
13508			Header:         res.Header,
13509			HTTPStatusCode: res.StatusCode,
13510		},
13511	}
13512	target := &ret
13513	if err := gensupport.DecodeResponse(target, res); err != nil {
13514		return nil, err
13515	}
13516	return ret, nil
13517	// {
13518	//   "description": "Retrieves a paginated list of all mobile devices for an account.",
13519	//   "flatPath": "admin/directory/v1/customer/{customerId}/devices/mobile",
13520	//   "httpMethod": "GET",
13521	//   "id": "directory.mobiledevices.list",
13522	//   "parameterOrder": [
13523	//     "customerId"
13524	//   ],
13525	//   "parameters": {
13526	//     "customerId": {
13527	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13528	//       "location": "path",
13529	//       "required": true,
13530	//       "type": "string"
13531	//     },
13532	//     "maxResults": {
13533	//       "default": "100",
13534	//       "description": "Maximum number of results to return. Max allowed value is 100.",
13535	//       "format": "int32",
13536	//       "location": "query",
13537	//       "maximum": "100",
13538	//       "minimum": "1",
13539	//       "type": "integer"
13540	//     },
13541	//     "orderBy": {
13542	//       "description": "Device property to use for sorting results.",
13543	//       "enum": [
13544	//         "deviceId",
13545	//         "email",
13546	//         "lastSync",
13547	//         "model",
13548	//         "name",
13549	//         "os",
13550	//         "status",
13551	//         "type"
13552	//       ],
13553	//       "enumDescriptions": [
13554	//         "The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier.",
13555	//         "The device owner's email address.",
13556	//         "Last policy settings sync date time of the device.",
13557	//         "The mobile device's model.",
13558	//         "The device owner's user name.",
13559	//         "The device's operating system.",
13560	//         "The device status.",
13561	//         "Type of the device."
13562	//       ],
13563	//       "location": "query",
13564	//       "type": "string"
13565	//     },
13566	//     "pageToken": {
13567	//       "description": "Token to specify next page in the list",
13568	//       "location": "query",
13569	//       "type": "string"
13570	//     },
13571	//     "projection": {
13572	//       "description": "Restrict information returned to a set of selected fields.",
13573	//       "enum": [
13574	//         "BASIC",
13575	//         "FULL"
13576	//       ],
13577	//       "enumDescriptions": [
13578	//         "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)",
13579	//         "Includes all metadata fields"
13580	//       ],
13581	//       "location": "query",
13582	//       "type": "string"
13583	//     },
13584	//     "query": {
13585	//       "description": "Search string in the format given at https://developers.google.com/admin-sdk/directory/v1/search-operators",
13586	//       "location": "query",
13587	//       "type": "string"
13588	//     },
13589	//     "sortOrder": {
13590	//       "description": "Whether to return results in ascending or descending order. Must be used with the `orderBy` parameter.",
13591	//       "enum": [
13592	//         "ASCENDING",
13593	//         "DESCENDING"
13594	//       ],
13595	//       "enumDescriptions": [
13596	//         "Ascending order.",
13597	//         "Descending order."
13598	//       ],
13599	//       "location": "query",
13600	//       "type": "string"
13601	//     }
13602	//   },
13603	//   "path": "admin/directory/v1/customer/{customerId}/devices/mobile",
13604	//   "response": {
13605	//     "$ref": "MobileDevices"
13606	//   },
13607	//   "scopes": [
13608	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
13609	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action",
13610	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
13611	//   ]
13612	// }
13613
13614}
13615
13616// Pages invokes f for each page of results.
13617// A non-nil error returned from f will halt the iteration.
13618// The provided context supersedes any context provided to the Context method.
13619func (c *MobiledevicesListCall) Pages(ctx context.Context, f func(*MobileDevices) error) error {
13620	c.ctx_ = ctx
13621	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13622	for {
13623		x, err := c.Do()
13624		if err != nil {
13625			return err
13626		}
13627		if err := f(x); err != nil {
13628			return err
13629		}
13630		if x.NextPageToken == "" {
13631			return nil
13632		}
13633		c.PageToken(x.NextPageToken)
13634	}
13635}
13636
13637// method id "directory.orgunits.delete":
13638
13639type OrgunitsDeleteCall struct {
13640	s           *Service
13641	customerId  string
13642	orgUnitPath string
13643	urlParams_  gensupport.URLParams
13644	ctx_        context.Context
13645	header_     http.Header
13646}
13647
13648// Delete: Removes an organizational unit.
13649//
13650// - customerId: The unique ID for the customer's Google Workspace
13651//   account. As an account administrator, you can also use the
13652//   `my_customer` alias to represent your account's `customerId`. The
13653//   `customerId` is also returned as part of the Users resource
13654//   (/admin-sdk/directory/v1/reference/users).
13655// - orgUnitPath: The full path of the organizational unit or its unique
13656//   ID.
13657func (r *OrgunitsService) Delete(customerId string, orgUnitPath string) *OrgunitsDeleteCall {
13658	c := &OrgunitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13659	c.customerId = customerId
13660	c.orgUnitPath = orgUnitPath
13661	return c
13662}
13663
13664// Fields allows partial responses to be retrieved. See
13665// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13666// for more information.
13667func (c *OrgunitsDeleteCall) Fields(s ...googleapi.Field) *OrgunitsDeleteCall {
13668	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13669	return c
13670}
13671
13672// Context sets the context to be used in this call's Do method. Any
13673// pending HTTP request will be aborted if the provided context is
13674// canceled.
13675func (c *OrgunitsDeleteCall) Context(ctx context.Context) *OrgunitsDeleteCall {
13676	c.ctx_ = ctx
13677	return c
13678}
13679
13680// Header returns an http.Header that can be modified by the caller to
13681// add HTTP headers to the request.
13682func (c *OrgunitsDeleteCall) Header() http.Header {
13683	if c.header_ == nil {
13684		c.header_ = make(http.Header)
13685	}
13686	return c.header_
13687}
13688
13689func (c *OrgunitsDeleteCall) doRequest(alt string) (*http.Response, error) {
13690	reqHeaders := make(http.Header)
13691	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13692	for k, v := range c.header_ {
13693		reqHeaders[k] = v
13694	}
13695	reqHeaders.Set("User-Agent", c.s.userAgent())
13696	var body io.Reader = nil
13697	c.urlParams_.Set("alt", alt)
13698	c.urlParams_.Set("prettyPrint", "false")
13699	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
13700	urls += "?" + c.urlParams_.Encode()
13701	req, err := http.NewRequest("DELETE", urls, body)
13702	if err != nil {
13703		return nil, err
13704	}
13705	req.Header = reqHeaders
13706	googleapi.Expand(req.URL, map[string]string{
13707		"customerId":  c.customerId,
13708		"orgUnitPath": c.orgUnitPath,
13709	})
13710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13711}
13712
13713// Do executes the "directory.orgunits.delete" call.
13714func (c *OrgunitsDeleteCall) Do(opts ...googleapi.CallOption) error {
13715	gensupport.SetOptions(c.urlParams_, opts...)
13716	res, err := c.doRequest("json")
13717	if err != nil {
13718		return err
13719	}
13720	defer googleapi.CloseBody(res)
13721	if err := googleapi.CheckResponse(res); err != nil {
13722		return err
13723	}
13724	return nil
13725	// {
13726	//   "description": "Removes an organizational unit.",
13727	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits/{orgunitsId}",
13728	//   "httpMethod": "DELETE",
13729	//   "id": "directory.orgunits.delete",
13730	//   "parameterOrder": [
13731	//     "customerId",
13732	//     "orgUnitPath"
13733	//   ],
13734	//   "parameters": {
13735	//     "customerId": {
13736	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13737	//       "location": "path",
13738	//       "required": true,
13739	//       "type": "string"
13740	//     },
13741	//     "orgUnitPath": {
13742	//       "description": "The full path of the organizational unit or its unique ID.",
13743	//       "location": "path",
13744	//       "pattern": "^.*$",
13745	//       "required": true,
13746	//       "type": "string"
13747	//     }
13748	//   },
13749	//   "path": "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}",
13750	//   "scopes": [
13751	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
13752	//   ]
13753	// }
13754
13755}
13756
13757// method id "directory.orgunits.get":
13758
13759type OrgunitsGetCall struct {
13760	s            *Service
13761	customerId   string
13762	orgUnitPath  string
13763	urlParams_   gensupport.URLParams
13764	ifNoneMatch_ string
13765	ctx_         context.Context
13766	header_      http.Header
13767}
13768
13769// Get: Retrieves an organizational unit.
13770//
13771// - customerId: The unique ID for the customer's Google Workspace
13772//   account. As an account administrator, you can also use the
13773//   `my_customer` alias to represent your account's `customerId`. The
13774//   `customerId` is also returned as part of the Users resource
13775//   (/admin-sdk/directory/v1/reference/users).
13776// - orgUnitPath: The full path of the organizational unit or its unique
13777//   ID.
13778func (r *OrgunitsService) Get(customerId string, orgUnitPath string) *OrgunitsGetCall {
13779	c := &OrgunitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13780	c.customerId = customerId
13781	c.orgUnitPath = orgUnitPath
13782	return c
13783}
13784
13785// Fields allows partial responses to be retrieved. See
13786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13787// for more information.
13788func (c *OrgunitsGetCall) Fields(s ...googleapi.Field) *OrgunitsGetCall {
13789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13790	return c
13791}
13792
13793// IfNoneMatch sets the optional parameter which makes the operation
13794// fail if the object's ETag matches the given value. This is useful for
13795// getting updates only after the object has changed since the last
13796// request. Use googleapi.IsNotModified to check whether the response
13797// error from Do is the result of In-None-Match.
13798func (c *OrgunitsGetCall) IfNoneMatch(entityTag string) *OrgunitsGetCall {
13799	c.ifNoneMatch_ = entityTag
13800	return c
13801}
13802
13803// Context sets the context to be used in this call's Do method. Any
13804// pending HTTP request will be aborted if the provided context is
13805// canceled.
13806func (c *OrgunitsGetCall) Context(ctx context.Context) *OrgunitsGetCall {
13807	c.ctx_ = ctx
13808	return c
13809}
13810
13811// Header returns an http.Header that can be modified by the caller to
13812// add HTTP headers to the request.
13813func (c *OrgunitsGetCall) Header() http.Header {
13814	if c.header_ == nil {
13815		c.header_ = make(http.Header)
13816	}
13817	return c.header_
13818}
13819
13820func (c *OrgunitsGetCall) doRequest(alt string) (*http.Response, error) {
13821	reqHeaders := make(http.Header)
13822	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13823	for k, v := range c.header_ {
13824		reqHeaders[k] = v
13825	}
13826	reqHeaders.Set("User-Agent", c.s.userAgent())
13827	if c.ifNoneMatch_ != "" {
13828		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13829	}
13830	var body io.Reader = nil
13831	c.urlParams_.Set("alt", alt)
13832	c.urlParams_.Set("prettyPrint", "false")
13833	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
13834	urls += "?" + c.urlParams_.Encode()
13835	req, err := http.NewRequest("GET", urls, body)
13836	if err != nil {
13837		return nil, err
13838	}
13839	req.Header = reqHeaders
13840	googleapi.Expand(req.URL, map[string]string{
13841		"customerId":  c.customerId,
13842		"orgUnitPath": c.orgUnitPath,
13843	})
13844	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13845}
13846
13847// Do executes the "directory.orgunits.get" call.
13848// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
13849// code is an error. Response headers are in either
13850// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
13851// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13852// check whether the returned error was because http.StatusNotModified
13853// was returned.
13854func (c *OrgunitsGetCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
13855	gensupport.SetOptions(c.urlParams_, opts...)
13856	res, err := c.doRequest("json")
13857	if res != nil && res.StatusCode == http.StatusNotModified {
13858		if res.Body != nil {
13859			res.Body.Close()
13860		}
13861		return nil, &googleapi.Error{
13862			Code:   res.StatusCode,
13863			Header: res.Header,
13864		}
13865	}
13866	if err != nil {
13867		return nil, err
13868	}
13869	defer googleapi.CloseBody(res)
13870	if err := googleapi.CheckResponse(res); err != nil {
13871		return nil, err
13872	}
13873	ret := &OrgUnit{
13874		ServerResponse: googleapi.ServerResponse{
13875			Header:         res.Header,
13876			HTTPStatusCode: res.StatusCode,
13877		},
13878	}
13879	target := &ret
13880	if err := gensupport.DecodeResponse(target, res); err != nil {
13881		return nil, err
13882	}
13883	return ret, nil
13884	// {
13885	//   "description": "Retrieves an organizational unit.",
13886	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits/{orgunitsId}",
13887	//   "httpMethod": "GET",
13888	//   "id": "directory.orgunits.get",
13889	//   "parameterOrder": [
13890	//     "customerId",
13891	//     "orgUnitPath"
13892	//   ],
13893	//   "parameters": {
13894	//     "customerId": {
13895	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
13896	//       "location": "path",
13897	//       "required": true,
13898	//       "type": "string"
13899	//     },
13900	//     "orgUnitPath": {
13901	//       "description": "The full path of the organizational unit or its unique ID.",
13902	//       "location": "path",
13903	//       "pattern": "^.*$",
13904	//       "required": true,
13905	//       "type": "string"
13906	//     }
13907	//   },
13908	//   "path": "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}",
13909	//   "response": {
13910	//     "$ref": "OrgUnit"
13911	//   },
13912	//   "scopes": [
13913	//     "https://www.googleapis.com/auth/admin.directory.orgunit",
13914	//     "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
13915	//   ]
13916	// }
13917
13918}
13919
13920// method id "directory.orgunits.insert":
13921
13922type OrgunitsInsertCall struct {
13923	s          *Service
13924	customerId string
13925	orgunit    *OrgUnit
13926	urlParams_ gensupport.URLParams
13927	ctx_       context.Context
13928	header_    http.Header
13929}
13930
13931// Insert: Adds an organizational unit.
13932//
13933// - customerId: The unique ID for the customer's Google Workspace
13934//   account. As an account administrator, you can also use the
13935//   `my_customer` alias to represent your account's `customerId`. The
13936//   `customerId` is also returned as part of the Users resource
13937//   (/admin-sdk/directory/v1/reference/users).
13938func (r *OrgunitsService) Insert(customerId string, orgunit *OrgUnit) *OrgunitsInsertCall {
13939	c := &OrgunitsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13940	c.customerId = customerId
13941	c.orgunit = orgunit
13942	return c
13943}
13944
13945// Fields allows partial responses to be retrieved. See
13946// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13947// for more information.
13948func (c *OrgunitsInsertCall) Fields(s ...googleapi.Field) *OrgunitsInsertCall {
13949	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13950	return c
13951}
13952
13953// Context sets the context to be used in this call's Do method. Any
13954// pending HTTP request will be aborted if the provided context is
13955// canceled.
13956func (c *OrgunitsInsertCall) Context(ctx context.Context) *OrgunitsInsertCall {
13957	c.ctx_ = ctx
13958	return c
13959}
13960
13961// Header returns an http.Header that can be modified by the caller to
13962// add HTTP headers to the request.
13963func (c *OrgunitsInsertCall) Header() http.Header {
13964	if c.header_ == nil {
13965		c.header_ = make(http.Header)
13966	}
13967	return c.header_
13968}
13969
13970func (c *OrgunitsInsertCall) doRequest(alt string) (*http.Response, error) {
13971	reqHeaders := make(http.Header)
13972	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
13973	for k, v := range c.header_ {
13974		reqHeaders[k] = v
13975	}
13976	reqHeaders.Set("User-Agent", c.s.userAgent())
13977	var body io.Reader = nil
13978	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
13979	if err != nil {
13980		return nil, err
13981	}
13982	reqHeaders.Set("Content-Type", "application/json")
13983	c.urlParams_.Set("alt", alt)
13984	c.urlParams_.Set("prettyPrint", "false")
13985	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits")
13986	urls += "?" + c.urlParams_.Encode()
13987	req, err := http.NewRequest("POST", urls, body)
13988	if err != nil {
13989		return nil, err
13990	}
13991	req.Header = reqHeaders
13992	googleapi.Expand(req.URL, map[string]string{
13993		"customerId": c.customerId,
13994	})
13995	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13996}
13997
13998// Do executes the "directory.orgunits.insert" call.
13999// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
14000// code is an error. Response headers are in either
14001// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
14002// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14003// check whether the returned error was because http.StatusNotModified
14004// was returned.
14005func (c *OrgunitsInsertCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
14006	gensupport.SetOptions(c.urlParams_, opts...)
14007	res, err := c.doRequest("json")
14008	if res != nil && res.StatusCode == http.StatusNotModified {
14009		if res.Body != nil {
14010			res.Body.Close()
14011		}
14012		return nil, &googleapi.Error{
14013			Code:   res.StatusCode,
14014			Header: res.Header,
14015		}
14016	}
14017	if err != nil {
14018		return nil, err
14019	}
14020	defer googleapi.CloseBody(res)
14021	if err := googleapi.CheckResponse(res); err != nil {
14022		return nil, err
14023	}
14024	ret := &OrgUnit{
14025		ServerResponse: googleapi.ServerResponse{
14026			Header:         res.Header,
14027			HTTPStatusCode: res.StatusCode,
14028		},
14029	}
14030	target := &ret
14031	if err := gensupport.DecodeResponse(target, res); err != nil {
14032		return nil, err
14033	}
14034	return ret, nil
14035	// {
14036	//   "description": "Adds an organizational unit.",
14037	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits",
14038	//   "httpMethod": "POST",
14039	//   "id": "directory.orgunits.insert",
14040	//   "parameterOrder": [
14041	//     "customerId"
14042	//   ],
14043	//   "parameters": {
14044	//     "customerId": {
14045	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
14046	//       "location": "path",
14047	//       "required": true,
14048	//       "type": "string"
14049	//     }
14050	//   },
14051	//   "path": "admin/directory/v1/customer/{customerId}/orgunits",
14052	//   "request": {
14053	//     "$ref": "OrgUnit"
14054	//   },
14055	//   "response": {
14056	//     "$ref": "OrgUnit"
14057	//   },
14058	//   "scopes": [
14059	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
14060	//   ]
14061	// }
14062
14063}
14064
14065// method id "directory.orgunits.list":
14066
14067type OrgunitsListCall struct {
14068	s            *Service
14069	customerId   string
14070	urlParams_   gensupport.URLParams
14071	ifNoneMatch_ string
14072	ctx_         context.Context
14073	header_      http.Header
14074}
14075
14076// List: Retrieves a list of all organizational units for an account.
14077//
14078// - customerId: The unique ID for the customer's Google Workspace
14079//   account. As an account administrator, you can also use the
14080//   `my_customer` alias to represent your account's `customerId`. The
14081//   `customerId` is also returned as part of the Users resource
14082//   (/admin-sdk/directory/v1/reference/users).
14083func (r *OrgunitsService) List(customerId string) *OrgunitsListCall {
14084	c := &OrgunitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14085	c.customerId = customerId
14086	return c
14087}
14088
14089// OrgUnitPath sets the optional parameter "orgUnitPath": The full path
14090// to the organizational unit or its unique ID. Returns the children of
14091// the specified organizational unit.
14092func (c *OrgunitsListCall) OrgUnitPath(orgUnitPath string) *OrgunitsListCall {
14093	c.urlParams_.Set("orgUnitPath", orgUnitPath)
14094	return c
14095}
14096
14097// Type sets the optional parameter "type": Whether to return all
14098// sub-organizations or just immediate children.
14099//
14100// Possible values:
14101//   "all" - All sub-organizational units.
14102//   "children" - Immediate children only (default).
14103func (c *OrgunitsListCall) Type(type_ string) *OrgunitsListCall {
14104	c.urlParams_.Set("type", type_)
14105	return c
14106}
14107
14108// Fields allows partial responses to be retrieved. See
14109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14110// for more information.
14111func (c *OrgunitsListCall) Fields(s ...googleapi.Field) *OrgunitsListCall {
14112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14113	return c
14114}
14115
14116// IfNoneMatch sets the optional parameter which makes the operation
14117// fail if the object's ETag matches the given value. This is useful for
14118// getting updates only after the object has changed since the last
14119// request. Use googleapi.IsNotModified to check whether the response
14120// error from Do is the result of In-None-Match.
14121func (c *OrgunitsListCall) IfNoneMatch(entityTag string) *OrgunitsListCall {
14122	c.ifNoneMatch_ = entityTag
14123	return c
14124}
14125
14126// Context sets the context to be used in this call's Do method. Any
14127// pending HTTP request will be aborted if the provided context is
14128// canceled.
14129func (c *OrgunitsListCall) Context(ctx context.Context) *OrgunitsListCall {
14130	c.ctx_ = ctx
14131	return c
14132}
14133
14134// Header returns an http.Header that can be modified by the caller to
14135// add HTTP headers to the request.
14136func (c *OrgunitsListCall) Header() http.Header {
14137	if c.header_ == nil {
14138		c.header_ = make(http.Header)
14139	}
14140	return c.header_
14141}
14142
14143func (c *OrgunitsListCall) doRequest(alt string) (*http.Response, error) {
14144	reqHeaders := make(http.Header)
14145	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14146	for k, v := range c.header_ {
14147		reqHeaders[k] = v
14148	}
14149	reqHeaders.Set("User-Agent", c.s.userAgent())
14150	if c.ifNoneMatch_ != "" {
14151		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14152	}
14153	var body io.Reader = nil
14154	c.urlParams_.Set("alt", alt)
14155	c.urlParams_.Set("prettyPrint", "false")
14156	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits")
14157	urls += "?" + c.urlParams_.Encode()
14158	req, err := http.NewRequest("GET", urls, body)
14159	if err != nil {
14160		return nil, err
14161	}
14162	req.Header = reqHeaders
14163	googleapi.Expand(req.URL, map[string]string{
14164		"customerId": c.customerId,
14165	})
14166	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14167}
14168
14169// Do executes the "directory.orgunits.list" call.
14170// Exactly one of *OrgUnits or error will be non-nil. Any non-2xx status
14171// code is an error. Response headers are in either
14172// *OrgUnits.ServerResponse.Header or (if a response was returned at
14173// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14174// to check whether the returned error was because
14175// http.StatusNotModified was returned.
14176func (c *OrgunitsListCall) Do(opts ...googleapi.CallOption) (*OrgUnits, error) {
14177	gensupport.SetOptions(c.urlParams_, opts...)
14178	res, err := c.doRequest("json")
14179	if res != nil && res.StatusCode == http.StatusNotModified {
14180		if res.Body != nil {
14181			res.Body.Close()
14182		}
14183		return nil, &googleapi.Error{
14184			Code:   res.StatusCode,
14185			Header: res.Header,
14186		}
14187	}
14188	if err != nil {
14189		return nil, err
14190	}
14191	defer googleapi.CloseBody(res)
14192	if err := googleapi.CheckResponse(res); err != nil {
14193		return nil, err
14194	}
14195	ret := &OrgUnits{
14196		ServerResponse: googleapi.ServerResponse{
14197			Header:         res.Header,
14198			HTTPStatusCode: res.StatusCode,
14199		},
14200	}
14201	target := &ret
14202	if err := gensupport.DecodeResponse(target, res); err != nil {
14203		return nil, err
14204	}
14205	return ret, nil
14206	// {
14207	//   "description": "Retrieves a list of all organizational units for an account.",
14208	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits",
14209	//   "httpMethod": "GET",
14210	//   "id": "directory.orgunits.list",
14211	//   "parameterOrder": [
14212	//     "customerId"
14213	//   ],
14214	//   "parameters": {
14215	//     "customerId": {
14216	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
14217	//       "location": "path",
14218	//       "required": true,
14219	//       "type": "string"
14220	//     },
14221	//     "orgUnitPath": {
14222	//       "default": "",
14223	//       "description": "The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.",
14224	//       "location": "query",
14225	//       "type": "string"
14226	//     },
14227	//     "type": {
14228	//       "description": "Whether to return all sub-organizations or just immediate children.",
14229	//       "enum": [
14230	//         "all",
14231	//         "children"
14232	//       ],
14233	//       "enumDescriptions": [
14234	//         "All sub-organizational units.",
14235	//         "Immediate children only (default)."
14236	//       ],
14237	//       "location": "query",
14238	//       "type": "string"
14239	//     }
14240	//   },
14241	//   "path": "admin/directory/v1/customer/{customerId}/orgunits",
14242	//   "response": {
14243	//     "$ref": "OrgUnits"
14244	//   },
14245	//   "scopes": [
14246	//     "https://www.googleapis.com/auth/admin.directory.orgunit",
14247	//     "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
14248	//   ]
14249	// }
14250
14251}
14252
14253// method id "directory.orgunits.patch":
14254
14255type OrgunitsPatchCall struct {
14256	s           *Service
14257	customerId  string
14258	orgUnitPath string
14259	orgunit     *OrgUnit
14260	urlParams_  gensupport.URLParams
14261	ctx_        context.Context
14262	header_     http.Header
14263}
14264
14265// Patch: Updates an organizational unit. This method supports patch
14266// semantics (/admin-sdk/directory/v1/guides/performance#patch)
14267//
14268// - customerId: The unique ID for the customer's Google Workspace
14269//   account. As an account administrator, you can also use the
14270//   `my_customer` alias to represent your account's `customerId`. The
14271//   `customerId` is also returned as part of the Users resource
14272//   (/admin-sdk/directory/v1/reference/users).
14273// - orgUnitPath: The full path of the organizational unit or its unique
14274//   ID.
14275func (r *OrgunitsService) Patch(customerId string, orgUnitPath string, orgunit *OrgUnit) *OrgunitsPatchCall {
14276	c := &OrgunitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14277	c.customerId = customerId
14278	c.orgUnitPath = orgUnitPath
14279	c.orgunit = orgunit
14280	return c
14281}
14282
14283// Fields allows partial responses to be retrieved. See
14284// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14285// for more information.
14286func (c *OrgunitsPatchCall) Fields(s ...googleapi.Field) *OrgunitsPatchCall {
14287	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14288	return c
14289}
14290
14291// Context sets the context to be used in this call's Do method. Any
14292// pending HTTP request will be aborted if the provided context is
14293// canceled.
14294func (c *OrgunitsPatchCall) Context(ctx context.Context) *OrgunitsPatchCall {
14295	c.ctx_ = ctx
14296	return c
14297}
14298
14299// Header returns an http.Header that can be modified by the caller to
14300// add HTTP headers to the request.
14301func (c *OrgunitsPatchCall) Header() http.Header {
14302	if c.header_ == nil {
14303		c.header_ = make(http.Header)
14304	}
14305	return c.header_
14306}
14307
14308func (c *OrgunitsPatchCall) doRequest(alt string) (*http.Response, error) {
14309	reqHeaders := make(http.Header)
14310	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14311	for k, v := range c.header_ {
14312		reqHeaders[k] = v
14313	}
14314	reqHeaders.Set("User-Agent", c.s.userAgent())
14315	var body io.Reader = nil
14316	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
14317	if err != nil {
14318		return nil, err
14319	}
14320	reqHeaders.Set("Content-Type", "application/json")
14321	c.urlParams_.Set("alt", alt)
14322	c.urlParams_.Set("prettyPrint", "false")
14323	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
14324	urls += "?" + c.urlParams_.Encode()
14325	req, err := http.NewRequest("PATCH", urls, body)
14326	if err != nil {
14327		return nil, err
14328	}
14329	req.Header = reqHeaders
14330	googleapi.Expand(req.URL, map[string]string{
14331		"customerId":  c.customerId,
14332		"orgUnitPath": c.orgUnitPath,
14333	})
14334	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14335}
14336
14337// Do executes the "directory.orgunits.patch" call.
14338// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
14339// code is an error. Response headers are in either
14340// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
14341// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14342// check whether the returned error was because http.StatusNotModified
14343// was returned.
14344func (c *OrgunitsPatchCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
14345	gensupport.SetOptions(c.urlParams_, opts...)
14346	res, err := c.doRequest("json")
14347	if res != nil && res.StatusCode == http.StatusNotModified {
14348		if res.Body != nil {
14349			res.Body.Close()
14350		}
14351		return nil, &googleapi.Error{
14352			Code:   res.StatusCode,
14353			Header: res.Header,
14354		}
14355	}
14356	if err != nil {
14357		return nil, err
14358	}
14359	defer googleapi.CloseBody(res)
14360	if err := googleapi.CheckResponse(res); err != nil {
14361		return nil, err
14362	}
14363	ret := &OrgUnit{
14364		ServerResponse: googleapi.ServerResponse{
14365			Header:         res.Header,
14366			HTTPStatusCode: res.StatusCode,
14367		},
14368	}
14369	target := &ret
14370	if err := gensupport.DecodeResponse(target, res); err != nil {
14371		return nil, err
14372	}
14373	return ret, nil
14374	// {
14375	//   "description": "Updates an organizational unit. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch)",
14376	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits/{orgunitsId}",
14377	//   "httpMethod": "PATCH",
14378	//   "id": "directory.orgunits.patch",
14379	//   "parameterOrder": [
14380	//     "customerId",
14381	//     "orgUnitPath"
14382	//   ],
14383	//   "parameters": {
14384	//     "customerId": {
14385	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
14386	//       "location": "path",
14387	//       "required": true,
14388	//       "type": "string"
14389	//     },
14390	//     "orgUnitPath": {
14391	//       "description": "The full path of the organizational unit or its unique ID.",
14392	//       "location": "path",
14393	//       "pattern": "^.*$",
14394	//       "required": true,
14395	//       "type": "string"
14396	//     }
14397	//   },
14398	//   "path": "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}",
14399	//   "request": {
14400	//     "$ref": "OrgUnit"
14401	//   },
14402	//   "response": {
14403	//     "$ref": "OrgUnit"
14404	//   },
14405	//   "scopes": [
14406	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
14407	//   ]
14408	// }
14409
14410}
14411
14412// method id "directory.orgunits.update":
14413
14414type OrgunitsUpdateCall struct {
14415	s           *Service
14416	customerId  string
14417	orgUnitPath string
14418	orgunit     *OrgUnit
14419	urlParams_  gensupport.URLParams
14420	ctx_        context.Context
14421	header_     http.Header
14422}
14423
14424// Update: Updates an organizational unit.
14425//
14426// - customerId: The unique ID for the customer's Google Workspace
14427//   account. As an account administrator, you can also use the
14428//   `my_customer` alias to represent your account's `customerId`. The
14429//   `customerId` is also returned as part of the Users resource
14430//   (/admin-sdk/directory/v1/reference/users).
14431// - orgUnitPath: The full path of the organizational unit or its unique
14432//   ID.
14433func (r *OrgunitsService) Update(customerId string, orgUnitPath string, orgunit *OrgUnit) *OrgunitsUpdateCall {
14434	c := &OrgunitsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14435	c.customerId = customerId
14436	c.orgUnitPath = orgUnitPath
14437	c.orgunit = orgunit
14438	return c
14439}
14440
14441// Fields allows partial responses to be retrieved. See
14442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14443// for more information.
14444func (c *OrgunitsUpdateCall) Fields(s ...googleapi.Field) *OrgunitsUpdateCall {
14445	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14446	return c
14447}
14448
14449// Context sets the context to be used in this call's Do method. Any
14450// pending HTTP request will be aborted if the provided context is
14451// canceled.
14452func (c *OrgunitsUpdateCall) Context(ctx context.Context) *OrgunitsUpdateCall {
14453	c.ctx_ = ctx
14454	return c
14455}
14456
14457// Header returns an http.Header that can be modified by the caller to
14458// add HTTP headers to the request.
14459func (c *OrgunitsUpdateCall) Header() http.Header {
14460	if c.header_ == nil {
14461		c.header_ = make(http.Header)
14462	}
14463	return c.header_
14464}
14465
14466func (c *OrgunitsUpdateCall) doRequest(alt string) (*http.Response, error) {
14467	reqHeaders := make(http.Header)
14468	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14469	for k, v := range c.header_ {
14470		reqHeaders[k] = v
14471	}
14472	reqHeaders.Set("User-Agent", c.s.userAgent())
14473	var body io.Reader = nil
14474	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
14475	if err != nil {
14476		return nil, err
14477	}
14478	reqHeaders.Set("Content-Type", "application/json")
14479	c.urlParams_.Set("alt", alt)
14480	c.urlParams_.Set("prettyPrint", "false")
14481	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}")
14482	urls += "?" + c.urlParams_.Encode()
14483	req, err := http.NewRequest("PUT", urls, body)
14484	if err != nil {
14485		return nil, err
14486	}
14487	req.Header = reqHeaders
14488	googleapi.Expand(req.URL, map[string]string{
14489		"customerId":  c.customerId,
14490		"orgUnitPath": c.orgUnitPath,
14491	})
14492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14493}
14494
14495// Do executes the "directory.orgunits.update" call.
14496// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
14497// code is an error. Response headers are in either
14498// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
14499// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14500// check whether the returned error was because http.StatusNotModified
14501// was returned.
14502func (c *OrgunitsUpdateCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
14503	gensupport.SetOptions(c.urlParams_, opts...)
14504	res, err := c.doRequest("json")
14505	if res != nil && res.StatusCode == http.StatusNotModified {
14506		if res.Body != nil {
14507			res.Body.Close()
14508		}
14509		return nil, &googleapi.Error{
14510			Code:   res.StatusCode,
14511			Header: res.Header,
14512		}
14513	}
14514	if err != nil {
14515		return nil, err
14516	}
14517	defer googleapi.CloseBody(res)
14518	if err := googleapi.CheckResponse(res); err != nil {
14519		return nil, err
14520	}
14521	ret := &OrgUnit{
14522		ServerResponse: googleapi.ServerResponse{
14523			Header:         res.Header,
14524			HTTPStatusCode: res.StatusCode,
14525		},
14526	}
14527	target := &ret
14528	if err := gensupport.DecodeResponse(target, res); err != nil {
14529		return nil, err
14530	}
14531	return ret, nil
14532	// {
14533	//   "description": "Updates an organizational unit.",
14534	//   "flatPath": "admin/directory/v1/customer/{customerId}/orgunits/{orgunitsId}",
14535	//   "httpMethod": "PUT",
14536	//   "id": "directory.orgunits.update",
14537	//   "parameterOrder": [
14538	//     "customerId",
14539	//     "orgUnitPath"
14540	//   ],
14541	//   "parameters": {
14542	//     "customerId": {
14543	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users).",
14544	//       "location": "path",
14545	//       "required": true,
14546	//       "type": "string"
14547	//     },
14548	//     "orgUnitPath": {
14549	//       "description": "The full path of the organizational unit or its unique ID.",
14550	//       "location": "path",
14551	//       "pattern": "^.*$",
14552	//       "required": true,
14553	//       "type": "string"
14554	//     }
14555	//   },
14556	//   "path": "admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}",
14557	//   "request": {
14558	//     "$ref": "OrgUnit"
14559	//   },
14560	//   "response": {
14561	//     "$ref": "OrgUnit"
14562	//   },
14563	//   "scopes": [
14564	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
14565	//   ]
14566	// }
14567
14568}
14569
14570// method id "directory.privileges.list":
14571
14572type PrivilegesListCall struct {
14573	s            *Service
14574	customer     string
14575	urlParams_   gensupport.URLParams
14576	ifNoneMatch_ string
14577	ctx_         context.Context
14578	header_      http.Header
14579}
14580
14581// List: Retrieves a paginated list of all privileges for a customer.
14582//
14583// - customer: Immutable ID of the Google Workspace account.
14584func (r *PrivilegesService) List(customer string) *PrivilegesListCall {
14585	c := &PrivilegesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14586	c.customer = customer
14587	return c
14588}
14589
14590// Fields allows partial responses to be retrieved. See
14591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14592// for more information.
14593func (c *PrivilegesListCall) Fields(s ...googleapi.Field) *PrivilegesListCall {
14594	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14595	return c
14596}
14597
14598// IfNoneMatch sets the optional parameter which makes the operation
14599// fail if the object's ETag matches the given value. This is useful for
14600// getting updates only after the object has changed since the last
14601// request. Use googleapi.IsNotModified to check whether the response
14602// error from Do is the result of In-None-Match.
14603func (c *PrivilegesListCall) IfNoneMatch(entityTag string) *PrivilegesListCall {
14604	c.ifNoneMatch_ = entityTag
14605	return c
14606}
14607
14608// Context sets the context to be used in this call's Do method. Any
14609// pending HTTP request will be aborted if the provided context is
14610// canceled.
14611func (c *PrivilegesListCall) Context(ctx context.Context) *PrivilegesListCall {
14612	c.ctx_ = ctx
14613	return c
14614}
14615
14616// Header returns an http.Header that can be modified by the caller to
14617// add HTTP headers to the request.
14618func (c *PrivilegesListCall) Header() http.Header {
14619	if c.header_ == nil {
14620		c.header_ = make(http.Header)
14621	}
14622	return c.header_
14623}
14624
14625func (c *PrivilegesListCall) doRequest(alt string) (*http.Response, error) {
14626	reqHeaders := make(http.Header)
14627	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14628	for k, v := range c.header_ {
14629		reqHeaders[k] = v
14630	}
14631	reqHeaders.Set("User-Agent", c.s.userAgent())
14632	if c.ifNoneMatch_ != "" {
14633		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14634	}
14635	var body io.Reader = nil
14636	c.urlParams_.Set("alt", alt)
14637	c.urlParams_.Set("prettyPrint", "false")
14638	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/ALL/privileges")
14639	urls += "?" + c.urlParams_.Encode()
14640	req, err := http.NewRequest("GET", urls, body)
14641	if err != nil {
14642		return nil, err
14643	}
14644	req.Header = reqHeaders
14645	googleapi.Expand(req.URL, map[string]string{
14646		"customer": c.customer,
14647	})
14648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14649}
14650
14651// Do executes the "directory.privileges.list" call.
14652// Exactly one of *Privileges or error will be non-nil. Any non-2xx
14653// status code is an error. Response headers are in either
14654// *Privileges.ServerResponse.Header or (if a response was returned at
14655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14656// to check whether the returned error was because
14657// http.StatusNotModified was returned.
14658func (c *PrivilegesListCall) Do(opts ...googleapi.CallOption) (*Privileges, error) {
14659	gensupport.SetOptions(c.urlParams_, opts...)
14660	res, err := c.doRequest("json")
14661	if res != nil && res.StatusCode == http.StatusNotModified {
14662		if res.Body != nil {
14663			res.Body.Close()
14664		}
14665		return nil, &googleapi.Error{
14666			Code:   res.StatusCode,
14667			Header: res.Header,
14668		}
14669	}
14670	if err != nil {
14671		return nil, err
14672	}
14673	defer googleapi.CloseBody(res)
14674	if err := googleapi.CheckResponse(res); err != nil {
14675		return nil, err
14676	}
14677	ret := &Privileges{
14678		ServerResponse: googleapi.ServerResponse{
14679			Header:         res.Header,
14680			HTTPStatusCode: res.StatusCode,
14681		},
14682	}
14683	target := &ret
14684	if err := gensupport.DecodeResponse(target, res); err != nil {
14685		return nil, err
14686	}
14687	return ret, nil
14688	// {
14689	//   "description": "Retrieves a paginated list of all privileges for a customer.",
14690	//   "flatPath": "admin/directory/v1/customer/{customer}/roles/ALL/privileges",
14691	//   "httpMethod": "GET",
14692	//   "id": "directory.privileges.list",
14693	//   "parameterOrder": [
14694	//     "customer"
14695	//   ],
14696	//   "parameters": {
14697	//     "customer": {
14698	//       "description": "Immutable ID of the Google Workspace account.",
14699	//       "location": "path",
14700	//       "required": true,
14701	//       "type": "string"
14702	//     }
14703	//   },
14704	//   "path": "admin/directory/v1/customer/{customer}/roles/ALL/privileges",
14705	//   "response": {
14706	//     "$ref": "Privileges"
14707	//   },
14708	//   "scopes": [
14709	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
14710	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
14711	//   ]
14712	// }
14713
14714}
14715
14716// method id "directory.resources.buildings.delete":
14717
14718type ResourcesBuildingsDeleteCall struct {
14719	s          *Service
14720	customer   string
14721	buildingId string
14722	urlParams_ gensupport.URLParams
14723	ctx_       context.Context
14724	header_    http.Header
14725}
14726
14727// Delete: Deletes a building.
14728//
14729// - buildingId: The id of the building to delete.
14730// - customer: The unique ID for the customer's Google Workspace
14731//   account. As an account administrator, you can also use the
14732//   `my_customer` alias to represent your account's customer ID.
14733func (r *ResourcesBuildingsService) Delete(customer string, buildingId string) *ResourcesBuildingsDeleteCall {
14734	c := &ResourcesBuildingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14735	c.customer = customer
14736	c.buildingId = buildingId
14737	return c
14738}
14739
14740// Fields allows partial responses to be retrieved. See
14741// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14742// for more information.
14743func (c *ResourcesBuildingsDeleteCall) Fields(s ...googleapi.Field) *ResourcesBuildingsDeleteCall {
14744	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14745	return c
14746}
14747
14748// Context sets the context to be used in this call's Do method. Any
14749// pending HTTP request will be aborted if the provided context is
14750// canceled.
14751func (c *ResourcesBuildingsDeleteCall) Context(ctx context.Context) *ResourcesBuildingsDeleteCall {
14752	c.ctx_ = ctx
14753	return c
14754}
14755
14756// Header returns an http.Header that can be modified by the caller to
14757// add HTTP headers to the request.
14758func (c *ResourcesBuildingsDeleteCall) Header() http.Header {
14759	if c.header_ == nil {
14760		c.header_ = make(http.Header)
14761	}
14762	return c.header_
14763}
14764
14765func (c *ResourcesBuildingsDeleteCall) doRequest(alt string) (*http.Response, error) {
14766	reqHeaders := make(http.Header)
14767	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14768	for k, v := range c.header_ {
14769		reqHeaders[k] = v
14770	}
14771	reqHeaders.Set("User-Agent", c.s.userAgent())
14772	var body io.Reader = nil
14773	c.urlParams_.Set("alt", alt)
14774	c.urlParams_.Set("prettyPrint", "false")
14775	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
14776	urls += "?" + c.urlParams_.Encode()
14777	req, err := http.NewRequest("DELETE", urls, body)
14778	if err != nil {
14779		return nil, err
14780	}
14781	req.Header = reqHeaders
14782	googleapi.Expand(req.URL, map[string]string{
14783		"customer":   c.customer,
14784		"buildingId": c.buildingId,
14785	})
14786	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14787}
14788
14789// Do executes the "directory.resources.buildings.delete" call.
14790func (c *ResourcesBuildingsDeleteCall) Do(opts ...googleapi.CallOption) error {
14791	gensupport.SetOptions(c.urlParams_, opts...)
14792	res, err := c.doRequest("json")
14793	if err != nil {
14794		return err
14795	}
14796	defer googleapi.CloseBody(res)
14797	if err := googleapi.CheckResponse(res); err != nil {
14798		return err
14799	}
14800	return nil
14801	// {
14802	//   "description": "Deletes a building.",
14803	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
14804	//   "httpMethod": "DELETE",
14805	//   "id": "directory.resources.buildings.delete",
14806	//   "parameterOrder": [
14807	//     "customer",
14808	//     "buildingId"
14809	//   ],
14810	//   "parameters": {
14811	//     "buildingId": {
14812	//       "description": "The id of the building to delete.",
14813	//       "location": "path",
14814	//       "required": true,
14815	//       "type": "string"
14816	//     },
14817	//     "customer": {
14818	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
14819	//       "location": "path",
14820	//       "required": true,
14821	//       "type": "string"
14822	//     }
14823	//   },
14824	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
14825	//   "scopes": [
14826	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
14827	//   ]
14828	// }
14829
14830}
14831
14832// method id "directory.resources.buildings.get":
14833
14834type ResourcesBuildingsGetCall struct {
14835	s            *Service
14836	customer     string
14837	buildingId   string
14838	urlParams_   gensupport.URLParams
14839	ifNoneMatch_ string
14840	ctx_         context.Context
14841	header_      http.Header
14842}
14843
14844// Get: Retrieves a building.
14845//
14846// - buildingId: The unique ID of the building to retrieve.
14847// - customer: The unique ID for the customer's Google Workspace
14848//   account. As an account administrator, you can also use the
14849//   `my_customer` alias to represent your account's customer ID.
14850func (r *ResourcesBuildingsService) Get(customer string, buildingId string) *ResourcesBuildingsGetCall {
14851	c := &ResourcesBuildingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14852	c.customer = customer
14853	c.buildingId = buildingId
14854	return c
14855}
14856
14857// Fields allows partial responses to be retrieved. See
14858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14859// for more information.
14860func (c *ResourcesBuildingsGetCall) Fields(s ...googleapi.Field) *ResourcesBuildingsGetCall {
14861	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14862	return c
14863}
14864
14865// IfNoneMatch sets the optional parameter which makes the operation
14866// fail if the object's ETag matches the given value. This is useful for
14867// getting updates only after the object has changed since the last
14868// request. Use googleapi.IsNotModified to check whether the response
14869// error from Do is the result of In-None-Match.
14870func (c *ResourcesBuildingsGetCall) IfNoneMatch(entityTag string) *ResourcesBuildingsGetCall {
14871	c.ifNoneMatch_ = entityTag
14872	return c
14873}
14874
14875// Context sets the context to be used in this call's Do method. Any
14876// pending HTTP request will be aborted if the provided context is
14877// canceled.
14878func (c *ResourcesBuildingsGetCall) Context(ctx context.Context) *ResourcesBuildingsGetCall {
14879	c.ctx_ = ctx
14880	return c
14881}
14882
14883// Header returns an http.Header that can be modified by the caller to
14884// add HTTP headers to the request.
14885func (c *ResourcesBuildingsGetCall) Header() http.Header {
14886	if c.header_ == nil {
14887		c.header_ = make(http.Header)
14888	}
14889	return c.header_
14890}
14891
14892func (c *ResourcesBuildingsGetCall) doRequest(alt string) (*http.Response, error) {
14893	reqHeaders := make(http.Header)
14894	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
14895	for k, v := range c.header_ {
14896		reqHeaders[k] = v
14897	}
14898	reqHeaders.Set("User-Agent", c.s.userAgent())
14899	if c.ifNoneMatch_ != "" {
14900		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14901	}
14902	var body io.Reader = nil
14903	c.urlParams_.Set("alt", alt)
14904	c.urlParams_.Set("prettyPrint", "false")
14905	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
14906	urls += "?" + c.urlParams_.Encode()
14907	req, err := http.NewRequest("GET", urls, body)
14908	if err != nil {
14909		return nil, err
14910	}
14911	req.Header = reqHeaders
14912	googleapi.Expand(req.URL, map[string]string{
14913		"customer":   c.customer,
14914		"buildingId": c.buildingId,
14915	})
14916	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14917}
14918
14919// Do executes the "directory.resources.buildings.get" call.
14920// Exactly one of *Building or error will be non-nil. Any non-2xx status
14921// code is an error. Response headers are in either
14922// *Building.ServerResponse.Header or (if a response was returned at
14923// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14924// to check whether the returned error was because
14925// http.StatusNotModified was returned.
14926func (c *ResourcesBuildingsGetCall) Do(opts ...googleapi.CallOption) (*Building, error) {
14927	gensupport.SetOptions(c.urlParams_, opts...)
14928	res, err := c.doRequest("json")
14929	if res != nil && res.StatusCode == http.StatusNotModified {
14930		if res.Body != nil {
14931			res.Body.Close()
14932		}
14933		return nil, &googleapi.Error{
14934			Code:   res.StatusCode,
14935			Header: res.Header,
14936		}
14937	}
14938	if err != nil {
14939		return nil, err
14940	}
14941	defer googleapi.CloseBody(res)
14942	if err := googleapi.CheckResponse(res); err != nil {
14943		return nil, err
14944	}
14945	ret := &Building{
14946		ServerResponse: googleapi.ServerResponse{
14947			Header:         res.Header,
14948			HTTPStatusCode: res.StatusCode,
14949		},
14950	}
14951	target := &ret
14952	if err := gensupport.DecodeResponse(target, res); err != nil {
14953		return nil, err
14954	}
14955	return ret, nil
14956	// {
14957	//   "description": "Retrieves a building.",
14958	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
14959	//   "httpMethod": "GET",
14960	//   "id": "directory.resources.buildings.get",
14961	//   "parameterOrder": [
14962	//     "customer",
14963	//     "buildingId"
14964	//   ],
14965	//   "parameters": {
14966	//     "buildingId": {
14967	//       "description": "The unique ID of the building to retrieve.",
14968	//       "location": "path",
14969	//       "required": true,
14970	//       "type": "string"
14971	//     },
14972	//     "customer": {
14973	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
14974	//       "location": "path",
14975	//       "required": true,
14976	//       "type": "string"
14977	//     }
14978	//   },
14979	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
14980	//   "response": {
14981	//     "$ref": "Building"
14982	//   },
14983	//   "scopes": [
14984	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
14985	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
14986	//   ]
14987	// }
14988
14989}
14990
14991// method id "directory.resources.buildings.insert":
14992
14993type ResourcesBuildingsInsertCall struct {
14994	s          *Service
14995	customer   string
14996	building   *Building
14997	urlParams_ gensupport.URLParams
14998	ctx_       context.Context
14999	header_    http.Header
15000}
15001
15002// Insert: Inserts a building.
15003//
15004// - customer: The unique ID for the customer's Google Workspace
15005//   account. As an account administrator, you can also use the
15006//   `my_customer` alias to represent your account's customer ID.
15007func (r *ResourcesBuildingsService) Insert(customer string, building *Building) *ResourcesBuildingsInsertCall {
15008	c := &ResourcesBuildingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15009	c.customer = customer
15010	c.building = building
15011	return c
15012}
15013
15014// CoordinatesSource sets the optional parameter "coordinatesSource":
15015// Source from which Building.coordinates are derived.
15016//
15017// Possible values:
15018//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
15019// coordinates included in the request.
15020//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
15021// populated based on the postal address.
15022//   "SOURCE_UNSPECIFIED" (default) - Defaults to
15023// `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise,
15024// defaults to `CLIENT_SPECIFIED` if coordinates are provided.
15025func (c *ResourcesBuildingsInsertCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsInsertCall {
15026	c.urlParams_.Set("coordinatesSource", coordinatesSource)
15027	return c
15028}
15029
15030// Fields allows partial responses to be retrieved. See
15031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15032// for more information.
15033func (c *ResourcesBuildingsInsertCall) Fields(s ...googleapi.Field) *ResourcesBuildingsInsertCall {
15034	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15035	return c
15036}
15037
15038// Context sets the context to be used in this call's Do method. Any
15039// pending HTTP request will be aborted if the provided context is
15040// canceled.
15041func (c *ResourcesBuildingsInsertCall) Context(ctx context.Context) *ResourcesBuildingsInsertCall {
15042	c.ctx_ = ctx
15043	return c
15044}
15045
15046// Header returns an http.Header that can be modified by the caller to
15047// add HTTP headers to the request.
15048func (c *ResourcesBuildingsInsertCall) Header() http.Header {
15049	if c.header_ == nil {
15050		c.header_ = make(http.Header)
15051	}
15052	return c.header_
15053}
15054
15055func (c *ResourcesBuildingsInsertCall) doRequest(alt string) (*http.Response, error) {
15056	reqHeaders := make(http.Header)
15057	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15058	for k, v := range c.header_ {
15059		reqHeaders[k] = v
15060	}
15061	reqHeaders.Set("User-Agent", c.s.userAgent())
15062	var body io.Reader = nil
15063	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
15064	if err != nil {
15065		return nil, err
15066	}
15067	reqHeaders.Set("Content-Type", "application/json")
15068	c.urlParams_.Set("alt", alt)
15069	c.urlParams_.Set("prettyPrint", "false")
15070	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings")
15071	urls += "?" + c.urlParams_.Encode()
15072	req, err := http.NewRequest("POST", urls, body)
15073	if err != nil {
15074		return nil, err
15075	}
15076	req.Header = reqHeaders
15077	googleapi.Expand(req.URL, map[string]string{
15078		"customer": c.customer,
15079	})
15080	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15081}
15082
15083// Do executes the "directory.resources.buildings.insert" call.
15084// Exactly one of *Building or error will be non-nil. Any non-2xx status
15085// code is an error. Response headers are in either
15086// *Building.ServerResponse.Header or (if a response was returned at
15087// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15088// to check whether the returned error was because
15089// http.StatusNotModified was returned.
15090func (c *ResourcesBuildingsInsertCall) Do(opts ...googleapi.CallOption) (*Building, error) {
15091	gensupport.SetOptions(c.urlParams_, opts...)
15092	res, err := c.doRequest("json")
15093	if res != nil && res.StatusCode == http.StatusNotModified {
15094		if res.Body != nil {
15095			res.Body.Close()
15096		}
15097		return nil, &googleapi.Error{
15098			Code:   res.StatusCode,
15099			Header: res.Header,
15100		}
15101	}
15102	if err != nil {
15103		return nil, err
15104	}
15105	defer googleapi.CloseBody(res)
15106	if err := googleapi.CheckResponse(res); err != nil {
15107		return nil, err
15108	}
15109	ret := &Building{
15110		ServerResponse: googleapi.ServerResponse{
15111			Header:         res.Header,
15112			HTTPStatusCode: res.StatusCode,
15113		},
15114	}
15115	target := &ret
15116	if err := gensupport.DecodeResponse(target, res); err != nil {
15117		return nil, err
15118	}
15119	return ret, nil
15120	// {
15121	//   "description": "Inserts a building.",
15122	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings",
15123	//   "httpMethod": "POST",
15124	//   "id": "directory.resources.buildings.insert",
15125	//   "parameterOrder": [
15126	//     "customer"
15127	//   ],
15128	//   "parameters": {
15129	//     "coordinatesSource": {
15130	//       "default": "SOURCE_UNSPECIFIED",
15131	//       "description": "Source from which Building.coordinates are derived.",
15132	//       "enum": [
15133	//         "CLIENT_SPECIFIED",
15134	//         "RESOLVED_FROM_ADDRESS",
15135	//         "SOURCE_UNSPECIFIED"
15136	//       ],
15137	//       "enumDescriptions": [
15138	//         "Building.coordinates are set to the coordinates included in the request.",
15139	//         "Building.coordinates are automatically populated based on the postal address.",
15140	//         "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided."
15141	//       ],
15142	//       "location": "query",
15143	//       "type": "string"
15144	//     },
15145	//     "customer": {
15146	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15147	//       "location": "path",
15148	//       "required": true,
15149	//       "type": "string"
15150	//     }
15151	//   },
15152	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings",
15153	//   "request": {
15154	//     "$ref": "Building"
15155	//   },
15156	//   "response": {
15157	//     "$ref": "Building"
15158	//   },
15159	//   "scopes": [
15160	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15161	//   ]
15162	// }
15163
15164}
15165
15166// method id "directory.resources.buildings.list":
15167
15168type ResourcesBuildingsListCall struct {
15169	s            *Service
15170	customer     string
15171	urlParams_   gensupport.URLParams
15172	ifNoneMatch_ string
15173	ctx_         context.Context
15174	header_      http.Header
15175}
15176
15177// List: Retrieves a list of buildings for an account.
15178//
15179// - customer: The unique ID for the customer's Google Workspace
15180//   account. As an account administrator, you can also use the
15181//   `my_customer` alias to represent your account's customer ID.
15182func (r *ResourcesBuildingsService) List(customer string) *ResourcesBuildingsListCall {
15183	c := &ResourcesBuildingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15184	c.customer = customer
15185	return c
15186}
15187
15188// MaxResults sets the optional parameter "maxResults": Maximum number
15189// of results to return.
15190func (c *ResourcesBuildingsListCall) MaxResults(maxResults int64) *ResourcesBuildingsListCall {
15191	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15192	return c
15193}
15194
15195// PageToken sets the optional parameter "pageToken": Token to specify
15196// the next page in the list.
15197func (c *ResourcesBuildingsListCall) PageToken(pageToken string) *ResourcesBuildingsListCall {
15198	c.urlParams_.Set("pageToken", pageToken)
15199	return c
15200}
15201
15202// Fields allows partial responses to be retrieved. See
15203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15204// for more information.
15205func (c *ResourcesBuildingsListCall) Fields(s ...googleapi.Field) *ResourcesBuildingsListCall {
15206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15207	return c
15208}
15209
15210// IfNoneMatch sets the optional parameter which makes the operation
15211// fail if the object's ETag matches the given value. This is useful for
15212// getting updates only after the object has changed since the last
15213// request. Use googleapi.IsNotModified to check whether the response
15214// error from Do is the result of In-None-Match.
15215func (c *ResourcesBuildingsListCall) IfNoneMatch(entityTag string) *ResourcesBuildingsListCall {
15216	c.ifNoneMatch_ = entityTag
15217	return c
15218}
15219
15220// Context sets the context to be used in this call's Do method. Any
15221// pending HTTP request will be aborted if the provided context is
15222// canceled.
15223func (c *ResourcesBuildingsListCall) Context(ctx context.Context) *ResourcesBuildingsListCall {
15224	c.ctx_ = ctx
15225	return c
15226}
15227
15228// Header returns an http.Header that can be modified by the caller to
15229// add HTTP headers to the request.
15230func (c *ResourcesBuildingsListCall) Header() http.Header {
15231	if c.header_ == nil {
15232		c.header_ = make(http.Header)
15233	}
15234	return c.header_
15235}
15236
15237func (c *ResourcesBuildingsListCall) doRequest(alt string) (*http.Response, error) {
15238	reqHeaders := make(http.Header)
15239	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15240	for k, v := range c.header_ {
15241		reqHeaders[k] = v
15242	}
15243	reqHeaders.Set("User-Agent", c.s.userAgent())
15244	if c.ifNoneMatch_ != "" {
15245		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15246	}
15247	var body io.Reader = nil
15248	c.urlParams_.Set("alt", alt)
15249	c.urlParams_.Set("prettyPrint", "false")
15250	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings")
15251	urls += "?" + c.urlParams_.Encode()
15252	req, err := http.NewRequest("GET", urls, body)
15253	if err != nil {
15254		return nil, err
15255	}
15256	req.Header = reqHeaders
15257	googleapi.Expand(req.URL, map[string]string{
15258		"customer": c.customer,
15259	})
15260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15261}
15262
15263// Do executes the "directory.resources.buildings.list" call.
15264// Exactly one of *Buildings or error will be non-nil. Any non-2xx
15265// status code is an error. Response headers are in either
15266// *Buildings.ServerResponse.Header or (if a response was returned at
15267// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15268// to check whether the returned error was because
15269// http.StatusNotModified was returned.
15270func (c *ResourcesBuildingsListCall) Do(opts ...googleapi.CallOption) (*Buildings, error) {
15271	gensupport.SetOptions(c.urlParams_, opts...)
15272	res, err := c.doRequest("json")
15273	if res != nil && res.StatusCode == http.StatusNotModified {
15274		if res.Body != nil {
15275			res.Body.Close()
15276		}
15277		return nil, &googleapi.Error{
15278			Code:   res.StatusCode,
15279			Header: res.Header,
15280		}
15281	}
15282	if err != nil {
15283		return nil, err
15284	}
15285	defer googleapi.CloseBody(res)
15286	if err := googleapi.CheckResponse(res); err != nil {
15287		return nil, err
15288	}
15289	ret := &Buildings{
15290		ServerResponse: googleapi.ServerResponse{
15291			Header:         res.Header,
15292			HTTPStatusCode: res.StatusCode,
15293		},
15294	}
15295	target := &ret
15296	if err := gensupport.DecodeResponse(target, res); err != nil {
15297		return nil, err
15298	}
15299	return ret, nil
15300	// {
15301	//   "description": "Retrieves a list of buildings for an account.",
15302	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings",
15303	//   "httpMethod": "GET",
15304	//   "id": "directory.resources.buildings.list",
15305	//   "parameterOrder": [
15306	//     "customer"
15307	//   ],
15308	//   "parameters": {
15309	//     "customer": {
15310	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15311	//       "location": "path",
15312	//       "required": true,
15313	//       "type": "string"
15314	//     },
15315	//     "maxResults": {
15316	//       "description": "Maximum number of results to return.",
15317	//       "format": "int32",
15318	//       "location": "query",
15319	//       "maximum": "500",
15320	//       "minimum": "1",
15321	//       "type": "integer"
15322	//     },
15323	//     "pageToken": {
15324	//       "description": "Token to specify the next page in the list.",
15325	//       "location": "query",
15326	//       "type": "string"
15327	//     }
15328	//   },
15329	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings",
15330	//   "response": {
15331	//     "$ref": "Buildings"
15332	//   },
15333	//   "scopes": [
15334	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
15335	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
15336	//   ]
15337	// }
15338
15339}
15340
15341// Pages invokes f for each page of results.
15342// A non-nil error returned from f will halt the iteration.
15343// The provided context supersedes any context provided to the Context method.
15344func (c *ResourcesBuildingsListCall) Pages(ctx context.Context, f func(*Buildings) error) error {
15345	c.ctx_ = ctx
15346	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15347	for {
15348		x, err := c.Do()
15349		if err != nil {
15350			return err
15351		}
15352		if err := f(x); err != nil {
15353			return err
15354		}
15355		if x.NextPageToken == "" {
15356			return nil
15357		}
15358		c.PageToken(x.NextPageToken)
15359	}
15360}
15361
15362// method id "directory.resources.buildings.patch":
15363
15364type ResourcesBuildingsPatchCall struct {
15365	s          *Service
15366	customer   string
15367	buildingId string
15368	building   *Building
15369	urlParams_ gensupport.URLParams
15370	ctx_       context.Context
15371	header_    http.Header
15372}
15373
15374// Patch: Patches a building.
15375//
15376// - buildingId: The id of the building to update.
15377// - customer: The unique ID for the customer's Google Workspace
15378//   account. As an account administrator, you can also use the
15379//   `my_customer` alias to represent your account's customer ID.
15380func (r *ResourcesBuildingsService) Patch(customer string, buildingId string, building *Building) *ResourcesBuildingsPatchCall {
15381	c := &ResourcesBuildingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15382	c.customer = customer
15383	c.buildingId = buildingId
15384	c.building = building
15385	return c
15386}
15387
15388// CoordinatesSource sets the optional parameter "coordinatesSource":
15389// Source from which Building.coordinates are derived.
15390//
15391// Possible values:
15392//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
15393// coordinates included in the request.
15394//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
15395// populated based on the postal address.
15396//   "SOURCE_UNSPECIFIED" (default) - Defaults to
15397// `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise,
15398// defaults to `CLIENT_SPECIFIED` if coordinates are provided.
15399func (c *ResourcesBuildingsPatchCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsPatchCall {
15400	c.urlParams_.Set("coordinatesSource", coordinatesSource)
15401	return c
15402}
15403
15404// Fields allows partial responses to be retrieved. See
15405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15406// for more information.
15407func (c *ResourcesBuildingsPatchCall) Fields(s ...googleapi.Field) *ResourcesBuildingsPatchCall {
15408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15409	return c
15410}
15411
15412// Context sets the context to be used in this call's Do method. Any
15413// pending HTTP request will be aborted if the provided context is
15414// canceled.
15415func (c *ResourcesBuildingsPatchCall) Context(ctx context.Context) *ResourcesBuildingsPatchCall {
15416	c.ctx_ = ctx
15417	return c
15418}
15419
15420// Header returns an http.Header that can be modified by the caller to
15421// add HTTP headers to the request.
15422func (c *ResourcesBuildingsPatchCall) Header() http.Header {
15423	if c.header_ == nil {
15424		c.header_ = make(http.Header)
15425	}
15426	return c.header_
15427}
15428
15429func (c *ResourcesBuildingsPatchCall) doRequest(alt string) (*http.Response, error) {
15430	reqHeaders := make(http.Header)
15431	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15432	for k, v := range c.header_ {
15433		reqHeaders[k] = v
15434	}
15435	reqHeaders.Set("User-Agent", c.s.userAgent())
15436	var body io.Reader = nil
15437	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
15438	if err != nil {
15439		return nil, err
15440	}
15441	reqHeaders.Set("Content-Type", "application/json")
15442	c.urlParams_.Set("alt", alt)
15443	c.urlParams_.Set("prettyPrint", "false")
15444	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
15445	urls += "?" + c.urlParams_.Encode()
15446	req, err := http.NewRequest("PATCH", urls, body)
15447	if err != nil {
15448		return nil, err
15449	}
15450	req.Header = reqHeaders
15451	googleapi.Expand(req.URL, map[string]string{
15452		"customer":   c.customer,
15453		"buildingId": c.buildingId,
15454	})
15455	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15456}
15457
15458// Do executes the "directory.resources.buildings.patch" call.
15459// Exactly one of *Building or error will be non-nil. Any non-2xx status
15460// code is an error. Response headers are in either
15461// *Building.ServerResponse.Header or (if a response was returned at
15462// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15463// to check whether the returned error was because
15464// http.StatusNotModified was returned.
15465func (c *ResourcesBuildingsPatchCall) Do(opts ...googleapi.CallOption) (*Building, error) {
15466	gensupport.SetOptions(c.urlParams_, opts...)
15467	res, err := c.doRequest("json")
15468	if res != nil && res.StatusCode == http.StatusNotModified {
15469		if res.Body != nil {
15470			res.Body.Close()
15471		}
15472		return nil, &googleapi.Error{
15473			Code:   res.StatusCode,
15474			Header: res.Header,
15475		}
15476	}
15477	if err != nil {
15478		return nil, err
15479	}
15480	defer googleapi.CloseBody(res)
15481	if err := googleapi.CheckResponse(res); err != nil {
15482		return nil, err
15483	}
15484	ret := &Building{
15485		ServerResponse: googleapi.ServerResponse{
15486			Header:         res.Header,
15487			HTTPStatusCode: res.StatusCode,
15488		},
15489	}
15490	target := &ret
15491	if err := gensupport.DecodeResponse(target, res); err != nil {
15492		return nil, err
15493	}
15494	return ret, nil
15495	// {
15496	//   "description": "Patches a building.",
15497	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
15498	//   "httpMethod": "PATCH",
15499	//   "id": "directory.resources.buildings.patch",
15500	//   "parameterOrder": [
15501	//     "customer",
15502	//     "buildingId"
15503	//   ],
15504	//   "parameters": {
15505	//     "buildingId": {
15506	//       "description": "The id of the building to update.",
15507	//       "location": "path",
15508	//       "required": true,
15509	//       "type": "string"
15510	//     },
15511	//     "coordinatesSource": {
15512	//       "default": "SOURCE_UNSPECIFIED",
15513	//       "description": "Source from which Building.coordinates are derived.",
15514	//       "enum": [
15515	//         "CLIENT_SPECIFIED",
15516	//         "RESOLVED_FROM_ADDRESS",
15517	//         "SOURCE_UNSPECIFIED"
15518	//       ],
15519	//       "enumDescriptions": [
15520	//         "Building.coordinates are set to the coordinates included in the request.",
15521	//         "Building.coordinates are automatically populated based on the postal address.",
15522	//         "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided."
15523	//       ],
15524	//       "location": "query",
15525	//       "type": "string"
15526	//     },
15527	//     "customer": {
15528	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15529	//       "location": "path",
15530	//       "required": true,
15531	//       "type": "string"
15532	//     }
15533	//   },
15534	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
15535	//   "request": {
15536	//     "$ref": "Building"
15537	//   },
15538	//   "response": {
15539	//     "$ref": "Building"
15540	//   },
15541	//   "scopes": [
15542	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15543	//   ]
15544	// }
15545
15546}
15547
15548// method id "directory.resources.buildings.update":
15549
15550type ResourcesBuildingsUpdateCall struct {
15551	s          *Service
15552	customer   string
15553	buildingId string
15554	building   *Building
15555	urlParams_ gensupport.URLParams
15556	ctx_       context.Context
15557	header_    http.Header
15558}
15559
15560// Update: Updates a building.
15561//
15562// - buildingId: The id of the building to update.
15563// - customer: The unique ID for the customer's Google Workspace
15564//   account. As an account administrator, you can also use the
15565//   `my_customer` alias to represent your account's customer ID.
15566func (r *ResourcesBuildingsService) Update(customer string, buildingId string, building *Building) *ResourcesBuildingsUpdateCall {
15567	c := &ResourcesBuildingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15568	c.customer = customer
15569	c.buildingId = buildingId
15570	c.building = building
15571	return c
15572}
15573
15574// CoordinatesSource sets the optional parameter "coordinatesSource":
15575// Source from which Building.coordinates are derived.
15576//
15577// Possible values:
15578//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
15579// coordinates included in the request.
15580//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
15581// populated based on the postal address.
15582//   "SOURCE_UNSPECIFIED" (default) - Defaults to
15583// `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise,
15584// defaults to `CLIENT_SPECIFIED` if coordinates are provided.
15585func (c *ResourcesBuildingsUpdateCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsUpdateCall {
15586	c.urlParams_.Set("coordinatesSource", coordinatesSource)
15587	return c
15588}
15589
15590// Fields allows partial responses to be retrieved. See
15591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15592// for more information.
15593func (c *ResourcesBuildingsUpdateCall) Fields(s ...googleapi.Field) *ResourcesBuildingsUpdateCall {
15594	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15595	return c
15596}
15597
15598// Context sets the context to be used in this call's Do method. Any
15599// pending HTTP request will be aborted if the provided context is
15600// canceled.
15601func (c *ResourcesBuildingsUpdateCall) Context(ctx context.Context) *ResourcesBuildingsUpdateCall {
15602	c.ctx_ = ctx
15603	return c
15604}
15605
15606// Header returns an http.Header that can be modified by the caller to
15607// add HTTP headers to the request.
15608func (c *ResourcesBuildingsUpdateCall) Header() http.Header {
15609	if c.header_ == nil {
15610		c.header_ = make(http.Header)
15611	}
15612	return c.header_
15613}
15614
15615func (c *ResourcesBuildingsUpdateCall) doRequest(alt string) (*http.Response, error) {
15616	reqHeaders := make(http.Header)
15617	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15618	for k, v := range c.header_ {
15619		reqHeaders[k] = v
15620	}
15621	reqHeaders.Set("User-Agent", c.s.userAgent())
15622	var body io.Reader = nil
15623	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
15624	if err != nil {
15625		return nil, err
15626	}
15627	reqHeaders.Set("Content-Type", "application/json")
15628	c.urlParams_.Set("alt", alt)
15629	c.urlParams_.Set("prettyPrint", "false")
15630	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}")
15631	urls += "?" + c.urlParams_.Encode()
15632	req, err := http.NewRequest("PUT", urls, body)
15633	if err != nil {
15634		return nil, err
15635	}
15636	req.Header = reqHeaders
15637	googleapi.Expand(req.URL, map[string]string{
15638		"customer":   c.customer,
15639		"buildingId": c.buildingId,
15640	})
15641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15642}
15643
15644// Do executes the "directory.resources.buildings.update" call.
15645// Exactly one of *Building or error will be non-nil. Any non-2xx status
15646// code is an error. Response headers are in either
15647// *Building.ServerResponse.Header or (if a response was returned at
15648// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15649// to check whether the returned error was because
15650// http.StatusNotModified was returned.
15651func (c *ResourcesBuildingsUpdateCall) Do(opts ...googleapi.CallOption) (*Building, error) {
15652	gensupport.SetOptions(c.urlParams_, opts...)
15653	res, err := c.doRequest("json")
15654	if res != nil && res.StatusCode == http.StatusNotModified {
15655		if res.Body != nil {
15656			res.Body.Close()
15657		}
15658		return nil, &googleapi.Error{
15659			Code:   res.StatusCode,
15660			Header: res.Header,
15661		}
15662	}
15663	if err != nil {
15664		return nil, err
15665	}
15666	defer googleapi.CloseBody(res)
15667	if err := googleapi.CheckResponse(res); err != nil {
15668		return nil, err
15669	}
15670	ret := &Building{
15671		ServerResponse: googleapi.ServerResponse{
15672			Header:         res.Header,
15673			HTTPStatusCode: res.StatusCode,
15674		},
15675	}
15676	target := &ret
15677	if err := gensupport.DecodeResponse(target, res); err != nil {
15678		return nil, err
15679	}
15680	return ret, nil
15681	// {
15682	//   "description": "Updates a building.",
15683	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
15684	//   "httpMethod": "PUT",
15685	//   "id": "directory.resources.buildings.update",
15686	//   "parameterOrder": [
15687	//     "customer",
15688	//     "buildingId"
15689	//   ],
15690	//   "parameters": {
15691	//     "buildingId": {
15692	//       "description": "The id of the building to update.",
15693	//       "location": "path",
15694	//       "required": true,
15695	//       "type": "string"
15696	//     },
15697	//     "coordinatesSource": {
15698	//       "default": "SOURCE_UNSPECIFIED",
15699	//       "description": "Source from which Building.coordinates are derived.",
15700	//       "enum": [
15701	//         "CLIENT_SPECIFIED",
15702	//         "RESOLVED_FROM_ADDRESS",
15703	//         "SOURCE_UNSPECIFIED"
15704	//       ],
15705	//       "enumDescriptions": [
15706	//         "Building.coordinates are set to the coordinates included in the request.",
15707	//         "Building.coordinates are automatically populated based on the postal address.",
15708	//         "Defaults to `RESOLVED_FROM_ADDRESS` if postal address is provided. Otherwise, defaults to `CLIENT_SPECIFIED` if coordinates are provided."
15709	//       ],
15710	//       "location": "query",
15711	//       "type": "string"
15712	//     },
15713	//     "customer": {
15714	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15715	//       "location": "path",
15716	//       "required": true,
15717	//       "type": "string"
15718	//     }
15719	//   },
15720	//   "path": "admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}",
15721	//   "request": {
15722	//     "$ref": "Building"
15723	//   },
15724	//   "response": {
15725	//     "$ref": "Building"
15726	//   },
15727	//   "scopes": [
15728	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15729	//   ]
15730	// }
15731
15732}
15733
15734// method id "directory.resources.calendars.delete":
15735
15736type ResourcesCalendarsDeleteCall struct {
15737	s                  *Service
15738	customer           string
15739	calendarResourceId string
15740	urlParams_         gensupport.URLParams
15741	ctx_               context.Context
15742	header_            http.Header
15743}
15744
15745// Delete: Deletes a calendar resource.
15746//
15747// - calendarResourceId: The unique ID of the calendar resource to
15748//   delete.
15749// - customer: The unique ID for the customer's Google Workspace
15750//   account. As an account administrator, you can also use the
15751//   `my_customer` alias to represent your account's customer ID.
15752func (r *ResourcesCalendarsService) Delete(customer string, calendarResourceId string) *ResourcesCalendarsDeleteCall {
15753	c := &ResourcesCalendarsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15754	c.customer = customer
15755	c.calendarResourceId = calendarResourceId
15756	return c
15757}
15758
15759// Fields allows partial responses to be retrieved. See
15760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15761// for more information.
15762func (c *ResourcesCalendarsDeleteCall) Fields(s ...googleapi.Field) *ResourcesCalendarsDeleteCall {
15763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15764	return c
15765}
15766
15767// Context sets the context to be used in this call's Do method. Any
15768// pending HTTP request will be aborted if the provided context is
15769// canceled.
15770func (c *ResourcesCalendarsDeleteCall) Context(ctx context.Context) *ResourcesCalendarsDeleteCall {
15771	c.ctx_ = ctx
15772	return c
15773}
15774
15775// Header returns an http.Header that can be modified by the caller to
15776// add HTTP headers to the request.
15777func (c *ResourcesCalendarsDeleteCall) Header() http.Header {
15778	if c.header_ == nil {
15779		c.header_ = make(http.Header)
15780	}
15781	return c.header_
15782}
15783
15784func (c *ResourcesCalendarsDeleteCall) doRequest(alt string) (*http.Response, error) {
15785	reqHeaders := make(http.Header)
15786	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15787	for k, v := range c.header_ {
15788		reqHeaders[k] = v
15789	}
15790	reqHeaders.Set("User-Agent", c.s.userAgent())
15791	var body io.Reader = nil
15792	c.urlParams_.Set("alt", alt)
15793	c.urlParams_.Set("prettyPrint", "false")
15794	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
15795	urls += "?" + c.urlParams_.Encode()
15796	req, err := http.NewRequest("DELETE", urls, body)
15797	if err != nil {
15798		return nil, err
15799	}
15800	req.Header = reqHeaders
15801	googleapi.Expand(req.URL, map[string]string{
15802		"customer":           c.customer,
15803		"calendarResourceId": c.calendarResourceId,
15804	})
15805	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15806}
15807
15808// Do executes the "directory.resources.calendars.delete" call.
15809func (c *ResourcesCalendarsDeleteCall) Do(opts ...googleapi.CallOption) error {
15810	gensupport.SetOptions(c.urlParams_, opts...)
15811	res, err := c.doRequest("json")
15812	if err != nil {
15813		return err
15814	}
15815	defer googleapi.CloseBody(res)
15816	if err := googleapi.CheckResponse(res); err != nil {
15817		return err
15818	}
15819	return nil
15820	// {
15821	//   "description": "Deletes a calendar resource.",
15822	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
15823	//   "httpMethod": "DELETE",
15824	//   "id": "directory.resources.calendars.delete",
15825	//   "parameterOrder": [
15826	//     "customer",
15827	//     "calendarResourceId"
15828	//   ],
15829	//   "parameters": {
15830	//     "calendarResourceId": {
15831	//       "description": "The unique ID of the calendar resource to delete.",
15832	//       "location": "path",
15833	//       "required": true,
15834	//       "type": "string"
15835	//     },
15836	//     "customer": {
15837	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15838	//       "location": "path",
15839	//       "required": true,
15840	//       "type": "string"
15841	//     }
15842	//   },
15843	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
15844	//   "scopes": [
15845	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15846	//   ]
15847	// }
15848
15849}
15850
15851// method id "directory.resources.calendars.get":
15852
15853type ResourcesCalendarsGetCall struct {
15854	s                  *Service
15855	customer           string
15856	calendarResourceId string
15857	urlParams_         gensupport.URLParams
15858	ifNoneMatch_       string
15859	ctx_               context.Context
15860	header_            http.Header
15861}
15862
15863// Get: Retrieves a calendar resource.
15864//
15865// - calendarResourceId: The unique ID of the calendar resource to
15866//   retrieve.
15867// - customer: The unique ID for the customer's Google Workspace
15868//   account. As an account administrator, you can also use the
15869//   `my_customer` alias to represent your account's customer ID.
15870func (r *ResourcesCalendarsService) Get(customer string, calendarResourceId string) *ResourcesCalendarsGetCall {
15871	c := &ResourcesCalendarsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15872	c.customer = customer
15873	c.calendarResourceId = calendarResourceId
15874	return c
15875}
15876
15877// Fields allows partial responses to be retrieved. See
15878// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15879// for more information.
15880func (c *ResourcesCalendarsGetCall) Fields(s ...googleapi.Field) *ResourcesCalendarsGetCall {
15881	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15882	return c
15883}
15884
15885// IfNoneMatch sets the optional parameter which makes the operation
15886// fail if the object's ETag matches the given value. This is useful for
15887// getting updates only after the object has changed since the last
15888// request. Use googleapi.IsNotModified to check whether the response
15889// error from Do is the result of In-None-Match.
15890func (c *ResourcesCalendarsGetCall) IfNoneMatch(entityTag string) *ResourcesCalendarsGetCall {
15891	c.ifNoneMatch_ = entityTag
15892	return c
15893}
15894
15895// Context sets the context to be used in this call's Do method. Any
15896// pending HTTP request will be aborted if the provided context is
15897// canceled.
15898func (c *ResourcesCalendarsGetCall) Context(ctx context.Context) *ResourcesCalendarsGetCall {
15899	c.ctx_ = ctx
15900	return c
15901}
15902
15903// Header returns an http.Header that can be modified by the caller to
15904// add HTTP headers to the request.
15905func (c *ResourcesCalendarsGetCall) Header() http.Header {
15906	if c.header_ == nil {
15907		c.header_ = make(http.Header)
15908	}
15909	return c.header_
15910}
15911
15912func (c *ResourcesCalendarsGetCall) doRequest(alt string) (*http.Response, error) {
15913	reqHeaders := make(http.Header)
15914	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
15915	for k, v := range c.header_ {
15916		reqHeaders[k] = v
15917	}
15918	reqHeaders.Set("User-Agent", c.s.userAgent())
15919	if c.ifNoneMatch_ != "" {
15920		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15921	}
15922	var body io.Reader = nil
15923	c.urlParams_.Set("alt", alt)
15924	c.urlParams_.Set("prettyPrint", "false")
15925	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
15926	urls += "?" + c.urlParams_.Encode()
15927	req, err := http.NewRequest("GET", urls, body)
15928	if err != nil {
15929		return nil, err
15930	}
15931	req.Header = reqHeaders
15932	googleapi.Expand(req.URL, map[string]string{
15933		"customer":           c.customer,
15934		"calendarResourceId": c.calendarResourceId,
15935	})
15936	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15937}
15938
15939// Do executes the "directory.resources.calendars.get" call.
15940// Exactly one of *CalendarResource or error will be non-nil. Any
15941// non-2xx status code is an error. Response headers are in either
15942// *CalendarResource.ServerResponse.Header or (if a response was
15943// returned at all) in error.(*googleapi.Error).Header. Use
15944// googleapi.IsNotModified to check whether the returned error was
15945// because http.StatusNotModified was returned.
15946func (c *ResourcesCalendarsGetCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
15947	gensupport.SetOptions(c.urlParams_, opts...)
15948	res, err := c.doRequest("json")
15949	if res != nil && res.StatusCode == http.StatusNotModified {
15950		if res.Body != nil {
15951			res.Body.Close()
15952		}
15953		return nil, &googleapi.Error{
15954			Code:   res.StatusCode,
15955			Header: res.Header,
15956		}
15957	}
15958	if err != nil {
15959		return nil, err
15960	}
15961	defer googleapi.CloseBody(res)
15962	if err := googleapi.CheckResponse(res); err != nil {
15963		return nil, err
15964	}
15965	ret := &CalendarResource{
15966		ServerResponse: googleapi.ServerResponse{
15967			Header:         res.Header,
15968			HTTPStatusCode: res.StatusCode,
15969		},
15970	}
15971	target := &ret
15972	if err := gensupport.DecodeResponse(target, res); err != nil {
15973		return nil, err
15974	}
15975	return ret, nil
15976	// {
15977	//   "description": "Retrieves a calendar resource.",
15978	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
15979	//   "httpMethod": "GET",
15980	//   "id": "directory.resources.calendars.get",
15981	//   "parameterOrder": [
15982	//     "customer",
15983	//     "calendarResourceId"
15984	//   ],
15985	//   "parameters": {
15986	//     "calendarResourceId": {
15987	//       "description": "The unique ID of the calendar resource to retrieve.",
15988	//       "location": "path",
15989	//       "required": true,
15990	//       "type": "string"
15991	//     },
15992	//     "customer": {
15993	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
15994	//       "location": "path",
15995	//       "required": true,
15996	//       "type": "string"
15997	//     }
15998	//   },
15999	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
16000	//   "response": {
16001	//     "$ref": "CalendarResource"
16002	//   },
16003	//   "scopes": [
16004	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
16005	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
16006	//   ]
16007	// }
16008
16009}
16010
16011// method id "directory.resources.calendars.insert":
16012
16013type ResourcesCalendarsInsertCall struct {
16014	s                *Service
16015	customer         string
16016	calendarresource *CalendarResource
16017	urlParams_       gensupport.URLParams
16018	ctx_             context.Context
16019	header_          http.Header
16020}
16021
16022// Insert: Inserts a calendar resource.
16023//
16024// - customer: The unique ID for the customer's Google Workspace
16025//   account. As an account administrator, you can also use the
16026//   `my_customer` alias to represent your account's customer ID.
16027func (r *ResourcesCalendarsService) Insert(customer string, calendarresource *CalendarResource) *ResourcesCalendarsInsertCall {
16028	c := &ResourcesCalendarsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16029	c.customer = customer
16030	c.calendarresource = calendarresource
16031	return c
16032}
16033
16034// Fields allows partial responses to be retrieved. See
16035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16036// for more information.
16037func (c *ResourcesCalendarsInsertCall) Fields(s ...googleapi.Field) *ResourcesCalendarsInsertCall {
16038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16039	return c
16040}
16041
16042// Context sets the context to be used in this call's Do method. Any
16043// pending HTTP request will be aborted if the provided context is
16044// canceled.
16045func (c *ResourcesCalendarsInsertCall) Context(ctx context.Context) *ResourcesCalendarsInsertCall {
16046	c.ctx_ = ctx
16047	return c
16048}
16049
16050// Header returns an http.Header that can be modified by the caller to
16051// add HTTP headers to the request.
16052func (c *ResourcesCalendarsInsertCall) Header() http.Header {
16053	if c.header_ == nil {
16054		c.header_ = make(http.Header)
16055	}
16056	return c.header_
16057}
16058
16059func (c *ResourcesCalendarsInsertCall) doRequest(alt string) (*http.Response, error) {
16060	reqHeaders := make(http.Header)
16061	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16062	for k, v := range c.header_ {
16063		reqHeaders[k] = v
16064	}
16065	reqHeaders.Set("User-Agent", c.s.userAgent())
16066	var body io.Reader = nil
16067	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
16068	if err != nil {
16069		return nil, err
16070	}
16071	reqHeaders.Set("Content-Type", "application/json")
16072	c.urlParams_.Set("alt", alt)
16073	c.urlParams_.Set("prettyPrint", "false")
16074	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars")
16075	urls += "?" + c.urlParams_.Encode()
16076	req, err := http.NewRequest("POST", urls, body)
16077	if err != nil {
16078		return nil, err
16079	}
16080	req.Header = reqHeaders
16081	googleapi.Expand(req.URL, map[string]string{
16082		"customer": c.customer,
16083	})
16084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16085}
16086
16087// Do executes the "directory.resources.calendars.insert" call.
16088// Exactly one of *CalendarResource or error will be non-nil. Any
16089// non-2xx status code is an error. Response headers are in either
16090// *CalendarResource.ServerResponse.Header or (if a response was
16091// returned at all) in error.(*googleapi.Error).Header. Use
16092// googleapi.IsNotModified to check whether the returned error was
16093// because http.StatusNotModified was returned.
16094func (c *ResourcesCalendarsInsertCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
16095	gensupport.SetOptions(c.urlParams_, opts...)
16096	res, err := c.doRequest("json")
16097	if res != nil && res.StatusCode == http.StatusNotModified {
16098		if res.Body != nil {
16099			res.Body.Close()
16100		}
16101		return nil, &googleapi.Error{
16102			Code:   res.StatusCode,
16103			Header: res.Header,
16104		}
16105	}
16106	if err != nil {
16107		return nil, err
16108	}
16109	defer googleapi.CloseBody(res)
16110	if err := googleapi.CheckResponse(res); err != nil {
16111		return nil, err
16112	}
16113	ret := &CalendarResource{
16114		ServerResponse: googleapi.ServerResponse{
16115			Header:         res.Header,
16116			HTTPStatusCode: res.StatusCode,
16117		},
16118	}
16119	target := &ret
16120	if err := gensupport.DecodeResponse(target, res); err != nil {
16121		return nil, err
16122	}
16123	return ret, nil
16124	// {
16125	//   "description": "Inserts a calendar resource.",
16126	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars",
16127	//   "httpMethod": "POST",
16128	//   "id": "directory.resources.calendars.insert",
16129	//   "parameterOrder": [
16130	//     "customer"
16131	//   ],
16132	//   "parameters": {
16133	//     "customer": {
16134	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16135	//       "location": "path",
16136	//       "required": true,
16137	//       "type": "string"
16138	//     }
16139	//   },
16140	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars",
16141	//   "request": {
16142	//     "$ref": "CalendarResource"
16143	//   },
16144	//   "response": {
16145	//     "$ref": "CalendarResource"
16146	//   },
16147	//   "scopes": [
16148	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
16149	//   ]
16150	// }
16151
16152}
16153
16154// method id "directory.resources.calendars.list":
16155
16156type ResourcesCalendarsListCall struct {
16157	s            *Service
16158	customer     string
16159	urlParams_   gensupport.URLParams
16160	ifNoneMatch_ string
16161	ctx_         context.Context
16162	header_      http.Header
16163}
16164
16165// List: Retrieves a list of calendar resources for an account.
16166//
16167// - customer: The unique ID for the customer's Google Workspace
16168//   account. As an account administrator, you can also use the
16169//   `my_customer` alias to represent your account's customer ID.
16170func (r *ResourcesCalendarsService) List(customer string) *ResourcesCalendarsListCall {
16171	c := &ResourcesCalendarsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16172	c.customer = customer
16173	return c
16174}
16175
16176// MaxResults sets the optional parameter "maxResults": Maximum number
16177// of results to return.
16178func (c *ResourcesCalendarsListCall) MaxResults(maxResults int64) *ResourcesCalendarsListCall {
16179	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16180	return c
16181}
16182
16183// OrderBy sets the optional parameter "orderBy": Field(s) to sort
16184// results by in either ascending or descending order. Supported fields
16185// include `resourceId`, `resourceName`, `capacity`, `buildingId`, and
16186// `floorName`. If no order is specified, defaults to ascending. Should
16187// be of the form "field [asc|desc], field [asc|desc], ...". For example
16188// `buildingId, capacity desc` would return results sorted first by
16189// `buildingId` in ascending order then by `capacity` in descending
16190// order.
16191func (c *ResourcesCalendarsListCall) OrderBy(orderBy string) *ResourcesCalendarsListCall {
16192	c.urlParams_.Set("orderBy", orderBy)
16193	return c
16194}
16195
16196// PageToken sets the optional parameter "pageToken": Token to specify
16197// the next page in the list.
16198func (c *ResourcesCalendarsListCall) PageToken(pageToken string) *ResourcesCalendarsListCall {
16199	c.urlParams_.Set("pageToken", pageToken)
16200	return c
16201}
16202
16203// Query sets the optional parameter "query": String query used to
16204// filter results. Should be of the form "field operator value" where
16205// field can be any of supported fields and operators can be any of
16206// supported operations. Operators include '=' for exact match, '!=' for
16207// mismatch and ':' for prefix match or HAS match where applicable. For
16208// prefix match, the value should always be followed by a *. Logical
16209// operators NOT and AND are supported (in this order of precedence).
16210// Supported fields include `generatedResourceName`, `name`,
16211// `buildingId`, `floor_name`, `capacity`,
16212// `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`.
16213// For example `buildingId=US-NYC-9TH AND
16214// featureInstances.feature.name:Phone`.
16215func (c *ResourcesCalendarsListCall) Query(query string) *ResourcesCalendarsListCall {
16216	c.urlParams_.Set("query", query)
16217	return c
16218}
16219
16220// Fields allows partial responses to be retrieved. See
16221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16222// for more information.
16223func (c *ResourcesCalendarsListCall) Fields(s ...googleapi.Field) *ResourcesCalendarsListCall {
16224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16225	return c
16226}
16227
16228// IfNoneMatch sets the optional parameter which makes the operation
16229// fail if the object's ETag matches the given value. This is useful for
16230// getting updates only after the object has changed since the last
16231// request. Use googleapi.IsNotModified to check whether the response
16232// error from Do is the result of In-None-Match.
16233func (c *ResourcesCalendarsListCall) IfNoneMatch(entityTag string) *ResourcesCalendarsListCall {
16234	c.ifNoneMatch_ = entityTag
16235	return c
16236}
16237
16238// Context sets the context to be used in this call's Do method. Any
16239// pending HTTP request will be aborted if the provided context is
16240// canceled.
16241func (c *ResourcesCalendarsListCall) Context(ctx context.Context) *ResourcesCalendarsListCall {
16242	c.ctx_ = ctx
16243	return c
16244}
16245
16246// Header returns an http.Header that can be modified by the caller to
16247// add HTTP headers to the request.
16248func (c *ResourcesCalendarsListCall) Header() http.Header {
16249	if c.header_ == nil {
16250		c.header_ = make(http.Header)
16251	}
16252	return c.header_
16253}
16254
16255func (c *ResourcesCalendarsListCall) doRequest(alt string) (*http.Response, error) {
16256	reqHeaders := make(http.Header)
16257	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16258	for k, v := range c.header_ {
16259		reqHeaders[k] = v
16260	}
16261	reqHeaders.Set("User-Agent", c.s.userAgent())
16262	if c.ifNoneMatch_ != "" {
16263		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16264	}
16265	var body io.Reader = nil
16266	c.urlParams_.Set("alt", alt)
16267	c.urlParams_.Set("prettyPrint", "false")
16268	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars")
16269	urls += "?" + c.urlParams_.Encode()
16270	req, err := http.NewRequest("GET", urls, body)
16271	if err != nil {
16272		return nil, err
16273	}
16274	req.Header = reqHeaders
16275	googleapi.Expand(req.URL, map[string]string{
16276		"customer": c.customer,
16277	})
16278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16279}
16280
16281// Do executes the "directory.resources.calendars.list" call.
16282// Exactly one of *CalendarResources or error will be non-nil. Any
16283// non-2xx status code is an error. Response headers are in either
16284// *CalendarResources.ServerResponse.Header or (if a response was
16285// returned at all) in error.(*googleapi.Error).Header. Use
16286// googleapi.IsNotModified to check whether the returned error was
16287// because http.StatusNotModified was returned.
16288func (c *ResourcesCalendarsListCall) Do(opts ...googleapi.CallOption) (*CalendarResources, error) {
16289	gensupport.SetOptions(c.urlParams_, opts...)
16290	res, err := c.doRequest("json")
16291	if res != nil && res.StatusCode == http.StatusNotModified {
16292		if res.Body != nil {
16293			res.Body.Close()
16294		}
16295		return nil, &googleapi.Error{
16296			Code:   res.StatusCode,
16297			Header: res.Header,
16298		}
16299	}
16300	if err != nil {
16301		return nil, err
16302	}
16303	defer googleapi.CloseBody(res)
16304	if err := googleapi.CheckResponse(res); err != nil {
16305		return nil, err
16306	}
16307	ret := &CalendarResources{
16308		ServerResponse: googleapi.ServerResponse{
16309			Header:         res.Header,
16310			HTTPStatusCode: res.StatusCode,
16311		},
16312	}
16313	target := &ret
16314	if err := gensupport.DecodeResponse(target, res); err != nil {
16315		return nil, err
16316	}
16317	return ret, nil
16318	// {
16319	//   "description": "Retrieves a list of calendar resources for an account.",
16320	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars",
16321	//   "httpMethod": "GET",
16322	//   "id": "directory.resources.calendars.list",
16323	//   "parameterOrder": [
16324	//     "customer"
16325	//   ],
16326	//   "parameters": {
16327	//     "customer": {
16328	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16329	//       "location": "path",
16330	//       "required": true,
16331	//       "type": "string"
16332	//     },
16333	//     "maxResults": {
16334	//       "description": "Maximum number of results to return.",
16335	//       "format": "int32",
16336	//       "location": "query",
16337	//       "maximum": "500",
16338	//       "minimum": "1",
16339	//       "type": "integer"
16340	//     },
16341	//     "orderBy": {
16342	//       "description": "Field(s) to sort results by in either ascending or descending order. Supported fields include `resourceId`, `resourceName`, `capacity`, `buildingId`, and `floorName`. If no order is specified, defaults to ascending. Should be of the form \"field [asc|desc], field [asc|desc], ...\". For example `buildingId, capacity desc` would return results sorted first by `buildingId` in ascending order then by `capacity` in descending order.",
16343	//       "location": "query",
16344	//       "type": "string"
16345	//     },
16346	//     "pageToken": {
16347	//       "description": "Token to specify the next page in the list.",
16348	//       "location": "query",
16349	//       "type": "string"
16350	//     },
16351	//     "query": {
16352	//       "description": "String query used to filter results. Should be of the form \"field operator value\" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Logical operators NOT and AND are supported (in this order of precedence). Supported fields include `generatedResourceName`, `name`, `buildingId`, `floor_name`, `capacity`, `featureInstances.feature.name`, `resourceEmail`, `resourceCategory`. For example `buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone`.",
16353	//       "location": "query",
16354	//       "type": "string"
16355	//     }
16356	//   },
16357	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars",
16358	//   "response": {
16359	//     "$ref": "CalendarResources"
16360	//   },
16361	//   "scopes": [
16362	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
16363	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
16364	//   ]
16365	// }
16366
16367}
16368
16369// Pages invokes f for each page of results.
16370// A non-nil error returned from f will halt the iteration.
16371// The provided context supersedes any context provided to the Context method.
16372func (c *ResourcesCalendarsListCall) Pages(ctx context.Context, f func(*CalendarResources) error) error {
16373	c.ctx_ = ctx
16374	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16375	for {
16376		x, err := c.Do()
16377		if err != nil {
16378			return err
16379		}
16380		if err := f(x); err != nil {
16381			return err
16382		}
16383		if x.NextPageToken == "" {
16384			return nil
16385		}
16386		c.PageToken(x.NextPageToken)
16387	}
16388}
16389
16390// method id "directory.resources.calendars.patch":
16391
16392type ResourcesCalendarsPatchCall struct {
16393	s                  *Service
16394	customer           string
16395	calendarResourceId string
16396	calendarresource   *CalendarResource
16397	urlParams_         gensupport.URLParams
16398	ctx_               context.Context
16399	header_            http.Header
16400}
16401
16402// Patch: Patches a calendar resource.
16403//
16404// - calendarResourceId: The unique ID of the calendar resource to
16405//   update.
16406// - customer: The unique ID for the customer's Google Workspace
16407//   account. As an account administrator, you can also use the
16408//   `my_customer` alias to represent your account's customer ID.
16409func (r *ResourcesCalendarsService) Patch(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsPatchCall {
16410	c := &ResourcesCalendarsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16411	c.customer = customer
16412	c.calendarResourceId = calendarResourceId
16413	c.calendarresource = calendarresource
16414	return c
16415}
16416
16417// Fields allows partial responses to be retrieved. See
16418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16419// for more information.
16420func (c *ResourcesCalendarsPatchCall) Fields(s ...googleapi.Field) *ResourcesCalendarsPatchCall {
16421	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16422	return c
16423}
16424
16425// Context sets the context to be used in this call's Do method. Any
16426// pending HTTP request will be aborted if the provided context is
16427// canceled.
16428func (c *ResourcesCalendarsPatchCall) Context(ctx context.Context) *ResourcesCalendarsPatchCall {
16429	c.ctx_ = ctx
16430	return c
16431}
16432
16433// Header returns an http.Header that can be modified by the caller to
16434// add HTTP headers to the request.
16435func (c *ResourcesCalendarsPatchCall) Header() http.Header {
16436	if c.header_ == nil {
16437		c.header_ = make(http.Header)
16438	}
16439	return c.header_
16440}
16441
16442func (c *ResourcesCalendarsPatchCall) doRequest(alt string) (*http.Response, error) {
16443	reqHeaders := make(http.Header)
16444	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16445	for k, v := range c.header_ {
16446		reqHeaders[k] = v
16447	}
16448	reqHeaders.Set("User-Agent", c.s.userAgent())
16449	var body io.Reader = nil
16450	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
16451	if err != nil {
16452		return nil, err
16453	}
16454	reqHeaders.Set("Content-Type", "application/json")
16455	c.urlParams_.Set("alt", alt)
16456	c.urlParams_.Set("prettyPrint", "false")
16457	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
16458	urls += "?" + c.urlParams_.Encode()
16459	req, err := http.NewRequest("PATCH", urls, body)
16460	if err != nil {
16461		return nil, err
16462	}
16463	req.Header = reqHeaders
16464	googleapi.Expand(req.URL, map[string]string{
16465		"customer":           c.customer,
16466		"calendarResourceId": c.calendarResourceId,
16467	})
16468	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16469}
16470
16471// Do executes the "directory.resources.calendars.patch" call.
16472// Exactly one of *CalendarResource or error will be non-nil. Any
16473// non-2xx status code is an error. Response headers are in either
16474// *CalendarResource.ServerResponse.Header or (if a response was
16475// returned at all) in error.(*googleapi.Error).Header. Use
16476// googleapi.IsNotModified to check whether the returned error was
16477// because http.StatusNotModified was returned.
16478func (c *ResourcesCalendarsPatchCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
16479	gensupport.SetOptions(c.urlParams_, opts...)
16480	res, err := c.doRequest("json")
16481	if res != nil && res.StatusCode == http.StatusNotModified {
16482		if res.Body != nil {
16483			res.Body.Close()
16484		}
16485		return nil, &googleapi.Error{
16486			Code:   res.StatusCode,
16487			Header: res.Header,
16488		}
16489	}
16490	if err != nil {
16491		return nil, err
16492	}
16493	defer googleapi.CloseBody(res)
16494	if err := googleapi.CheckResponse(res); err != nil {
16495		return nil, err
16496	}
16497	ret := &CalendarResource{
16498		ServerResponse: googleapi.ServerResponse{
16499			Header:         res.Header,
16500			HTTPStatusCode: res.StatusCode,
16501		},
16502	}
16503	target := &ret
16504	if err := gensupport.DecodeResponse(target, res); err != nil {
16505		return nil, err
16506	}
16507	return ret, nil
16508	// {
16509	//   "description": "Patches a calendar resource.",
16510	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
16511	//   "httpMethod": "PATCH",
16512	//   "id": "directory.resources.calendars.patch",
16513	//   "parameterOrder": [
16514	//     "customer",
16515	//     "calendarResourceId"
16516	//   ],
16517	//   "parameters": {
16518	//     "calendarResourceId": {
16519	//       "description": "The unique ID of the calendar resource to update.",
16520	//       "location": "path",
16521	//       "required": true,
16522	//       "type": "string"
16523	//     },
16524	//     "customer": {
16525	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16526	//       "location": "path",
16527	//       "required": true,
16528	//       "type": "string"
16529	//     }
16530	//   },
16531	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
16532	//   "request": {
16533	//     "$ref": "CalendarResource"
16534	//   },
16535	//   "response": {
16536	//     "$ref": "CalendarResource"
16537	//   },
16538	//   "scopes": [
16539	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
16540	//   ]
16541	// }
16542
16543}
16544
16545// method id "directory.resources.calendars.update":
16546
16547type ResourcesCalendarsUpdateCall struct {
16548	s                  *Service
16549	customer           string
16550	calendarResourceId string
16551	calendarresource   *CalendarResource
16552	urlParams_         gensupport.URLParams
16553	ctx_               context.Context
16554	header_            http.Header
16555}
16556
16557// Update: Updates a calendar resource. This method supports patch
16558// semantics, meaning you only need to include the fields you wish to
16559// update. Fields that are not present in the request will be preserved.
16560//
16561// - calendarResourceId: The unique ID of the calendar resource to
16562//   update.
16563// - customer: The unique ID for the customer's Google Workspace
16564//   account. As an account administrator, you can also use the
16565//   `my_customer` alias to represent your account's customer ID.
16566func (r *ResourcesCalendarsService) Update(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsUpdateCall {
16567	c := &ResourcesCalendarsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16568	c.customer = customer
16569	c.calendarResourceId = calendarResourceId
16570	c.calendarresource = calendarresource
16571	return c
16572}
16573
16574// Fields allows partial responses to be retrieved. See
16575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16576// for more information.
16577func (c *ResourcesCalendarsUpdateCall) Fields(s ...googleapi.Field) *ResourcesCalendarsUpdateCall {
16578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16579	return c
16580}
16581
16582// Context sets the context to be used in this call's Do method. Any
16583// pending HTTP request will be aborted if the provided context is
16584// canceled.
16585func (c *ResourcesCalendarsUpdateCall) Context(ctx context.Context) *ResourcesCalendarsUpdateCall {
16586	c.ctx_ = ctx
16587	return c
16588}
16589
16590// Header returns an http.Header that can be modified by the caller to
16591// add HTTP headers to the request.
16592func (c *ResourcesCalendarsUpdateCall) Header() http.Header {
16593	if c.header_ == nil {
16594		c.header_ = make(http.Header)
16595	}
16596	return c.header_
16597}
16598
16599func (c *ResourcesCalendarsUpdateCall) doRequest(alt string) (*http.Response, error) {
16600	reqHeaders := make(http.Header)
16601	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16602	for k, v := range c.header_ {
16603		reqHeaders[k] = v
16604	}
16605	reqHeaders.Set("User-Agent", c.s.userAgent())
16606	var body io.Reader = nil
16607	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
16608	if err != nil {
16609		return nil, err
16610	}
16611	reqHeaders.Set("Content-Type", "application/json")
16612	c.urlParams_.Set("alt", alt)
16613	c.urlParams_.Set("prettyPrint", "false")
16614	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}")
16615	urls += "?" + c.urlParams_.Encode()
16616	req, err := http.NewRequest("PUT", urls, body)
16617	if err != nil {
16618		return nil, err
16619	}
16620	req.Header = reqHeaders
16621	googleapi.Expand(req.URL, map[string]string{
16622		"customer":           c.customer,
16623		"calendarResourceId": c.calendarResourceId,
16624	})
16625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16626}
16627
16628// Do executes the "directory.resources.calendars.update" call.
16629// Exactly one of *CalendarResource or error will be non-nil. Any
16630// non-2xx status code is an error. Response headers are in either
16631// *CalendarResource.ServerResponse.Header or (if a response was
16632// returned at all) in error.(*googleapi.Error).Header. Use
16633// googleapi.IsNotModified to check whether the returned error was
16634// because http.StatusNotModified was returned.
16635func (c *ResourcesCalendarsUpdateCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
16636	gensupport.SetOptions(c.urlParams_, opts...)
16637	res, err := c.doRequest("json")
16638	if res != nil && res.StatusCode == http.StatusNotModified {
16639		if res.Body != nil {
16640			res.Body.Close()
16641		}
16642		return nil, &googleapi.Error{
16643			Code:   res.StatusCode,
16644			Header: res.Header,
16645		}
16646	}
16647	if err != nil {
16648		return nil, err
16649	}
16650	defer googleapi.CloseBody(res)
16651	if err := googleapi.CheckResponse(res); err != nil {
16652		return nil, err
16653	}
16654	ret := &CalendarResource{
16655		ServerResponse: googleapi.ServerResponse{
16656			Header:         res.Header,
16657			HTTPStatusCode: res.StatusCode,
16658		},
16659	}
16660	target := &ret
16661	if err := gensupport.DecodeResponse(target, res); err != nil {
16662		return nil, err
16663	}
16664	return ret, nil
16665	// {
16666	//   "description": "Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.",
16667	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
16668	//   "httpMethod": "PUT",
16669	//   "id": "directory.resources.calendars.update",
16670	//   "parameterOrder": [
16671	//     "customer",
16672	//     "calendarResourceId"
16673	//   ],
16674	//   "parameters": {
16675	//     "calendarResourceId": {
16676	//       "description": "The unique ID of the calendar resource to update.",
16677	//       "location": "path",
16678	//       "required": true,
16679	//       "type": "string"
16680	//     },
16681	//     "customer": {
16682	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16683	//       "location": "path",
16684	//       "required": true,
16685	//       "type": "string"
16686	//     }
16687	//   },
16688	//   "path": "admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}",
16689	//   "request": {
16690	//     "$ref": "CalendarResource"
16691	//   },
16692	//   "response": {
16693	//     "$ref": "CalendarResource"
16694	//   },
16695	//   "scopes": [
16696	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
16697	//   ]
16698	// }
16699
16700}
16701
16702// method id "directory.resources.features.delete":
16703
16704type ResourcesFeaturesDeleteCall struct {
16705	s          *Service
16706	customer   string
16707	featureKey string
16708	urlParams_ gensupport.URLParams
16709	ctx_       context.Context
16710	header_    http.Header
16711}
16712
16713// Delete: Deletes a feature.
16714//
16715// - customer: The unique ID for the customer's Google Workspace
16716//   account. As an account administrator, you can also use the
16717//   `my_customer` alias to represent your account's customer ID.
16718// - featureKey: The unique ID of the feature to delete.
16719func (r *ResourcesFeaturesService) Delete(customer string, featureKey string) *ResourcesFeaturesDeleteCall {
16720	c := &ResourcesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16721	c.customer = customer
16722	c.featureKey = featureKey
16723	return c
16724}
16725
16726// Fields allows partial responses to be retrieved. See
16727// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16728// for more information.
16729func (c *ResourcesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ResourcesFeaturesDeleteCall {
16730	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16731	return c
16732}
16733
16734// Context sets the context to be used in this call's Do method. Any
16735// pending HTTP request will be aborted if the provided context is
16736// canceled.
16737func (c *ResourcesFeaturesDeleteCall) Context(ctx context.Context) *ResourcesFeaturesDeleteCall {
16738	c.ctx_ = ctx
16739	return c
16740}
16741
16742// Header returns an http.Header that can be modified by the caller to
16743// add HTTP headers to the request.
16744func (c *ResourcesFeaturesDeleteCall) Header() http.Header {
16745	if c.header_ == nil {
16746		c.header_ = make(http.Header)
16747	}
16748	return c.header_
16749}
16750
16751func (c *ResourcesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
16752	reqHeaders := make(http.Header)
16753	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16754	for k, v := range c.header_ {
16755		reqHeaders[k] = v
16756	}
16757	reqHeaders.Set("User-Agent", c.s.userAgent())
16758	var body io.Reader = nil
16759	c.urlParams_.Set("alt", alt)
16760	c.urlParams_.Set("prettyPrint", "false")
16761	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
16762	urls += "?" + c.urlParams_.Encode()
16763	req, err := http.NewRequest("DELETE", urls, body)
16764	if err != nil {
16765		return nil, err
16766	}
16767	req.Header = reqHeaders
16768	googleapi.Expand(req.URL, map[string]string{
16769		"customer":   c.customer,
16770		"featureKey": c.featureKey,
16771	})
16772	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16773}
16774
16775// Do executes the "directory.resources.features.delete" call.
16776func (c *ResourcesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) error {
16777	gensupport.SetOptions(c.urlParams_, opts...)
16778	res, err := c.doRequest("json")
16779	if err != nil {
16780		return err
16781	}
16782	defer googleapi.CloseBody(res)
16783	if err := googleapi.CheckResponse(res); err != nil {
16784		return err
16785	}
16786	return nil
16787	// {
16788	//   "description": "Deletes a feature.",
16789	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
16790	//   "httpMethod": "DELETE",
16791	//   "id": "directory.resources.features.delete",
16792	//   "parameterOrder": [
16793	//     "customer",
16794	//     "featureKey"
16795	//   ],
16796	//   "parameters": {
16797	//     "customer": {
16798	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16799	//       "location": "path",
16800	//       "required": true,
16801	//       "type": "string"
16802	//     },
16803	//     "featureKey": {
16804	//       "description": "The unique ID of the feature to delete.",
16805	//       "location": "path",
16806	//       "required": true,
16807	//       "type": "string"
16808	//     }
16809	//   },
16810	//   "path": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
16811	//   "scopes": [
16812	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
16813	//   ]
16814	// }
16815
16816}
16817
16818// method id "directory.resources.features.get":
16819
16820type ResourcesFeaturesGetCall struct {
16821	s            *Service
16822	customer     string
16823	featureKey   string
16824	urlParams_   gensupport.URLParams
16825	ifNoneMatch_ string
16826	ctx_         context.Context
16827	header_      http.Header
16828}
16829
16830// Get: Retrieves a feature.
16831//
16832// - customer: The unique ID for the customer's Google Workspace
16833//   account. As an account administrator, you can also use the
16834//   `my_customer` alias to represent your account's customer ID.
16835// - featureKey: The unique ID of the feature to retrieve.
16836func (r *ResourcesFeaturesService) Get(customer string, featureKey string) *ResourcesFeaturesGetCall {
16837	c := &ResourcesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16838	c.customer = customer
16839	c.featureKey = featureKey
16840	return c
16841}
16842
16843// Fields allows partial responses to be retrieved. See
16844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16845// for more information.
16846func (c *ResourcesFeaturesGetCall) Fields(s ...googleapi.Field) *ResourcesFeaturesGetCall {
16847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16848	return c
16849}
16850
16851// IfNoneMatch sets the optional parameter which makes the operation
16852// fail if the object's ETag matches the given value. This is useful for
16853// getting updates only after the object has changed since the last
16854// request. Use googleapi.IsNotModified to check whether the response
16855// error from Do is the result of In-None-Match.
16856func (c *ResourcesFeaturesGetCall) IfNoneMatch(entityTag string) *ResourcesFeaturesGetCall {
16857	c.ifNoneMatch_ = entityTag
16858	return c
16859}
16860
16861// Context sets the context to be used in this call's Do method. Any
16862// pending HTTP request will be aborted if the provided context is
16863// canceled.
16864func (c *ResourcesFeaturesGetCall) Context(ctx context.Context) *ResourcesFeaturesGetCall {
16865	c.ctx_ = ctx
16866	return c
16867}
16868
16869// Header returns an http.Header that can be modified by the caller to
16870// add HTTP headers to the request.
16871func (c *ResourcesFeaturesGetCall) Header() http.Header {
16872	if c.header_ == nil {
16873		c.header_ = make(http.Header)
16874	}
16875	return c.header_
16876}
16877
16878func (c *ResourcesFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
16879	reqHeaders := make(http.Header)
16880	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
16881	for k, v := range c.header_ {
16882		reqHeaders[k] = v
16883	}
16884	reqHeaders.Set("User-Agent", c.s.userAgent())
16885	if c.ifNoneMatch_ != "" {
16886		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16887	}
16888	var body io.Reader = nil
16889	c.urlParams_.Set("alt", alt)
16890	c.urlParams_.Set("prettyPrint", "false")
16891	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
16892	urls += "?" + c.urlParams_.Encode()
16893	req, err := http.NewRequest("GET", urls, body)
16894	if err != nil {
16895		return nil, err
16896	}
16897	req.Header = reqHeaders
16898	googleapi.Expand(req.URL, map[string]string{
16899		"customer":   c.customer,
16900		"featureKey": c.featureKey,
16901	})
16902	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16903}
16904
16905// Do executes the "directory.resources.features.get" call.
16906// Exactly one of *Feature or error will be non-nil. Any non-2xx status
16907// code is an error. Response headers are in either
16908// *Feature.ServerResponse.Header or (if a response was returned at all)
16909// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16910// check whether the returned error was because http.StatusNotModified
16911// was returned.
16912func (c *ResourcesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
16913	gensupport.SetOptions(c.urlParams_, opts...)
16914	res, err := c.doRequest("json")
16915	if res != nil && res.StatusCode == http.StatusNotModified {
16916		if res.Body != nil {
16917			res.Body.Close()
16918		}
16919		return nil, &googleapi.Error{
16920			Code:   res.StatusCode,
16921			Header: res.Header,
16922		}
16923	}
16924	if err != nil {
16925		return nil, err
16926	}
16927	defer googleapi.CloseBody(res)
16928	if err := googleapi.CheckResponse(res); err != nil {
16929		return nil, err
16930	}
16931	ret := &Feature{
16932		ServerResponse: googleapi.ServerResponse{
16933			Header:         res.Header,
16934			HTTPStatusCode: res.StatusCode,
16935		},
16936	}
16937	target := &ret
16938	if err := gensupport.DecodeResponse(target, res); err != nil {
16939		return nil, err
16940	}
16941	return ret, nil
16942	// {
16943	//   "description": "Retrieves a feature.",
16944	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
16945	//   "httpMethod": "GET",
16946	//   "id": "directory.resources.features.get",
16947	//   "parameterOrder": [
16948	//     "customer",
16949	//     "featureKey"
16950	//   ],
16951	//   "parameters": {
16952	//     "customer": {
16953	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
16954	//       "location": "path",
16955	//       "required": true,
16956	//       "type": "string"
16957	//     },
16958	//     "featureKey": {
16959	//       "description": "The unique ID of the feature to retrieve.",
16960	//       "location": "path",
16961	//       "required": true,
16962	//       "type": "string"
16963	//     }
16964	//   },
16965	//   "path": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
16966	//   "response": {
16967	//     "$ref": "Feature"
16968	//   },
16969	//   "scopes": [
16970	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
16971	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
16972	//   ]
16973	// }
16974
16975}
16976
16977// method id "directory.resources.features.insert":
16978
16979type ResourcesFeaturesInsertCall struct {
16980	s          *Service
16981	customer   string
16982	feature    *Feature
16983	urlParams_ gensupport.URLParams
16984	ctx_       context.Context
16985	header_    http.Header
16986}
16987
16988// Insert: Inserts a feature.
16989//
16990// - customer: The unique ID for the customer's Google Workspace
16991//   account. As an account administrator, you can also use the
16992//   `my_customer` alias to represent your account's customer ID.
16993func (r *ResourcesFeaturesService) Insert(customer string, feature *Feature) *ResourcesFeaturesInsertCall {
16994	c := &ResourcesFeaturesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16995	c.customer = customer
16996	c.feature = feature
16997	return c
16998}
16999
17000// Fields allows partial responses to be retrieved. See
17001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17002// for more information.
17003func (c *ResourcesFeaturesInsertCall) Fields(s ...googleapi.Field) *ResourcesFeaturesInsertCall {
17004	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17005	return c
17006}
17007
17008// Context sets the context to be used in this call's Do method. Any
17009// pending HTTP request will be aborted if the provided context is
17010// canceled.
17011func (c *ResourcesFeaturesInsertCall) Context(ctx context.Context) *ResourcesFeaturesInsertCall {
17012	c.ctx_ = ctx
17013	return c
17014}
17015
17016// Header returns an http.Header that can be modified by the caller to
17017// add HTTP headers to the request.
17018func (c *ResourcesFeaturesInsertCall) Header() http.Header {
17019	if c.header_ == nil {
17020		c.header_ = make(http.Header)
17021	}
17022	return c.header_
17023}
17024
17025func (c *ResourcesFeaturesInsertCall) doRequest(alt string) (*http.Response, error) {
17026	reqHeaders := make(http.Header)
17027	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17028	for k, v := range c.header_ {
17029		reqHeaders[k] = v
17030	}
17031	reqHeaders.Set("User-Agent", c.s.userAgent())
17032	var body io.Reader = nil
17033	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
17034	if err != nil {
17035		return nil, err
17036	}
17037	reqHeaders.Set("Content-Type", "application/json")
17038	c.urlParams_.Set("alt", alt)
17039	c.urlParams_.Set("prettyPrint", "false")
17040	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features")
17041	urls += "?" + c.urlParams_.Encode()
17042	req, err := http.NewRequest("POST", urls, body)
17043	if err != nil {
17044		return nil, err
17045	}
17046	req.Header = reqHeaders
17047	googleapi.Expand(req.URL, map[string]string{
17048		"customer": c.customer,
17049	})
17050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17051}
17052
17053// Do executes the "directory.resources.features.insert" call.
17054// Exactly one of *Feature or error will be non-nil. Any non-2xx status
17055// code is an error. Response headers are in either
17056// *Feature.ServerResponse.Header or (if a response was returned at all)
17057// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17058// check whether the returned error was because http.StatusNotModified
17059// was returned.
17060func (c *ResourcesFeaturesInsertCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
17061	gensupport.SetOptions(c.urlParams_, opts...)
17062	res, err := c.doRequest("json")
17063	if res != nil && res.StatusCode == http.StatusNotModified {
17064		if res.Body != nil {
17065			res.Body.Close()
17066		}
17067		return nil, &googleapi.Error{
17068			Code:   res.StatusCode,
17069			Header: res.Header,
17070		}
17071	}
17072	if err != nil {
17073		return nil, err
17074	}
17075	defer googleapi.CloseBody(res)
17076	if err := googleapi.CheckResponse(res); err != nil {
17077		return nil, err
17078	}
17079	ret := &Feature{
17080		ServerResponse: googleapi.ServerResponse{
17081			Header:         res.Header,
17082			HTTPStatusCode: res.StatusCode,
17083		},
17084	}
17085	target := &ret
17086	if err := gensupport.DecodeResponse(target, res); err != nil {
17087		return nil, err
17088	}
17089	return ret, nil
17090	// {
17091	//   "description": "Inserts a feature.",
17092	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features",
17093	//   "httpMethod": "POST",
17094	//   "id": "directory.resources.features.insert",
17095	//   "parameterOrder": [
17096	//     "customer"
17097	//   ],
17098	//   "parameters": {
17099	//     "customer": {
17100	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
17101	//       "location": "path",
17102	//       "required": true,
17103	//       "type": "string"
17104	//     }
17105	//   },
17106	//   "path": "admin/directory/v1/customer/{customer}/resources/features",
17107	//   "request": {
17108	//     "$ref": "Feature"
17109	//   },
17110	//   "response": {
17111	//     "$ref": "Feature"
17112	//   },
17113	//   "scopes": [
17114	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
17115	//   ]
17116	// }
17117
17118}
17119
17120// method id "directory.resources.features.list":
17121
17122type ResourcesFeaturesListCall struct {
17123	s            *Service
17124	customer     string
17125	urlParams_   gensupport.URLParams
17126	ifNoneMatch_ string
17127	ctx_         context.Context
17128	header_      http.Header
17129}
17130
17131// List: Retrieves a list of features for an account.
17132//
17133// - customer: The unique ID for the customer's Google Workspace
17134//   account. As an account administrator, you can also use the
17135//   `my_customer` alias to represent your account's customer ID.
17136func (r *ResourcesFeaturesService) List(customer string) *ResourcesFeaturesListCall {
17137	c := &ResourcesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17138	c.customer = customer
17139	return c
17140}
17141
17142// MaxResults sets the optional parameter "maxResults": Maximum number
17143// of results to return.
17144func (c *ResourcesFeaturesListCall) MaxResults(maxResults int64) *ResourcesFeaturesListCall {
17145	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17146	return c
17147}
17148
17149// PageToken sets the optional parameter "pageToken": Token to specify
17150// the next page in the list.
17151func (c *ResourcesFeaturesListCall) PageToken(pageToken string) *ResourcesFeaturesListCall {
17152	c.urlParams_.Set("pageToken", pageToken)
17153	return c
17154}
17155
17156// Fields allows partial responses to be retrieved. See
17157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17158// for more information.
17159func (c *ResourcesFeaturesListCall) Fields(s ...googleapi.Field) *ResourcesFeaturesListCall {
17160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17161	return c
17162}
17163
17164// IfNoneMatch sets the optional parameter which makes the operation
17165// fail if the object's ETag matches the given value. This is useful for
17166// getting updates only after the object has changed since the last
17167// request. Use googleapi.IsNotModified to check whether the response
17168// error from Do is the result of In-None-Match.
17169func (c *ResourcesFeaturesListCall) IfNoneMatch(entityTag string) *ResourcesFeaturesListCall {
17170	c.ifNoneMatch_ = entityTag
17171	return c
17172}
17173
17174// Context sets the context to be used in this call's Do method. Any
17175// pending HTTP request will be aborted if the provided context is
17176// canceled.
17177func (c *ResourcesFeaturesListCall) Context(ctx context.Context) *ResourcesFeaturesListCall {
17178	c.ctx_ = ctx
17179	return c
17180}
17181
17182// Header returns an http.Header that can be modified by the caller to
17183// add HTTP headers to the request.
17184func (c *ResourcesFeaturesListCall) Header() http.Header {
17185	if c.header_ == nil {
17186		c.header_ = make(http.Header)
17187	}
17188	return c.header_
17189}
17190
17191func (c *ResourcesFeaturesListCall) doRequest(alt string) (*http.Response, error) {
17192	reqHeaders := make(http.Header)
17193	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17194	for k, v := range c.header_ {
17195		reqHeaders[k] = v
17196	}
17197	reqHeaders.Set("User-Agent", c.s.userAgent())
17198	if c.ifNoneMatch_ != "" {
17199		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17200	}
17201	var body io.Reader = nil
17202	c.urlParams_.Set("alt", alt)
17203	c.urlParams_.Set("prettyPrint", "false")
17204	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features")
17205	urls += "?" + c.urlParams_.Encode()
17206	req, err := http.NewRequest("GET", urls, body)
17207	if err != nil {
17208		return nil, err
17209	}
17210	req.Header = reqHeaders
17211	googleapi.Expand(req.URL, map[string]string{
17212		"customer": c.customer,
17213	})
17214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17215}
17216
17217// Do executes the "directory.resources.features.list" call.
17218// Exactly one of *Features or error will be non-nil. Any non-2xx status
17219// code is an error. Response headers are in either
17220// *Features.ServerResponse.Header or (if a response was returned at
17221// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17222// to check whether the returned error was because
17223// http.StatusNotModified was returned.
17224func (c *ResourcesFeaturesListCall) Do(opts ...googleapi.CallOption) (*Features, error) {
17225	gensupport.SetOptions(c.urlParams_, opts...)
17226	res, err := c.doRequest("json")
17227	if res != nil && res.StatusCode == http.StatusNotModified {
17228		if res.Body != nil {
17229			res.Body.Close()
17230		}
17231		return nil, &googleapi.Error{
17232			Code:   res.StatusCode,
17233			Header: res.Header,
17234		}
17235	}
17236	if err != nil {
17237		return nil, err
17238	}
17239	defer googleapi.CloseBody(res)
17240	if err := googleapi.CheckResponse(res); err != nil {
17241		return nil, err
17242	}
17243	ret := &Features{
17244		ServerResponse: googleapi.ServerResponse{
17245			Header:         res.Header,
17246			HTTPStatusCode: res.StatusCode,
17247		},
17248	}
17249	target := &ret
17250	if err := gensupport.DecodeResponse(target, res); err != nil {
17251		return nil, err
17252	}
17253	return ret, nil
17254	// {
17255	//   "description": "Retrieves a list of features for an account.",
17256	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features",
17257	//   "httpMethod": "GET",
17258	//   "id": "directory.resources.features.list",
17259	//   "parameterOrder": [
17260	//     "customer"
17261	//   ],
17262	//   "parameters": {
17263	//     "customer": {
17264	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
17265	//       "location": "path",
17266	//       "required": true,
17267	//       "type": "string"
17268	//     },
17269	//     "maxResults": {
17270	//       "description": "Maximum number of results to return.",
17271	//       "format": "int32",
17272	//       "location": "query",
17273	//       "maximum": "500",
17274	//       "minimum": "1",
17275	//       "type": "integer"
17276	//     },
17277	//     "pageToken": {
17278	//       "description": "Token to specify the next page in the list.",
17279	//       "location": "query",
17280	//       "type": "string"
17281	//     }
17282	//   },
17283	//   "path": "admin/directory/v1/customer/{customer}/resources/features",
17284	//   "response": {
17285	//     "$ref": "Features"
17286	//   },
17287	//   "scopes": [
17288	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
17289	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
17290	//   ]
17291	// }
17292
17293}
17294
17295// Pages invokes f for each page of results.
17296// A non-nil error returned from f will halt the iteration.
17297// The provided context supersedes any context provided to the Context method.
17298func (c *ResourcesFeaturesListCall) Pages(ctx context.Context, f func(*Features) error) error {
17299	c.ctx_ = ctx
17300	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17301	for {
17302		x, err := c.Do()
17303		if err != nil {
17304			return err
17305		}
17306		if err := f(x); err != nil {
17307			return err
17308		}
17309		if x.NextPageToken == "" {
17310			return nil
17311		}
17312		c.PageToken(x.NextPageToken)
17313	}
17314}
17315
17316// method id "directory.resources.features.patch":
17317
17318type ResourcesFeaturesPatchCall struct {
17319	s          *Service
17320	customer   string
17321	featureKey string
17322	feature    *Feature
17323	urlParams_ gensupport.URLParams
17324	ctx_       context.Context
17325	header_    http.Header
17326}
17327
17328// Patch: Patches a feature.
17329//
17330// - customer: The unique ID for the customer's Google Workspace
17331//   account. As an account administrator, you can also use the
17332//   `my_customer` alias to represent your account's customer ID.
17333// - featureKey: The unique ID of the feature to update.
17334func (r *ResourcesFeaturesService) Patch(customer string, featureKey string, feature *Feature) *ResourcesFeaturesPatchCall {
17335	c := &ResourcesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17336	c.customer = customer
17337	c.featureKey = featureKey
17338	c.feature = feature
17339	return c
17340}
17341
17342// Fields allows partial responses to be retrieved. See
17343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17344// for more information.
17345func (c *ResourcesFeaturesPatchCall) Fields(s ...googleapi.Field) *ResourcesFeaturesPatchCall {
17346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17347	return c
17348}
17349
17350// Context sets the context to be used in this call's Do method. Any
17351// pending HTTP request will be aborted if the provided context is
17352// canceled.
17353func (c *ResourcesFeaturesPatchCall) Context(ctx context.Context) *ResourcesFeaturesPatchCall {
17354	c.ctx_ = ctx
17355	return c
17356}
17357
17358// Header returns an http.Header that can be modified by the caller to
17359// add HTTP headers to the request.
17360func (c *ResourcesFeaturesPatchCall) Header() http.Header {
17361	if c.header_ == nil {
17362		c.header_ = make(http.Header)
17363	}
17364	return c.header_
17365}
17366
17367func (c *ResourcesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
17368	reqHeaders := make(http.Header)
17369	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17370	for k, v := range c.header_ {
17371		reqHeaders[k] = v
17372	}
17373	reqHeaders.Set("User-Agent", c.s.userAgent())
17374	var body io.Reader = nil
17375	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
17376	if err != nil {
17377		return nil, err
17378	}
17379	reqHeaders.Set("Content-Type", "application/json")
17380	c.urlParams_.Set("alt", alt)
17381	c.urlParams_.Set("prettyPrint", "false")
17382	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
17383	urls += "?" + c.urlParams_.Encode()
17384	req, err := http.NewRequest("PATCH", urls, body)
17385	if err != nil {
17386		return nil, err
17387	}
17388	req.Header = reqHeaders
17389	googleapi.Expand(req.URL, map[string]string{
17390		"customer":   c.customer,
17391		"featureKey": c.featureKey,
17392	})
17393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17394}
17395
17396// Do executes the "directory.resources.features.patch" call.
17397// Exactly one of *Feature or error will be non-nil. Any non-2xx status
17398// code is an error. Response headers are in either
17399// *Feature.ServerResponse.Header or (if a response was returned at all)
17400// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17401// check whether the returned error was because http.StatusNotModified
17402// was returned.
17403func (c *ResourcesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
17404	gensupport.SetOptions(c.urlParams_, opts...)
17405	res, err := c.doRequest("json")
17406	if res != nil && res.StatusCode == http.StatusNotModified {
17407		if res.Body != nil {
17408			res.Body.Close()
17409		}
17410		return nil, &googleapi.Error{
17411			Code:   res.StatusCode,
17412			Header: res.Header,
17413		}
17414	}
17415	if err != nil {
17416		return nil, err
17417	}
17418	defer googleapi.CloseBody(res)
17419	if err := googleapi.CheckResponse(res); err != nil {
17420		return nil, err
17421	}
17422	ret := &Feature{
17423		ServerResponse: googleapi.ServerResponse{
17424			Header:         res.Header,
17425			HTTPStatusCode: res.StatusCode,
17426		},
17427	}
17428	target := &ret
17429	if err := gensupport.DecodeResponse(target, res); err != nil {
17430		return nil, err
17431	}
17432	return ret, nil
17433	// {
17434	//   "description": "Patches a feature.",
17435	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
17436	//   "httpMethod": "PATCH",
17437	//   "id": "directory.resources.features.patch",
17438	//   "parameterOrder": [
17439	//     "customer",
17440	//     "featureKey"
17441	//   ],
17442	//   "parameters": {
17443	//     "customer": {
17444	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
17445	//       "location": "path",
17446	//       "required": true,
17447	//       "type": "string"
17448	//     },
17449	//     "featureKey": {
17450	//       "description": "The unique ID of the feature to update.",
17451	//       "location": "path",
17452	//       "required": true,
17453	//       "type": "string"
17454	//     }
17455	//   },
17456	//   "path": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
17457	//   "request": {
17458	//     "$ref": "Feature"
17459	//   },
17460	//   "response": {
17461	//     "$ref": "Feature"
17462	//   },
17463	//   "scopes": [
17464	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
17465	//   ]
17466	// }
17467
17468}
17469
17470// method id "directory.resources.features.rename":
17471
17472type ResourcesFeaturesRenameCall struct {
17473	s             *Service
17474	customer      string
17475	oldName       string
17476	featurerename *FeatureRename
17477	urlParams_    gensupport.URLParams
17478	ctx_          context.Context
17479	header_       http.Header
17480}
17481
17482// Rename: Renames a feature.
17483//
17484// - customer: The unique ID for the customer's Google Workspace
17485//   account. As an account administrator, you can also use the
17486//   `my_customer` alias to represent your account's customer ID.
17487// - oldName: The unique ID of the feature to rename.
17488func (r *ResourcesFeaturesService) Rename(customer string, oldName string, featurerename *FeatureRename) *ResourcesFeaturesRenameCall {
17489	c := &ResourcesFeaturesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17490	c.customer = customer
17491	c.oldName = oldName
17492	c.featurerename = featurerename
17493	return c
17494}
17495
17496// Fields allows partial responses to be retrieved. See
17497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17498// for more information.
17499func (c *ResourcesFeaturesRenameCall) Fields(s ...googleapi.Field) *ResourcesFeaturesRenameCall {
17500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17501	return c
17502}
17503
17504// Context sets the context to be used in this call's Do method. Any
17505// pending HTTP request will be aborted if the provided context is
17506// canceled.
17507func (c *ResourcesFeaturesRenameCall) Context(ctx context.Context) *ResourcesFeaturesRenameCall {
17508	c.ctx_ = ctx
17509	return c
17510}
17511
17512// Header returns an http.Header that can be modified by the caller to
17513// add HTTP headers to the request.
17514func (c *ResourcesFeaturesRenameCall) Header() http.Header {
17515	if c.header_ == nil {
17516		c.header_ = make(http.Header)
17517	}
17518	return c.header_
17519}
17520
17521func (c *ResourcesFeaturesRenameCall) doRequest(alt string) (*http.Response, error) {
17522	reqHeaders := make(http.Header)
17523	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17524	for k, v := range c.header_ {
17525		reqHeaders[k] = v
17526	}
17527	reqHeaders.Set("User-Agent", c.s.userAgent())
17528	var body io.Reader = nil
17529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.featurerename)
17530	if err != nil {
17531		return nil, err
17532	}
17533	reqHeaders.Set("Content-Type", "application/json")
17534	c.urlParams_.Set("alt", alt)
17535	c.urlParams_.Set("prettyPrint", "false")
17536	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename")
17537	urls += "?" + c.urlParams_.Encode()
17538	req, err := http.NewRequest("POST", urls, body)
17539	if err != nil {
17540		return nil, err
17541	}
17542	req.Header = reqHeaders
17543	googleapi.Expand(req.URL, map[string]string{
17544		"customer": c.customer,
17545		"oldName":  c.oldName,
17546	})
17547	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17548}
17549
17550// Do executes the "directory.resources.features.rename" call.
17551func (c *ResourcesFeaturesRenameCall) Do(opts ...googleapi.CallOption) error {
17552	gensupport.SetOptions(c.urlParams_, opts...)
17553	res, err := c.doRequest("json")
17554	if err != nil {
17555		return err
17556	}
17557	defer googleapi.CloseBody(res)
17558	if err := googleapi.CheckResponse(res); err != nil {
17559		return err
17560	}
17561	return nil
17562	// {
17563	//   "description": "Renames a feature.",
17564	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename",
17565	//   "httpMethod": "POST",
17566	//   "id": "directory.resources.features.rename",
17567	//   "parameterOrder": [
17568	//     "customer",
17569	//     "oldName"
17570	//   ],
17571	//   "parameters": {
17572	//     "customer": {
17573	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
17574	//       "location": "path",
17575	//       "required": true,
17576	//       "type": "string"
17577	//     },
17578	//     "oldName": {
17579	//       "description": "The unique ID of the feature to rename.",
17580	//       "location": "path",
17581	//       "required": true,
17582	//       "type": "string"
17583	//     }
17584	//   },
17585	//   "path": "admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename",
17586	//   "request": {
17587	//     "$ref": "FeatureRename"
17588	//   },
17589	//   "scopes": [
17590	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
17591	//   ]
17592	// }
17593
17594}
17595
17596// method id "directory.resources.features.update":
17597
17598type ResourcesFeaturesUpdateCall struct {
17599	s          *Service
17600	customer   string
17601	featureKey string
17602	feature    *Feature
17603	urlParams_ gensupport.URLParams
17604	ctx_       context.Context
17605	header_    http.Header
17606}
17607
17608// Update: Updates a feature.
17609//
17610// - customer: The unique ID for the customer's Google Workspace
17611//   account. As an account administrator, you can also use the
17612//   `my_customer` alias to represent your account's customer ID.
17613// - featureKey: The unique ID of the feature to update.
17614func (r *ResourcesFeaturesService) Update(customer string, featureKey string, feature *Feature) *ResourcesFeaturesUpdateCall {
17615	c := &ResourcesFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17616	c.customer = customer
17617	c.featureKey = featureKey
17618	c.feature = feature
17619	return c
17620}
17621
17622// Fields allows partial responses to be retrieved. See
17623// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17624// for more information.
17625func (c *ResourcesFeaturesUpdateCall) Fields(s ...googleapi.Field) *ResourcesFeaturesUpdateCall {
17626	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17627	return c
17628}
17629
17630// Context sets the context to be used in this call's Do method. Any
17631// pending HTTP request will be aborted if the provided context is
17632// canceled.
17633func (c *ResourcesFeaturesUpdateCall) Context(ctx context.Context) *ResourcesFeaturesUpdateCall {
17634	c.ctx_ = ctx
17635	return c
17636}
17637
17638// Header returns an http.Header that can be modified by the caller to
17639// add HTTP headers to the request.
17640func (c *ResourcesFeaturesUpdateCall) Header() http.Header {
17641	if c.header_ == nil {
17642		c.header_ = make(http.Header)
17643	}
17644	return c.header_
17645}
17646
17647func (c *ResourcesFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) {
17648	reqHeaders := make(http.Header)
17649	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17650	for k, v := range c.header_ {
17651		reqHeaders[k] = v
17652	}
17653	reqHeaders.Set("User-Agent", c.s.userAgent())
17654	var body io.Reader = nil
17655	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
17656	if err != nil {
17657		return nil, err
17658	}
17659	reqHeaders.Set("Content-Type", "application/json")
17660	c.urlParams_.Set("alt", alt)
17661	c.urlParams_.Set("prettyPrint", "false")
17662	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/resources/features/{featureKey}")
17663	urls += "?" + c.urlParams_.Encode()
17664	req, err := http.NewRequest("PUT", urls, body)
17665	if err != nil {
17666		return nil, err
17667	}
17668	req.Header = reqHeaders
17669	googleapi.Expand(req.URL, map[string]string{
17670		"customer":   c.customer,
17671		"featureKey": c.featureKey,
17672	})
17673	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17674}
17675
17676// Do executes the "directory.resources.features.update" call.
17677// Exactly one of *Feature or error will be non-nil. Any non-2xx status
17678// code is an error. Response headers are in either
17679// *Feature.ServerResponse.Header or (if a response was returned at all)
17680// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17681// check whether the returned error was because http.StatusNotModified
17682// was returned.
17683func (c *ResourcesFeaturesUpdateCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
17684	gensupport.SetOptions(c.urlParams_, opts...)
17685	res, err := c.doRequest("json")
17686	if res != nil && res.StatusCode == http.StatusNotModified {
17687		if res.Body != nil {
17688			res.Body.Close()
17689		}
17690		return nil, &googleapi.Error{
17691			Code:   res.StatusCode,
17692			Header: res.Header,
17693		}
17694	}
17695	if err != nil {
17696		return nil, err
17697	}
17698	defer googleapi.CloseBody(res)
17699	if err := googleapi.CheckResponse(res); err != nil {
17700		return nil, err
17701	}
17702	ret := &Feature{
17703		ServerResponse: googleapi.ServerResponse{
17704			Header:         res.Header,
17705			HTTPStatusCode: res.StatusCode,
17706		},
17707	}
17708	target := &ret
17709	if err := gensupport.DecodeResponse(target, res); err != nil {
17710		return nil, err
17711	}
17712	return ret, nil
17713	// {
17714	//   "description": "Updates a feature.",
17715	//   "flatPath": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
17716	//   "httpMethod": "PUT",
17717	//   "id": "directory.resources.features.update",
17718	//   "parameterOrder": [
17719	//     "customer",
17720	//     "featureKey"
17721	//   ],
17722	//   "parameters": {
17723	//     "customer": {
17724	//       "description": "The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's customer ID.",
17725	//       "location": "path",
17726	//       "required": true,
17727	//       "type": "string"
17728	//     },
17729	//     "featureKey": {
17730	//       "description": "The unique ID of the feature to update.",
17731	//       "location": "path",
17732	//       "required": true,
17733	//       "type": "string"
17734	//     }
17735	//   },
17736	//   "path": "admin/directory/v1/customer/{customer}/resources/features/{featureKey}",
17737	//   "request": {
17738	//     "$ref": "Feature"
17739	//   },
17740	//   "response": {
17741	//     "$ref": "Feature"
17742	//   },
17743	//   "scopes": [
17744	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
17745	//   ]
17746	// }
17747
17748}
17749
17750// method id "directory.roleAssignments.delete":
17751
17752type RoleAssignmentsDeleteCall struct {
17753	s                *Service
17754	customer         string
17755	roleAssignmentId string
17756	urlParams_       gensupport.URLParams
17757	ctx_             context.Context
17758	header_          http.Header
17759}
17760
17761// Delete: Deletes a role assignment.
17762//
17763// - customer: Immutable ID of the Google Workspace account.
17764// - roleAssignmentId: Immutable ID of the role assignment.
17765func (r *RoleAssignmentsService) Delete(customer string, roleAssignmentId string) *RoleAssignmentsDeleteCall {
17766	c := &RoleAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17767	c.customer = customer
17768	c.roleAssignmentId = roleAssignmentId
17769	return c
17770}
17771
17772// Fields allows partial responses to be retrieved. See
17773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17774// for more information.
17775func (c *RoleAssignmentsDeleteCall) Fields(s ...googleapi.Field) *RoleAssignmentsDeleteCall {
17776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17777	return c
17778}
17779
17780// Context sets the context to be used in this call's Do method. Any
17781// pending HTTP request will be aborted if the provided context is
17782// canceled.
17783func (c *RoleAssignmentsDeleteCall) Context(ctx context.Context) *RoleAssignmentsDeleteCall {
17784	c.ctx_ = ctx
17785	return c
17786}
17787
17788// Header returns an http.Header that can be modified by the caller to
17789// add HTTP headers to the request.
17790func (c *RoleAssignmentsDeleteCall) Header() http.Header {
17791	if c.header_ == nil {
17792		c.header_ = make(http.Header)
17793	}
17794	return c.header_
17795}
17796
17797func (c *RoleAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
17798	reqHeaders := make(http.Header)
17799	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17800	for k, v := range c.header_ {
17801		reqHeaders[k] = v
17802	}
17803	reqHeaders.Set("User-Agent", c.s.userAgent())
17804	var body io.Reader = nil
17805	c.urlParams_.Set("alt", alt)
17806	c.urlParams_.Set("prettyPrint", "false")
17807	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}")
17808	urls += "?" + c.urlParams_.Encode()
17809	req, err := http.NewRequest("DELETE", urls, body)
17810	if err != nil {
17811		return nil, err
17812	}
17813	req.Header = reqHeaders
17814	googleapi.Expand(req.URL, map[string]string{
17815		"customer":         c.customer,
17816		"roleAssignmentId": c.roleAssignmentId,
17817	})
17818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17819}
17820
17821// Do executes the "directory.roleAssignments.delete" call.
17822func (c *RoleAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error {
17823	gensupport.SetOptions(c.urlParams_, opts...)
17824	res, err := c.doRequest("json")
17825	if err != nil {
17826		return err
17827	}
17828	defer googleapi.CloseBody(res)
17829	if err := googleapi.CheckResponse(res); err != nil {
17830		return err
17831	}
17832	return nil
17833	// {
17834	//   "description": "Deletes a role assignment.",
17835	//   "flatPath": "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}",
17836	//   "httpMethod": "DELETE",
17837	//   "id": "directory.roleAssignments.delete",
17838	//   "parameterOrder": [
17839	//     "customer",
17840	//     "roleAssignmentId"
17841	//   ],
17842	//   "parameters": {
17843	//     "customer": {
17844	//       "description": "Immutable ID of the Google Workspace account.",
17845	//       "location": "path",
17846	//       "required": true,
17847	//       "type": "string"
17848	//     },
17849	//     "roleAssignmentId": {
17850	//       "description": "Immutable ID of the role assignment.",
17851	//       "location": "path",
17852	//       "required": true,
17853	//       "type": "string"
17854	//     }
17855	//   },
17856	//   "path": "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}",
17857	//   "scopes": [
17858	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
17859	//   ]
17860	// }
17861
17862}
17863
17864// method id "directory.roleAssignments.get":
17865
17866type RoleAssignmentsGetCall struct {
17867	s                *Service
17868	customer         string
17869	roleAssignmentId string
17870	urlParams_       gensupport.URLParams
17871	ifNoneMatch_     string
17872	ctx_             context.Context
17873	header_          http.Header
17874}
17875
17876// Get: Retrieves a role assignment.
17877//
17878// - customer: Immutable ID of the Google Workspace account.
17879// - roleAssignmentId: Immutable ID of the role assignment.
17880func (r *RoleAssignmentsService) Get(customer string, roleAssignmentId string) *RoleAssignmentsGetCall {
17881	c := &RoleAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17882	c.customer = customer
17883	c.roleAssignmentId = roleAssignmentId
17884	return c
17885}
17886
17887// Fields allows partial responses to be retrieved. See
17888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17889// for more information.
17890func (c *RoleAssignmentsGetCall) Fields(s ...googleapi.Field) *RoleAssignmentsGetCall {
17891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17892	return c
17893}
17894
17895// IfNoneMatch sets the optional parameter which makes the operation
17896// fail if the object's ETag matches the given value. This is useful for
17897// getting updates only after the object has changed since the last
17898// request. Use googleapi.IsNotModified to check whether the response
17899// error from Do is the result of In-None-Match.
17900func (c *RoleAssignmentsGetCall) IfNoneMatch(entityTag string) *RoleAssignmentsGetCall {
17901	c.ifNoneMatch_ = entityTag
17902	return c
17903}
17904
17905// Context sets the context to be used in this call's Do method. Any
17906// pending HTTP request will be aborted if the provided context is
17907// canceled.
17908func (c *RoleAssignmentsGetCall) Context(ctx context.Context) *RoleAssignmentsGetCall {
17909	c.ctx_ = ctx
17910	return c
17911}
17912
17913// Header returns an http.Header that can be modified by the caller to
17914// add HTTP headers to the request.
17915func (c *RoleAssignmentsGetCall) Header() http.Header {
17916	if c.header_ == nil {
17917		c.header_ = make(http.Header)
17918	}
17919	return c.header_
17920}
17921
17922func (c *RoleAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
17923	reqHeaders := make(http.Header)
17924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
17925	for k, v := range c.header_ {
17926		reqHeaders[k] = v
17927	}
17928	reqHeaders.Set("User-Agent", c.s.userAgent())
17929	if c.ifNoneMatch_ != "" {
17930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17931	}
17932	var body io.Reader = nil
17933	c.urlParams_.Set("alt", alt)
17934	c.urlParams_.Set("prettyPrint", "false")
17935	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}")
17936	urls += "?" + c.urlParams_.Encode()
17937	req, err := http.NewRequest("GET", urls, body)
17938	if err != nil {
17939		return nil, err
17940	}
17941	req.Header = reqHeaders
17942	googleapi.Expand(req.URL, map[string]string{
17943		"customer":         c.customer,
17944		"roleAssignmentId": c.roleAssignmentId,
17945	})
17946	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17947}
17948
17949// Do executes the "directory.roleAssignments.get" call.
17950// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx
17951// status code is an error. Response headers are in either
17952// *RoleAssignment.ServerResponse.Header or (if a response was returned
17953// at all) in error.(*googleapi.Error).Header. Use
17954// googleapi.IsNotModified to check whether the returned error was
17955// because http.StatusNotModified was returned.
17956func (c *RoleAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
17957	gensupport.SetOptions(c.urlParams_, opts...)
17958	res, err := c.doRequest("json")
17959	if res != nil && res.StatusCode == http.StatusNotModified {
17960		if res.Body != nil {
17961			res.Body.Close()
17962		}
17963		return nil, &googleapi.Error{
17964			Code:   res.StatusCode,
17965			Header: res.Header,
17966		}
17967	}
17968	if err != nil {
17969		return nil, err
17970	}
17971	defer googleapi.CloseBody(res)
17972	if err := googleapi.CheckResponse(res); err != nil {
17973		return nil, err
17974	}
17975	ret := &RoleAssignment{
17976		ServerResponse: googleapi.ServerResponse{
17977			Header:         res.Header,
17978			HTTPStatusCode: res.StatusCode,
17979		},
17980	}
17981	target := &ret
17982	if err := gensupport.DecodeResponse(target, res); err != nil {
17983		return nil, err
17984	}
17985	return ret, nil
17986	// {
17987	//   "description": "Retrieves a role assignment.",
17988	//   "flatPath": "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}",
17989	//   "httpMethod": "GET",
17990	//   "id": "directory.roleAssignments.get",
17991	//   "parameterOrder": [
17992	//     "customer",
17993	//     "roleAssignmentId"
17994	//   ],
17995	//   "parameters": {
17996	//     "customer": {
17997	//       "description": "Immutable ID of the Google Workspace account.",
17998	//       "location": "path",
17999	//       "required": true,
18000	//       "type": "string"
18001	//     },
18002	//     "roleAssignmentId": {
18003	//       "description": "Immutable ID of the role assignment.",
18004	//       "location": "path",
18005	//       "required": true,
18006	//       "type": "string"
18007	//     }
18008	//   },
18009	//   "path": "admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}",
18010	//   "response": {
18011	//     "$ref": "RoleAssignment"
18012	//   },
18013	//   "scopes": [
18014	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
18015	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
18016	//   ]
18017	// }
18018
18019}
18020
18021// method id "directory.roleAssignments.insert":
18022
18023type RoleAssignmentsInsertCall struct {
18024	s              *Service
18025	customer       string
18026	roleassignment *RoleAssignment
18027	urlParams_     gensupport.URLParams
18028	ctx_           context.Context
18029	header_        http.Header
18030}
18031
18032// Insert: Creates a role assignment.
18033//
18034// - customer: Immutable ID of the Google Workspace account.
18035func (r *RoleAssignmentsService) Insert(customer string, roleassignment *RoleAssignment) *RoleAssignmentsInsertCall {
18036	c := &RoleAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18037	c.customer = customer
18038	c.roleassignment = roleassignment
18039	return c
18040}
18041
18042// Fields allows partial responses to be retrieved. See
18043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18044// for more information.
18045func (c *RoleAssignmentsInsertCall) Fields(s ...googleapi.Field) *RoleAssignmentsInsertCall {
18046	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18047	return c
18048}
18049
18050// Context sets the context to be used in this call's Do method. Any
18051// pending HTTP request will be aborted if the provided context is
18052// canceled.
18053func (c *RoleAssignmentsInsertCall) Context(ctx context.Context) *RoleAssignmentsInsertCall {
18054	c.ctx_ = ctx
18055	return c
18056}
18057
18058// Header returns an http.Header that can be modified by the caller to
18059// add HTTP headers to the request.
18060func (c *RoleAssignmentsInsertCall) Header() http.Header {
18061	if c.header_ == nil {
18062		c.header_ = make(http.Header)
18063	}
18064	return c.header_
18065}
18066
18067func (c *RoleAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
18068	reqHeaders := make(http.Header)
18069	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18070	for k, v := range c.header_ {
18071		reqHeaders[k] = v
18072	}
18073	reqHeaders.Set("User-Agent", c.s.userAgent())
18074	var body io.Reader = nil
18075	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roleassignment)
18076	if err != nil {
18077		return nil, err
18078	}
18079	reqHeaders.Set("Content-Type", "application/json")
18080	c.urlParams_.Set("alt", alt)
18081	c.urlParams_.Set("prettyPrint", "false")
18082	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments")
18083	urls += "?" + c.urlParams_.Encode()
18084	req, err := http.NewRequest("POST", urls, body)
18085	if err != nil {
18086		return nil, err
18087	}
18088	req.Header = reqHeaders
18089	googleapi.Expand(req.URL, map[string]string{
18090		"customer": c.customer,
18091	})
18092	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18093}
18094
18095// Do executes the "directory.roleAssignments.insert" call.
18096// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx
18097// status code is an error. Response headers are in either
18098// *RoleAssignment.ServerResponse.Header or (if a response was returned
18099// at all) in error.(*googleapi.Error).Header. Use
18100// googleapi.IsNotModified to check whether the returned error was
18101// because http.StatusNotModified was returned.
18102func (c *RoleAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
18103	gensupport.SetOptions(c.urlParams_, opts...)
18104	res, err := c.doRequest("json")
18105	if res != nil && res.StatusCode == http.StatusNotModified {
18106		if res.Body != nil {
18107			res.Body.Close()
18108		}
18109		return nil, &googleapi.Error{
18110			Code:   res.StatusCode,
18111			Header: res.Header,
18112		}
18113	}
18114	if err != nil {
18115		return nil, err
18116	}
18117	defer googleapi.CloseBody(res)
18118	if err := googleapi.CheckResponse(res); err != nil {
18119		return nil, err
18120	}
18121	ret := &RoleAssignment{
18122		ServerResponse: googleapi.ServerResponse{
18123			Header:         res.Header,
18124			HTTPStatusCode: res.StatusCode,
18125		},
18126	}
18127	target := &ret
18128	if err := gensupport.DecodeResponse(target, res); err != nil {
18129		return nil, err
18130	}
18131	return ret, nil
18132	// {
18133	//   "description": "Creates a role assignment.",
18134	//   "flatPath": "admin/directory/v1/customer/{customer}/roleassignments",
18135	//   "httpMethod": "POST",
18136	//   "id": "directory.roleAssignments.insert",
18137	//   "parameterOrder": [
18138	//     "customer"
18139	//   ],
18140	//   "parameters": {
18141	//     "customer": {
18142	//       "description": "Immutable ID of the Google Workspace account.",
18143	//       "location": "path",
18144	//       "required": true,
18145	//       "type": "string"
18146	//     }
18147	//   },
18148	//   "path": "admin/directory/v1/customer/{customer}/roleassignments",
18149	//   "request": {
18150	//     "$ref": "RoleAssignment"
18151	//   },
18152	//   "response": {
18153	//     "$ref": "RoleAssignment"
18154	//   },
18155	//   "scopes": [
18156	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
18157	//   ]
18158	// }
18159
18160}
18161
18162// method id "directory.roleAssignments.list":
18163
18164type RoleAssignmentsListCall struct {
18165	s            *Service
18166	customer     string
18167	urlParams_   gensupport.URLParams
18168	ifNoneMatch_ string
18169	ctx_         context.Context
18170	header_      http.Header
18171}
18172
18173// List: Retrieves a paginated list of all roleAssignments.
18174//
18175// - customer: Immutable ID of the Google Workspace account.
18176func (r *RoleAssignmentsService) List(customer string) *RoleAssignmentsListCall {
18177	c := &RoleAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18178	c.customer = customer
18179	return c
18180}
18181
18182// MaxResults sets the optional parameter "maxResults": Maximum number
18183// of results to return.
18184func (c *RoleAssignmentsListCall) MaxResults(maxResults int64) *RoleAssignmentsListCall {
18185	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18186	return c
18187}
18188
18189// PageToken sets the optional parameter "pageToken": Token to specify
18190// the next page in the list.
18191func (c *RoleAssignmentsListCall) PageToken(pageToken string) *RoleAssignmentsListCall {
18192	c.urlParams_.Set("pageToken", pageToken)
18193	return c
18194}
18195
18196// RoleId sets the optional parameter "roleId": Immutable ID of a role.
18197// If included in the request, returns only role assignments containing
18198// this role ID.
18199func (c *RoleAssignmentsListCall) RoleId(roleId string) *RoleAssignmentsListCall {
18200	c.urlParams_.Set("roleId", roleId)
18201	return c
18202}
18203
18204// UserKey sets the optional parameter "userKey": The user's primary
18205// email address, alias email address, or unique user ID. If included in
18206// the request, returns role assignments only for this user.
18207func (c *RoleAssignmentsListCall) UserKey(userKey string) *RoleAssignmentsListCall {
18208	c.urlParams_.Set("userKey", userKey)
18209	return c
18210}
18211
18212// Fields allows partial responses to be retrieved. See
18213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18214// for more information.
18215func (c *RoleAssignmentsListCall) Fields(s ...googleapi.Field) *RoleAssignmentsListCall {
18216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18217	return c
18218}
18219
18220// IfNoneMatch sets the optional parameter which makes the operation
18221// fail if the object's ETag matches the given value. This is useful for
18222// getting updates only after the object has changed since the last
18223// request. Use googleapi.IsNotModified to check whether the response
18224// error from Do is the result of In-None-Match.
18225func (c *RoleAssignmentsListCall) IfNoneMatch(entityTag string) *RoleAssignmentsListCall {
18226	c.ifNoneMatch_ = entityTag
18227	return c
18228}
18229
18230// Context sets the context to be used in this call's Do method. Any
18231// pending HTTP request will be aborted if the provided context is
18232// canceled.
18233func (c *RoleAssignmentsListCall) Context(ctx context.Context) *RoleAssignmentsListCall {
18234	c.ctx_ = ctx
18235	return c
18236}
18237
18238// Header returns an http.Header that can be modified by the caller to
18239// add HTTP headers to the request.
18240func (c *RoleAssignmentsListCall) Header() http.Header {
18241	if c.header_ == nil {
18242		c.header_ = make(http.Header)
18243	}
18244	return c.header_
18245}
18246
18247func (c *RoleAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
18248	reqHeaders := make(http.Header)
18249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18250	for k, v := range c.header_ {
18251		reqHeaders[k] = v
18252	}
18253	reqHeaders.Set("User-Agent", c.s.userAgent())
18254	if c.ifNoneMatch_ != "" {
18255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18256	}
18257	var body io.Reader = nil
18258	c.urlParams_.Set("alt", alt)
18259	c.urlParams_.Set("prettyPrint", "false")
18260	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roleassignments")
18261	urls += "?" + c.urlParams_.Encode()
18262	req, err := http.NewRequest("GET", urls, body)
18263	if err != nil {
18264		return nil, err
18265	}
18266	req.Header = reqHeaders
18267	googleapi.Expand(req.URL, map[string]string{
18268		"customer": c.customer,
18269	})
18270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18271}
18272
18273// Do executes the "directory.roleAssignments.list" call.
18274// Exactly one of *RoleAssignments or error will be non-nil. Any non-2xx
18275// status code is an error. Response headers are in either
18276// *RoleAssignments.ServerResponse.Header or (if a response was returned
18277// at all) in error.(*googleapi.Error).Header. Use
18278// googleapi.IsNotModified to check whether the returned error was
18279// because http.StatusNotModified was returned.
18280func (c *RoleAssignmentsListCall) Do(opts ...googleapi.CallOption) (*RoleAssignments, error) {
18281	gensupport.SetOptions(c.urlParams_, opts...)
18282	res, err := c.doRequest("json")
18283	if res != nil && res.StatusCode == http.StatusNotModified {
18284		if res.Body != nil {
18285			res.Body.Close()
18286		}
18287		return nil, &googleapi.Error{
18288			Code:   res.StatusCode,
18289			Header: res.Header,
18290		}
18291	}
18292	if err != nil {
18293		return nil, err
18294	}
18295	defer googleapi.CloseBody(res)
18296	if err := googleapi.CheckResponse(res); err != nil {
18297		return nil, err
18298	}
18299	ret := &RoleAssignments{
18300		ServerResponse: googleapi.ServerResponse{
18301			Header:         res.Header,
18302			HTTPStatusCode: res.StatusCode,
18303		},
18304	}
18305	target := &ret
18306	if err := gensupport.DecodeResponse(target, res); err != nil {
18307		return nil, err
18308	}
18309	return ret, nil
18310	// {
18311	//   "description": "Retrieves a paginated list of all roleAssignments.",
18312	//   "flatPath": "admin/directory/v1/customer/{customer}/roleassignments",
18313	//   "httpMethod": "GET",
18314	//   "id": "directory.roleAssignments.list",
18315	//   "parameterOrder": [
18316	//     "customer"
18317	//   ],
18318	//   "parameters": {
18319	//     "customer": {
18320	//       "description": "Immutable ID of the Google Workspace account.",
18321	//       "location": "path",
18322	//       "required": true,
18323	//       "type": "string"
18324	//     },
18325	//     "maxResults": {
18326	//       "description": "Maximum number of results to return.",
18327	//       "format": "int32",
18328	//       "location": "query",
18329	//       "maximum": "200",
18330	//       "minimum": "1",
18331	//       "type": "integer"
18332	//     },
18333	//     "pageToken": {
18334	//       "description": "Token to specify the next page in the list.",
18335	//       "location": "query",
18336	//       "type": "string"
18337	//     },
18338	//     "roleId": {
18339	//       "description": "Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.",
18340	//       "location": "query",
18341	//       "type": "string"
18342	//     },
18343	//     "userKey": {
18344	//       "description": "The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.",
18345	//       "location": "query",
18346	//       "type": "string"
18347	//     }
18348	//   },
18349	//   "path": "admin/directory/v1/customer/{customer}/roleassignments",
18350	//   "response": {
18351	//     "$ref": "RoleAssignments"
18352	//   },
18353	//   "scopes": [
18354	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
18355	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
18356	//   ]
18357	// }
18358
18359}
18360
18361// Pages invokes f for each page of results.
18362// A non-nil error returned from f will halt the iteration.
18363// The provided context supersedes any context provided to the Context method.
18364func (c *RoleAssignmentsListCall) Pages(ctx context.Context, f func(*RoleAssignments) error) error {
18365	c.ctx_ = ctx
18366	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18367	for {
18368		x, err := c.Do()
18369		if err != nil {
18370			return err
18371		}
18372		if err := f(x); err != nil {
18373			return err
18374		}
18375		if x.NextPageToken == "" {
18376			return nil
18377		}
18378		c.PageToken(x.NextPageToken)
18379	}
18380}
18381
18382// method id "directory.roles.delete":
18383
18384type RolesDeleteCall struct {
18385	s          *Service
18386	customer   string
18387	roleId     string
18388	urlParams_ gensupport.URLParams
18389	ctx_       context.Context
18390	header_    http.Header
18391}
18392
18393// Delete: Deletes a role.
18394//
18395// - customer: Immutable ID of the Google Workspace account.
18396// - roleId: Immutable ID of the role.
18397func (r *RolesService) Delete(customer string, roleId string) *RolesDeleteCall {
18398	c := &RolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18399	c.customer = customer
18400	c.roleId = roleId
18401	return c
18402}
18403
18404// Fields allows partial responses to be retrieved. See
18405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18406// for more information.
18407func (c *RolesDeleteCall) Fields(s ...googleapi.Field) *RolesDeleteCall {
18408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18409	return c
18410}
18411
18412// Context sets the context to be used in this call's Do method. Any
18413// pending HTTP request will be aborted if the provided context is
18414// canceled.
18415func (c *RolesDeleteCall) Context(ctx context.Context) *RolesDeleteCall {
18416	c.ctx_ = ctx
18417	return c
18418}
18419
18420// Header returns an http.Header that can be modified by the caller to
18421// add HTTP headers to the request.
18422func (c *RolesDeleteCall) Header() http.Header {
18423	if c.header_ == nil {
18424		c.header_ = make(http.Header)
18425	}
18426	return c.header_
18427}
18428
18429func (c *RolesDeleteCall) doRequest(alt string) (*http.Response, error) {
18430	reqHeaders := make(http.Header)
18431	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18432	for k, v := range c.header_ {
18433		reqHeaders[k] = v
18434	}
18435	reqHeaders.Set("User-Agent", c.s.userAgent())
18436	var body io.Reader = nil
18437	c.urlParams_.Set("alt", alt)
18438	c.urlParams_.Set("prettyPrint", "false")
18439	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
18440	urls += "?" + c.urlParams_.Encode()
18441	req, err := http.NewRequest("DELETE", urls, body)
18442	if err != nil {
18443		return nil, err
18444	}
18445	req.Header = reqHeaders
18446	googleapi.Expand(req.URL, map[string]string{
18447		"customer": c.customer,
18448		"roleId":   c.roleId,
18449	})
18450	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18451}
18452
18453// Do executes the "directory.roles.delete" call.
18454func (c *RolesDeleteCall) Do(opts ...googleapi.CallOption) error {
18455	gensupport.SetOptions(c.urlParams_, opts...)
18456	res, err := c.doRequest("json")
18457	if err != nil {
18458		return err
18459	}
18460	defer googleapi.CloseBody(res)
18461	if err := googleapi.CheckResponse(res); err != nil {
18462		return err
18463	}
18464	return nil
18465	// {
18466	//   "description": "Deletes a role.",
18467	//   "flatPath": "admin/directory/v1/customer/{customer}/roles/{roleId}",
18468	//   "httpMethod": "DELETE",
18469	//   "id": "directory.roles.delete",
18470	//   "parameterOrder": [
18471	//     "customer",
18472	//     "roleId"
18473	//   ],
18474	//   "parameters": {
18475	//     "customer": {
18476	//       "description": "Immutable ID of the Google Workspace account.",
18477	//       "location": "path",
18478	//       "required": true,
18479	//       "type": "string"
18480	//     },
18481	//     "roleId": {
18482	//       "description": "Immutable ID of the role.",
18483	//       "location": "path",
18484	//       "required": true,
18485	//       "type": "string"
18486	//     }
18487	//   },
18488	//   "path": "admin/directory/v1/customer/{customer}/roles/{roleId}",
18489	//   "scopes": [
18490	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
18491	//   ]
18492	// }
18493
18494}
18495
18496// method id "directory.roles.get":
18497
18498type RolesGetCall struct {
18499	s            *Service
18500	customer     string
18501	roleId       string
18502	urlParams_   gensupport.URLParams
18503	ifNoneMatch_ string
18504	ctx_         context.Context
18505	header_      http.Header
18506}
18507
18508// Get: Retrieves a role.
18509//
18510// - customer: Immutable ID of the Google Workspace account.
18511// - roleId: Immutable ID of the role.
18512func (r *RolesService) Get(customer string, roleId string) *RolesGetCall {
18513	c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18514	c.customer = customer
18515	c.roleId = roleId
18516	return c
18517}
18518
18519// Fields allows partial responses to be retrieved. See
18520// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18521// for more information.
18522func (c *RolesGetCall) Fields(s ...googleapi.Field) *RolesGetCall {
18523	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18524	return c
18525}
18526
18527// IfNoneMatch sets the optional parameter which makes the operation
18528// fail if the object's ETag matches the given value. This is useful for
18529// getting updates only after the object has changed since the last
18530// request. Use googleapi.IsNotModified to check whether the response
18531// error from Do is the result of In-None-Match.
18532func (c *RolesGetCall) IfNoneMatch(entityTag string) *RolesGetCall {
18533	c.ifNoneMatch_ = entityTag
18534	return c
18535}
18536
18537// Context sets the context to be used in this call's Do method. Any
18538// pending HTTP request will be aborted if the provided context is
18539// canceled.
18540func (c *RolesGetCall) Context(ctx context.Context) *RolesGetCall {
18541	c.ctx_ = ctx
18542	return c
18543}
18544
18545// Header returns an http.Header that can be modified by the caller to
18546// add HTTP headers to the request.
18547func (c *RolesGetCall) Header() http.Header {
18548	if c.header_ == nil {
18549		c.header_ = make(http.Header)
18550	}
18551	return c.header_
18552}
18553
18554func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) {
18555	reqHeaders := make(http.Header)
18556	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18557	for k, v := range c.header_ {
18558		reqHeaders[k] = v
18559	}
18560	reqHeaders.Set("User-Agent", c.s.userAgent())
18561	if c.ifNoneMatch_ != "" {
18562		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18563	}
18564	var body io.Reader = nil
18565	c.urlParams_.Set("alt", alt)
18566	c.urlParams_.Set("prettyPrint", "false")
18567	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
18568	urls += "?" + c.urlParams_.Encode()
18569	req, err := http.NewRequest("GET", urls, body)
18570	if err != nil {
18571		return nil, err
18572	}
18573	req.Header = reqHeaders
18574	googleapi.Expand(req.URL, map[string]string{
18575		"customer": c.customer,
18576		"roleId":   c.roleId,
18577	})
18578	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18579}
18580
18581// Do executes the "directory.roles.get" call.
18582// Exactly one of *Role or error will be non-nil. Any non-2xx status
18583// code is an error. Response headers are in either
18584// *Role.ServerResponse.Header or (if a response was returned at all) in
18585// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18586// whether the returned error was because http.StatusNotModified was
18587// returned.
18588func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) {
18589	gensupport.SetOptions(c.urlParams_, opts...)
18590	res, err := c.doRequest("json")
18591	if res != nil && res.StatusCode == http.StatusNotModified {
18592		if res.Body != nil {
18593			res.Body.Close()
18594		}
18595		return nil, &googleapi.Error{
18596			Code:   res.StatusCode,
18597			Header: res.Header,
18598		}
18599	}
18600	if err != nil {
18601		return nil, err
18602	}
18603	defer googleapi.CloseBody(res)
18604	if err := googleapi.CheckResponse(res); err != nil {
18605		return nil, err
18606	}
18607	ret := &Role{
18608		ServerResponse: googleapi.ServerResponse{
18609			Header:         res.Header,
18610			HTTPStatusCode: res.StatusCode,
18611		},
18612	}
18613	target := &ret
18614	if err := gensupport.DecodeResponse(target, res); err != nil {
18615		return nil, err
18616	}
18617	return ret, nil
18618	// {
18619	//   "description": "Retrieves a role.",
18620	//   "flatPath": "admin/directory/v1/customer/{customer}/roles/{roleId}",
18621	//   "httpMethod": "GET",
18622	//   "id": "directory.roles.get",
18623	//   "parameterOrder": [
18624	//     "customer",
18625	//     "roleId"
18626	//   ],
18627	//   "parameters": {
18628	//     "customer": {
18629	//       "description": "Immutable ID of the Google Workspace account.",
18630	//       "location": "path",
18631	//       "required": true,
18632	//       "type": "string"
18633	//     },
18634	//     "roleId": {
18635	//       "description": "Immutable ID of the role.",
18636	//       "location": "path",
18637	//       "required": true,
18638	//       "type": "string"
18639	//     }
18640	//   },
18641	//   "path": "admin/directory/v1/customer/{customer}/roles/{roleId}",
18642	//   "response": {
18643	//     "$ref": "Role"
18644	//   },
18645	//   "scopes": [
18646	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
18647	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
18648	//   ]
18649	// }
18650
18651}
18652
18653// method id "directory.roles.insert":
18654
18655type RolesInsertCall struct {
18656	s          *Service
18657	customer   string
18658	role       *Role
18659	urlParams_ gensupport.URLParams
18660	ctx_       context.Context
18661	header_    http.Header
18662}
18663
18664// Insert: Creates a role.
18665//
18666// - customer: Immutable ID of the Google Workspace account.
18667func (r *RolesService) Insert(customer string, role *Role) *RolesInsertCall {
18668	c := &RolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18669	c.customer = customer
18670	c.role = role
18671	return c
18672}
18673
18674// Fields allows partial responses to be retrieved. See
18675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18676// for more information.
18677func (c *RolesInsertCall) Fields(s ...googleapi.Field) *RolesInsertCall {
18678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18679	return c
18680}
18681
18682// Context sets the context to be used in this call's Do method. Any
18683// pending HTTP request will be aborted if the provided context is
18684// canceled.
18685func (c *RolesInsertCall) Context(ctx context.Context) *RolesInsertCall {
18686	c.ctx_ = ctx
18687	return c
18688}
18689
18690// Header returns an http.Header that can be modified by the caller to
18691// add HTTP headers to the request.
18692func (c *RolesInsertCall) Header() http.Header {
18693	if c.header_ == nil {
18694		c.header_ = make(http.Header)
18695	}
18696	return c.header_
18697}
18698
18699func (c *RolesInsertCall) doRequest(alt string) (*http.Response, error) {
18700	reqHeaders := make(http.Header)
18701	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18702	for k, v := range c.header_ {
18703		reqHeaders[k] = v
18704	}
18705	reqHeaders.Set("User-Agent", c.s.userAgent())
18706	var body io.Reader = nil
18707	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
18708	if err != nil {
18709		return nil, err
18710	}
18711	reqHeaders.Set("Content-Type", "application/json")
18712	c.urlParams_.Set("alt", alt)
18713	c.urlParams_.Set("prettyPrint", "false")
18714	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles")
18715	urls += "?" + c.urlParams_.Encode()
18716	req, err := http.NewRequest("POST", urls, body)
18717	if err != nil {
18718		return nil, err
18719	}
18720	req.Header = reqHeaders
18721	googleapi.Expand(req.URL, map[string]string{
18722		"customer": c.customer,
18723	})
18724	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18725}
18726
18727// Do executes the "directory.roles.insert" call.
18728// Exactly one of *Role or error will be non-nil. Any non-2xx status
18729// code is an error. Response headers are in either
18730// *Role.ServerResponse.Header or (if a response was returned at all) in
18731// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18732// whether the returned error was because http.StatusNotModified was
18733// returned.
18734func (c *RolesInsertCall) Do(opts ...googleapi.CallOption) (*Role, error) {
18735	gensupport.SetOptions(c.urlParams_, opts...)
18736	res, err := c.doRequest("json")
18737	if res != nil && res.StatusCode == http.StatusNotModified {
18738		if res.Body != nil {
18739			res.Body.Close()
18740		}
18741		return nil, &googleapi.Error{
18742			Code:   res.StatusCode,
18743			Header: res.Header,
18744		}
18745	}
18746	if err != nil {
18747		return nil, err
18748	}
18749	defer googleapi.CloseBody(res)
18750	if err := googleapi.CheckResponse(res); err != nil {
18751		return nil, err
18752	}
18753	ret := &Role{
18754		ServerResponse: googleapi.ServerResponse{
18755			Header:         res.Header,
18756			HTTPStatusCode: res.StatusCode,
18757		},
18758	}
18759	target := &ret
18760	if err := gensupport.DecodeResponse(target, res); err != nil {
18761		return nil, err
18762	}
18763	return ret, nil
18764	// {
18765	//   "description": "Creates a role.",
18766	//   "flatPath": "admin/directory/v1/customer/{customer}/roles",
18767	//   "httpMethod": "POST",
18768	//   "id": "directory.roles.insert",
18769	//   "parameterOrder": [
18770	//     "customer"
18771	//   ],
18772	//   "parameters": {
18773	//     "customer": {
18774	//       "description": "Immutable ID of the Google Workspace account.",
18775	//       "location": "path",
18776	//       "required": true,
18777	//       "type": "string"
18778	//     }
18779	//   },
18780	//   "path": "admin/directory/v1/customer/{customer}/roles",
18781	//   "request": {
18782	//     "$ref": "Role"
18783	//   },
18784	//   "response": {
18785	//     "$ref": "Role"
18786	//   },
18787	//   "scopes": [
18788	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
18789	//   ]
18790	// }
18791
18792}
18793
18794// method id "directory.roles.list":
18795
18796type RolesListCall struct {
18797	s            *Service
18798	customer     string
18799	urlParams_   gensupport.URLParams
18800	ifNoneMatch_ string
18801	ctx_         context.Context
18802	header_      http.Header
18803}
18804
18805// List: Retrieves a paginated list of all the roles in a domain.
18806//
18807// - customer: Immutable ID of the Google Workspace account.
18808func (r *RolesService) List(customer string) *RolesListCall {
18809	c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18810	c.customer = customer
18811	return c
18812}
18813
18814// MaxResults sets the optional parameter "maxResults": Maximum number
18815// of results to return.
18816func (c *RolesListCall) MaxResults(maxResults int64) *RolesListCall {
18817	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18818	return c
18819}
18820
18821// PageToken sets the optional parameter "pageToken": Token to specify
18822// the next page in the list.
18823func (c *RolesListCall) PageToken(pageToken string) *RolesListCall {
18824	c.urlParams_.Set("pageToken", pageToken)
18825	return c
18826}
18827
18828// Fields allows partial responses to be retrieved. See
18829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18830// for more information.
18831func (c *RolesListCall) Fields(s ...googleapi.Field) *RolesListCall {
18832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18833	return c
18834}
18835
18836// IfNoneMatch sets the optional parameter which makes the operation
18837// fail if the object's ETag matches the given value. This is useful for
18838// getting updates only after the object has changed since the last
18839// request. Use googleapi.IsNotModified to check whether the response
18840// error from Do is the result of In-None-Match.
18841func (c *RolesListCall) IfNoneMatch(entityTag string) *RolesListCall {
18842	c.ifNoneMatch_ = entityTag
18843	return c
18844}
18845
18846// Context sets the context to be used in this call's Do method. Any
18847// pending HTTP request will be aborted if the provided context is
18848// canceled.
18849func (c *RolesListCall) Context(ctx context.Context) *RolesListCall {
18850	c.ctx_ = ctx
18851	return c
18852}
18853
18854// Header returns an http.Header that can be modified by the caller to
18855// add HTTP headers to the request.
18856func (c *RolesListCall) Header() http.Header {
18857	if c.header_ == nil {
18858		c.header_ = make(http.Header)
18859	}
18860	return c.header_
18861}
18862
18863func (c *RolesListCall) doRequest(alt string) (*http.Response, error) {
18864	reqHeaders := make(http.Header)
18865	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
18866	for k, v := range c.header_ {
18867		reqHeaders[k] = v
18868	}
18869	reqHeaders.Set("User-Agent", c.s.userAgent())
18870	if c.ifNoneMatch_ != "" {
18871		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18872	}
18873	var body io.Reader = nil
18874	c.urlParams_.Set("alt", alt)
18875	c.urlParams_.Set("prettyPrint", "false")
18876	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles")
18877	urls += "?" + c.urlParams_.Encode()
18878	req, err := http.NewRequest("GET", urls, body)
18879	if err != nil {
18880		return nil, err
18881	}
18882	req.Header = reqHeaders
18883	googleapi.Expand(req.URL, map[string]string{
18884		"customer": c.customer,
18885	})
18886	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18887}
18888
18889// Do executes the "directory.roles.list" call.
18890// Exactly one of *Roles or error will be non-nil. Any non-2xx status
18891// code is an error. Response headers are in either
18892// *Roles.ServerResponse.Header or (if a response was returned at all)
18893// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18894// check whether the returned error was because http.StatusNotModified
18895// was returned.
18896func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*Roles, error) {
18897	gensupport.SetOptions(c.urlParams_, opts...)
18898	res, err := c.doRequest("json")
18899	if res != nil && res.StatusCode == http.StatusNotModified {
18900		if res.Body != nil {
18901			res.Body.Close()
18902		}
18903		return nil, &googleapi.Error{
18904			Code:   res.StatusCode,
18905			Header: res.Header,
18906		}
18907	}
18908	if err != nil {
18909		return nil, err
18910	}
18911	defer googleapi.CloseBody(res)
18912	if err := googleapi.CheckResponse(res); err != nil {
18913		return nil, err
18914	}
18915	ret := &Roles{
18916		ServerResponse: googleapi.ServerResponse{
18917			Header:         res.Header,
18918			HTTPStatusCode: res.StatusCode,
18919		},
18920	}
18921	target := &ret
18922	if err := gensupport.DecodeResponse(target, res); err != nil {
18923		return nil, err
18924	}
18925	return ret, nil
18926	// {
18927	//   "description": "Retrieves a paginated list of all the roles in a domain.",
18928	//   "flatPath": "admin/directory/v1/customer/{customer}/roles",
18929	//   "httpMethod": "GET",
18930	//   "id": "directory.roles.list",
18931	//   "parameterOrder": [
18932	//     "customer"
18933	//   ],
18934	//   "parameters": {
18935	//     "customer": {
18936	//       "description": "Immutable ID of the Google Workspace account.",
18937	//       "location": "path",
18938	//       "required": true,
18939	//       "type": "string"
18940	//     },
18941	//     "maxResults": {
18942	//       "description": "Maximum number of results to return.",
18943	//       "format": "int32",
18944	//       "location": "query",
18945	//       "maximum": "100",
18946	//       "minimum": "1",
18947	//       "type": "integer"
18948	//     },
18949	//     "pageToken": {
18950	//       "description": "Token to specify the next page in the list.",
18951	//       "location": "query",
18952	//       "type": "string"
18953	//     }
18954	//   },
18955	//   "path": "admin/directory/v1/customer/{customer}/roles",
18956	//   "response": {
18957	//     "$ref": "Roles"
18958	//   },
18959	//   "scopes": [
18960	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
18961	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
18962	//   ]
18963	// }
18964
18965}
18966
18967// Pages invokes f for each page of results.
18968// A non-nil error returned from f will halt the iteration.
18969// The provided context supersedes any context provided to the Context method.
18970func (c *RolesListCall) Pages(ctx context.Context, f func(*Roles) error) error {
18971	c.ctx_ = ctx
18972	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18973	for {
18974		x, err := c.Do()
18975		if err != nil {
18976			return err
18977		}
18978		if err := f(x); err != nil {
18979			return err
18980		}
18981		if x.NextPageToken == "" {
18982			return nil
18983		}
18984		c.PageToken(x.NextPageToken)
18985	}
18986}
18987
18988// method id "directory.roles.patch":
18989
18990type RolesPatchCall struct {
18991	s          *Service
18992	customer   string
18993	roleId     string
18994	role       *Role
18995	urlParams_ gensupport.URLParams
18996	ctx_       context.Context
18997	header_    http.Header
18998}
18999
19000// Patch: Patches a role.
19001//
19002// - customer: Immutable ID of the Google Workspace account.
19003// - roleId: Immutable ID of the role.
19004func (r *RolesService) Patch(customer string, roleId string, role *Role) *RolesPatchCall {
19005	c := &RolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19006	c.customer = customer
19007	c.roleId = roleId
19008	c.role = role
19009	return c
19010}
19011
19012// Fields allows partial responses to be retrieved. See
19013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19014// for more information.
19015func (c *RolesPatchCall) Fields(s ...googleapi.Field) *RolesPatchCall {
19016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19017	return c
19018}
19019
19020// Context sets the context to be used in this call's Do method. Any
19021// pending HTTP request will be aborted if the provided context is
19022// canceled.
19023func (c *RolesPatchCall) Context(ctx context.Context) *RolesPatchCall {
19024	c.ctx_ = ctx
19025	return c
19026}
19027
19028// Header returns an http.Header that can be modified by the caller to
19029// add HTTP headers to the request.
19030func (c *RolesPatchCall) Header() http.Header {
19031	if c.header_ == nil {
19032		c.header_ = make(http.Header)
19033	}
19034	return c.header_
19035}
19036
19037func (c *RolesPatchCall) doRequest(alt string) (*http.Response, error) {
19038	reqHeaders := make(http.Header)
19039	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19040	for k, v := range c.header_ {
19041		reqHeaders[k] = v
19042	}
19043	reqHeaders.Set("User-Agent", c.s.userAgent())
19044	var body io.Reader = nil
19045	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
19046	if err != nil {
19047		return nil, err
19048	}
19049	reqHeaders.Set("Content-Type", "application/json")
19050	c.urlParams_.Set("alt", alt)
19051	c.urlParams_.Set("prettyPrint", "false")
19052	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
19053	urls += "?" + c.urlParams_.Encode()
19054	req, err := http.NewRequest("PATCH", urls, body)
19055	if err != nil {
19056		return nil, err
19057	}
19058	req.Header = reqHeaders
19059	googleapi.Expand(req.URL, map[string]string{
19060		"customer": c.customer,
19061		"roleId":   c.roleId,
19062	})
19063	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19064}
19065
19066// Do executes the "directory.roles.patch" call.
19067// Exactly one of *Role or error will be non-nil. Any non-2xx status
19068// code is an error. Response headers are in either
19069// *Role.ServerResponse.Header or (if a response was returned at all) in
19070// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19071// whether the returned error was because http.StatusNotModified was
19072// returned.
19073func (c *RolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) {
19074	gensupport.SetOptions(c.urlParams_, opts...)
19075	res, err := c.doRequest("json")
19076	if res != nil && res.StatusCode == http.StatusNotModified {
19077		if res.Body != nil {
19078			res.Body.Close()
19079		}
19080		return nil, &googleapi.Error{
19081			Code:   res.StatusCode,
19082			Header: res.Header,
19083		}
19084	}
19085	if err != nil {
19086		return nil, err
19087	}
19088	defer googleapi.CloseBody(res)
19089	if err := googleapi.CheckResponse(res); err != nil {
19090		return nil, err
19091	}
19092	ret := &Role{
19093		ServerResponse: googleapi.ServerResponse{
19094			Header:         res.Header,
19095			HTTPStatusCode: res.StatusCode,
19096		},
19097	}
19098	target := &ret
19099	if err := gensupport.DecodeResponse(target, res); err != nil {
19100		return nil, err
19101	}
19102	return ret, nil
19103	// {
19104	//   "description": "Patches a role.",
19105	//   "flatPath": "admin/directory/v1/customer/{customer}/roles/{roleId}",
19106	//   "httpMethod": "PATCH",
19107	//   "id": "directory.roles.patch",
19108	//   "parameterOrder": [
19109	//     "customer",
19110	//     "roleId"
19111	//   ],
19112	//   "parameters": {
19113	//     "customer": {
19114	//       "description": "Immutable ID of the Google Workspace account.",
19115	//       "location": "path",
19116	//       "required": true,
19117	//       "type": "string"
19118	//     },
19119	//     "roleId": {
19120	//       "description": "Immutable ID of the role.",
19121	//       "location": "path",
19122	//       "required": true,
19123	//       "type": "string"
19124	//     }
19125	//   },
19126	//   "path": "admin/directory/v1/customer/{customer}/roles/{roleId}",
19127	//   "request": {
19128	//     "$ref": "Role"
19129	//   },
19130	//   "response": {
19131	//     "$ref": "Role"
19132	//   },
19133	//   "scopes": [
19134	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
19135	//   ]
19136	// }
19137
19138}
19139
19140// method id "directory.roles.update":
19141
19142type RolesUpdateCall struct {
19143	s          *Service
19144	customer   string
19145	roleId     string
19146	role       *Role
19147	urlParams_ gensupport.URLParams
19148	ctx_       context.Context
19149	header_    http.Header
19150}
19151
19152// Update: Updates a role.
19153//
19154// - customer: Immutable ID of the Google Workspace account.
19155// - roleId: Immutable ID of the role.
19156func (r *RolesService) Update(customer string, roleId string, role *Role) *RolesUpdateCall {
19157	c := &RolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19158	c.customer = customer
19159	c.roleId = roleId
19160	c.role = role
19161	return c
19162}
19163
19164// Fields allows partial responses to be retrieved. See
19165// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19166// for more information.
19167func (c *RolesUpdateCall) Fields(s ...googleapi.Field) *RolesUpdateCall {
19168	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19169	return c
19170}
19171
19172// Context sets the context to be used in this call's Do method. Any
19173// pending HTTP request will be aborted if the provided context is
19174// canceled.
19175func (c *RolesUpdateCall) Context(ctx context.Context) *RolesUpdateCall {
19176	c.ctx_ = ctx
19177	return c
19178}
19179
19180// Header returns an http.Header that can be modified by the caller to
19181// add HTTP headers to the request.
19182func (c *RolesUpdateCall) Header() http.Header {
19183	if c.header_ == nil {
19184		c.header_ = make(http.Header)
19185	}
19186	return c.header_
19187}
19188
19189func (c *RolesUpdateCall) doRequest(alt string) (*http.Response, error) {
19190	reqHeaders := make(http.Header)
19191	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19192	for k, v := range c.header_ {
19193		reqHeaders[k] = v
19194	}
19195	reqHeaders.Set("User-Agent", c.s.userAgent())
19196	var body io.Reader = nil
19197	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
19198	if err != nil {
19199		return nil, err
19200	}
19201	reqHeaders.Set("Content-Type", "application/json")
19202	c.urlParams_.Set("alt", alt)
19203	c.urlParams_.Set("prettyPrint", "false")
19204	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customer}/roles/{roleId}")
19205	urls += "?" + c.urlParams_.Encode()
19206	req, err := http.NewRequest("PUT", urls, body)
19207	if err != nil {
19208		return nil, err
19209	}
19210	req.Header = reqHeaders
19211	googleapi.Expand(req.URL, map[string]string{
19212		"customer": c.customer,
19213		"roleId":   c.roleId,
19214	})
19215	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19216}
19217
19218// Do executes the "directory.roles.update" call.
19219// Exactly one of *Role or error will be non-nil. Any non-2xx status
19220// code is an error. Response headers are in either
19221// *Role.ServerResponse.Header or (if a response was returned at all) in
19222// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19223// whether the returned error was because http.StatusNotModified was
19224// returned.
19225func (c *RolesUpdateCall) Do(opts ...googleapi.CallOption) (*Role, error) {
19226	gensupport.SetOptions(c.urlParams_, opts...)
19227	res, err := c.doRequest("json")
19228	if res != nil && res.StatusCode == http.StatusNotModified {
19229		if res.Body != nil {
19230			res.Body.Close()
19231		}
19232		return nil, &googleapi.Error{
19233			Code:   res.StatusCode,
19234			Header: res.Header,
19235		}
19236	}
19237	if err != nil {
19238		return nil, err
19239	}
19240	defer googleapi.CloseBody(res)
19241	if err := googleapi.CheckResponse(res); err != nil {
19242		return nil, err
19243	}
19244	ret := &Role{
19245		ServerResponse: googleapi.ServerResponse{
19246			Header:         res.Header,
19247			HTTPStatusCode: res.StatusCode,
19248		},
19249	}
19250	target := &ret
19251	if err := gensupport.DecodeResponse(target, res); err != nil {
19252		return nil, err
19253	}
19254	return ret, nil
19255	// {
19256	//   "description": "Updates a role.",
19257	//   "flatPath": "admin/directory/v1/customer/{customer}/roles/{roleId}",
19258	//   "httpMethod": "PUT",
19259	//   "id": "directory.roles.update",
19260	//   "parameterOrder": [
19261	//     "customer",
19262	//     "roleId"
19263	//   ],
19264	//   "parameters": {
19265	//     "customer": {
19266	//       "description": "Immutable ID of the Google Workspace account.",
19267	//       "location": "path",
19268	//       "required": true,
19269	//       "type": "string"
19270	//     },
19271	//     "roleId": {
19272	//       "description": "Immutable ID of the role.",
19273	//       "location": "path",
19274	//       "required": true,
19275	//       "type": "string"
19276	//     }
19277	//   },
19278	//   "path": "admin/directory/v1/customer/{customer}/roles/{roleId}",
19279	//   "request": {
19280	//     "$ref": "Role"
19281	//   },
19282	//   "response": {
19283	//     "$ref": "Role"
19284	//   },
19285	//   "scopes": [
19286	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
19287	//   ]
19288	// }
19289
19290}
19291
19292// method id "directory.schemas.delete":
19293
19294type SchemasDeleteCall struct {
19295	s          *Service
19296	customerId string
19297	schemaKey  string
19298	urlParams_ gensupport.URLParams
19299	ctx_       context.Context
19300	header_    http.Header
19301}
19302
19303// Delete: Deletes a schema.
19304//
19305// - customerId: Immutable ID of the Google Workspace account.
19306// - schemaKey: Name or immutable ID of the schema.
19307func (r *SchemasService) Delete(customerId string, schemaKey string) *SchemasDeleteCall {
19308	c := &SchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19309	c.customerId = customerId
19310	c.schemaKey = schemaKey
19311	return c
19312}
19313
19314// Fields allows partial responses to be retrieved. See
19315// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19316// for more information.
19317func (c *SchemasDeleteCall) Fields(s ...googleapi.Field) *SchemasDeleteCall {
19318	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19319	return c
19320}
19321
19322// Context sets the context to be used in this call's Do method. Any
19323// pending HTTP request will be aborted if the provided context is
19324// canceled.
19325func (c *SchemasDeleteCall) Context(ctx context.Context) *SchemasDeleteCall {
19326	c.ctx_ = ctx
19327	return c
19328}
19329
19330// Header returns an http.Header that can be modified by the caller to
19331// add HTTP headers to the request.
19332func (c *SchemasDeleteCall) Header() http.Header {
19333	if c.header_ == nil {
19334		c.header_ = make(http.Header)
19335	}
19336	return c.header_
19337}
19338
19339func (c *SchemasDeleteCall) doRequest(alt string) (*http.Response, error) {
19340	reqHeaders := make(http.Header)
19341	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19342	for k, v := range c.header_ {
19343		reqHeaders[k] = v
19344	}
19345	reqHeaders.Set("User-Agent", c.s.userAgent())
19346	var body io.Reader = nil
19347	c.urlParams_.Set("alt", alt)
19348	c.urlParams_.Set("prettyPrint", "false")
19349	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
19350	urls += "?" + c.urlParams_.Encode()
19351	req, err := http.NewRequest("DELETE", urls, body)
19352	if err != nil {
19353		return nil, err
19354	}
19355	req.Header = reqHeaders
19356	googleapi.Expand(req.URL, map[string]string{
19357		"customerId": c.customerId,
19358		"schemaKey":  c.schemaKey,
19359	})
19360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19361}
19362
19363// Do executes the "directory.schemas.delete" call.
19364func (c *SchemasDeleteCall) Do(opts ...googleapi.CallOption) error {
19365	gensupport.SetOptions(c.urlParams_, opts...)
19366	res, err := c.doRequest("json")
19367	if err != nil {
19368		return err
19369	}
19370	defer googleapi.CloseBody(res)
19371	if err := googleapi.CheckResponse(res); err != nil {
19372		return err
19373	}
19374	return nil
19375	// {
19376	//   "description": "Deletes a schema.",
19377	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19378	//   "httpMethod": "DELETE",
19379	//   "id": "directory.schemas.delete",
19380	//   "parameterOrder": [
19381	//     "customerId",
19382	//     "schemaKey"
19383	//   ],
19384	//   "parameters": {
19385	//     "customerId": {
19386	//       "description": "Immutable ID of the Google Workspace account.",
19387	//       "location": "path",
19388	//       "required": true,
19389	//       "type": "string"
19390	//     },
19391	//     "schemaKey": {
19392	//       "description": "Name or immutable ID of the schema.",
19393	//       "location": "path",
19394	//       "required": true,
19395	//       "type": "string"
19396	//     }
19397	//   },
19398	//   "path": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19399	//   "scopes": [
19400	//     "https://www.googleapis.com/auth/admin.directory.userschema"
19401	//   ]
19402	// }
19403
19404}
19405
19406// method id "directory.schemas.get":
19407
19408type SchemasGetCall struct {
19409	s            *Service
19410	customerId   string
19411	schemaKey    string
19412	urlParams_   gensupport.URLParams
19413	ifNoneMatch_ string
19414	ctx_         context.Context
19415	header_      http.Header
19416}
19417
19418// Get: Retrieves a schema.
19419//
19420// - customerId: Immutable ID of the Google Workspace account.
19421// - schemaKey: Name or immutable ID of the schema.
19422func (r *SchemasService) Get(customerId string, schemaKey string) *SchemasGetCall {
19423	c := &SchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19424	c.customerId = customerId
19425	c.schemaKey = schemaKey
19426	return c
19427}
19428
19429// Fields allows partial responses to be retrieved. See
19430// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19431// for more information.
19432func (c *SchemasGetCall) Fields(s ...googleapi.Field) *SchemasGetCall {
19433	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19434	return c
19435}
19436
19437// IfNoneMatch sets the optional parameter which makes the operation
19438// fail if the object's ETag matches the given value. This is useful for
19439// getting updates only after the object has changed since the last
19440// request. Use googleapi.IsNotModified to check whether the response
19441// error from Do is the result of In-None-Match.
19442func (c *SchemasGetCall) IfNoneMatch(entityTag string) *SchemasGetCall {
19443	c.ifNoneMatch_ = entityTag
19444	return c
19445}
19446
19447// Context sets the context to be used in this call's Do method. Any
19448// pending HTTP request will be aborted if the provided context is
19449// canceled.
19450func (c *SchemasGetCall) Context(ctx context.Context) *SchemasGetCall {
19451	c.ctx_ = ctx
19452	return c
19453}
19454
19455// Header returns an http.Header that can be modified by the caller to
19456// add HTTP headers to the request.
19457func (c *SchemasGetCall) Header() http.Header {
19458	if c.header_ == nil {
19459		c.header_ = make(http.Header)
19460	}
19461	return c.header_
19462}
19463
19464func (c *SchemasGetCall) doRequest(alt string) (*http.Response, error) {
19465	reqHeaders := make(http.Header)
19466	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19467	for k, v := range c.header_ {
19468		reqHeaders[k] = v
19469	}
19470	reqHeaders.Set("User-Agent", c.s.userAgent())
19471	if c.ifNoneMatch_ != "" {
19472		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19473	}
19474	var body io.Reader = nil
19475	c.urlParams_.Set("alt", alt)
19476	c.urlParams_.Set("prettyPrint", "false")
19477	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
19478	urls += "?" + c.urlParams_.Encode()
19479	req, err := http.NewRequest("GET", urls, body)
19480	if err != nil {
19481		return nil, err
19482	}
19483	req.Header = reqHeaders
19484	googleapi.Expand(req.URL, map[string]string{
19485		"customerId": c.customerId,
19486		"schemaKey":  c.schemaKey,
19487	})
19488	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19489}
19490
19491// Do executes the "directory.schemas.get" call.
19492// Exactly one of *Schema or error will be non-nil. Any non-2xx status
19493// code is an error. Response headers are in either
19494// *Schema.ServerResponse.Header or (if a response was returned at all)
19495// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19496// check whether the returned error was because http.StatusNotModified
19497// was returned.
19498func (c *SchemasGetCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
19499	gensupport.SetOptions(c.urlParams_, opts...)
19500	res, err := c.doRequest("json")
19501	if res != nil && res.StatusCode == http.StatusNotModified {
19502		if res.Body != nil {
19503			res.Body.Close()
19504		}
19505		return nil, &googleapi.Error{
19506			Code:   res.StatusCode,
19507			Header: res.Header,
19508		}
19509	}
19510	if err != nil {
19511		return nil, err
19512	}
19513	defer googleapi.CloseBody(res)
19514	if err := googleapi.CheckResponse(res); err != nil {
19515		return nil, err
19516	}
19517	ret := &Schema{
19518		ServerResponse: googleapi.ServerResponse{
19519			Header:         res.Header,
19520			HTTPStatusCode: res.StatusCode,
19521		},
19522	}
19523	target := &ret
19524	if err := gensupport.DecodeResponse(target, res); err != nil {
19525		return nil, err
19526	}
19527	return ret, nil
19528	// {
19529	//   "description": "Retrieves a schema.",
19530	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19531	//   "httpMethod": "GET",
19532	//   "id": "directory.schemas.get",
19533	//   "parameterOrder": [
19534	//     "customerId",
19535	//     "schemaKey"
19536	//   ],
19537	//   "parameters": {
19538	//     "customerId": {
19539	//       "description": "Immutable ID of the Google Workspace account.",
19540	//       "location": "path",
19541	//       "required": true,
19542	//       "type": "string"
19543	//     },
19544	//     "schemaKey": {
19545	//       "description": "Name or immutable ID of the schema.",
19546	//       "location": "path",
19547	//       "required": true,
19548	//       "type": "string"
19549	//     }
19550	//   },
19551	//   "path": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19552	//   "response": {
19553	//     "$ref": "Schema"
19554	//   },
19555	//   "scopes": [
19556	//     "https://www.googleapis.com/auth/admin.directory.userschema",
19557	//     "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
19558	//   ]
19559	// }
19560
19561}
19562
19563// method id "directory.schemas.insert":
19564
19565type SchemasInsertCall struct {
19566	s          *Service
19567	customerId string
19568	schema     *Schema
19569	urlParams_ gensupport.URLParams
19570	ctx_       context.Context
19571	header_    http.Header
19572}
19573
19574// Insert: Creates a schema.
19575//
19576// - customerId: Immutable ID of the Google Workspace account.
19577func (r *SchemasService) Insert(customerId string, schema *Schema) *SchemasInsertCall {
19578	c := &SchemasInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19579	c.customerId = customerId
19580	c.schema = schema
19581	return c
19582}
19583
19584// Fields allows partial responses to be retrieved. See
19585// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19586// for more information.
19587func (c *SchemasInsertCall) Fields(s ...googleapi.Field) *SchemasInsertCall {
19588	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19589	return c
19590}
19591
19592// Context sets the context to be used in this call's Do method. Any
19593// pending HTTP request will be aborted if the provided context is
19594// canceled.
19595func (c *SchemasInsertCall) Context(ctx context.Context) *SchemasInsertCall {
19596	c.ctx_ = ctx
19597	return c
19598}
19599
19600// Header returns an http.Header that can be modified by the caller to
19601// add HTTP headers to the request.
19602func (c *SchemasInsertCall) Header() http.Header {
19603	if c.header_ == nil {
19604		c.header_ = make(http.Header)
19605	}
19606	return c.header_
19607}
19608
19609func (c *SchemasInsertCall) doRequest(alt string) (*http.Response, error) {
19610	reqHeaders := make(http.Header)
19611	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19612	for k, v := range c.header_ {
19613		reqHeaders[k] = v
19614	}
19615	reqHeaders.Set("User-Agent", c.s.userAgent())
19616	var body io.Reader = nil
19617	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
19618	if err != nil {
19619		return nil, err
19620	}
19621	reqHeaders.Set("Content-Type", "application/json")
19622	c.urlParams_.Set("alt", alt)
19623	c.urlParams_.Set("prettyPrint", "false")
19624	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas")
19625	urls += "?" + c.urlParams_.Encode()
19626	req, err := http.NewRequest("POST", urls, body)
19627	if err != nil {
19628		return nil, err
19629	}
19630	req.Header = reqHeaders
19631	googleapi.Expand(req.URL, map[string]string{
19632		"customerId": c.customerId,
19633	})
19634	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19635}
19636
19637// Do executes the "directory.schemas.insert" call.
19638// Exactly one of *Schema or error will be non-nil. Any non-2xx status
19639// code is an error. Response headers are in either
19640// *Schema.ServerResponse.Header or (if a response was returned at all)
19641// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19642// check whether the returned error was because http.StatusNotModified
19643// was returned.
19644func (c *SchemasInsertCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
19645	gensupport.SetOptions(c.urlParams_, opts...)
19646	res, err := c.doRequest("json")
19647	if res != nil && res.StatusCode == http.StatusNotModified {
19648		if res.Body != nil {
19649			res.Body.Close()
19650		}
19651		return nil, &googleapi.Error{
19652			Code:   res.StatusCode,
19653			Header: res.Header,
19654		}
19655	}
19656	if err != nil {
19657		return nil, err
19658	}
19659	defer googleapi.CloseBody(res)
19660	if err := googleapi.CheckResponse(res); err != nil {
19661		return nil, err
19662	}
19663	ret := &Schema{
19664		ServerResponse: googleapi.ServerResponse{
19665			Header:         res.Header,
19666			HTTPStatusCode: res.StatusCode,
19667		},
19668	}
19669	target := &ret
19670	if err := gensupport.DecodeResponse(target, res); err != nil {
19671		return nil, err
19672	}
19673	return ret, nil
19674	// {
19675	//   "description": "Creates a schema.",
19676	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas",
19677	//   "httpMethod": "POST",
19678	//   "id": "directory.schemas.insert",
19679	//   "parameterOrder": [
19680	//     "customerId"
19681	//   ],
19682	//   "parameters": {
19683	//     "customerId": {
19684	//       "description": "Immutable ID of the Google Workspace account.",
19685	//       "location": "path",
19686	//       "required": true,
19687	//       "type": "string"
19688	//     }
19689	//   },
19690	//   "path": "admin/directory/v1/customer/{customerId}/schemas",
19691	//   "request": {
19692	//     "$ref": "Schema"
19693	//   },
19694	//   "response": {
19695	//     "$ref": "Schema"
19696	//   },
19697	//   "scopes": [
19698	//     "https://www.googleapis.com/auth/admin.directory.userschema"
19699	//   ]
19700	// }
19701
19702}
19703
19704// method id "directory.schemas.list":
19705
19706type SchemasListCall struct {
19707	s            *Service
19708	customerId   string
19709	urlParams_   gensupport.URLParams
19710	ifNoneMatch_ string
19711	ctx_         context.Context
19712	header_      http.Header
19713}
19714
19715// List: Retrieves all schemas for a customer.
19716//
19717// - customerId: Immutable ID of the Google Workspace account.
19718func (r *SchemasService) List(customerId string) *SchemasListCall {
19719	c := &SchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19720	c.customerId = customerId
19721	return c
19722}
19723
19724// Fields allows partial responses to be retrieved. See
19725// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19726// for more information.
19727func (c *SchemasListCall) Fields(s ...googleapi.Field) *SchemasListCall {
19728	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19729	return c
19730}
19731
19732// IfNoneMatch sets the optional parameter which makes the operation
19733// fail if the object's ETag matches the given value. This is useful for
19734// getting updates only after the object has changed since the last
19735// request. Use googleapi.IsNotModified to check whether the response
19736// error from Do is the result of In-None-Match.
19737func (c *SchemasListCall) IfNoneMatch(entityTag string) *SchemasListCall {
19738	c.ifNoneMatch_ = entityTag
19739	return c
19740}
19741
19742// Context sets the context to be used in this call's Do method. Any
19743// pending HTTP request will be aborted if the provided context is
19744// canceled.
19745func (c *SchemasListCall) Context(ctx context.Context) *SchemasListCall {
19746	c.ctx_ = ctx
19747	return c
19748}
19749
19750// Header returns an http.Header that can be modified by the caller to
19751// add HTTP headers to the request.
19752func (c *SchemasListCall) Header() http.Header {
19753	if c.header_ == nil {
19754		c.header_ = make(http.Header)
19755	}
19756	return c.header_
19757}
19758
19759func (c *SchemasListCall) doRequest(alt string) (*http.Response, error) {
19760	reqHeaders := make(http.Header)
19761	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19762	for k, v := range c.header_ {
19763		reqHeaders[k] = v
19764	}
19765	reqHeaders.Set("User-Agent", c.s.userAgent())
19766	if c.ifNoneMatch_ != "" {
19767		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19768	}
19769	var body io.Reader = nil
19770	c.urlParams_.Set("alt", alt)
19771	c.urlParams_.Set("prettyPrint", "false")
19772	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas")
19773	urls += "?" + c.urlParams_.Encode()
19774	req, err := http.NewRequest("GET", urls, body)
19775	if err != nil {
19776		return nil, err
19777	}
19778	req.Header = reqHeaders
19779	googleapi.Expand(req.URL, map[string]string{
19780		"customerId": c.customerId,
19781	})
19782	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19783}
19784
19785// Do executes the "directory.schemas.list" call.
19786// Exactly one of *Schemas or error will be non-nil. Any non-2xx status
19787// code is an error. Response headers are in either
19788// *Schemas.ServerResponse.Header or (if a response was returned at all)
19789// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19790// check whether the returned error was because http.StatusNotModified
19791// was returned.
19792func (c *SchemasListCall) Do(opts ...googleapi.CallOption) (*Schemas, error) {
19793	gensupport.SetOptions(c.urlParams_, opts...)
19794	res, err := c.doRequest("json")
19795	if res != nil && res.StatusCode == http.StatusNotModified {
19796		if res.Body != nil {
19797			res.Body.Close()
19798		}
19799		return nil, &googleapi.Error{
19800			Code:   res.StatusCode,
19801			Header: res.Header,
19802		}
19803	}
19804	if err != nil {
19805		return nil, err
19806	}
19807	defer googleapi.CloseBody(res)
19808	if err := googleapi.CheckResponse(res); err != nil {
19809		return nil, err
19810	}
19811	ret := &Schemas{
19812		ServerResponse: googleapi.ServerResponse{
19813			Header:         res.Header,
19814			HTTPStatusCode: res.StatusCode,
19815		},
19816	}
19817	target := &ret
19818	if err := gensupport.DecodeResponse(target, res); err != nil {
19819		return nil, err
19820	}
19821	return ret, nil
19822	// {
19823	//   "description": "Retrieves all schemas for a customer.",
19824	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas",
19825	//   "httpMethod": "GET",
19826	//   "id": "directory.schemas.list",
19827	//   "parameterOrder": [
19828	//     "customerId"
19829	//   ],
19830	//   "parameters": {
19831	//     "customerId": {
19832	//       "description": "Immutable ID of the Google Workspace account.",
19833	//       "location": "path",
19834	//       "required": true,
19835	//       "type": "string"
19836	//     }
19837	//   },
19838	//   "path": "admin/directory/v1/customer/{customerId}/schemas",
19839	//   "response": {
19840	//     "$ref": "Schemas"
19841	//   },
19842	//   "scopes": [
19843	//     "https://www.googleapis.com/auth/admin.directory.userschema",
19844	//     "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
19845	//   ]
19846	// }
19847
19848}
19849
19850// method id "directory.schemas.patch":
19851
19852type SchemasPatchCall struct {
19853	s          *Service
19854	customerId string
19855	schemaKey  string
19856	schema     *Schema
19857	urlParams_ gensupport.URLParams
19858	ctx_       context.Context
19859	header_    http.Header
19860}
19861
19862// Patch: Patches a schema.
19863//
19864// - customerId: Immutable ID of the Google Workspace account.
19865// - schemaKey: Name or immutable ID of the schema.
19866func (r *SchemasService) Patch(customerId string, schemaKey string, schema *Schema) *SchemasPatchCall {
19867	c := &SchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19868	c.customerId = customerId
19869	c.schemaKey = schemaKey
19870	c.schema = schema
19871	return c
19872}
19873
19874// Fields allows partial responses to be retrieved. See
19875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19876// for more information.
19877func (c *SchemasPatchCall) Fields(s ...googleapi.Field) *SchemasPatchCall {
19878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19879	return c
19880}
19881
19882// Context sets the context to be used in this call's Do method. Any
19883// pending HTTP request will be aborted if the provided context is
19884// canceled.
19885func (c *SchemasPatchCall) Context(ctx context.Context) *SchemasPatchCall {
19886	c.ctx_ = ctx
19887	return c
19888}
19889
19890// Header returns an http.Header that can be modified by the caller to
19891// add HTTP headers to the request.
19892func (c *SchemasPatchCall) Header() http.Header {
19893	if c.header_ == nil {
19894		c.header_ = make(http.Header)
19895	}
19896	return c.header_
19897}
19898
19899func (c *SchemasPatchCall) doRequest(alt string) (*http.Response, error) {
19900	reqHeaders := make(http.Header)
19901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
19902	for k, v := range c.header_ {
19903		reqHeaders[k] = v
19904	}
19905	reqHeaders.Set("User-Agent", c.s.userAgent())
19906	var body io.Reader = nil
19907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
19908	if err != nil {
19909		return nil, err
19910	}
19911	reqHeaders.Set("Content-Type", "application/json")
19912	c.urlParams_.Set("alt", alt)
19913	c.urlParams_.Set("prettyPrint", "false")
19914	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
19915	urls += "?" + c.urlParams_.Encode()
19916	req, err := http.NewRequest("PATCH", urls, body)
19917	if err != nil {
19918		return nil, err
19919	}
19920	req.Header = reqHeaders
19921	googleapi.Expand(req.URL, map[string]string{
19922		"customerId": c.customerId,
19923		"schemaKey":  c.schemaKey,
19924	})
19925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19926}
19927
19928// Do executes the "directory.schemas.patch" call.
19929// Exactly one of *Schema or error will be non-nil. Any non-2xx status
19930// code is an error. Response headers are in either
19931// *Schema.ServerResponse.Header or (if a response was returned at all)
19932// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19933// check whether the returned error was because http.StatusNotModified
19934// was returned.
19935func (c *SchemasPatchCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
19936	gensupport.SetOptions(c.urlParams_, opts...)
19937	res, err := c.doRequest("json")
19938	if res != nil && res.StatusCode == http.StatusNotModified {
19939		if res.Body != nil {
19940			res.Body.Close()
19941		}
19942		return nil, &googleapi.Error{
19943			Code:   res.StatusCode,
19944			Header: res.Header,
19945		}
19946	}
19947	if err != nil {
19948		return nil, err
19949	}
19950	defer googleapi.CloseBody(res)
19951	if err := googleapi.CheckResponse(res); err != nil {
19952		return nil, err
19953	}
19954	ret := &Schema{
19955		ServerResponse: googleapi.ServerResponse{
19956			Header:         res.Header,
19957			HTTPStatusCode: res.StatusCode,
19958		},
19959	}
19960	target := &ret
19961	if err := gensupport.DecodeResponse(target, res); err != nil {
19962		return nil, err
19963	}
19964	return ret, nil
19965	// {
19966	//   "description": "Patches a schema.",
19967	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19968	//   "httpMethod": "PATCH",
19969	//   "id": "directory.schemas.patch",
19970	//   "parameterOrder": [
19971	//     "customerId",
19972	//     "schemaKey"
19973	//   ],
19974	//   "parameters": {
19975	//     "customerId": {
19976	//       "description": "Immutable ID of the Google Workspace account.",
19977	//       "location": "path",
19978	//       "required": true,
19979	//       "type": "string"
19980	//     },
19981	//     "schemaKey": {
19982	//       "description": "Name or immutable ID of the schema.",
19983	//       "location": "path",
19984	//       "required": true,
19985	//       "type": "string"
19986	//     }
19987	//   },
19988	//   "path": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
19989	//   "request": {
19990	//     "$ref": "Schema"
19991	//   },
19992	//   "response": {
19993	//     "$ref": "Schema"
19994	//   },
19995	//   "scopes": [
19996	//     "https://www.googleapis.com/auth/admin.directory.userschema"
19997	//   ]
19998	// }
19999
20000}
20001
20002// method id "directory.schemas.update":
20003
20004type SchemasUpdateCall struct {
20005	s          *Service
20006	customerId string
20007	schemaKey  string
20008	schema     *Schema
20009	urlParams_ gensupport.URLParams
20010	ctx_       context.Context
20011	header_    http.Header
20012}
20013
20014// Update: Updates a schema.
20015//
20016// - customerId: Immutable ID of the Google Workspace account.
20017// - schemaKey: Name or immutable ID of the schema.
20018func (r *SchemasService) Update(customerId string, schemaKey string, schema *Schema) *SchemasUpdateCall {
20019	c := &SchemasUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20020	c.customerId = customerId
20021	c.schemaKey = schemaKey
20022	c.schema = schema
20023	return c
20024}
20025
20026// Fields allows partial responses to be retrieved. See
20027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20028// for more information.
20029func (c *SchemasUpdateCall) Fields(s ...googleapi.Field) *SchemasUpdateCall {
20030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20031	return c
20032}
20033
20034// Context sets the context to be used in this call's Do method. Any
20035// pending HTTP request will be aborted if the provided context is
20036// canceled.
20037func (c *SchemasUpdateCall) Context(ctx context.Context) *SchemasUpdateCall {
20038	c.ctx_ = ctx
20039	return c
20040}
20041
20042// Header returns an http.Header that can be modified by the caller to
20043// add HTTP headers to the request.
20044func (c *SchemasUpdateCall) Header() http.Header {
20045	if c.header_ == nil {
20046		c.header_ = make(http.Header)
20047	}
20048	return c.header_
20049}
20050
20051func (c *SchemasUpdateCall) doRequest(alt string) (*http.Response, error) {
20052	reqHeaders := make(http.Header)
20053	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20054	for k, v := range c.header_ {
20055		reqHeaders[k] = v
20056	}
20057	reqHeaders.Set("User-Agent", c.s.userAgent())
20058	var body io.Reader = nil
20059	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
20060	if err != nil {
20061		return nil, err
20062	}
20063	reqHeaders.Set("Content-Type", "application/json")
20064	c.urlParams_.Set("alt", alt)
20065	c.urlParams_.Set("prettyPrint", "false")
20066	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}")
20067	urls += "?" + c.urlParams_.Encode()
20068	req, err := http.NewRequest("PUT", urls, body)
20069	if err != nil {
20070		return nil, err
20071	}
20072	req.Header = reqHeaders
20073	googleapi.Expand(req.URL, map[string]string{
20074		"customerId": c.customerId,
20075		"schemaKey":  c.schemaKey,
20076	})
20077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20078}
20079
20080// Do executes the "directory.schemas.update" call.
20081// Exactly one of *Schema or error will be non-nil. Any non-2xx status
20082// code is an error. Response headers are in either
20083// *Schema.ServerResponse.Header or (if a response was returned at all)
20084// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20085// check whether the returned error was because http.StatusNotModified
20086// was returned.
20087func (c *SchemasUpdateCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
20088	gensupport.SetOptions(c.urlParams_, opts...)
20089	res, err := c.doRequest("json")
20090	if res != nil && res.StatusCode == http.StatusNotModified {
20091		if res.Body != nil {
20092			res.Body.Close()
20093		}
20094		return nil, &googleapi.Error{
20095			Code:   res.StatusCode,
20096			Header: res.Header,
20097		}
20098	}
20099	if err != nil {
20100		return nil, err
20101	}
20102	defer googleapi.CloseBody(res)
20103	if err := googleapi.CheckResponse(res); err != nil {
20104		return nil, err
20105	}
20106	ret := &Schema{
20107		ServerResponse: googleapi.ServerResponse{
20108			Header:         res.Header,
20109			HTTPStatusCode: res.StatusCode,
20110		},
20111	}
20112	target := &ret
20113	if err := gensupport.DecodeResponse(target, res); err != nil {
20114		return nil, err
20115	}
20116	return ret, nil
20117	// {
20118	//   "description": "Updates a schema.",
20119	//   "flatPath": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
20120	//   "httpMethod": "PUT",
20121	//   "id": "directory.schemas.update",
20122	//   "parameterOrder": [
20123	//     "customerId",
20124	//     "schemaKey"
20125	//   ],
20126	//   "parameters": {
20127	//     "customerId": {
20128	//       "description": "Immutable ID of the Google Workspace account.",
20129	//       "location": "path",
20130	//       "required": true,
20131	//       "type": "string"
20132	//     },
20133	//     "schemaKey": {
20134	//       "description": "Name or immutable ID of the schema.",
20135	//       "location": "path",
20136	//       "required": true,
20137	//       "type": "string"
20138	//     }
20139	//   },
20140	//   "path": "admin/directory/v1/customer/{customerId}/schemas/{schemaKey}",
20141	//   "request": {
20142	//     "$ref": "Schema"
20143	//   },
20144	//   "response": {
20145	//     "$ref": "Schema"
20146	//   },
20147	//   "scopes": [
20148	//     "https://www.googleapis.com/auth/admin.directory.userschema"
20149	//   ]
20150	// }
20151
20152}
20153
20154// method id "directory.tokens.delete":
20155
20156type TokensDeleteCall struct {
20157	s          *Service
20158	userKey    string
20159	clientId   string
20160	urlParams_ gensupport.URLParams
20161	ctx_       context.Context
20162	header_    http.Header
20163}
20164
20165// Delete: Deletes all access tokens issued by a user for an
20166// application.
20167//
20168// - clientId: The Client ID of the application the token is issued to.
20169// - userKey: Identifies the user in the API request. The value can be
20170//   the user's primary email address, alias email address, or unique
20171//   user ID.
20172func (r *TokensService) Delete(userKey string, clientId string) *TokensDeleteCall {
20173	c := &TokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20174	c.userKey = userKey
20175	c.clientId = clientId
20176	return c
20177}
20178
20179// Fields allows partial responses to be retrieved. See
20180// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20181// for more information.
20182func (c *TokensDeleteCall) Fields(s ...googleapi.Field) *TokensDeleteCall {
20183	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20184	return c
20185}
20186
20187// Context sets the context to be used in this call's Do method. Any
20188// pending HTTP request will be aborted if the provided context is
20189// canceled.
20190func (c *TokensDeleteCall) Context(ctx context.Context) *TokensDeleteCall {
20191	c.ctx_ = ctx
20192	return c
20193}
20194
20195// Header returns an http.Header that can be modified by the caller to
20196// add HTTP headers to the request.
20197func (c *TokensDeleteCall) Header() http.Header {
20198	if c.header_ == nil {
20199		c.header_ = make(http.Header)
20200	}
20201	return c.header_
20202}
20203
20204func (c *TokensDeleteCall) doRequest(alt string) (*http.Response, error) {
20205	reqHeaders := make(http.Header)
20206	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20207	for k, v := range c.header_ {
20208		reqHeaders[k] = v
20209	}
20210	reqHeaders.Set("User-Agent", c.s.userAgent())
20211	var body io.Reader = nil
20212	c.urlParams_.Set("alt", alt)
20213	c.urlParams_.Set("prettyPrint", "false")
20214	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens/{clientId}")
20215	urls += "?" + c.urlParams_.Encode()
20216	req, err := http.NewRequest("DELETE", urls, body)
20217	if err != nil {
20218		return nil, err
20219	}
20220	req.Header = reqHeaders
20221	googleapi.Expand(req.URL, map[string]string{
20222		"userKey":  c.userKey,
20223		"clientId": c.clientId,
20224	})
20225	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20226}
20227
20228// Do executes the "directory.tokens.delete" call.
20229func (c *TokensDeleteCall) Do(opts ...googleapi.CallOption) error {
20230	gensupport.SetOptions(c.urlParams_, opts...)
20231	res, err := c.doRequest("json")
20232	if err != nil {
20233		return err
20234	}
20235	defer googleapi.CloseBody(res)
20236	if err := googleapi.CheckResponse(res); err != nil {
20237		return err
20238	}
20239	return nil
20240	// {
20241	//   "description": "Deletes all access tokens issued by a user for an application.",
20242	//   "flatPath": "admin/directory/v1/users/{userKey}/tokens/{clientId}",
20243	//   "httpMethod": "DELETE",
20244	//   "id": "directory.tokens.delete",
20245	//   "parameterOrder": [
20246	//     "userKey",
20247	//     "clientId"
20248	//   ],
20249	//   "parameters": {
20250	//     "clientId": {
20251	//       "description": "The Client ID of the application the token is issued to.",
20252	//       "location": "path",
20253	//       "required": true,
20254	//       "type": "string"
20255	//     },
20256	//     "userKey": {
20257	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20258	//       "location": "path",
20259	//       "required": true,
20260	//       "type": "string"
20261	//     }
20262	//   },
20263	//   "path": "admin/directory/v1/users/{userKey}/tokens/{clientId}",
20264	//   "scopes": [
20265	//     "https://www.googleapis.com/auth/admin.directory.user.security"
20266	//   ]
20267	// }
20268
20269}
20270
20271// method id "directory.tokens.get":
20272
20273type TokensGetCall struct {
20274	s            *Service
20275	userKey      string
20276	clientId     string
20277	urlParams_   gensupport.URLParams
20278	ifNoneMatch_ string
20279	ctx_         context.Context
20280	header_      http.Header
20281}
20282
20283// Get: Gets information about an access token issued by a user.
20284//
20285// - clientId: The Client ID of the application the token is issued to.
20286// - userKey: Identifies the user in the API request. The value can be
20287//   the user's primary email address, alias email address, or unique
20288//   user ID.
20289func (r *TokensService) Get(userKey string, clientId string) *TokensGetCall {
20290	c := &TokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20291	c.userKey = userKey
20292	c.clientId = clientId
20293	return c
20294}
20295
20296// Fields allows partial responses to be retrieved. See
20297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20298// for more information.
20299func (c *TokensGetCall) Fields(s ...googleapi.Field) *TokensGetCall {
20300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20301	return c
20302}
20303
20304// IfNoneMatch sets the optional parameter which makes the operation
20305// fail if the object's ETag matches the given value. This is useful for
20306// getting updates only after the object has changed since the last
20307// request. Use googleapi.IsNotModified to check whether the response
20308// error from Do is the result of In-None-Match.
20309func (c *TokensGetCall) IfNoneMatch(entityTag string) *TokensGetCall {
20310	c.ifNoneMatch_ = entityTag
20311	return c
20312}
20313
20314// Context sets the context to be used in this call's Do method. Any
20315// pending HTTP request will be aborted if the provided context is
20316// canceled.
20317func (c *TokensGetCall) Context(ctx context.Context) *TokensGetCall {
20318	c.ctx_ = ctx
20319	return c
20320}
20321
20322// Header returns an http.Header that can be modified by the caller to
20323// add HTTP headers to the request.
20324func (c *TokensGetCall) Header() http.Header {
20325	if c.header_ == nil {
20326		c.header_ = make(http.Header)
20327	}
20328	return c.header_
20329}
20330
20331func (c *TokensGetCall) doRequest(alt string) (*http.Response, error) {
20332	reqHeaders := make(http.Header)
20333	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20334	for k, v := range c.header_ {
20335		reqHeaders[k] = v
20336	}
20337	reqHeaders.Set("User-Agent", c.s.userAgent())
20338	if c.ifNoneMatch_ != "" {
20339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20340	}
20341	var body io.Reader = nil
20342	c.urlParams_.Set("alt", alt)
20343	c.urlParams_.Set("prettyPrint", "false")
20344	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens/{clientId}")
20345	urls += "?" + c.urlParams_.Encode()
20346	req, err := http.NewRequest("GET", urls, body)
20347	if err != nil {
20348		return nil, err
20349	}
20350	req.Header = reqHeaders
20351	googleapi.Expand(req.URL, map[string]string{
20352		"userKey":  c.userKey,
20353		"clientId": c.clientId,
20354	})
20355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20356}
20357
20358// Do executes the "directory.tokens.get" call.
20359// Exactly one of *Token or error will be non-nil. Any non-2xx status
20360// code is an error. Response headers are in either
20361// *Token.ServerResponse.Header or (if a response was returned at all)
20362// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20363// check whether the returned error was because http.StatusNotModified
20364// was returned.
20365func (c *TokensGetCall) Do(opts ...googleapi.CallOption) (*Token, error) {
20366	gensupport.SetOptions(c.urlParams_, opts...)
20367	res, err := c.doRequest("json")
20368	if res != nil && res.StatusCode == http.StatusNotModified {
20369		if res.Body != nil {
20370			res.Body.Close()
20371		}
20372		return nil, &googleapi.Error{
20373			Code:   res.StatusCode,
20374			Header: res.Header,
20375		}
20376	}
20377	if err != nil {
20378		return nil, err
20379	}
20380	defer googleapi.CloseBody(res)
20381	if err := googleapi.CheckResponse(res); err != nil {
20382		return nil, err
20383	}
20384	ret := &Token{
20385		ServerResponse: googleapi.ServerResponse{
20386			Header:         res.Header,
20387			HTTPStatusCode: res.StatusCode,
20388		},
20389	}
20390	target := &ret
20391	if err := gensupport.DecodeResponse(target, res); err != nil {
20392		return nil, err
20393	}
20394	return ret, nil
20395	// {
20396	//   "description": "Gets information about an access token issued by a user.",
20397	//   "flatPath": "admin/directory/v1/users/{userKey}/tokens/{clientId}",
20398	//   "httpMethod": "GET",
20399	//   "id": "directory.tokens.get",
20400	//   "parameterOrder": [
20401	//     "userKey",
20402	//     "clientId"
20403	//   ],
20404	//   "parameters": {
20405	//     "clientId": {
20406	//       "description": "The Client ID of the application the token is issued to.",
20407	//       "location": "path",
20408	//       "required": true,
20409	//       "type": "string"
20410	//     },
20411	//     "userKey": {
20412	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20413	//       "location": "path",
20414	//       "required": true,
20415	//       "type": "string"
20416	//     }
20417	//   },
20418	//   "path": "admin/directory/v1/users/{userKey}/tokens/{clientId}",
20419	//   "response": {
20420	//     "$ref": "Token"
20421	//   },
20422	//   "scopes": [
20423	//     "https://www.googleapis.com/auth/admin.directory.user.security"
20424	//   ]
20425	// }
20426
20427}
20428
20429// method id "directory.tokens.list":
20430
20431type TokensListCall struct {
20432	s            *Service
20433	userKey      string
20434	urlParams_   gensupport.URLParams
20435	ifNoneMatch_ string
20436	ctx_         context.Context
20437	header_      http.Header
20438}
20439
20440// List: Returns the set of tokens specified user has issued to 3rd
20441// party applications.
20442//
20443// - userKey: Identifies the user in the API request. The value can be
20444//   the user's primary email address, alias email address, or unique
20445//   user ID.
20446func (r *TokensService) List(userKey string) *TokensListCall {
20447	c := &TokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20448	c.userKey = userKey
20449	return c
20450}
20451
20452// Fields allows partial responses to be retrieved. See
20453// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20454// for more information.
20455func (c *TokensListCall) Fields(s ...googleapi.Field) *TokensListCall {
20456	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20457	return c
20458}
20459
20460// IfNoneMatch sets the optional parameter which makes the operation
20461// fail if the object's ETag matches the given value. This is useful for
20462// getting updates only after the object has changed since the last
20463// request. Use googleapi.IsNotModified to check whether the response
20464// error from Do is the result of In-None-Match.
20465func (c *TokensListCall) IfNoneMatch(entityTag string) *TokensListCall {
20466	c.ifNoneMatch_ = entityTag
20467	return c
20468}
20469
20470// Context sets the context to be used in this call's Do method. Any
20471// pending HTTP request will be aborted if the provided context is
20472// canceled.
20473func (c *TokensListCall) Context(ctx context.Context) *TokensListCall {
20474	c.ctx_ = ctx
20475	return c
20476}
20477
20478// Header returns an http.Header that can be modified by the caller to
20479// add HTTP headers to the request.
20480func (c *TokensListCall) Header() http.Header {
20481	if c.header_ == nil {
20482		c.header_ = make(http.Header)
20483	}
20484	return c.header_
20485}
20486
20487func (c *TokensListCall) doRequest(alt string) (*http.Response, error) {
20488	reqHeaders := make(http.Header)
20489	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20490	for k, v := range c.header_ {
20491		reqHeaders[k] = v
20492	}
20493	reqHeaders.Set("User-Agent", c.s.userAgent())
20494	if c.ifNoneMatch_ != "" {
20495		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20496	}
20497	var body io.Reader = nil
20498	c.urlParams_.Set("alt", alt)
20499	c.urlParams_.Set("prettyPrint", "false")
20500	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/tokens")
20501	urls += "?" + c.urlParams_.Encode()
20502	req, err := http.NewRequest("GET", urls, body)
20503	if err != nil {
20504		return nil, err
20505	}
20506	req.Header = reqHeaders
20507	googleapi.Expand(req.URL, map[string]string{
20508		"userKey": c.userKey,
20509	})
20510	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20511}
20512
20513// Do executes the "directory.tokens.list" call.
20514// Exactly one of *Tokens or error will be non-nil. Any non-2xx status
20515// code is an error. Response headers are in either
20516// *Tokens.ServerResponse.Header or (if a response was returned at all)
20517// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20518// check whether the returned error was because http.StatusNotModified
20519// was returned.
20520func (c *TokensListCall) Do(opts ...googleapi.CallOption) (*Tokens, error) {
20521	gensupport.SetOptions(c.urlParams_, opts...)
20522	res, err := c.doRequest("json")
20523	if res != nil && res.StatusCode == http.StatusNotModified {
20524		if res.Body != nil {
20525			res.Body.Close()
20526		}
20527		return nil, &googleapi.Error{
20528			Code:   res.StatusCode,
20529			Header: res.Header,
20530		}
20531	}
20532	if err != nil {
20533		return nil, err
20534	}
20535	defer googleapi.CloseBody(res)
20536	if err := googleapi.CheckResponse(res); err != nil {
20537		return nil, err
20538	}
20539	ret := &Tokens{
20540		ServerResponse: googleapi.ServerResponse{
20541			Header:         res.Header,
20542			HTTPStatusCode: res.StatusCode,
20543		},
20544	}
20545	target := &ret
20546	if err := gensupport.DecodeResponse(target, res); err != nil {
20547		return nil, err
20548	}
20549	return ret, nil
20550	// {
20551	//   "description": "Returns the set of tokens specified user has issued to 3rd party applications.",
20552	//   "flatPath": "admin/directory/v1/users/{userKey}/tokens",
20553	//   "httpMethod": "GET",
20554	//   "id": "directory.tokens.list",
20555	//   "parameterOrder": [
20556	//     "userKey"
20557	//   ],
20558	//   "parameters": {
20559	//     "userKey": {
20560	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20561	//       "location": "path",
20562	//       "required": true,
20563	//       "type": "string"
20564	//     }
20565	//   },
20566	//   "path": "admin/directory/v1/users/{userKey}/tokens",
20567	//   "response": {
20568	//     "$ref": "Tokens"
20569	//   },
20570	//   "scopes": [
20571	//     "https://www.googleapis.com/auth/admin.directory.user.security"
20572	//   ]
20573	// }
20574
20575}
20576
20577// method id "directory.twoStepVerification.turnOff":
20578
20579type TwoStepVerificationTurnOffCall struct {
20580	s          *Service
20581	userKey    string
20582	urlParams_ gensupport.URLParams
20583	ctx_       context.Context
20584	header_    http.Header
20585}
20586
20587// TurnOff: Turns off 2-Step Verification for user.
20588//
20589// - userKey: Identifies the user in the API request. The value can be
20590//   the user's primary email address, alias email address, or unique
20591//   user ID.
20592func (r *TwoStepVerificationService) TurnOff(userKey string) *TwoStepVerificationTurnOffCall {
20593	c := &TwoStepVerificationTurnOffCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20594	c.userKey = userKey
20595	return c
20596}
20597
20598// Fields allows partial responses to be retrieved. See
20599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20600// for more information.
20601func (c *TwoStepVerificationTurnOffCall) Fields(s ...googleapi.Field) *TwoStepVerificationTurnOffCall {
20602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20603	return c
20604}
20605
20606// Context sets the context to be used in this call's Do method. Any
20607// pending HTTP request will be aborted if the provided context is
20608// canceled.
20609func (c *TwoStepVerificationTurnOffCall) Context(ctx context.Context) *TwoStepVerificationTurnOffCall {
20610	c.ctx_ = ctx
20611	return c
20612}
20613
20614// Header returns an http.Header that can be modified by the caller to
20615// add HTTP headers to the request.
20616func (c *TwoStepVerificationTurnOffCall) Header() http.Header {
20617	if c.header_ == nil {
20618		c.header_ = make(http.Header)
20619	}
20620	return c.header_
20621}
20622
20623func (c *TwoStepVerificationTurnOffCall) doRequest(alt string) (*http.Response, error) {
20624	reqHeaders := make(http.Header)
20625	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20626	for k, v := range c.header_ {
20627		reqHeaders[k] = v
20628	}
20629	reqHeaders.Set("User-Agent", c.s.userAgent())
20630	var body io.Reader = nil
20631	c.urlParams_.Set("alt", alt)
20632	c.urlParams_.Set("prettyPrint", "false")
20633	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/twoStepVerification/turnOff")
20634	urls += "?" + c.urlParams_.Encode()
20635	req, err := http.NewRequest("POST", urls, body)
20636	if err != nil {
20637		return nil, err
20638	}
20639	req.Header = reqHeaders
20640	googleapi.Expand(req.URL, map[string]string{
20641		"userKey": c.userKey,
20642	})
20643	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20644}
20645
20646// Do executes the "directory.twoStepVerification.turnOff" call.
20647func (c *TwoStepVerificationTurnOffCall) Do(opts ...googleapi.CallOption) error {
20648	gensupport.SetOptions(c.urlParams_, opts...)
20649	res, err := c.doRequest("json")
20650	if err != nil {
20651		return err
20652	}
20653	defer googleapi.CloseBody(res)
20654	if err := googleapi.CheckResponse(res); err != nil {
20655		return err
20656	}
20657	return nil
20658	// {
20659	//   "description": "Turns off 2-Step Verification for user.",
20660	//   "flatPath": "admin/directory/v1/users/{userKey}/twoStepVerification/turnOff",
20661	//   "httpMethod": "POST",
20662	//   "id": "directory.twoStepVerification.turnOff",
20663	//   "parameterOrder": [
20664	//     "userKey"
20665	//   ],
20666	//   "parameters": {
20667	//     "userKey": {
20668	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20669	//       "location": "path",
20670	//       "required": true,
20671	//       "type": "string"
20672	//     }
20673	//   },
20674	//   "path": "admin/directory/v1/users/{userKey}/twoStepVerification/turnOff",
20675	//   "scopes": [
20676	//     "https://www.googleapis.com/auth/admin.directory.user.security"
20677	//   ]
20678	// }
20679
20680}
20681
20682// method id "directory.users.delete":
20683
20684type UsersDeleteCall struct {
20685	s          *Service
20686	userKey    string
20687	urlParams_ gensupport.URLParams
20688	ctx_       context.Context
20689	header_    http.Header
20690}
20691
20692// Delete: Deletes a user.
20693//
20694// - userKey: Identifies the user in the API request. The value can be
20695//   the user's primary email address, alias email address, or unique
20696//   user ID.
20697func (r *UsersService) Delete(userKey string) *UsersDeleteCall {
20698	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20699	c.userKey = userKey
20700	return c
20701}
20702
20703// Fields allows partial responses to be retrieved. See
20704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20705// for more information.
20706func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
20707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20708	return c
20709}
20710
20711// Context sets the context to be used in this call's Do method. Any
20712// pending HTTP request will be aborted if the provided context is
20713// canceled.
20714func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
20715	c.ctx_ = ctx
20716	return c
20717}
20718
20719// Header returns an http.Header that can be modified by the caller to
20720// add HTTP headers to the request.
20721func (c *UsersDeleteCall) Header() http.Header {
20722	if c.header_ == nil {
20723		c.header_ = make(http.Header)
20724	}
20725	return c.header_
20726}
20727
20728func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
20729	reqHeaders := make(http.Header)
20730	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20731	for k, v := range c.header_ {
20732		reqHeaders[k] = v
20733	}
20734	reqHeaders.Set("User-Agent", c.s.userAgent())
20735	var body io.Reader = nil
20736	c.urlParams_.Set("alt", alt)
20737	c.urlParams_.Set("prettyPrint", "false")
20738	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
20739	urls += "?" + c.urlParams_.Encode()
20740	req, err := http.NewRequest("DELETE", urls, body)
20741	if err != nil {
20742		return nil, err
20743	}
20744	req.Header = reqHeaders
20745	googleapi.Expand(req.URL, map[string]string{
20746		"userKey": c.userKey,
20747	})
20748	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20749}
20750
20751// Do executes the "directory.users.delete" call.
20752func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error {
20753	gensupport.SetOptions(c.urlParams_, opts...)
20754	res, err := c.doRequest("json")
20755	if err != nil {
20756		return err
20757	}
20758	defer googleapi.CloseBody(res)
20759	if err := googleapi.CheckResponse(res); err != nil {
20760		return err
20761	}
20762	return nil
20763	// {
20764	//   "description": "Deletes a user.",
20765	//   "flatPath": "admin/directory/v1/users/{userKey}",
20766	//   "httpMethod": "DELETE",
20767	//   "id": "directory.users.delete",
20768	//   "parameterOrder": [
20769	//     "userKey"
20770	//   ],
20771	//   "parameters": {
20772	//     "userKey": {
20773	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20774	//       "location": "path",
20775	//       "required": true,
20776	//       "type": "string"
20777	//     }
20778	//   },
20779	//   "path": "admin/directory/v1/users/{userKey}",
20780	//   "scopes": [
20781	//     "https://www.googleapis.com/auth/admin.directory.user"
20782	//   ]
20783	// }
20784
20785}
20786
20787// method id "directory.users.get":
20788
20789type UsersGetCall struct {
20790	s            *Service
20791	userKey      string
20792	urlParams_   gensupport.URLParams
20793	ifNoneMatch_ string
20794	ctx_         context.Context
20795	header_      http.Header
20796}
20797
20798// Get: Retrieves a user.
20799//
20800// - userKey: Identifies the user in the API request. The value can be
20801//   the user's primary email address, alias email address, or unique
20802//   user ID.
20803func (r *UsersService) Get(userKey string) *UsersGetCall {
20804	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20805	c.userKey = userKey
20806	return c
20807}
20808
20809// CustomFieldMask sets the optional parameter "customFieldMask": A
20810// comma-separated list of schema names. All fields from these schemas
20811// are fetched. This should only be set when `projection=custom`.
20812func (c *UsersGetCall) CustomFieldMask(customFieldMask string) *UsersGetCall {
20813	c.urlParams_.Set("customFieldMask", customFieldMask)
20814	return c
20815}
20816
20817// Projection sets the optional parameter "projection": What subset of
20818// fields to fetch for this user.
20819//
20820// Possible values:
20821//   "basic" (default) - Do not include any custom fields for the user.
20822//   "custom" - Include custom fields from schemas requested in
20823// `customFieldMask`.
20824//   "full" - Include all fields associated with this user.
20825func (c *UsersGetCall) Projection(projection string) *UsersGetCall {
20826	c.urlParams_.Set("projection", projection)
20827	return c
20828}
20829
20830// ViewType sets the optional parameter "viewType": Whether to fetch the
20831// administrator-only or domain-wide public view of the user. For more
20832// information, see Retrieve a user as a non-administrator
20833// (/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin)
20834// .
20835//
20836// Possible values:
20837//   "admin_view" (default) - Results include both administrator-only
20838// and domain-public fields for the user.
20839//   "domain_public" - Results only include fields for the user that are
20840// publicly visible to other users in the domain.
20841func (c *UsersGetCall) ViewType(viewType string) *UsersGetCall {
20842	c.urlParams_.Set("viewType", viewType)
20843	return c
20844}
20845
20846// Fields allows partial responses to be retrieved. See
20847// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20848// for more information.
20849func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
20850	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20851	return c
20852}
20853
20854// IfNoneMatch sets the optional parameter which makes the operation
20855// fail if the object's ETag matches the given value. This is useful for
20856// getting updates only after the object has changed since the last
20857// request. Use googleapi.IsNotModified to check whether the response
20858// error from Do is the result of In-None-Match.
20859func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
20860	c.ifNoneMatch_ = entityTag
20861	return c
20862}
20863
20864// Context sets the context to be used in this call's Do method. Any
20865// pending HTTP request will be aborted if the provided context is
20866// canceled.
20867func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
20868	c.ctx_ = ctx
20869	return c
20870}
20871
20872// Header returns an http.Header that can be modified by the caller to
20873// add HTTP headers to the request.
20874func (c *UsersGetCall) Header() http.Header {
20875	if c.header_ == nil {
20876		c.header_ = make(http.Header)
20877	}
20878	return c.header_
20879}
20880
20881func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
20882	reqHeaders := make(http.Header)
20883	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
20884	for k, v := range c.header_ {
20885		reqHeaders[k] = v
20886	}
20887	reqHeaders.Set("User-Agent", c.s.userAgent())
20888	if c.ifNoneMatch_ != "" {
20889		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20890	}
20891	var body io.Reader = nil
20892	c.urlParams_.Set("alt", alt)
20893	c.urlParams_.Set("prettyPrint", "false")
20894	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
20895	urls += "?" + c.urlParams_.Encode()
20896	req, err := http.NewRequest("GET", urls, body)
20897	if err != nil {
20898		return nil, err
20899	}
20900	req.Header = reqHeaders
20901	googleapi.Expand(req.URL, map[string]string{
20902		"userKey": c.userKey,
20903	})
20904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20905}
20906
20907// Do executes the "directory.users.get" call.
20908// Exactly one of *User or error will be non-nil. Any non-2xx status
20909// code is an error. Response headers are in either
20910// *User.ServerResponse.Header or (if a response was returned at all) in
20911// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20912// whether the returned error was because http.StatusNotModified was
20913// returned.
20914func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
20915	gensupport.SetOptions(c.urlParams_, opts...)
20916	res, err := c.doRequest("json")
20917	if res != nil && res.StatusCode == http.StatusNotModified {
20918		if res.Body != nil {
20919			res.Body.Close()
20920		}
20921		return nil, &googleapi.Error{
20922			Code:   res.StatusCode,
20923			Header: res.Header,
20924		}
20925	}
20926	if err != nil {
20927		return nil, err
20928	}
20929	defer googleapi.CloseBody(res)
20930	if err := googleapi.CheckResponse(res); err != nil {
20931		return nil, err
20932	}
20933	ret := &User{
20934		ServerResponse: googleapi.ServerResponse{
20935			Header:         res.Header,
20936			HTTPStatusCode: res.StatusCode,
20937		},
20938	}
20939	target := &ret
20940	if err := gensupport.DecodeResponse(target, res); err != nil {
20941		return nil, err
20942	}
20943	return ret, nil
20944	// {
20945	//   "description": "Retrieves a user.",
20946	//   "flatPath": "admin/directory/v1/users/{userKey}",
20947	//   "httpMethod": "GET",
20948	//   "id": "directory.users.get",
20949	//   "parameterOrder": [
20950	//     "userKey"
20951	//   ],
20952	//   "parameters": {
20953	//     "customFieldMask": {
20954	//       "description": "A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.",
20955	//       "location": "query",
20956	//       "type": "string"
20957	//     },
20958	//     "projection": {
20959	//       "default": "basic",
20960	//       "description": "What subset of fields to fetch for this user.",
20961	//       "enum": [
20962	//         "basic",
20963	//         "custom",
20964	//         "full"
20965	//       ],
20966	//       "enumDescriptions": [
20967	//         "Do not include any custom fields for the user.",
20968	//         "Include custom fields from schemas requested in `customFieldMask`.",
20969	//         "Include all fields associated with this user."
20970	//       ],
20971	//       "location": "query",
20972	//       "type": "string"
20973	//     },
20974	//     "userKey": {
20975	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
20976	//       "location": "path",
20977	//       "required": true,
20978	//       "type": "string"
20979	//     },
20980	//     "viewType": {
20981	//       "default": "admin_view",
20982	//       "description": "Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).",
20983	//       "enum": [
20984	//         "admin_view",
20985	//         "domain_public"
20986	//       ],
20987	//       "enumDescriptions": [
20988	//         "Results include both administrator-only and domain-public fields for the user.",
20989	//         "Results only include fields for the user that are publicly visible to other users in the domain."
20990	//       ],
20991	//       "location": "query",
20992	//       "type": "string"
20993	//     }
20994	//   },
20995	//   "path": "admin/directory/v1/users/{userKey}",
20996	//   "response": {
20997	//     "$ref": "User"
20998	//   },
20999	//   "scopes": [
21000	//     "https://www.googleapis.com/auth/admin.directory.user",
21001	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
21002	//   ]
21003	// }
21004
21005}
21006
21007// method id "directory.users.insert":
21008
21009type UsersInsertCall struct {
21010	s          *Service
21011	user       *User
21012	urlParams_ gensupport.URLParams
21013	ctx_       context.Context
21014	header_    http.Header
21015}
21016
21017// Insert: Creates a user.
21018func (r *UsersService) Insert(user *User) *UsersInsertCall {
21019	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21020	c.user = user
21021	return c
21022}
21023
21024// Fields allows partial responses to be retrieved. See
21025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21026// for more information.
21027func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
21028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21029	return c
21030}
21031
21032// Context sets the context to be used in this call's Do method. Any
21033// pending HTTP request will be aborted if the provided context is
21034// canceled.
21035func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
21036	c.ctx_ = ctx
21037	return c
21038}
21039
21040// Header returns an http.Header that can be modified by the caller to
21041// add HTTP headers to the request.
21042func (c *UsersInsertCall) Header() http.Header {
21043	if c.header_ == nil {
21044		c.header_ = make(http.Header)
21045	}
21046	return c.header_
21047}
21048
21049func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
21050	reqHeaders := make(http.Header)
21051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21052	for k, v := range c.header_ {
21053		reqHeaders[k] = v
21054	}
21055	reqHeaders.Set("User-Agent", c.s.userAgent())
21056	var body io.Reader = nil
21057	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
21058	if err != nil {
21059		return nil, err
21060	}
21061	reqHeaders.Set("Content-Type", "application/json")
21062	c.urlParams_.Set("alt", alt)
21063	c.urlParams_.Set("prettyPrint", "false")
21064	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users")
21065	urls += "?" + c.urlParams_.Encode()
21066	req, err := http.NewRequest("POST", urls, body)
21067	if err != nil {
21068		return nil, err
21069	}
21070	req.Header = reqHeaders
21071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21072}
21073
21074// Do executes the "directory.users.insert" call.
21075// Exactly one of *User or error will be non-nil. Any non-2xx status
21076// code is an error. Response headers are in either
21077// *User.ServerResponse.Header or (if a response was returned at all) in
21078// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21079// whether the returned error was because http.StatusNotModified was
21080// returned.
21081func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) {
21082	gensupport.SetOptions(c.urlParams_, opts...)
21083	res, err := c.doRequest("json")
21084	if res != nil && res.StatusCode == http.StatusNotModified {
21085		if res.Body != nil {
21086			res.Body.Close()
21087		}
21088		return nil, &googleapi.Error{
21089			Code:   res.StatusCode,
21090			Header: res.Header,
21091		}
21092	}
21093	if err != nil {
21094		return nil, err
21095	}
21096	defer googleapi.CloseBody(res)
21097	if err := googleapi.CheckResponse(res); err != nil {
21098		return nil, err
21099	}
21100	ret := &User{
21101		ServerResponse: googleapi.ServerResponse{
21102			Header:         res.Header,
21103			HTTPStatusCode: res.StatusCode,
21104		},
21105	}
21106	target := &ret
21107	if err := gensupport.DecodeResponse(target, res); err != nil {
21108		return nil, err
21109	}
21110	return ret, nil
21111	// {
21112	//   "description": "Creates a user.",
21113	//   "flatPath": "admin/directory/v1/users",
21114	//   "httpMethod": "POST",
21115	//   "id": "directory.users.insert",
21116	//   "parameterOrder": [],
21117	//   "parameters": {},
21118	//   "path": "admin/directory/v1/users",
21119	//   "request": {
21120	//     "$ref": "User"
21121	//   },
21122	//   "response": {
21123	//     "$ref": "User"
21124	//   },
21125	//   "scopes": [
21126	//     "https://www.googleapis.com/auth/admin.directory.user"
21127	//   ]
21128	// }
21129
21130}
21131
21132// method id "directory.users.list":
21133
21134type UsersListCall struct {
21135	s            *Service
21136	urlParams_   gensupport.URLParams
21137	ifNoneMatch_ string
21138	ctx_         context.Context
21139	header_      http.Header
21140}
21141
21142// List: Retrieves a paginated list of either deleted users or all users
21143// in a domain.
21144func (r *UsersService) List() *UsersListCall {
21145	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21146	return c
21147}
21148
21149// CustomFieldMask sets the optional parameter "customFieldMask": A
21150// comma-separated list of schema names. All fields from these schemas
21151// are fetched. This should only be set when `projection=custom`.
21152func (c *UsersListCall) CustomFieldMask(customFieldMask string) *UsersListCall {
21153	c.urlParams_.Set("customFieldMask", customFieldMask)
21154	return c
21155}
21156
21157// Customer sets the optional parameter "customer": The unique ID for
21158// the customer's Google Workspace account. In case of a multi-domain
21159// account, to fetch all groups for a customer, fill this field instead
21160// of domain. You can also use the `my_customer` alias to represent your
21161// account's `customerId`. The `customerId` is also returned as part of
21162// the Users resource (/admin-sdk/directory/v1/reference/users). Either
21163// the `customer` or the `domain` parameter must be provided.
21164func (c *UsersListCall) Customer(customer string) *UsersListCall {
21165	c.urlParams_.Set("customer", customer)
21166	return c
21167}
21168
21169// Domain sets the optional parameter "domain": The domain name. Use
21170// this field to get fields from only one domain. To return all domains
21171// for a customer account, use the `customer` query parameter instead.
21172// Either the `customer` or the `domain` parameter must be provided.
21173func (c *UsersListCall) Domain(domain string) *UsersListCall {
21174	c.urlParams_.Set("domain", domain)
21175	return c
21176}
21177
21178// Event sets the optional parameter "event": Event on which
21179// subscription is intended (if subscribing)
21180//
21181// Possible values:
21182//   "add" - User Created Event
21183//   "delete" - User Deleted Event
21184//   "makeAdmin" - User Admin Status Change Event
21185//   "undelete" - User Undeleted Event
21186//   "update" - User Updated Event
21187func (c *UsersListCall) Event(event string) *UsersListCall {
21188	c.urlParams_.Set("event", event)
21189	return c
21190}
21191
21192// MaxResults sets the optional parameter "maxResults": Maximum number
21193// of results to return.
21194func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall {
21195	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21196	return c
21197}
21198
21199// OrderBy sets the optional parameter "orderBy": Property to use for
21200// sorting results.
21201//
21202// Possible values:
21203//   "email" - Primary email of the user.
21204//   "familyName" - User's family name.
21205//   "givenName" - User's given name.
21206func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall {
21207	c.urlParams_.Set("orderBy", orderBy)
21208	return c
21209}
21210
21211// PageToken sets the optional parameter "pageToken": Token to specify
21212// next page in the list
21213func (c *UsersListCall) PageToken(pageToken string) *UsersListCall {
21214	c.urlParams_.Set("pageToken", pageToken)
21215	return c
21216}
21217
21218// Projection sets the optional parameter "projection": What subset of
21219// fields to fetch for this user.
21220//
21221// Possible values:
21222//   "basic" (default) - Do not include any custom fields for the user.
21223//   "custom" - Include custom fields from schemas requested in
21224// `customFieldMask`.
21225//   "full" - Include all fields associated with this user.
21226func (c *UsersListCall) Projection(projection string) *UsersListCall {
21227	c.urlParams_.Set("projection", projection)
21228	return c
21229}
21230
21231// Query sets the optional parameter "query": Query string for searching
21232// user fields. For more information on constructing user queries, see
21233// Search for Users (/admin-sdk/directory/v1/guides/search-users).
21234func (c *UsersListCall) Query(query string) *UsersListCall {
21235	c.urlParams_.Set("query", query)
21236	return c
21237}
21238
21239// ShowDeleted sets the optional parameter "showDeleted": If set to
21240// `true`, retrieves the list of deleted users. (Default: `false`)
21241func (c *UsersListCall) ShowDeleted(showDeleted string) *UsersListCall {
21242	c.urlParams_.Set("showDeleted", showDeleted)
21243	return c
21244}
21245
21246// SortOrder sets the optional parameter "sortOrder": Whether to return
21247// results in ascending or descending order.
21248//
21249// Possible values:
21250//   "ASCENDING" - Ascending order.
21251//   "DESCENDING" - Descending order.
21252func (c *UsersListCall) SortOrder(sortOrder string) *UsersListCall {
21253	c.urlParams_.Set("sortOrder", sortOrder)
21254	return c
21255}
21256
21257// ViewType sets the optional parameter "viewType": Whether to fetch the
21258// administrator-only or domain-wide public view of the user. For more
21259// information, see Retrieve a user as a non-administrator
21260// (/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin)
21261// .
21262//
21263// Possible values:
21264//   "admin_view" (default) - Results include both administrator-only
21265// and domain-public fields for the user.
21266//   "domain_public" - Results only include fields for the user that are
21267// publicly visible to other users in the domain.
21268func (c *UsersListCall) ViewType(viewType string) *UsersListCall {
21269	c.urlParams_.Set("viewType", viewType)
21270	return c
21271}
21272
21273// Fields allows partial responses to be retrieved. See
21274// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21275// for more information.
21276func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
21277	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21278	return c
21279}
21280
21281// IfNoneMatch sets the optional parameter which makes the operation
21282// fail if the object's ETag matches the given value. This is useful for
21283// getting updates only after the object has changed since the last
21284// request. Use googleapi.IsNotModified to check whether the response
21285// error from Do is the result of In-None-Match.
21286func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
21287	c.ifNoneMatch_ = entityTag
21288	return c
21289}
21290
21291// Context sets the context to be used in this call's Do method. Any
21292// pending HTTP request will be aborted if the provided context is
21293// canceled.
21294func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
21295	c.ctx_ = ctx
21296	return c
21297}
21298
21299// Header returns an http.Header that can be modified by the caller to
21300// add HTTP headers to the request.
21301func (c *UsersListCall) Header() http.Header {
21302	if c.header_ == nil {
21303		c.header_ = make(http.Header)
21304	}
21305	return c.header_
21306}
21307
21308func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
21309	reqHeaders := make(http.Header)
21310	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21311	for k, v := range c.header_ {
21312		reqHeaders[k] = v
21313	}
21314	reqHeaders.Set("User-Agent", c.s.userAgent())
21315	if c.ifNoneMatch_ != "" {
21316		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21317	}
21318	var body io.Reader = nil
21319	c.urlParams_.Set("alt", alt)
21320	c.urlParams_.Set("prettyPrint", "false")
21321	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users")
21322	urls += "?" + c.urlParams_.Encode()
21323	req, err := http.NewRequest("GET", urls, body)
21324	if err != nil {
21325		return nil, err
21326	}
21327	req.Header = reqHeaders
21328	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21329}
21330
21331// Do executes the "directory.users.list" call.
21332// Exactly one of *Users or error will be non-nil. Any non-2xx status
21333// code is an error. Response headers are in either
21334// *Users.ServerResponse.Header or (if a response was returned at all)
21335// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
21336// check whether the returned error was because http.StatusNotModified
21337// was returned.
21338func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*Users, error) {
21339	gensupport.SetOptions(c.urlParams_, opts...)
21340	res, err := c.doRequest("json")
21341	if res != nil && res.StatusCode == http.StatusNotModified {
21342		if res.Body != nil {
21343			res.Body.Close()
21344		}
21345		return nil, &googleapi.Error{
21346			Code:   res.StatusCode,
21347			Header: res.Header,
21348		}
21349	}
21350	if err != nil {
21351		return nil, err
21352	}
21353	defer googleapi.CloseBody(res)
21354	if err := googleapi.CheckResponse(res); err != nil {
21355		return nil, err
21356	}
21357	ret := &Users{
21358		ServerResponse: googleapi.ServerResponse{
21359			Header:         res.Header,
21360			HTTPStatusCode: res.StatusCode,
21361		},
21362	}
21363	target := &ret
21364	if err := gensupport.DecodeResponse(target, res); err != nil {
21365		return nil, err
21366	}
21367	return ret, nil
21368	// {
21369	//   "description": "Retrieves a paginated list of either deleted users or all users in a domain.",
21370	//   "flatPath": "admin/directory/v1/users",
21371	//   "httpMethod": "GET",
21372	//   "id": "directory.users.list",
21373	//   "parameterOrder": [],
21374	//   "parameters": {
21375	//     "customFieldMask": {
21376	//       "description": "A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when `projection=custom`.",
21377	//       "location": "query",
21378	//       "type": "string"
21379	//     },
21380	//     "customer": {
21381	//       "description": "The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). Either the `customer` or the `domain` parameter must be provided.",
21382	//       "location": "query",
21383	//       "type": "string"
21384	//     },
21385	//     "domain": {
21386	//       "description": "The domain name. Use this field to get fields from only one domain. To return all domains for a customer account, use the `customer` query parameter instead. Either the `customer` or the `domain` parameter must be provided.",
21387	//       "location": "query",
21388	//       "type": "string"
21389	//     },
21390	//     "event": {
21391	//       "description": "Event on which subscription is intended (if subscribing)",
21392	//       "enum": [
21393	//         "add",
21394	//         "delete",
21395	//         "makeAdmin",
21396	//         "undelete",
21397	//         "update"
21398	//       ],
21399	//       "enumDescriptions": [
21400	//         "User Created Event",
21401	//         "User Deleted Event",
21402	//         "User Admin Status Change Event",
21403	//         "User Undeleted Event",
21404	//         "User Updated Event"
21405	//       ],
21406	//       "location": "query",
21407	//       "type": "string"
21408	//     },
21409	//     "maxResults": {
21410	//       "default": "100",
21411	//       "description": "Maximum number of results to return.",
21412	//       "format": "int32",
21413	//       "location": "query",
21414	//       "maximum": "500",
21415	//       "minimum": "1",
21416	//       "type": "integer"
21417	//     },
21418	//     "orderBy": {
21419	//       "description": "Property to use for sorting results.",
21420	//       "enum": [
21421	//         "email",
21422	//         "familyName",
21423	//         "givenName"
21424	//       ],
21425	//       "enumDescriptions": [
21426	//         "Primary email of the user.",
21427	//         "User's family name.",
21428	//         "User's given name."
21429	//       ],
21430	//       "location": "query",
21431	//       "type": "string"
21432	//     },
21433	//     "pageToken": {
21434	//       "description": "Token to specify next page in the list",
21435	//       "location": "query",
21436	//       "type": "string"
21437	//     },
21438	//     "projection": {
21439	//       "default": "basic",
21440	//       "description": "What subset of fields to fetch for this user.",
21441	//       "enum": [
21442	//         "basic",
21443	//         "custom",
21444	//         "full"
21445	//       ],
21446	//       "enumDescriptions": [
21447	//         "Do not include any custom fields for the user.",
21448	//         "Include custom fields from schemas requested in `customFieldMask`.",
21449	//         "Include all fields associated with this user."
21450	//       ],
21451	//       "location": "query",
21452	//       "type": "string"
21453	//     },
21454	//     "query": {
21455	//       "description": "Query string for searching user fields. For more information on constructing user queries, see [Search for Users](/admin-sdk/directory/v1/guides/search-users).",
21456	//       "location": "query",
21457	//       "type": "string"
21458	//     },
21459	//     "showDeleted": {
21460	//       "description": "If set to `true`, retrieves the list of deleted users. (Default: `false`)",
21461	//       "location": "query",
21462	//       "type": "string"
21463	//     },
21464	//     "sortOrder": {
21465	//       "description": "Whether to return results in ascending or descending order.",
21466	//       "enum": [
21467	//         "ASCENDING",
21468	//         "DESCENDING"
21469	//       ],
21470	//       "enumDescriptions": [
21471	//         "Ascending order.",
21472	//         "Descending order."
21473	//       ],
21474	//       "location": "query",
21475	//       "type": "string"
21476	//     },
21477	//     "viewType": {
21478	//       "default": "admin_view",
21479	//       "description": "Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).",
21480	//       "enum": [
21481	//         "admin_view",
21482	//         "domain_public"
21483	//       ],
21484	//       "enumDescriptions": [
21485	//         "Results include both administrator-only and domain-public fields for the user.",
21486	//         "Results only include fields for the user that are publicly visible to other users in the domain."
21487	//       ],
21488	//       "location": "query",
21489	//       "type": "string"
21490	//     }
21491	//   },
21492	//   "path": "admin/directory/v1/users",
21493	//   "response": {
21494	//     "$ref": "Users"
21495	//   },
21496	//   "scopes": [
21497	//     "https://www.googleapis.com/auth/admin.directory.user",
21498	//     "https://www.googleapis.com/auth/admin.directory.user.readonly",
21499	//     "https://www.googleapis.com/auth/cloud-platform"
21500	//   ]
21501	// }
21502
21503}
21504
21505// Pages invokes f for each page of results.
21506// A non-nil error returned from f will halt the iteration.
21507// The provided context supersedes any context provided to the Context method.
21508func (c *UsersListCall) Pages(ctx context.Context, f func(*Users) error) error {
21509	c.ctx_ = ctx
21510	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21511	for {
21512		x, err := c.Do()
21513		if err != nil {
21514			return err
21515		}
21516		if err := f(x); err != nil {
21517			return err
21518		}
21519		if x.NextPageToken == "" {
21520			return nil
21521		}
21522		c.PageToken(x.NextPageToken)
21523	}
21524}
21525
21526// method id "directory.users.makeAdmin":
21527
21528type UsersMakeAdminCall struct {
21529	s             *Service
21530	userKey       string
21531	usermakeadmin *UserMakeAdmin
21532	urlParams_    gensupport.URLParams
21533	ctx_          context.Context
21534	header_       http.Header
21535}
21536
21537// MakeAdmin: Makes a user a super administrator.
21538//
21539// - userKey: Identifies the user in the API request. The value can be
21540//   the user's primary email address, alias email address, or unique
21541//   user ID.
21542func (r *UsersService) MakeAdmin(userKey string, usermakeadmin *UserMakeAdmin) *UsersMakeAdminCall {
21543	c := &UsersMakeAdminCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21544	c.userKey = userKey
21545	c.usermakeadmin = usermakeadmin
21546	return c
21547}
21548
21549// Fields allows partial responses to be retrieved. See
21550// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21551// for more information.
21552func (c *UsersMakeAdminCall) Fields(s ...googleapi.Field) *UsersMakeAdminCall {
21553	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21554	return c
21555}
21556
21557// Context sets the context to be used in this call's Do method. Any
21558// pending HTTP request will be aborted if the provided context is
21559// canceled.
21560func (c *UsersMakeAdminCall) Context(ctx context.Context) *UsersMakeAdminCall {
21561	c.ctx_ = ctx
21562	return c
21563}
21564
21565// Header returns an http.Header that can be modified by the caller to
21566// add HTTP headers to the request.
21567func (c *UsersMakeAdminCall) Header() http.Header {
21568	if c.header_ == nil {
21569		c.header_ = make(http.Header)
21570	}
21571	return c.header_
21572}
21573
21574func (c *UsersMakeAdminCall) doRequest(alt string) (*http.Response, error) {
21575	reqHeaders := make(http.Header)
21576	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21577	for k, v := range c.header_ {
21578		reqHeaders[k] = v
21579	}
21580	reqHeaders.Set("User-Agent", c.s.userAgent())
21581	var body io.Reader = nil
21582	body, err := googleapi.WithoutDataWrapper.JSONReader(c.usermakeadmin)
21583	if err != nil {
21584		return nil, err
21585	}
21586	reqHeaders.Set("Content-Type", "application/json")
21587	c.urlParams_.Set("alt", alt)
21588	c.urlParams_.Set("prettyPrint", "false")
21589	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/makeAdmin")
21590	urls += "?" + c.urlParams_.Encode()
21591	req, err := http.NewRequest("POST", urls, body)
21592	if err != nil {
21593		return nil, err
21594	}
21595	req.Header = reqHeaders
21596	googleapi.Expand(req.URL, map[string]string{
21597		"userKey": c.userKey,
21598	})
21599	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21600}
21601
21602// Do executes the "directory.users.makeAdmin" call.
21603func (c *UsersMakeAdminCall) Do(opts ...googleapi.CallOption) error {
21604	gensupport.SetOptions(c.urlParams_, opts...)
21605	res, err := c.doRequest("json")
21606	if err != nil {
21607		return err
21608	}
21609	defer googleapi.CloseBody(res)
21610	if err := googleapi.CheckResponse(res); err != nil {
21611		return err
21612	}
21613	return nil
21614	// {
21615	//   "description": "Makes a user a super administrator.",
21616	//   "flatPath": "admin/directory/v1/users/{userKey}/makeAdmin",
21617	//   "httpMethod": "POST",
21618	//   "id": "directory.users.makeAdmin",
21619	//   "parameterOrder": [
21620	//     "userKey"
21621	//   ],
21622	//   "parameters": {
21623	//     "userKey": {
21624	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
21625	//       "location": "path",
21626	//       "required": true,
21627	//       "type": "string"
21628	//     }
21629	//   },
21630	//   "path": "admin/directory/v1/users/{userKey}/makeAdmin",
21631	//   "request": {
21632	//     "$ref": "UserMakeAdmin"
21633	//   },
21634	//   "scopes": [
21635	//     "https://www.googleapis.com/auth/admin.directory.user"
21636	//   ]
21637	// }
21638
21639}
21640
21641// method id "directory.users.patch":
21642
21643type UsersPatchCall struct {
21644	s          *Service
21645	userKey    string
21646	user       *User
21647	urlParams_ gensupport.URLParams
21648	ctx_       context.Context
21649	header_    http.Header
21650}
21651
21652// Patch: Updates a user using patch semantics. The update method should
21653// be used instead, since it also supports patch semantics and has
21654// better performance. This method is unable to clear fields that
21655// contain repeated objects (`addresses`, `phones`, etc). Use the update
21656// method instead.
21657//
21658// - userKey: Identifies the user in the API request. The value can be
21659//   the user's primary email address, alias email address, or unique
21660//   user ID.
21661func (r *UsersService) Patch(userKey string, user *User) *UsersPatchCall {
21662	c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21663	c.userKey = userKey
21664	c.user = user
21665	return c
21666}
21667
21668// Fields allows partial responses to be retrieved. See
21669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21670// for more information.
21671func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall {
21672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21673	return c
21674}
21675
21676// Context sets the context to be used in this call's Do method. Any
21677// pending HTTP request will be aborted if the provided context is
21678// canceled.
21679func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
21680	c.ctx_ = ctx
21681	return c
21682}
21683
21684// Header returns an http.Header that can be modified by the caller to
21685// add HTTP headers to the request.
21686func (c *UsersPatchCall) Header() http.Header {
21687	if c.header_ == nil {
21688		c.header_ = make(http.Header)
21689	}
21690	return c.header_
21691}
21692
21693func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
21694	reqHeaders := make(http.Header)
21695	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21696	for k, v := range c.header_ {
21697		reqHeaders[k] = v
21698	}
21699	reqHeaders.Set("User-Agent", c.s.userAgent())
21700	var body io.Reader = nil
21701	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
21702	if err != nil {
21703		return nil, err
21704	}
21705	reqHeaders.Set("Content-Type", "application/json")
21706	c.urlParams_.Set("alt", alt)
21707	c.urlParams_.Set("prettyPrint", "false")
21708	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
21709	urls += "?" + c.urlParams_.Encode()
21710	req, err := http.NewRequest("PATCH", urls, body)
21711	if err != nil {
21712		return nil, err
21713	}
21714	req.Header = reqHeaders
21715	googleapi.Expand(req.URL, map[string]string{
21716		"userKey": c.userKey,
21717	})
21718	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21719}
21720
21721// Do executes the "directory.users.patch" call.
21722// Exactly one of *User or error will be non-nil. Any non-2xx status
21723// code is an error. Response headers are in either
21724// *User.ServerResponse.Header or (if a response was returned at all) in
21725// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21726// whether the returned error was because http.StatusNotModified was
21727// returned.
21728func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) {
21729	gensupport.SetOptions(c.urlParams_, opts...)
21730	res, err := c.doRequest("json")
21731	if res != nil && res.StatusCode == http.StatusNotModified {
21732		if res.Body != nil {
21733			res.Body.Close()
21734		}
21735		return nil, &googleapi.Error{
21736			Code:   res.StatusCode,
21737			Header: res.Header,
21738		}
21739	}
21740	if err != nil {
21741		return nil, err
21742	}
21743	defer googleapi.CloseBody(res)
21744	if err := googleapi.CheckResponse(res); err != nil {
21745		return nil, err
21746	}
21747	ret := &User{
21748		ServerResponse: googleapi.ServerResponse{
21749			Header:         res.Header,
21750			HTTPStatusCode: res.StatusCode,
21751		},
21752	}
21753	target := &ret
21754	if err := gensupport.DecodeResponse(target, res); err != nil {
21755		return nil, err
21756	}
21757	return ret, nil
21758	// {
21759	//   "description": "Updates a user using patch semantics. The update method should be used instead, since it also supports patch semantics and has better performance. This method is unable to clear fields that contain repeated objects (`addresses`, `phones`, etc). Use the update method instead.",
21760	//   "flatPath": "admin/directory/v1/users/{userKey}",
21761	//   "httpMethod": "PATCH",
21762	//   "id": "directory.users.patch",
21763	//   "parameterOrder": [
21764	//     "userKey"
21765	//   ],
21766	//   "parameters": {
21767	//     "userKey": {
21768	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
21769	//       "location": "path",
21770	//       "required": true,
21771	//       "type": "string"
21772	//     }
21773	//   },
21774	//   "path": "admin/directory/v1/users/{userKey}",
21775	//   "request": {
21776	//     "$ref": "User"
21777	//   },
21778	//   "response": {
21779	//     "$ref": "User"
21780	//   },
21781	//   "scopes": [
21782	//     "https://www.googleapis.com/auth/admin.directory.user"
21783	//   ]
21784	// }
21785
21786}
21787
21788// method id "directory.users.signOut":
21789
21790type UsersSignOutCall struct {
21791	s          *Service
21792	userKey    string
21793	urlParams_ gensupport.URLParams
21794	ctx_       context.Context
21795	header_    http.Header
21796}
21797
21798// SignOut: Signs a user out of all web and device sessions and reset
21799// their sign-in cookies. User will have to sign in by authenticating
21800// again.
21801//
21802// - userKey: Identifies the target user in the API request. The value
21803//   can be the user's primary email address, alias email address, or
21804//   unique user ID.
21805func (r *UsersService) SignOut(userKey string) *UsersSignOutCall {
21806	c := &UsersSignOutCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21807	c.userKey = userKey
21808	return c
21809}
21810
21811// Fields allows partial responses to be retrieved. See
21812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21813// for more information.
21814func (c *UsersSignOutCall) Fields(s ...googleapi.Field) *UsersSignOutCall {
21815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21816	return c
21817}
21818
21819// Context sets the context to be used in this call's Do method. Any
21820// pending HTTP request will be aborted if the provided context is
21821// canceled.
21822func (c *UsersSignOutCall) Context(ctx context.Context) *UsersSignOutCall {
21823	c.ctx_ = ctx
21824	return c
21825}
21826
21827// Header returns an http.Header that can be modified by the caller to
21828// add HTTP headers to the request.
21829func (c *UsersSignOutCall) Header() http.Header {
21830	if c.header_ == nil {
21831		c.header_ = make(http.Header)
21832	}
21833	return c.header_
21834}
21835
21836func (c *UsersSignOutCall) doRequest(alt string) (*http.Response, error) {
21837	reqHeaders := make(http.Header)
21838	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21839	for k, v := range c.header_ {
21840		reqHeaders[k] = v
21841	}
21842	reqHeaders.Set("User-Agent", c.s.userAgent())
21843	var body io.Reader = nil
21844	c.urlParams_.Set("alt", alt)
21845	c.urlParams_.Set("prettyPrint", "false")
21846	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/signOut")
21847	urls += "?" + c.urlParams_.Encode()
21848	req, err := http.NewRequest("POST", urls, body)
21849	if err != nil {
21850		return nil, err
21851	}
21852	req.Header = reqHeaders
21853	googleapi.Expand(req.URL, map[string]string{
21854		"userKey": c.userKey,
21855	})
21856	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21857}
21858
21859// Do executes the "directory.users.signOut" call.
21860func (c *UsersSignOutCall) Do(opts ...googleapi.CallOption) error {
21861	gensupport.SetOptions(c.urlParams_, opts...)
21862	res, err := c.doRequest("json")
21863	if err != nil {
21864		return err
21865	}
21866	defer googleapi.CloseBody(res)
21867	if err := googleapi.CheckResponse(res); err != nil {
21868		return err
21869	}
21870	return nil
21871	// {
21872	//   "description": "Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.",
21873	//   "flatPath": "admin/directory/v1/users/{userKey}/signOut",
21874	//   "httpMethod": "POST",
21875	//   "id": "directory.users.signOut",
21876	//   "parameterOrder": [
21877	//     "userKey"
21878	//   ],
21879	//   "parameters": {
21880	//     "userKey": {
21881	//       "description": "Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
21882	//       "location": "path",
21883	//       "required": true,
21884	//       "type": "string"
21885	//     }
21886	//   },
21887	//   "path": "admin/directory/v1/users/{userKey}/signOut",
21888	//   "scopes": [
21889	//     "https://www.googleapis.com/auth/admin.directory.user.security"
21890	//   ]
21891	// }
21892
21893}
21894
21895// method id "directory.users.undelete":
21896
21897type UsersUndeleteCall struct {
21898	s            *Service
21899	userKey      string
21900	userundelete *UserUndelete
21901	urlParams_   gensupport.URLParams
21902	ctx_         context.Context
21903	header_      http.Header
21904}
21905
21906// Undelete: Undeletes a deleted user.
21907//
21908// - userKey: The immutable id of the user.
21909func (r *UsersService) Undelete(userKey string, userundelete *UserUndelete) *UsersUndeleteCall {
21910	c := &UsersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21911	c.userKey = userKey
21912	c.userundelete = userundelete
21913	return c
21914}
21915
21916// Fields allows partial responses to be retrieved. See
21917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21918// for more information.
21919func (c *UsersUndeleteCall) Fields(s ...googleapi.Field) *UsersUndeleteCall {
21920	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21921	return c
21922}
21923
21924// Context sets the context to be used in this call's Do method. Any
21925// pending HTTP request will be aborted if the provided context is
21926// canceled.
21927func (c *UsersUndeleteCall) Context(ctx context.Context) *UsersUndeleteCall {
21928	c.ctx_ = ctx
21929	return c
21930}
21931
21932// Header returns an http.Header that can be modified by the caller to
21933// add HTTP headers to the request.
21934func (c *UsersUndeleteCall) Header() http.Header {
21935	if c.header_ == nil {
21936		c.header_ = make(http.Header)
21937	}
21938	return c.header_
21939}
21940
21941func (c *UsersUndeleteCall) doRequest(alt string) (*http.Response, error) {
21942	reqHeaders := make(http.Header)
21943	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
21944	for k, v := range c.header_ {
21945		reqHeaders[k] = v
21946	}
21947	reqHeaders.Set("User-Agent", c.s.userAgent())
21948	var body io.Reader = nil
21949	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userundelete)
21950	if err != nil {
21951		return nil, err
21952	}
21953	reqHeaders.Set("Content-Type", "application/json")
21954	c.urlParams_.Set("alt", alt)
21955	c.urlParams_.Set("prettyPrint", "false")
21956	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/undelete")
21957	urls += "?" + c.urlParams_.Encode()
21958	req, err := http.NewRequest("POST", urls, body)
21959	if err != nil {
21960		return nil, err
21961	}
21962	req.Header = reqHeaders
21963	googleapi.Expand(req.URL, map[string]string{
21964		"userKey": c.userKey,
21965	})
21966	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21967}
21968
21969// Do executes the "directory.users.undelete" call.
21970func (c *UsersUndeleteCall) Do(opts ...googleapi.CallOption) error {
21971	gensupport.SetOptions(c.urlParams_, opts...)
21972	res, err := c.doRequest("json")
21973	if err != nil {
21974		return err
21975	}
21976	defer googleapi.CloseBody(res)
21977	if err := googleapi.CheckResponse(res); err != nil {
21978		return err
21979	}
21980	return nil
21981	// {
21982	//   "description": "Undeletes a deleted user.",
21983	//   "flatPath": "admin/directory/v1/users/{userKey}/undelete",
21984	//   "httpMethod": "POST",
21985	//   "id": "directory.users.undelete",
21986	//   "parameterOrder": [
21987	//     "userKey"
21988	//   ],
21989	//   "parameters": {
21990	//     "userKey": {
21991	//       "description": "The immutable id of the user",
21992	//       "location": "path",
21993	//       "required": true,
21994	//       "type": "string"
21995	//     }
21996	//   },
21997	//   "path": "admin/directory/v1/users/{userKey}/undelete",
21998	//   "request": {
21999	//     "$ref": "UserUndelete"
22000	//   },
22001	//   "scopes": [
22002	//     "https://www.googleapis.com/auth/admin.directory.user"
22003	//   ]
22004	// }
22005
22006}
22007
22008// method id "directory.users.update":
22009
22010type UsersUpdateCall struct {
22011	s          *Service
22012	userKey    string
22013	user       *User
22014	urlParams_ gensupport.URLParams
22015	ctx_       context.Context
22016	header_    http.Header
22017}
22018
22019// Update: Updates a user. This method supports patch semantics, meaning
22020// you only need to include the fields you wish to update. Fields that
22021// are not present in the request will be preserved, and fields set to
22022// `null` will be cleared.
22023//
22024// - userKey: Identifies the user in the API request. The value can be
22025//   the user's primary email address, alias email address, or unique
22026//   user ID.
22027func (r *UsersService) Update(userKey string, user *User) *UsersUpdateCall {
22028	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22029	c.userKey = userKey
22030	c.user = user
22031	return c
22032}
22033
22034// Fields allows partial responses to be retrieved. See
22035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22036// for more information.
22037func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
22038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22039	return c
22040}
22041
22042// Context sets the context to be used in this call's Do method. Any
22043// pending HTTP request will be aborted if the provided context is
22044// canceled.
22045func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
22046	c.ctx_ = ctx
22047	return c
22048}
22049
22050// Header returns an http.Header that can be modified by the caller to
22051// add HTTP headers to the request.
22052func (c *UsersUpdateCall) Header() http.Header {
22053	if c.header_ == nil {
22054		c.header_ = make(http.Header)
22055	}
22056	return c.header_
22057}
22058
22059func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
22060	reqHeaders := make(http.Header)
22061	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
22062	for k, v := range c.header_ {
22063		reqHeaders[k] = v
22064	}
22065	reqHeaders.Set("User-Agent", c.s.userAgent())
22066	var body io.Reader = nil
22067	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
22068	if err != nil {
22069		return nil, err
22070	}
22071	reqHeaders.Set("Content-Type", "application/json")
22072	c.urlParams_.Set("alt", alt)
22073	c.urlParams_.Set("prettyPrint", "false")
22074	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}")
22075	urls += "?" + c.urlParams_.Encode()
22076	req, err := http.NewRequest("PUT", urls, body)
22077	if err != nil {
22078		return nil, err
22079	}
22080	req.Header = reqHeaders
22081	googleapi.Expand(req.URL, map[string]string{
22082		"userKey": c.userKey,
22083	})
22084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22085}
22086
22087// Do executes the "directory.users.update" call.
22088// Exactly one of *User or error will be non-nil. Any non-2xx status
22089// code is an error. Response headers are in either
22090// *User.ServerResponse.Header or (if a response was returned at all) in
22091// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
22092// whether the returned error was because http.StatusNotModified was
22093// returned.
22094func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) {
22095	gensupport.SetOptions(c.urlParams_, opts...)
22096	res, err := c.doRequest("json")
22097	if res != nil && res.StatusCode == http.StatusNotModified {
22098		if res.Body != nil {
22099			res.Body.Close()
22100		}
22101		return nil, &googleapi.Error{
22102			Code:   res.StatusCode,
22103			Header: res.Header,
22104		}
22105	}
22106	if err != nil {
22107		return nil, err
22108	}
22109	defer googleapi.CloseBody(res)
22110	if err := googleapi.CheckResponse(res); err != nil {
22111		return nil, err
22112	}
22113	ret := &User{
22114		ServerResponse: googleapi.ServerResponse{
22115			Header:         res.Header,
22116			HTTPStatusCode: res.StatusCode,
22117		},
22118	}
22119	target := &ret
22120	if err := gensupport.DecodeResponse(target, res); err != nil {
22121		return nil, err
22122	}
22123	return ret, nil
22124	// {
22125	//   "description": "Updates a user. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to `null` will be cleared.",
22126	//   "flatPath": "admin/directory/v1/users/{userKey}",
22127	//   "httpMethod": "PUT",
22128	//   "id": "directory.users.update",
22129	//   "parameterOrder": [
22130	//     "userKey"
22131	//   ],
22132	//   "parameters": {
22133	//     "userKey": {
22134	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
22135	//       "location": "path",
22136	//       "required": true,
22137	//       "type": "string"
22138	//     }
22139	//   },
22140	//   "path": "admin/directory/v1/users/{userKey}",
22141	//   "request": {
22142	//     "$ref": "User"
22143	//   },
22144	//   "response": {
22145	//     "$ref": "User"
22146	//   },
22147	//   "scopes": [
22148	//     "https://www.googleapis.com/auth/admin.directory.user"
22149	//   ]
22150	// }
22151
22152}
22153
22154// method id "directory.users.watch":
22155
22156type UsersWatchCall struct {
22157	s          *Service
22158	channel    *Channel
22159	urlParams_ gensupport.URLParams
22160	ctx_       context.Context
22161	header_    http.Header
22162}
22163
22164// Watch: Watches for changes in users list.
22165func (r *UsersService) Watch(channel *Channel) *UsersWatchCall {
22166	c := &UsersWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22167	c.channel = channel
22168	return c
22169}
22170
22171// CustomFieldMask sets the optional parameter "customFieldMask":
22172// Comma-separated list of schema names. All fields from these schemas
22173// are fetched. This should only be set when projection=custom.
22174func (c *UsersWatchCall) CustomFieldMask(customFieldMask string) *UsersWatchCall {
22175	c.urlParams_.Set("customFieldMask", customFieldMask)
22176	return c
22177}
22178
22179// Customer sets the optional parameter "customer": Immutable ID of the
22180// Google Workspace account. In case of multi-domain, to fetch all users
22181// for a customer, fill this field instead of domain.
22182func (c *UsersWatchCall) Customer(customer string) *UsersWatchCall {
22183	c.urlParams_.Set("customer", customer)
22184	return c
22185}
22186
22187// Domain sets the optional parameter "domain": Name of the domain. Fill
22188// this field to get users from only this domain. To return all users in
22189// a multi-domain fill customer field instead."
22190func (c *UsersWatchCall) Domain(domain string) *UsersWatchCall {
22191	c.urlParams_.Set("domain", domain)
22192	return c
22193}
22194
22195// Event sets the optional parameter "event": Events to watch for.
22196//
22197// Possible values:
22198//   "add" - User Created Event
22199//   "delete" - User Deleted Event
22200//   "makeAdmin" - User Admin Status Change Event
22201//   "undelete" - User Undeleted Event
22202//   "update" - User Updated Event
22203func (c *UsersWatchCall) Event(event string) *UsersWatchCall {
22204	c.urlParams_.Set("event", event)
22205	return c
22206}
22207
22208// MaxResults sets the optional parameter "maxResults": Maximum number
22209// of results to return.
22210func (c *UsersWatchCall) MaxResults(maxResults int64) *UsersWatchCall {
22211	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22212	return c
22213}
22214
22215// OrderBy sets the optional parameter "orderBy": Column to use for
22216// sorting results
22217//
22218// Possible values:
22219//   "email" - Primary email of the user.
22220//   "familyName" - User's family name.
22221//   "givenName" - User's given name.
22222func (c *UsersWatchCall) OrderBy(orderBy string) *UsersWatchCall {
22223	c.urlParams_.Set("orderBy", orderBy)
22224	return c
22225}
22226
22227// PageToken sets the optional parameter "pageToken": Token to specify
22228// next page in the list
22229func (c *UsersWatchCall) PageToken(pageToken string) *UsersWatchCall {
22230	c.urlParams_.Set("pageToken", pageToken)
22231	return c
22232}
22233
22234// Projection sets the optional parameter "projection": What subset of
22235// fields to fetch for this user.
22236//
22237// Possible values:
22238//   "basic" (default) - Do not include any custom fields for the user.
22239//   "custom" - Include custom fields from schemas mentioned in
22240// customFieldMask.
22241//   "full" - Include all fields associated with this user.
22242func (c *UsersWatchCall) Projection(projection string) *UsersWatchCall {
22243	c.urlParams_.Set("projection", projection)
22244	return c
22245}
22246
22247// Query sets the optional parameter "query": Query string search.
22248// Should be of the form "". Complete documentation is at https:
22249// //developers.google.com/admin-sdk/directory/v1/guides/search-users
22250func (c *UsersWatchCall) Query(query string) *UsersWatchCall {
22251	c.urlParams_.Set("query", query)
22252	return c
22253}
22254
22255// ShowDeleted sets the optional parameter "showDeleted": If set to
22256// true, retrieves the list of deleted users. (Default: false)
22257func (c *UsersWatchCall) ShowDeleted(showDeleted string) *UsersWatchCall {
22258	c.urlParams_.Set("showDeleted", showDeleted)
22259	return c
22260}
22261
22262// SortOrder sets the optional parameter "sortOrder": Whether to return
22263// results in ascending or descending order.
22264//
22265// Possible values:
22266//   "ASCENDING" - Ascending order.
22267//   "DESCENDING" - Descending order.
22268func (c *UsersWatchCall) SortOrder(sortOrder string) *UsersWatchCall {
22269	c.urlParams_.Set("sortOrder", sortOrder)
22270	return c
22271}
22272
22273// ViewType sets the optional parameter "viewType": Whether to fetch the
22274// administrator-only or domain-wide public view of the user. For more
22275// information, see Retrieve a user as a non-administrator
22276// (/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin)
22277// .
22278//
22279// Possible values:
22280//   "admin_view" (default) - Results include both administrator-only
22281// and domain-public fields.
22282//   "domain_public" - Results only include fields for the user that are
22283// publicly visible to other users in the domain.
22284func (c *UsersWatchCall) ViewType(viewType string) *UsersWatchCall {
22285	c.urlParams_.Set("viewType", viewType)
22286	return c
22287}
22288
22289// Fields allows partial responses to be retrieved. See
22290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22291// for more information.
22292func (c *UsersWatchCall) Fields(s ...googleapi.Field) *UsersWatchCall {
22293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22294	return c
22295}
22296
22297// Context sets the context to be used in this call's Do method. Any
22298// pending HTTP request will be aborted if the provided context is
22299// canceled.
22300func (c *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall {
22301	c.ctx_ = ctx
22302	return c
22303}
22304
22305// Header returns an http.Header that can be modified by the caller to
22306// add HTTP headers to the request.
22307func (c *UsersWatchCall) Header() http.Header {
22308	if c.header_ == nil {
22309		c.header_ = make(http.Header)
22310	}
22311	return c.header_
22312}
22313
22314func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) {
22315	reqHeaders := make(http.Header)
22316	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
22317	for k, v := range c.header_ {
22318		reqHeaders[k] = v
22319	}
22320	reqHeaders.Set("User-Agent", c.s.userAgent())
22321	var body io.Reader = nil
22322	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
22323	if err != nil {
22324		return nil, err
22325	}
22326	reqHeaders.Set("Content-Type", "application/json")
22327	c.urlParams_.Set("alt", alt)
22328	c.urlParams_.Set("prettyPrint", "false")
22329	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/watch")
22330	urls += "?" + c.urlParams_.Encode()
22331	req, err := http.NewRequest("POST", urls, body)
22332	if err != nil {
22333		return nil, err
22334	}
22335	req.Header = reqHeaders
22336	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22337}
22338
22339// Do executes the "directory.users.watch" call.
22340// Exactly one of *Channel or error will be non-nil. Any non-2xx status
22341// code is an error. Response headers are in either
22342// *Channel.ServerResponse.Header or (if a response was returned at all)
22343// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22344// check whether the returned error was because http.StatusNotModified
22345// was returned.
22346func (c *UsersWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
22347	gensupport.SetOptions(c.urlParams_, opts...)
22348	res, err := c.doRequest("json")
22349	if res != nil && res.StatusCode == http.StatusNotModified {
22350		if res.Body != nil {
22351			res.Body.Close()
22352		}
22353		return nil, &googleapi.Error{
22354			Code:   res.StatusCode,
22355			Header: res.Header,
22356		}
22357	}
22358	if err != nil {
22359		return nil, err
22360	}
22361	defer googleapi.CloseBody(res)
22362	if err := googleapi.CheckResponse(res); err != nil {
22363		return nil, err
22364	}
22365	ret := &Channel{
22366		ServerResponse: googleapi.ServerResponse{
22367			Header:         res.Header,
22368			HTTPStatusCode: res.StatusCode,
22369		},
22370	}
22371	target := &ret
22372	if err := gensupport.DecodeResponse(target, res); err != nil {
22373		return nil, err
22374	}
22375	return ret, nil
22376	// {
22377	//   "description": "Watches for changes in users list.",
22378	//   "flatPath": "admin/directory/v1/users/watch",
22379	//   "httpMethod": "POST",
22380	//   "id": "directory.users.watch",
22381	//   "parameterOrder": [],
22382	//   "parameters": {
22383	//     "customFieldMask": {
22384	//       "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.",
22385	//       "location": "query",
22386	//       "type": "string"
22387	//     },
22388	//     "customer": {
22389	//       "description": "Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.",
22390	//       "location": "query",
22391	//       "type": "string"
22392	//     },
22393	//     "domain": {
22394	//       "description": "Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.\"",
22395	//       "location": "query",
22396	//       "type": "string"
22397	//     },
22398	//     "event": {
22399	//       "description": "Events to watch for.",
22400	//       "enum": [
22401	//         "add",
22402	//         "delete",
22403	//         "makeAdmin",
22404	//         "undelete",
22405	//         "update"
22406	//       ],
22407	//       "enumDescriptions": [
22408	//         "User Created Event",
22409	//         "User Deleted Event",
22410	//         "User Admin Status Change Event",
22411	//         "User Undeleted Event",
22412	//         "User Updated Event"
22413	//       ],
22414	//       "location": "query",
22415	//       "type": "string"
22416	//     },
22417	//     "maxResults": {
22418	//       "default": "100",
22419	//       "description": "Maximum number of results to return.",
22420	//       "format": "int32",
22421	//       "location": "query",
22422	//       "maximum": "500",
22423	//       "minimum": "1",
22424	//       "type": "integer"
22425	//     },
22426	//     "orderBy": {
22427	//       "description": "Column to use for sorting results",
22428	//       "enum": [
22429	//         "email",
22430	//         "familyName",
22431	//         "givenName"
22432	//       ],
22433	//       "enumDescriptions": [
22434	//         "Primary email of the user.",
22435	//         "User's family name.",
22436	//         "User's given name."
22437	//       ],
22438	//       "location": "query",
22439	//       "type": "string"
22440	//     },
22441	//     "pageToken": {
22442	//       "description": "Token to specify next page in the list",
22443	//       "location": "query",
22444	//       "type": "string"
22445	//     },
22446	//     "projection": {
22447	//       "default": "basic",
22448	//       "description": "What subset of fields to fetch for this user.",
22449	//       "enum": [
22450	//         "basic",
22451	//         "custom",
22452	//         "full"
22453	//       ],
22454	//       "enumDescriptions": [
22455	//         "Do not include any custom fields for the user.",
22456	//         "Include custom fields from schemas mentioned in customFieldMask.",
22457	//         "Include all fields associated with this user."
22458	//       ],
22459	//       "location": "query",
22460	//       "type": "string"
22461	//     },
22462	//     "query": {
22463	//       "description": "Query string search. Should be of the form \"\". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users",
22464	//       "location": "query",
22465	//       "type": "string"
22466	//     },
22467	//     "showDeleted": {
22468	//       "description": "If set to true, retrieves the list of deleted users. (Default: false)",
22469	//       "location": "query",
22470	//       "type": "string"
22471	//     },
22472	//     "sortOrder": {
22473	//       "description": "Whether to return results in ascending or descending order.",
22474	//       "enum": [
22475	//         "ASCENDING",
22476	//         "DESCENDING"
22477	//       ],
22478	//       "enumDescriptions": [
22479	//         "Ascending order.",
22480	//         "Descending order."
22481	//       ],
22482	//       "location": "query",
22483	//       "type": "string"
22484	//     },
22485	//     "viewType": {
22486	//       "default": "admin_view",
22487	//       "description": "Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see [Retrieve a user as a non-administrator](/admin-sdk/directory/v1/guides/manage-users#retrieve_users_non_admin).",
22488	//       "enum": [
22489	//         "admin_view",
22490	//         "domain_public"
22491	//       ],
22492	//       "enumDescriptions": [
22493	//         "Results include both administrator-only and domain-public fields.",
22494	//         "Results only include fields for the user that are publicly visible to other users in the domain."
22495	//       ],
22496	//       "location": "query",
22497	//       "type": "string"
22498	//     }
22499	//   },
22500	//   "path": "admin/directory/v1/users/watch",
22501	//   "request": {
22502	//     "$ref": "Channel"
22503	//   },
22504	//   "response": {
22505	//     "$ref": "Channel"
22506	//   },
22507	//   "scopes": [
22508	//     "https://www.googleapis.com/auth/admin.directory.user",
22509	//     "https://www.googleapis.com/auth/admin.directory.user.readonly",
22510	//     "https://www.googleapis.com/auth/cloud-platform"
22511	//   ]
22512	// }
22513
22514}
22515
22516// method id "directory.users.aliases.delete":
22517
22518type UsersAliasesDeleteCall struct {
22519	s          *Service
22520	userKey    string
22521	alias      string
22522	urlParams_ gensupport.URLParams
22523	ctx_       context.Context
22524	header_    http.Header
22525}
22526
22527// Delete: Removes an alias.
22528//
22529// - alias: The alias to be removed.
22530// - userKey: Identifies the user in the API request. The value can be
22531//   the user's primary email address, alias email address, or unique
22532//   user ID.
22533func (r *UsersAliasesService) Delete(userKey string, alias string) *UsersAliasesDeleteCall {
22534	c := &UsersAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22535	c.userKey = userKey
22536	c.alias = alias
22537	return c
22538}
22539
22540// Fields allows partial responses to be retrieved. See
22541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22542// for more information.
22543func (c *UsersAliasesDeleteCall) Fields(s ...googleapi.Field) *UsersAliasesDeleteCall {
22544	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22545	return c
22546}
22547
22548// Context sets the context to be used in this call's Do method. Any
22549// pending HTTP request will be aborted if the provided context is
22550// canceled.
22551func (c *UsersAliasesDeleteCall) Context(ctx context.Context) *UsersAliasesDeleteCall {
22552	c.ctx_ = ctx
22553	return c
22554}
22555
22556// Header returns an http.Header that can be modified by the caller to
22557// add HTTP headers to the request.
22558func (c *UsersAliasesDeleteCall) Header() http.Header {
22559	if c.header_ == nil {
22560		c.header_ = make(http.Header)
22561	}
22562	return c.header_
22563}
22564
22565func (c *UsersAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
22566	reqHeaders := make(http.Header)
22567	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
22568	for k, v := range c.header_ {
22569		reqHeaders[k] = v
22570	}
22571	reqHeaders.Set("User-Agent", c.s.userAgent())
22572	var body io.Reader = nil
22573	c.urlParams_.Set("alt", alt)
22574	c.urlParams_.Set("prettyPrint", "false")
22575	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases/{alias}")
22576	urls += "?" + c.urlParams_.Encode()
22577	req, err := http.NewRequest("DELETE", urls, body)
22578	if err != nil {
22579		return nil, err
22580	}
22581	req.Header = reqHeaders
22582	googleapi.Expand(req.URL, map[string]string{
22583		"userKey": c.userKey,
22584		"alias":   c.alias,
22585	})
22586	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22587}
22588
22589// Do executes the "directory.users.aliases.delete" call.
22590func (c *UsersAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
22591	gensupport.SetOptions(c.urlParams_, opts...)
22592	res, err := c.doRequest("json")
22593	if err != nil {
22594		return err
22595	}
22596	defer googleapi.CloseBody(res)
22597	if err := googleapi.CheckResponse(res); err != nil {
22598		return err
22599	}
22600	return nil
22601	// {
22602	//   "description": "Removes an alias.",
22603	//   "flatPath": "admin/directory/v1/users/{userKey}/aliases/{alias}",
22604	//   "httpMethod": "DELETE",
22605	//   "id": "directory.users.aliases.delete",
22606	//   "parameterOrder": [
22607	//     "userKey",
22608	//     "alias"
22609	//   ],
22610	//   "parameters": {
22611	//     "alias": {
22612	//       "description": "The alias to be removed.",
22613	//       "location": "path",
22614	//       "required": true,
22615	//       "type": "string"
22616	//     },
22617	//     "userKey": {
22618	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
22619	//       "location": "path",
22620	//       "required": true,
22621	//       "type": "string"
22622	//     }
22623	//   },
22624	//   "path": "admin/directory/v1/users/{userKey}/aliases/{alias}",
22625	//   "scopes": [
22626	//     "https://www.googleapis.com/auth/admin.directory.user",
22627	//     "https://www.googleapis.com/auth/admin.directory.user.alias"
22628	//   ]
22629	// }
22630
22631}
22632
22633// method id "directory.users.aliases.insert":
22634
22635type UsersAliasesInsertCall struct {
22636	s          *Service
22637	userKey    string
22638	alias      *Alias
22639	urlParams_ gensupport.URLParams
22640	ctx_       context.Context
22641	header_    http.Header
22642}
22643
22644// Insert: Adds an alias.
22645//
22646// - userKey: Identifies the user in the API request. The value can be
22647//   the user's primary email address, alias email address, or unique
22648//   user ID.
22649func (r *UsersAliasesService) Insert(userKey string, alias *Alias) *UsersAliasesInsertCall {
22650	c := &UsersAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22651	c.userKey = userKey
22652	c.alias = alias
22653	return c
22654}
22655
22656// Fields allows partial responses to be retrieved. See
22657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22658// for more information.
22659func (c *UsersAliasesInsertCall) Fields(s ...googleapi.Field) *UsersAliasesInsertCall {
22660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22661	return c
22662}
22663
22664// Context sets the context to be used in this call's Do method. Any
22665// pending HTTP request will be aborted if the provided context is
22666// canceled.
22667func (c *UsersAliasesInsertCall) Context(ctx context.Context) *UsersAliasesInsertCall {
22668	c.ctx_ = ctx
22669	return c
22670}
22671
22672// Header returns an http.Header that can be modified by the caller to
22673// add HTTP headers to the request.
22674func (c *UsersAliasesInsertCall) Header() http.Header {
22675	if c.header_ == nil {
22676		c.header_ = make(http.Header)
22677	}
22678	return c.header_
22679}
22680
22681func (c *UsersAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
22682	reqHeaders := make(http.Header)
22683	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
22684	for k, v := range c.header_ {
22685		reqHeaders[k] = v
22686	}
22687	reqHeaders.Set("User-Agent", c.s.userAgent())
22688	var body io.Reader = nil
22689	body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
22690	if err != nil {
22691		return nil, err
22692	}
22693	reqHeaders.Set("Content-Type", "application/json")
22694	c.urlParams_.Set("alt", alt)
22695	c.urlParams_.Set("prettyPrint", "false")
22696	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases")
22697	urls += "?" + c.urlParams_.Encode()
22698	req, err := http.NewRequest("POST", urls, body)
22699	if err != nil {
22700		return nil, err
22701	}
22702	req.Header = reqHeaders
22703	googleapi.Expand(req.URL, map[string]string{
22704		"userKey": c.userKey,
22705	})
22706	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22707}
22708
22709// Do executes the "directory.users.aliases.insert" call.
22710// Exactly one of *Alias or error will be non-nil. Any non-2xx status
22711// code is an error. Response headers are in either
22712// *Alias.ServerResponse.Header or (if a response was returned at all)
22713// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22714// check whether the returned error was because http.StatusNotModified
22715// was returned.
22716func (c *UsersAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
22717	gensupport.SetOptions(c.urlParams_, opts...)
22718	res, err := c.doRequest("json")
22719	if res != nil && res.StatusCode == http.StatusNotModified {
22720		if res.Body != nil {
22721			res.Body.Close()
22722		}
22723		return nil, &googleapi.Error{
22724			Code:   res.StatusCode,
22725			Header: res.Header,
22726		}
22727	}
22728	if err != nil {
22729		return nil, err
22730	}
22731	defer googleapi.CloseBody(res)
22732	if err := googleapi.CheckResponse(res); err != nil {
22733		return nil, err
22734	}
22735	ret := &Alias{
22736		ServerResponse: googleapi.ServerResponse{
22737			Header:         res.Header,
22738			HTTPStatusCode: res.StatusCode,
22739		},
22740	}
22741	target := &ret
22742	if err := gensupport.DecodeResponse(target, res); err != nil {
22743		return nil, err
22744	}
22745	return ret, nil
22746	// {
22747	//   "description": "Adds an alias.",
22748	//   "flatPath": "admin/directory/v1/users/{userKey}/aliases",
22749	//   "httpMethod": "POST",
22750	//   "id": "directory.users.aliases.insert",
22751	//   "parameterOrder": [
22752	//     "userKey"
22753	//   ],
22754	//   "parameters": {
22755	//     "userKey": {
22756	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
22757	//       "location": "path",
22758	//       "required": true,
22759	//       "type": "string"
22760	//     }
22761	//   },
22762	//   "path": "admin/directory/v1/users/{userKey}/aliases",
22763	//   "request": {
22764	//     "$ref": "Alias"
22765	//   },
22766	//   "response": {
22767	//     "$ref": "Alias"
22768	//   },
22769	//   "scopes": [
22770	//     "https://www.googleapis.com/auth/admin.directory.user",
22771	//     "https://www.googleapis.com/auth/admin.directory.user.alias"
22772	//   ]
22773	// }
22774
22775}
22776
22777// method id "directory.users.aliases.list":
22778
22779type UsersAliasesListCall struct {
22780	s            *Service
22781	userKey      string
22782	urlParams_   gensupport.URLParams
22783	ifNoneMatch_ string
22784	ctx_         context.Context
22785	header_      http.Header
22786}
22787
22788// List: Lists all aliases for a user.
22789//
22790// - userKey: Identifies the user in the API request. The value can be
22791//   the user's primary email address, alias email address, or unique
22792//   user ID.
22793func (r *UsersAliasesService) List(userKey string) *UsersAliasesListCall {
22794	c := &UsersAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22795	c.userKey = userKey
22796	return c
22797}
22798
22799// Event sets the optional parameter "event": Events to watch for.
22800//
22801// Possible values:
22802//   "add" - Alias Created Event
22803//   "delete" - Alias Deleted Event
22804func (c *UsersAliasesListCall) Event(event string) *UsersAliasesListCall {
22805	c.urlParams_.Set("event", event)
22806	return c
22807}
22808
22809// Fields allows partial responses to be retrieved. See
22810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22811// for more information.
22812func (c *UsersAliasesListCall) Fields(s ...googleapi.Field) *UsersAliasesListCall {
22813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22814	return c
22815}
22816
22817// IfNoneMatch sets the optional parameter which makes the operation
22818// fail if the object's ETag matches the given value. This is useful for
22819// getting updates only after the object has changed since the last
22820// request. Use googleapi.IsNotModified to check whether the response
22821// error from Do is the result of In-None-Match.
22822func (c *UsersAliasesListCall) IfNoneMatch(entityTag string) *UsersAliasesListCall {
22823	c.ifNoneMatch_ = entityTag
22824	return c
22825}
22826
22827// Context sets the context to be used in this call's Do method. Any
22828// pending HTTP request will be aborted if the provided context is
22829// canceled.
22830func (c *UsersAliasesListCall) Context(ctx context.Context) *UsersAliasesListCall {
22831	c.ctx_ = ctx
22832	return c
22833}
22834
22835// Header returns an http.Header that can be modified by the caller to
22836// add HTTP headers to the request.
22837func (c *UsersAliasesListCall) Header() http.Header {
22838	if c.header_ == nil {
22839		c.header_ = make(http.Header)
22840	}
22841	return c.header_
22842}
22843
22844func (c *UsersAliasesListCall) doRequest(alt string) (*http.Response, error) {
22845	reqHeaders := make(http.Header)
22846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
22847	for k, v := range c.header_ {
22848		reqHeaders[k] = v
22849	}
22850	reqHeaders.Set("User-Agent", c.s.userAgent())
22851	if c.ifNoneMatch_ != "" {
22852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22853	}
22854	var body io.Reader = nil
22855	c.urlParams_.Set("alt", alt)
22856	c.urlParams_.Set("prettyPrint", "false")
22857	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases")
22858	urls += "?" + c.urlParams_.Encode()
22859	req, err := http.NewRequest("GET", urls, body)
22860	if err != nil {
22861		return nil, err
22862	}
22863	req.Header = reqHeaders
22864	googleapi.Expand(req.URL, map[string]string{
22865		"userKey": c.userKey,
22866	})
22867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22868}
22869
22870// Do executes the "directory.users.aliases.list" call.
22871// Exactly one of *Aliases or error will be non-nil. Any non-2xx status
22872// code is an error. Response headers are in either
22873// *Aliases.ServerResponse.Header or (if a response was returned at all)
22874// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22875// check whether the returned error was because http.StatusNotModified
22876// was returned.
22877func (c *UsersAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
22878	gensupport.SetOptions(c.urlParams_, opts...)
22879	res, err := c.doRequest("json")
22880	if res != nil && res.StatusCode == http.StatusNotModified {
22881		if res.Body != nil {
22882			res.Body.Close()
22883		}
22884		return nil, &googleapi.Error{
22885			Code:   res.StatusCode,
22886			Header: res.Header,
22887		}
22888	}
22889	if err != nil {
22890		return nil, err
22891	}
22892	defer googleapi.CloseBody(res)
22893	if err := googleapi.CheckResponse(res); err != nil {
22894		return nil, err
22895	}
22896	ret := &Aliases{
22897		ServerResponse: googleapi.ServerResponse{
22898			Header:         res.Header,
22899			HTTPStatusCode: res.StatusCode,
22900		},
22901	}
22902	target := &ret
22903	if err := gensupport.DecodeResponse(target, res); err != nil {
22904		return nil, err
22905	}
22906	return ret, nil
22907	// {
22908	//   "description": "Lists all aliases for a user.",
22909	//   "flatPath": "admin/directory/v1/users/{userKey}/aliases",
22910	//   "httpMethod": "GET",
22911	//   "id": "directory.users.aliases.list",
22912	//   "parameterOrder": [
22913	//     "userKey"
22914	//   ],
22915	//   "parameters": {
22916	//     "event": {
22917	//       "description": "Events to watch for.",
22918	//       "enum": [
22919	//         "add",
22920	//         "delete"
22921	//       ],
22922	//       "enumDescriptions": [
22923	//         "Alias Created Event",
22924	//         "Alias Deleted Event"
22925	//       ],
22926	//       "location": "query",
22927	//       "type": "string"
22928	//     },
22929	//     "userKey": {
22930	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
22931	//       "location": "path",
22932	//       "required": true,
22933	//       "type": "string"
22934	//     }
22935	//   },
22936	//   "path": "admin/directory/v1/users/{userKey}/aliases",
22937	//   "response": {
22938	//     "$ref": "Aliases"
22939	//   },
22940	//   "scopes": [
22941	//     "https://www.googleapis.com/auth/admin.directory.user",
22942	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
22943	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
22944	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
22945	//   ]
22946	// }
22947
22948}
22949
22950// method id "directory.users.aliases.watch":
22951
22952type UsersAliasesWatchCall struct {
22953	s          *Service
22954	userKey    string
22955	channel    *Channel
22956	urlParams_ gensupport.URLParams
22957	ctx_       context.Context
22958	header_    http.Header
22959}
22960
22961// Watch: Watches for changes in users list.
22962//
22963// - userKey: Email or immutable ID of the user.
22964func (r *UsersAliasesService) Watch(userKey string, channel *Channel) *UsersAliasesWatchCall {
22965	c := &UsersAliasesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22966	c.userKey = userKey
22967	c.channel = channel
22968	return c
22969}
22970
22971// Event sets the optional parameter "event": Events to watch for.
22972//
22973// Possible values:
22974//   "add" - Alias Created Event
22975//   "delete" - Alias Deleted Event
22976func (c *UsersAliasesWatchCall) Event(event string) *UsersAliasesWatchCall {
22977	c.urlParams_.Set("event", event)
22978	return c
22979}
22980
22981// Fields allows partial responses to be retrieved. See
22982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22983// for more information.
22984func (c *UsersAliasesWatchCall) Fields(s ...googleapi.Field) *UsersAliasesWatchCall {
22985	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22986	return c
22987}
22988
22989// Context sets the context to be used in this call's Do method. Any
22990// pending HTTP request will be aborted if the provided context is
22991// canceled.
22992func (c *UsersAliasesWatchCall) Context(ctx context.Context) *UsersAliasesWatchCall {
22993	c.ctx_ = ctx
22994	return c
22995}
22996
22997// Header returns an http.Header that can be modified by the caller to
22998// add HTTP headers to the request.
22999func (c *UsersAliasesWatchCall) Header() http.Header {
23000	if c.header_ == nil {
23001		c.header_ = make(http.Header)
23002	}
23003	return c.header_
23004}
23005
23006func (c *UsersAliasesWatchCall) doRequest(alt string) (*http.Response, error) {
23007	reqHeaders := make(http.Header)
23008	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23009	for k, v := range c.header_ {
23010		reqHeaders[k] = v
23011	}
23012	reqHeaders.Set("User-Agent", c.s.userAgent())
23013	var body io.Reader = nil
23014	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
23015	if err != nil {
23016		return nil, err
23017	}
23018	reqHeaders.Set("Content-Type", "application/json")
23019	c.urlParams_.Set("alt", alt)
23020	c.urlParams_.Set("prettyPrint", "false")
23021	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/aliases/watch")
23022	urls += "?" + c.urlParams_.Encode()
23023	req, err := http.NewRequest("POST", urls, body)
23024	if err != nil {
23025		return nil, err
23026	}
23027	req.Header = reqHeaders
23028	googleapi.Expand(req.URL, map[string]string{
23029		"userKey": c.userKey,
23030	})
23031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23032}
23033
23034// Do executes the "directory.users.aliases.watch" call.
23035// Exactly one of *Channel or error will be non-nil. Any non-2xx status
23036// code is an error. Response headers are in either
23037// *Channel.ServerResponse.Header or (if a response was returned at all)
23038// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
23039// check whether the returned error was because http.StatusNotModified
23040// was returned.
23041func (c *UsersAliasesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
23042	gensupport.SetOptions(c.urlParams_, opts...)
23043	res, err := c.doRequest("json")
23044	if res != nil && res.StatusCode == http.StatusNotModified {
23045		if res.Body != nil {
23046			res.Body.Close()
23047		}
23048		return nil, &googleapi.Error{
23049			Code:   res.StatusCode,
23050			Header: res.Header,
23051		}
23052	}
23053	if err != nil {
23054		return nil, err
23055	}
23056	defer googleapi.CloseBody(res)
23057	if err := googleapi.CheckResponse(res); err != nil {
23058		return nil, err
23059	}
23060	ret := &Channel{
23061		ServerResponse: googleapi.ServerResponse{
23062			Header:         res.Header,
23063			HTTPStatusCode: res.StatusCode,
23064		},
23065	}
23066	target := &ret
23067	if err := gensupport.DecodeResponse(target, res); err != nil {
23068		return nil, err
23069	}
23070	return ret, nil
23071	// {
23072	//   "description": "Watches for changes in users list.",
23073	//   "flatPath": "admin/directory/v1/users/{userKey}/aliases/watch",
23074	//   "httpMethod": "POST",
23075	//   "id": "directory.users.aliases.watch",
23076	//   "parameterOrder": [
23077	//     "userKey"
23078	//   ],
23079	//   "parameters": {
23080	//     "event": {
23081	//       "description": "Events to watch for.",
23082	//       "enum": [
23083	//         "add",
23084	//         "delete"
23085	//       ],
23086	//       "enumDescriptions": [
23087	//         "Alias Created Event",
23088	//         "Alias Deleted Event"
23089	//       ],
23090	//       "location": "query",
23091	//       "type": "string"
23092	//     },
23093	//     "userKey": {
23094	//       "description": "Email or immutable ID of the user",
23095	//       "location": "path",
23096	//       "required": true,
23097	//       "type": "string"
23098	//     }
23099	//   },
23100	//   "path": "admin/directory/v1/users/{userKey}/aliases/watch",
23101	//   "request": {
23102	//     "$ref": "Channel"
23103	//   },
23104	//   "response": {
23105	//     "$ref": "Channel"
23106	//   },
23107	//   "scopes": [
23108	//     "https://www.googleapis.com/auth/admin.directory.user",
23109	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
23110	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
23111	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
23112	//   ]
23113	// }
23114
23115}
23116
23117// method id "directory.users.photos.delete":
23118
23119type UsersPhotosDeleteCall struct {
23120	s          *Service
23121	userKey    string
23122	urlParams_ gensupport.URLParams
23123	ctx_       context.Context
23124	header_    http.Header
23125}
23126
23127// Delete: Removes the user's photo.
23128//
23129// - userKey: Identifies the user in the API request. The value can be
23130//   the user's primary email address, alias email address, or unique
23131//   user ID.
23132func (r *UsersPhotosService) Delete(userKey string) *UsersPhotosDeleteCall {
23133	c := &UsersPhotosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23134	c.userKey = userKey
23135	return c
23136}
23137
23138// Fields allows partial responses to be retrieved. See
23139// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23140// for more information.
23141func (c *UsersPhotosDeleteCall) Fields(s ...googleapi.Field) *UsersPhotosDeleteCall {
23142	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23143	return c
23144}
23145
23146// Context sets the context to be used in this call's Do method. Any
23147// pending HTTP request will be aborted if the provided context is
23148// canceled.
23149func (c *UsersPhotosDeleteCall) Context(ctx context.Context) *UsersPhotosDeleteCall {
23150	c.ctx_ = ctx
23151	return c
23152}
23153
23154// Header returns an http.Header that can be modified by the caller to
23155// add HTTP headers to the request.
23156func (c *UsersPhotosDeleteCall) Header() http.Header {
23157	if c.header_ == nil {
23158		c.header_ = make(http.Header)
23159	}
23160	return c.header_
23161}
23162
23163func (c *UsersPhotosDeleteCall) doRequest(alt string) (*http.Response, error) {
23164	reqHeaders := make(http.Header)
23165	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23166	for k, v := range c.header_ {
23167		reqHeaders[k] = v
23168	}
23169	reqHeaders.Set("User-Agent", c.s.userAgent())
23170	var body io.Reader = nil
23171	c.urlParams_.Set("alt", alt)
23172	c.urlParams_.Set("prettyPrint", "false")
23173	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
23174	urls += "?" + c.urlParams_.Encode()
23175	req, err := http.NewRequest("DELETE", urls, body)
23176	if err != nil {
23177		return nil, err
23178	}
23179	req.Header = reqHeaders
23180	googleapi.Expand(req.URL, map[string]string{
23181		"userKey": c.userKey,
23182	})
23183	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23184}
23185
23186// Do executes the "directory.users.photos.delete" call.
23187func (c *UsersPhotosDeleteCall) Do(opts ...googleapi.CallOption) error {
23188	gensupport.SetOptions(c.urlParams_, opts...)
23189	res, err := c.doRequest("json")
23190	if err != nil {
23191		return err
23192	}
23193	defer googleapi.CloseBody(res)
23194	if err := googleapi.CheckResponse(res); err != nil {
23195		return err
23196	}
23197	return nil
23198	// {
23199	//   "description": "Removes the user's photo.",
23200	//   "flatPath": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23201	//   "httpMethod": "DELETE",
23202	//   "id": "directory.users.photos.delete",
23203	//   "parameterOrder": [
23204	//     "userKey"
23205	//   ],
23206	//   "parameters": {
23207	//     "userKey": {
23208	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
23209	//       "location": "path",
23210	//       "required": true,
23211	//       "type": "string"
23212	//     }
23213	//   },
23214	//   "path": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23215	//   "scopes": [
23216	//     "https://www.googleapis.com/auth/admin.directory.user"
23217	//   ]
23218	// }
23219
23220}
23221
23222// method id "directory.users.photos.get":
23223
23224type UsersPhotosGetCall struct {
23225	s            *Service
23226	userKey      string
23227	urlParams_   gensupport.URLParams
23228	ifNoneMatch_ string
23229	ctx_         context.Context
23230	header_      http.Header
23231}
23232
23233// Get: Retrieves the user's photo.
23234//
23235// - userKey: Identifies the user in the API request. The value can be
23236//   the user's primary email address, alias email address, or unique
23237//   user ID.
23238func (r *UsersPhotosService) Get(userKey string) *UsersPhotosGetCall {
23239	c := &UsersPhotosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23240	c.userKey = userKey
23241	return c
23242}
23243
23244// Fields allows partial responses to be retrieved. See
23245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23246// for more information.
23247func (c *UsersPhotosGetCall) Fields(s ...googleapi.Field) *UsersPhotosGetCall {
23248	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23249	return c
23250}
23251
23252// IfNoneMatch sets the optional parameter which makes the operation
23253// fail if the object's ETag matches the given value. This is useful for
23254// getting updates only after the object has changed since the last
23255// request. Use googleapi.IsNotModified to check whether the response
23256// error from Do is the result of In-None-Match.
23257func (c *UsersPhotosGetCall) IfNoneMatch(entityTag string) *UsersPhotosGetCall {
23258	c.ifNoneMatch_ = entityTag
23259	return c
23260}
23261
23262// Context sets the context to be used in this call's Do method. Any
23263// pending HTTP request will be aborted if the provided context is
23264// canceled.
23265func (c *UsersPhotosGetCall) Context(ctx context.Context) *UsersPhotosGetCall {
23266	c.ctx_ = ctx
23267	return c
23268}
23269
23270// Header returns an http.Header that can be modified by the caller to
23271// add HTTP headers to the request.
23272func (c *UsersPhotosGetCall) Header() http.Header {
23273	if c.header_ == nil {
23274		c.header_ = make(http.Header)
23275	}
23276	return c.header_
23277}
23278
23279func (c *UsersPhotosGetCall) doRequest(alt string) (*http.Response, error) {
23280	reqHeaders := make(http.Header)
23281	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23282	for k, v := range c.header_ {
23283		reqHeaders[k] = v
23284	}
23285	reqHeaders.Set("User-Agent", c.s.userAgent())
23286	if c.ifNoneMatch_ != "" {
23287		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23288	}
23289	var body io.Reader = nil
23290	c.urlParams_.Set("alt", alt)
23291	c.urlParams_.Set("prettyPrint", "false")
23292	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
23293	urls += "?" + c.urlParams_.Encode()
23294	req, err := http.NewRequest("GET", urls, body)
23295	if err != nil {
23296		return nil, err
23297	}
23298	req.Header = reqHeaders
23299	googleapi.Expand(req.URL, map[string]string{
23300		"userKey": c.userKey,
23301	})
23302	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23303}
23304
23305// Do executes the "directory.users.photos.get" call.
23306// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
23307// status code is an error. Response headers are in either
23308// *UserPhoto.ServerResponse.Header or (if a response was returned at
23309// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23310// to check whether the returned error was because
23311// http.StatusNotModified was returned.
23312func (c *UsersPhotosGetCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
23313	gensupport.SetOptions(c.urlParams_, opts...)
23314	res, err := c.doRequest("json")
23315	if res != nil && res.StatusCode == http.StatusNotModified {
23316		if res.Body != nil {
23317			res.Body.Close()
23318		}
23319		return nil, &googleapi.Error{
23320			Code:   res.StatusCode,
23321			Header: res.Header,
23322		}
23323	}
23324	if err != nil {
23325		return nil, err
23326	}
23327	defer googleapi.CloseBody(res)
23328	if err := googleapi.CheckResponse(res); err != nil {
23329		return nil, err
23330	}
23331	ret := &UserPhoto{
23332		ServerResponse: googleapi.ServerResponse{
23333			Header:         res.Header,
23334			HTTPStatusCode: res.StatusCode,
23335		},
23336	}
23337	target := &ret
23338	if err := gensupport.DecodeResponse(target, res); err != nil {
23339		return nil, err
23340	}
23341	return ret, nil
23342	// {
23343	//   "description": "Retrieves the user's photo.",
23344	//   "flatPath": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23345	//   "httpMethod": "GET",
23346	//   "id": "directory.users.photos.get",
23347	//   "parameterOrder": [
23348	//     "userKey"
23349	//   ],
23350	//   "parameters": {
23351	//     "userKey": {
23352	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
23353	//       "location": "path",
23354	//       "required": true,
23355	//       "type": "string"
23356	//     }
23357	//   },
23358	//   "path": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23359	//   "response": {
23360	//     "$ref": "UserPhoto"
23361	//   },
23362	//   "scopes": [
23363	//     "https://www.googleapis.com/auth/admin.directory.user",
23364	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
23365	//   ]
23366	// }
23367
23368}
23369
23370// method id "directory.users.photos.patch":
23371
23372type UsersPhotosPatchCall struct {
23373	s          *Service
23374	userKey    string
23375	userphoto  *UserPhoto
23376	urlParams_ gensupport.URLParams
23377	ctx_       context.Context
23378	header_    http.Header
23379}
23380
23381// Patch: Adds a photo for the user. This method supports patch
23382// semantics (/admin-sdk/directory/v1/guides/performance#patch).
23383//
23384// - userKey: Identifies the user in the API request. The value can be
23385//   the user's primary email address, alias email address, or unique
23386//   user ID.
23387func (r *UsersPhotosService) Patch(userKey string, userphoto *UserPhoto) *UsersPhotosPatchCall {
23388	c := &UsersPhotosPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23389	c.userKey = userKey
23390	c.userphoto = userphoto
23391	return c
23392}
23393
23394// Fields allows partial responses to be retrieved. See
23395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23396// for more information.
23397func (c *UsersPhotosPatchCall) Fields(s ...googleapi.Field) *UsersPhotosPatchCall {
23398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23399	return c
23400}
23401
23402// Context sets the context to be used in this call's Do method. Any
23403// pending HTTP request will be aborted if the provided context is
23404// canceled.
23405func (c *UsersPhotosPatchCall) Context(ctx context.Context) *UsersPhotosPatchCall {
23406	c.ctx_ = ctx
23407	return c
23408}
23409
23410// Header returns an http.Header that can be modified by the caller to
23411// add HTTP headers to the request.
23412func (c *UsersPhotosPatchCall) Header() http.Header {
23413	if c.header_ == nil {
23414		c.header_ = make(http.Header)
23415	}
23416	return c.header_
23417}
23418
23419func (c *UsersPhotosPatchCall) doRequest(alt string) (*http.Response, error) {
23420	reqHeaders := make(http.Header)
23421	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23422	for k, v := range c.header_ {
23423		reqHeaders[k] = v
23424	}
23425	reqHeaders.Set("User-Agent", c.s.userAgent())
23426	var body io.Reader = nil
23427	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
23428	if err != nil {
23429		return nil, err
23430	}
23431	reqHeaders.Set("Content-Type", "application/json")
23432	c.urlParams_.Set("alt", alt)
23433	c.urlParams_.Set("prettyPrint", "false")
23434	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
23435	urls += "?" + c.urlParams_.Encode()
23436	req, err := http.NewRequest("PATCH", urls, body)
23437	if err != nil {
23438		return nil, err
23439	}
23440	req.Header = reqHeaders
23441	googleapi.Expand(req.URL, map[string]string{
23442		"userKey": c.userKey,
23443	})
23444	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23445}
23446
23447// Do executes the "directory.users.photos.patch" call.
23448// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
23449// status code is an error. Response headers are in either
23450// *UserPhoto.ServerResponse.Header or (if a response was returned at
23451// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23452// to check whether the returned error was because
23453// http.StatusNotModified was returned.
23454func (c *UsersPhotosPatchCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
23455	gensupport.SetOptions(c.urlParams_, opts...)
23456	res, err := c.doRequest("json")
23457	if res != nil && res.StatusCode == http.StatusNotModified {
23458		if res.Body != nil {
23459			res.Body.Close()
23460		}
23461		return nil, &googleapi.Error{
23462			Code:   res.StatusCode,
23463			Header: res.Header,
23464		}
23465	}
23466	if err != nil {
23467		return nil, err
23468	}
23469	defer googleapi.CloseBody(res)
23470	if err := googleapi.CheckResponse(res); err != nil {
23471		return nil, err
23472	}
23473	ret := &UserPhoto{
23474		ServerResponse: googleapi.ServerResponse{
23475			Header:         res.Header,
23476			HTTPStatusCode: res.StatusCode,
23477		},
23478	}
23479	target := &ret
23480	if err := gensupport.DecodeResponse(target, res); err != nil {
23481		return nil, err
23482	}
23483	return ret, nil
23484	// {
23485	//   "description": "Adds a photo for the user. This method supports [patch semantics](/admin-sdk/directory/v1/guides/performance#patch).",
23486	//   "flatPath": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23487	//   "httpMethod": "PATCH",
23488	//   "id": "directory.users.photos.patch",
23489	//   "parameterOrder": [
23490	//     "userKey"
23491	//   ],
23492	//   "parameters": {
23493	//     "userKey": {
23494	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
23495	//       "location": "path",
23496	//       "required": true,
23497	//       "type": "string"
23498	//     }
23499	//   },
23500	//   "path": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23501	//   "request": {
23502	//     "$ref": "UserPhoto"
23503	//   },
23504	//   "response": {
23505	//     "$ref": "UserPhoto"
23506	//   },
23507	//   "scopes": [
23508	//     "https://www.googleapis.com/auth/admin.directory.user"
23509	//   ]
23510	// }
23511
23512}
23513
23514// method id "directory.users.photos.update":
23515
23516type UsersPhotosUpdateCall struct {
23517	s          *Service
23518	userKey    string
23519	userphoto  *UserPhoto
23520	urlParams_ gensupport.URLParams
23521	ctx_       context.Context
23522	header_    http.Header
23523}
23524
23525// Update: Adds a photo for the user.
23526//
23527// - userKey: Identifies the user in the API request. The value can be
23528//   the user's primary email address, alias email address, or unique
23529//   user ID.
23530func (r *UsersPhotosService) Update(userKey string, userphoto *UserPhoto) *UsersPhotosUpdateCall {
23531	c := &UsersPhotosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23532	c.userKey = userKey
23533	c.userphoto = userphoto
23534	return c
23535}
23536
23537// Fields allows partial responses to be retrieved. See
23538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23539// for more information.
23540func (c *UsersPhotosUpdateCall) Fields(s ...googleapi.Field) *UsersPhotosUpdateCall {
23541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23542	return c
23543}
23544
23545// Context sets the context to be used in this call's Do method. Any
23546// pending HTTP request will be aborted if the provided context is
23547// canceled.
23548func (c *UsersPhotosUpdateCall) Context(ctx context.Context) *UsersPhotosUpdateCall {
23549	c.ctx_ = ctx
23550	return c
23551}
23552
23553// Header returns an http.Header that can be modified by the caller to
23554// add HTTP headers to the request.
23555func (c *UsersPhotosUpdateCall) Header() http.Header {
23556	if c.header_ == nil {
23557		c.header_ = make(http.Header)
23558	}
23559	return c.header_
23560}
23561
23562func (c *UsersPhotosUpdateCall) doRequest(alt string) (*http.Response, error) {
23563	reqHeaders := make(http.Header)
23564	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23565	for k, v := range c.header_ {
23566		reqHeaders[k] = v
23567	}
23568	reqHeaders.Set("User-Agent", c.s.userAgent())
23569	var body io.Reader = nil
23570	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
23571	if err != nil {
23572		return nil, err
23573	}
23574	reqHeaders.Set("Content-Type", "application/json")
23575	c.urlParams_.Set("alt", alt)
23576	c.urlParams_.Set("prettyPrint", "false")
23577	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/photos/thumbnail")
23578	urls += "?" + c.urlParams_.Encode()
23579	req, err := http.NewRequest("PUT", urls, body)
23580	if err != nil {
23581		return nil, err
23582	}
23583	req.Header = reqHeaders
23584	googleapi.Expand(req.URL, map[string]string{
23585		"userKey": c.userKey,
23586	})
23587	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23588}
23589
23590// Do executes the "directory.users.photos.update" call.
23591// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
23592// status code is an error. Response headers are in either
23593// *UserPhoto.ServerResponse.Header or (if a response was returned at
23594// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23595// to check whether the returned error was because
23596// http.StatusNotModified was returned.
23597func (c *UsersPhotosUpdateCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
23598	gensupport.SetOptions(c.urlParams_, opts...)
23599	res, err := c.doRequest("json")
23600	if res != nil && res.StatusCode == http.StatusNotModified {
23601		if res.Body != nil {
23602			res.Body.Close()
23603		}
23604		return nil, &googleapi.Error{
23605			Code:   res.StatusCode,
23606			Header: res.Header,
23607		}
23608	}
23609	if err != nil {
23610		return nil, err
23611	}
23612	defer googleapi.CloseBody(res)
23613	if err := googleapi.CheckResponse(res); err != nil {
23614		return nil, err
23615	}
23616	ret := &UserPhoto{
23617		ServerResponse: googleapi.ServerResponse{
23618			Header:         res.Header,
23619			HTTPStatusCode: res.StatusCode,
23620		},
23621	}
23622	target := &ret
23623	if err := gensupport.DecodeResponse(target, res); err != nil {
23624		return nil, err
23625	}
23626	return ret, nil
23627	// {
23628	//   "description": "Adds a photo for the user.",
23629	//   "flatPath": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23630	//   "httpMethod": "PUT",
23631	//   "id": "directory.users.photos.update",
23632	//   "parameterOrder": [
23633	//     "userKey"
23634	//   ],
23635	//   "parameters": {
23636	//     "userKey": {
23637	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
23638	//       "location": "path",
23639	//       "required": true,
23640	//       "type": "string"
23641	//     }
23642	//   },
23643	//   "path": "admin/directory/v1/users/{userKey}/photos/thumbnail",
23644	//   "request": {
23645	//     "$ref": "UserPhoto"
23646	//   },
23647	//   "response": {
23648	//     "$ref": "UserPhoto"
23649	//   },
23650	//   "scopes": [
23651	//     "https://www.googleapis.com/auth/admin.directory.user"
23652	//   ]
23653	// }
23654
23655}
23656
23657// method id "directory.verificationCodes.generate":
23658
23659type VerificationCodesGenerateCall struct {
23660	s          *Service
23661	userKey    string
23662	urlParams_ gensupport.URLParams
23663	ctx_       context.Context
23664	header_    http.Header
23665}
23666
23667// Generate: Generates new backup verification codes for the user.
23668//
23669// - userKey: Email or immutable ID of the user.
23670func (r *VerificationCodesService) Generate(userKey string) *VerificationCodesGenerateCall {
23671	c := &VerificationCodesGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23672	c.userKey = userKey
23673	return c
23674}
23675
23676// Fields allows partial responses to be retrieved. See
23677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23678// for more information.
23679func (c *VerificationCodesGenerateCall) Fields(s ...googleapi.Field) *VerificationCodesGenerateCall {
23680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23681	return c
23682}
23683
23684// Context sets the context to be used in this call's Do method. Any
23685// pending HTTP request will be aborted if the provided context is
23686// canceled.
23687func (c *VerificationCodesGenerateCall) Context(ctx context.Context) *VerificationCodesGenerateCall {
23688	c.ctx_ = ctx
23689	return c
23690}
23691
23692// Header returns an http.Header that can be modified by the caller to
23693// add HTTP headers to the request.
23694func (c *VerificationCodesGenerateCall) Header() http.Header {
23695	if c.header_ == nil {
23696		c.header_ = make(http.Header)
23697	}
23698	return c.header_
23699}
23700
23701func (c *VerificationCodesGenerateCall) doRequest(alt string) (*http.Response, error) {
23702	reqHeaders := make(http.Header)
23703	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23704	for k, v := range c.header_ {
23705		reqHeaders[k] = v
23706	}
23707	reqHeaders.Set("User-Agent", c.s.userAgent())
23708	var body io.Reader = nil
23709	c.urlParams_.Set("alt", alt)
23710	c.urlParams_.Set("prettyPrint", "false")
23711	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes/generate")
23712	urls += "?" + c.urlParams_.Encode()
23713	req, err := http.NewRequest("POST", urls, body)
23714	if err != nil {
23715		return nil, err
23716	}
23717	req.Header = reqHeaders
23718	googleapi.Expand(req.URL, map[string]string{
23719		"userKey": c.userKey,
23720	})
23721	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23722}
23723
23724// Do executes the "directory.verificationCodes.generate" call.
23725func (c *VerificationCodesGenerateCall) Do(opts ...googleapi.CallOption) error {
23726	gensupport.SetOptions(c.urlParams_, opts...)
23727	res, err := c.doRequest("json")
23728	if err != nil {
23729		return err
23730	}
23731	defer googleapi.CloseBody(res)
23732	if err := googleapi.CheckResponse(res); err != nil {
23733		return err
23734	}
23735	return nil
23736	// {
23737	//   "description": "Generates new backup verification codes for the user.",
23738	//   "flatPath": "admin/directory/v1/users/{userKey}/verificationCodes/generate",
23739	//   "httpMethod": "POST",
23740	//   "id": "directory.verificationCodes.generate",
23741	//   "parameterOrder": [
23742	//     "userKey"
23743	//   ],
23744	//   "parameters": {
23745	//     "userKey": {
23746	//       "description": "Email or immutable ID of the user",
23747	//       "location": "path",
23748	//       "required": true,
23749	//       "type": "string"
23750	//     }
23751	//   },
23752	//   "path": "admin/directory/v1/users/{userKey}/verificationCodes/generate",
23753	//   "scopes": [
23754	//     "https://www.googleapis.com/auth/admin.directory.user.security"
23755	//   ]
23756	// }
23757
23758}
23759
23760// method id "directory.verificationCodes.invalidate":
23761
23762type VerificationCodesInvalidateCall struct {
23763	s          *Service
23764	userKey    string
23765	urlParams_ gensupport.URLParams
23766	ctx_       context.Context
23767	header_    http.Header
23768}
23769
23770// Invalidate: Invalidates the current backup verification codes for the
23771// user.
23772//
23773// - userKey: Email or immutable ID of the user.
23774func (r *VerificationCodesService) Invalidate(userKey string) *VerificationCodesInvalidateCall {
23775	c := &VerificationCodesInvalidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23776	c.userKey = userKey
23777	return c
23778}
23779
23780// Fields allows partial responses to be retrieved. See
23781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23782// for more information.
23783func (c *VerificationCodesInvalidateCall) Fields(s ...googleapi.Field) *VerificationCodesInvalidateCall {
23784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23785	return c
23786}
23787
23788// Context sets the context to be used in this call's Do method. Any
23789// pending HTTP request will be aborted if the provided context is
23790// canceled.
23791func (c *VerificationCodesInvalidateCall) Context(ctx context.Context) *VerificationCodesInvalidateCall {
23792	c.ctx_ = ctx
23793	return c
23794}
23795
23796// Header returns an http.Header that can be modified by the caller to
23797// add HTTP headers to the request.
23798func (c *VerificationCodesInvalidateCall) Header() http.Header {
23799	if c.header_ == nil {
23800		c.header_ = make(http.Header)
23801	}
23802	return c.header_
23803}
23804
23805func (c *VerificationCodesInvalidateCall) doRequest(alt string) (*http.Response, error) {
23806	reqHeaders := make(http.Header)
23807	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23808	for k, v := range c.header_ {
23809		reqHeaders[k] = v
23810	}
23811	reqHeaders.Set("User-Agent", c.s.userAgent())
23812	var body io.Reader = nil
23813	c.urlParams_.Set("alt", alt)
23814	c.urlParams_.Set("prettyPrint", "false")
23815	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes/invalidate")
23816	urls += "?" + c.urlParams_.Encode()
23817	req, err := http.NewRequest("POST", urls, body)
23818	if err != nil {
23819		return nil, err
23820	}
23821	req.Header = reqHeaders
23822	googleapi.Expand(req.URL, map[string]string{
23823		"userKey": c.userKey,
23824	})
23825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23826}
23827
23828// Do executes the "directory.verificationCodes.invalidate" call.
23829func (c *VerificationCodesInvalidateCall) Do(opts ...googleapi.CallOption) error {
23830	gensupport.SetOptions(c.urlParams_, opts...)
23831	res, err := c.doRequest("json")
23832	if err != nil {
23833		return err
23834	}
23835	defer googleapi.CloseBody(res)
23836	if err := googleapi.CheckResponse(res); err != nil {
23837		return err
23838	}
23839	return nil
23840	// {
23841	//   "description": "Invalidates the current backup verification codes for the user.",
23842	//   "flatPath": "admin/directory/v1/users/{userKey}/verificationCodes/invalidate",
23843	//   "httpMethod": "POST",
23844	//   "id": "directory.verificationCodes.invalidate",
23845	//   "parameterOrder": [
23846	//     "userKey"
23847	//   ],
23848	//   "parameters": {
23849	//     "userKey": {
23850	//       "description": "Email or immutable ID of the user",
23851	//       "location": "path",
23852	//       "required": true,
23853	//       "type": "string"
23854	//     }
23855	//   },
23856	//   "path": "admin/directory/v1/users/{userKey}/verificationCodes/invalidate",
23857	//   "scopes": [
23858	//     "https://www.googleapis.com/auth/admin.directory.user.security"
23859	//   ]
23860	// }
23861
23862}
23863
23864// method id "directory.verificationCodes.list":
23865
23866type VerificationCodesListCall struct {
23867	s            *Service
23868	userKey      string
23869	urlParams_   gensupport.URLParams
23870	ifNoneMatch_ string
23871	ctx_         context.Context
23872	header_      http.Header
23873}
23874
23875// List: Returns the current set of valid backup verification codes for
23876// the specified user.
23877//
23878// - userKey: Identifies the user in the API request. The value can be
23879//   the user's primary email address, alias email address, or unique
23880//   user ID.
23881func (r *VerificationCodesService) List(userKey string) *VerificationCodesListCall {
23882	c := &VerificationCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23883	c.userKey = userKey
23884	return c
23885}
23886
23887// Fields allows partial responses to be retrieved. See
23888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23889// for more information.
23890func (c *VerificationCodesListCall) Fields(s ...googleapi.Field) *VerificationCodesListCall {
23891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23892	return c
23893}
23894
23895// IfNoneMatch sets the optional parameter which makes the operation
23896// fail if the object's ETag matches the given value. This is useful for
23897// getting updates only after the object has changed since the last
23898// request. Use googleapi.IsNotModified to check whether the response
23899// error from Do is the result of In-None-Match.
23900func (c *VerificationCodesListCall) IfNoneMatch(entityTag string) *VerificationCodesListCall {
23901	c.ifNoneMatch_ = entityTag
23902	return c
23903}
23904
23905// Context sets the context to be used in this call's Do method. Any
23906// pending HTTP request will be aborted if the provided context is
23907// canceled.
23908func (c *VerificationCodesListCall) Context(ctx context.Context) *VerificationCodesListCall {
23909	c.ctx_ = ctx
23910	return c
23911}
23912
23913// Header returns an http.Header that can be modified by the caller to
23914// add HTTP headers to the request.
23915func (c *VerificationCodesListCall) Header() http.Header {
23916	if c.header_ == nil {
23917		c.header_ = make(http.Header)
23918	}
23919	return c.header_
23920}
23921
23922func (c *VerificationCodesListCall) doRequest(alt string) (*http.Response, error) {
23923	reqHeaders := make(http.Header)
23924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210812")
23925	for k, v := range c.header_ {
23926		reqHeaders[k] = v
23927	}
23928	reqHeaders.Set("User-Agent", c.s.userAgent())
23929	if c.ifNoneMatch_ != "" {
23930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23931	}
23932	var body io.Reader = nil
23933	c.urlParams_.Set("alt", alt)
23934	c.urlParams_.Set("prettyPrint", "false")
23935	urls := googleapi.ResolveRelative(c.s.BasePath, "admin/directory/v1/users/{userKey}/verificationCodes")
23936	urls += "?" + c.urlParams_.Encode()
23937	req, err := http.NewRequest("GET", urls, body)
23938	if err != nil {
23939		return nil, err
23940	}
23941	req.Header = reqHeaders
23942	googleapi.Expand(req.URL, map[string]string{
23943		"userKey": c.userKey,
23944	})
23945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23946}
23947
23948// Do executes the "directory.verificationCodes.list" call.
23949// Exactly one of *VerificationCodes or error will be non-nil. Any
23950// non-2xx status code is an error. Response headers are in either
23951// *VerificationCodes.ServerResponse.Header or (if a response was
23952// returned at all) in error.(*googleapi.Error).Header. Use
23953// googleapi.IsNotModified to check whether the returned error was
23954// because http.StatusNotModified was returned.
23955func (c *VerificationCodesListCall) Do(opts ...googleapi.CallOption) (*VerificationCodes, error) {
23956	gensupport.SetOptions(c.urlParams_, opts...)
23957	res, err := c.doRequest("json")
23958	if res != nil && res.StatusCode == http.StatusNotModified {
23959		if res.Body != nil {
23960			res.Body.Close()
23961		}
23962		return nil, &googleapi.Error{
23963			Code:   res.StatusCode,
23964			Header: res.Header,
23965		}
23966	}
23967	if err != nil {
23968		return nil, err
23969	}
23970	defer googleapi.CloseBody(res)
23971	if err := googleapi.CheckResponse(res); err != nil {
23972		return nil, err
23973	}
23974	ret := &VerificationCodes{
23975		ServerResponse: googleapi.ServerResponse{
23976			Header:         res.Header,
23977			HTTPStatusCode: res.StatusCode,
23978		},
23979	}
23980	target := &ret
23981	if err := gensupport.DecodeResponse(target, res); err != nil {
23982		return nil, err
23983	}
23984	return ret, nil
23985	// {
23986	//   "description": "Returns the current set of valid backup verification codes for the specified user.",
23987	//   "flatPath": "admin/directory/v1/users/{userKey}/verificationCodes",
23988	//   "httpMethod": "GET",
23989	//   "id": "directory.verificationCodes.list",
23990	//   "parameterOrder": [
23991	//     "userKey"
23992	//   ],
23993	//   "parameters": {
23994	//     "userKey": {
23995	//       "description": "Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.",
23996	//       "location": "path",
23997	//       "required": true,
23998	//       "type": "string"
23999	//     }
24000	//   },
24001	//   "path": "admin/directory/v1/users/{userKey}/verificationCodes",
24002	//   "response": {
24003	//     "$ref": "VerificationCodes"
24004	//   },
24005	//   "scopes": [
24006	//     "https://www.googleapis.com/auth/admin.directory.user.security"
24007	//   ]
24008	// }
24009
24010}
24011