1// Copyright 2019 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 Directory API.
8//
9// For product documentation, see: https://developers.google.com/admin-sdk/directory/
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.AdminDirectoryUserschemaReadonlyScope))
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	gensupport "google.golang.org/api/gensupport"
57	googleapi "google.golang.org/api/googleapi"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "admin:directory_v1"
77const apiName = "admin"
78const apiVersion = "directory_v1"
79const basePath = "https://www.googleapis.com/admin/directory/v1/"
80
81// OAuth2 scopes used by this API.
82const (
83	// View and manage customer related information
84	AdminDirectoryCustomerScope = "https://www.googleapis.com/auth/admin.directory.customer"
85
86	// View customer related information
87	AdminDirectoryCustomerReadonlyScope = "https://www.googleapis.com/auth/admin.directory.customer.readonly"
88
89	// View and manage your Chrome OS devices' metadata
90	AdminDirectoryDeviceChromeosScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos"
91
92	// View your Chrome OS devices' metadata
93	AdminDirectoryDeviceChromeosReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
94
95	// View and manage your mobile devices' metadata
96	AdminDirectoryDeviceMobileScope = "https://www.googleapis.com/auth/admin.directory.device.mobile"
97
98	// Manage your mobile devices by performing administrative tasks
99	AdminDirectoryDeviceMobileActionScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.action"
100
101	// View your mobile devices' metadata
102	AdminDirectoryDeviceMobileReadonlyScope = "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
103
104	// View and manage the provisioning of domains for your customers
105	AdminDirectoryDomainScope = "https://www.googleapis.com/auth/admin.directory.domain"
106
107	// View domains related to your customers
108	AdminDirectoryDomainReadonlyScope = "https://www.googleapis.com/auth/admin.directory.domain.readonly"
109
110	// View and manage the provisioning of groups on your domain
111	AdminDirectoryGroupScope = "https://www.googleapis.com/auth/admin.directory.group"
112
113	// View and manage group subscriptions on your domain
114	AdminDirectoryGroupMemberScope = "https://www.googleapis.com/auth/admin.directory.group.member"
115
116	// View group subscriptions on your domain
117	AdminDirectoryGroupMemberReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.member.readonly"
118
119	// View groups on your domain
120	AdminDirectoryGroupReadonlyScope = "https://www.googleapis.com/auth/admin.directory.group.readonly"
121
122	// View and manage notifications received on your domain
123	AdminDirectoryNotificationsScope = "https://www.googleapis.com/auth/admin.directory.notifications"
124
125	// View and manage organization units on your domain
126	AdminDirectoryOrgunitScope = "https://www.googleapis.com/auth/admin.directory.orgunit"
127
128	// View organization units on your domain
129	AdminDirectoryOrgunitReadonlyScope = "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
130
131	// View and manage the provisioning of calendar resources on your domain
132	AdminDirectoryResourceCalendarScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar"
133
134	// View calendar resources on your domain
135	AdminDirectoryResourceCalendarReadonlyScope = "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
136
137	// Manage delegated admin roles for your domain
138	AdminDirectoryRolemanagementScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement"
139
140	// View delegated admin roles for your domain
141	AdminDirectoryRolemanagementReadonlyScope = "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
142
143	// View and manage the provisioning of users on your domain
144	AdminDirectoryUserScope = "https://www.googleapis.com/auth/admin.directory.user"
145
146	// View and manage user aliases on your domain
147	AdminDirectoryUserAliasScope = "https://www.googleapis.com/auth/admin.directory.user.alias"
148
149	// View user aliases on your domain
150	AdminDirectoryUserAliasReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.alias.readonly"
151
152	// View users on your domain
153	AdminDirectoryUserReadonlyScope = "https://www.googleapis.com/auth/admin.directory.user.readonly"
154
155	// Manage data access permissions for users on your domain
156	AdminDirectoryUserSecurityScope = "https://www.googleapis.com/auth/admin.directory.user.security"
157
158	// View and manage the provisioning of user schemas on your domain
159	AdminDirectoryUserschemaScope = "https://www.googleapis.com/auth/admin.directory.userschema"
160
161	// View user schemas on your domain
162	AdminDirectoryUserschemaReadonlyScope = "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
163)
164
165// NewService creates a new Service.
166func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
167	scopesOption := option.WithScopes(
168		"https://www.googleapis.com/auth/admin.directory.customer",
169		"https://www.googleapis.com/auth/admin.directory.customer.readonly",
170		"https://www.googleapis.com/auth/admin.directory.device.chromeos",
171		"https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly",
172		"https://www.googleapis.com/auth/admin.directory.device.mobile",
173		"https://www.googleapis.com/auth/admin.directory.device.mobile.action",
174		"https://www.googleapis.com/auth/admin.directory.device.mobile.readonly",
175		"https://www.googleapis.com/auth/admin.directory.domain",
176		"https://www.googleapis.com/auth/admin.directory.domain.readonly",
177		"https://www.googleapis.com/auth/admin.directory.group",
178		"https://www.googleapis.com/auth/admin.directory.group.member",
179		"https://www.googleapis.com/auth/admin.directory.group.member.readonly",
180		"https://www.googleapis.com/auth/admin.directory.group.readonly",
181		"https://www.googleapis.com/auth/admin.directory.notifications",
182		"https://www.googleapis.com/auth/admin.directory.orgunit",
183		"https://www.googleapis.com/auth/admin.directory.orgunit.readonly",
184		"https://www.googleapis.com/auth/admin.directory.resource.calendar",
185		"https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly",
186		"https://www.googleapis.com/auth/admin.directory.rolemanagement",
187		"https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly",
188		"https://www.googleapis.com/auth/admin.directory.user",
189		"https://www.googleapis.com/auth/admin.directory.user.alias",
190		"https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
191		"https://www.googleapis.com/auth/admin.directory.user.readonly",
192		"https://www.googleapis.com/auth/admin.directory.user.security",
193		"https://www.googleapis.com/auth/admin.directory.userschema",
194		"https://www.googleapis.com/auth/admin.directory.userschema.readonly",
195	)
196	// NOTE: prepend, so we don't override user-specified scopes.
197	opts = append([]option.ClientOption{scopesOption}, opts...)
198	client, endpoint, err := htransport.NewClient(ctx, opts...)
199	if err != nil {
200		return nil, err
201	}
202	s, err := New(client)
203	if err != nil {
204		return nil, err
205	}
206	if endpoint != "" {
207		s.BasePath = endpoint
208	}
209	return s, nil
210}
211
212// New creates a new Service. It uses the provided http.Client for requests.
213//
214// Deprecated: please use NewService instead.
215// To provide a custom HTTP client, use option.WithHTTPClient.
216// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
217func New(client *http.Client) (*Service, error) {
218	if client == nil {
219		return nil, errors.New("client is nil")
220	}
221	s := &Service{client: client, BasePath: basePath}
222	s.Asps = NewAspsService(s)
223	s.Channels = NewChannelsService(s)
224	s.Chromeosdevices = NewChromeosdevicesService(s)
225	s.Customers = NewCustomersService(s)
226	s.DomainAliases = NewDomainAliasesService(s)
227	s.Domains = NewDomainsService(s)
228	s.Groups = NewGroupsService(s)
229	s.Members = NewMembersService(s)
230	s.Mobiledevices = NewMobiledevicesService(s)
231	s.Notifications = NewNotificationsService(s)
232	s.Orgunits = NewOrgunitsService(s)
233	s.Privileges = NewPrivilegesService(s)
234	s.ResolvedAppAccessSettings = NewResolvedAppAccessSettingsService(s)
235	s.Resources = NewResourcesService(s)
236	s.RoleAssignments = NewRoleAssignmentsService(s)
237	s.Roles = NewRolesService(s)
238	s.Schemas = NewSchemasService(s)
239	s.Tokens = NewTokensService(s)
240	s.Users = NewUsersService(s)
241	s.VerificationCodes = NewVerificationCodesService(s)
242	return s, nil
243}
244
245type Service struct {
246	client    *http.Client
247	BasePath  string // API endpoint base URL
248	UserAgent string // optional additional User-Agent fragment
249
250	Asps *AspsService
251
252	Channels *ChannelsService
253
254	Chromeosdevices *ChromeosdevicesService
255
256	Customers *CustomersService
257
258	DomainAliases *DomainAliasesService
259
260	Domains *DomainsService
261
262	Groups *GroupsService
263
264	Members *MembersService
265
266	Mobiledevices *MobiledevicesService
267
268	Notifications *NotificationsService
269
270	Orgunits *OrgunitsService
271
272	Privileges *PrivilegesService
273
274	ResolvedAppAccessSettings *ResolvedAppAccessSettingsService
275
276	Resources *ResourcesService
277
278	RoleAssignments *RoleAssignmentsService
279
280	Roles *RolesService
281
282	Schemas *SchemasService
283
284	Tokens *TokensService
285
286	Users *UsersService
287
288	VerificationCodes *VerificationCodesService
289}
290
291func (s *Service) userAgent() string {
292	if s.UserAgent == "" {
293		return googleapi.UserAgent
294	}
295	return googleapi.UserAgent + " " + s.UserAgent
296}
297
298func NewAspsService(s *Service) *AspsService {
299	rs := &AspsService{s: s}
300	return rs
301}
302
303type AspsService struct {
304	s *Service
305}
306
307func NewChannelsService(s *Service) *ChannelsService {
308	rs := &ChannelsService{s: s}
309	return rs
310}
311
312type ChannelsService struct {
313	s *Service
314}
315
316func NewChromeosdevicesService(s *Service) *ChromeosdevicesService {
317	rs := &ChromeosdevicesService{s: s}
318	return rs
319}
320
321type ChromeosdevicesService struct {
322	s *Service
323}
324
325func NewCustomersService(s *Service) *CustomersService {
326	rs := &CustomersService{s: s}
327	return rs
328}
329
330type CustomersService struct {
331	s *Service
332}
333
334func NewDomainAliasesService(s *Service) *DomainAliasesService {
335	rs := &DomainAliasesService{s: s}
336	return rs
337}
338
339type DomainAliasesService struct {
340	s *Service
341}
342
343func NewDomainsService(s *Service) *DomainsService {
344	rs := &DomainsService{s: s}
345	return rs
346}
347
348type DomainsService struct {
349	s *Service
350}
351
352func NewGroupsService(s *Service) *GroupsService {
353	rs := &GroupsService{s: s}
354	rs.Aliases = NewGroupsAliasesService(s)
355	return rs
356}
357
358type GroupsService struct {
359	s *Service
360
361	Aliases *GroupsAliasesService
362}
363
364func NewGroupsAliasesService(s *Service) *GroupsAliasesService {
365	rs := &GroupsAliasesService{s: s}
366	return rs
367}
368
369type GroupsAliasesService struct {
370	s *Service
371}
372
373func NewMembersService(s *Service) *MembersService {
374	rs := &MembersService{s: s}
375	return rs
376}
377
378type MembersService struct {
379	s *Service
380}
381
382func NewMobiledevicesService(s *Service) *MobiledevicesService {
383	rs := &MobiledevicesService{s: s}
384	return rs
385}
386
387type MobiledevicesService struct {
388	s *Service
389}
390
391func NewNotificationsService(s *Service) *NotificationsService {
392	rs := &NotificationsService{s: s}
393	return rs
394}
395
396type NotificationsService struct {
397	s *Service
398}
399
400func NewOrgunitsService(s *Service) *OrgunitsService {
401	rs := &OrgunitsService{s: s}
402	return rs
403}
404
405type OrgunitsService struct {
406	s *Service
407}
408
409func NewPrivilegesService(s *Service) *PrivilegesService {
410	rs := &PrivilegesService{s: s}
411	return rs
412}
413
414type PrivilegesService struct {
415	s *Service
416}
417
418func NewResolvedAppAccessSettingsService(s *Service) *ResolvedAppAccessSettingsService {
419	rs := &ResolvedAppAccessSettingsService{s: s}
420	return rs
421}
422
423type ResolvedAppAccessSettingsService struct {
424	s *Service
425}
426
427func NewResourcesService(s *Service) *ResourcesService {
428	rs := &ResourcesService{s: s}
429	rs.Buildings = NewResourcesBuildingsService(s)
430	rs.Calendars = NewResourcesCalendarsService(s)
431	rs.Features = NewResourcesFeaturesService(s)
432	return rs
433}
434
435type ResourcesService struct {
436	s *Service
437
438	Buildings *ResourcesBuildingsService
439
440	Calendars *ResourcesCalendarsService
441
442	Features *ResourcesFeaturesService
443}
444
445func NewResourcesBuildingsService(s *Service) *ResourcesBuildingsService {
446	rs := &ResourcesBuildingsService{s: s}
447	return rs
448}
449
450type ResourcesBuildingsService struct {
451	s *Service
452}
453
454func NewResourcesCalendarsService(s *Service) *ResourcesCalendarsService {
455	rs := &ResourcesCalendarsService{s: s}
456	return rs
457}
458
459type ResourcesCalendarsService struct {
460	s *Service
461}
462
463func NewResourcesFeaturesService(s *Service) *ResourcesFeaturesService {
464	rs := &ResourcesFeaturesService{s: s}
465	return rs
466}
467
468type ResourcesFeaturesService struct {
469	s *Service
470}
471
472func NewRoleAssignmentsService(s *Service) *RoleAssignmentsService {
473	rs := &RoleAssignmentsService{s: s}
474	return rs
475}
476
477type RoleAssignmentsService struct {
478	s *Service
479}
480
481func NewRolesService(s *Service) *RolesService {
482	rs := &RolesService{s: s}
483	return rs
484}
485
486type RolesService struct {
487	s *Service
488}
489
490func NewSchemasService(s *Service) *SchemasService {
491	rs := &SchemasService{s: s}
492	return rs
493}
494
495type SchemasService struct {
496	s *Service
497}
498
499func NewTokensService(s *Service) *TokensService {
500	rs := &TokensService{s: s}
501	return rs
502}
503
504type TokensService struct {
505	s *Service
506}
507
508func NewUsersService(s *Service) *UsersService {
509	rs := &UsersService{s: s}
510	rs.Aliases = NewUsersAliasesService(s)
511	rs.Photos = NewUsersPhotosService(s)
512	return rs
513}
514
515type UsersService struct {
516	s *Service
517
518	Aliases *UsersAliasesService
519
520	Photos *UsersPhotosService
521}
522
523func NewUsersAliasesService(s *Service) *UsersAliasesService {
524	rs := &UsersAliasesService{s: s}
525	return rs
526}
527
528type UsersAliasesService struct {
529	s *Service
530}
531
532func NewUsersPhotosService(s *Service) *UsersPhotosService {
533	rs := &UsersPhotosService{s: s}
534	return rs
535}
536
537type UsersPhotosService struct {
538	s *Service
539}
540
541func NewVerificationCodesService(s *Service) *VerificationCodesService {
542	rs := &VerificationCodesService{s: s}
543	return rs
544}
545
546type VerificationCodesService struct {
547	s *Service
548}
549
550// Alias: JSON template for Alias object in Directory API.
551type Alias struct {
552	// Alias: A alias email
553	Alias string `json:"alias,omitempty"`
554
555	// Etag: ETag of the resource.
556	Etag string `json:"etag,omitempty"`
557
558	// Id: Unique id of the group (Read-only) Unique id of the user
559	// (Read-only)
560	Id string `json:"id,omitempty"`
561
562	// Kind: Kind of resource this is.
563	Kind string `json:"kind,omitempty"`
564
565	// PrimaryEmail: Group's primary email (Read-only) User's primary email
566	// (Read-only)
567	PrimaryEmail string `json:"primaryEmail,omitempty"`
568
569	// ServerResponse contains the HTTP response code and headers from the
570	// server.
571	googleapi.ServerResponse `json:"-"`
572
573	// ForceSendFields is a list of field names (e.g. "Alias") to
574	// unconditionally include in API requests. By default, fields with
575	// empty values are omitted from API requests. However, any non-pointer,
576	// non-interface field appearing in ForceSendFields will be sent to the
577	// server regardless of whether the field is empty or not. This may be
578	// used to include empty fields in Patch requests.
579	ForceSendFields []string `json:"-"`
580
581	// NullFields is a list of field names (e.g. "Alias") to include in API
582	// requests with the JSON null value. By default, fields with empty
583	// values are omitted from API requests. However, any field with an
584	// empty value appearing in NullFields will be sent to the server as
585	// null. It is an error if a field in this list has a non-empty value.
586	// This may be used to include null fields in Patch requests.
587	NullFields []string `json:"-"`
588}
589
590func (s *Alias) MarshalJSON() ([]byte, error) {
591	type NoMethod Alias
592	raw := NoMethod(*s)
593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
594}
595
596// Aliases: JSON response template to list aliases in Directory API.
597type Aliases struct {
598	// Aliases: List of alias objects.
599	Aliases []interface{} `json:"aliases,omitempty"`
600
601	// Etag: ETag of the resource.
602	Etag string `json:"etag,omitempty"`
603
604	// Kind: Kind of resource this is.
605	Kind string `json:"kind,omitempty"`
606
607	// ServerResponse contains the HTTP response code and headers from the
608	// server.
609	googleapi.ServerResponse `json:"-"`
610
611	// ForceSendFields is a list of field names (e.g. "Aliases") to
612	// unconditionally include in API requests. By default, fields with
613	// empty values are omitted from API requests. However, any non-pointer,
614	// non-interface field appearing in ForceSendFields will be sent to the
615	// server regardless of whether the field is empty or not. This may be
616	// used to include empty fields in Patch requests.
617	ForceSendFields []string `json:"-"`
618
619	// NullFields is a list of field names (e.g. "Aliases") to include in
620	// API requests with the JSON null value. By default, fields with empty
621	// values are omitted from API requests. However, any field with an
622	// empty value appearing in NullFields will be sent to the server as
623	// null. It is an error if a field in this list has a non-empty value.
624	// This may be used to include null fields in Patch requests.
625	NullFields []string `json:"-"`
626}
627
628func (s *Aliases) MarshalJSON() ([]byte, error) {
629	type NoMethod Aliases
630	raw := NoMethod(*s)
631	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
632}
633
634// AppAccessCollections: JSON template for App Access Collections
635// Resource object in Directory API.
636type AppAccessCollections struct {
637	// BlockedApiAccessBuckets: List of blocked api access buckets.
638	BlockedApiAccessBuckets []string `json:"blockedApiAccessBuckets,omitempty"`
639
640	// EnforceSettingsForAndroidDrive: Boolean to indicate whether to
641	// enforce app access settings on Android Drive or not.
642	EnforceSettingsForAndroidDrive bool `json:"enforceSettingsForAndroidDrive,omitempty"`
643
644	// ErrorMessage: Error message provided by the Admin that will be shown
645	// to the user when an app is blocked.
646	ErrorMessage string `json:"errorMessage,omitempty"`
647
648	// Etag: ETag of the resource.
649	Etag string `json:"etag,omitempty"`
650
651	// Kind: Identifies the resource as an app access collection. Value:
652	// admin#directory#appaccesscollection
653	Kind string `json:"kind,omitempty"`
654
655	// ResourceId: Unique ID of app access collection. (Readonly)
656	ResourceId int64 `json:"resourceId,omitempty,string"`
657
658	// ResourceName: Resource name given by the customer while
659	// creating/updating. Should be unique under given customer.
660	ResourceName string `json:"resourceName,omitempty"`
661
662	// TrustDomainOwnedApps: Boolean that indicates whether to trust domain
663	// owned apps.
664	TrustDomainOwnedApps bool `json:"trustDomainOwnedApps,omitempty"`
665
666	// ServerResponse contains the HTTP response code and headers from the
667	// server.
668	googleapi.ServerResponse `json:"-"`
669
670	// ForceSendFields is a list of field names (e.g.
671	// "BlockedApiAccessBuckets") to unconditionally include in API
672	// requests. By default, fields with empty values are omitted from API
673	// requests. However, any non-pointer, non-interface field appearing in
674	// ForceSendFields will be sent to the server regardless of whether the
675	// field is empty or not. This may be used to include empty fields in
676	// Patch requests.
677	ForceSendFields []string `json:"-"`
678
679	// NullFields is a list of field names (e.g. "BlockedApiAccessBuckets")
680	// to include in API requests with the JSON null value. By default,
681	// fields with empty values are omitted from API requests. However, any
682	// field with an empty value appearing in NullFields will be sent to the
683	// server as null. It is an error if a field in this list has a
684	// non-empty value. This may be used to include null fields in Patch
685	// requests.
686	NullFields []string `json:"-"`
687}
688
689func (s *AppAccessCollections) MarshalJSON() ([]byte, error) {
690	type NoMethod AppAccessCollections
691	raw := NoMethod(*s)
692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
693}
694
695// Asp: The template that returns individual ASP (Access Code) data.
696type Asp struct {
697	// CodeId: The unique ID of the ASP.
698	CodeId int64 `json:"codeId,omitempty"`
699
700	// CreationTime: The time when the ASP was created. Expressed in Unix
701	// time format.
702	CreationTime int64 `json:"creationTime,omitempty,string"`
703
704	// Etag: ETag of the ASP.
705	Etag string `json:"etag,omitempty"`
706
707	// Kind: The type of the API resource. This is always
708	// admin#directory#asp.
709	Kind string `json:"kind,omitempty"`
710
711	// LastTimeUsed: The time when the ASP was last used. Expressed in Unix
712	// time format.
713	LastTimeUsed int64 `json:"lastTimeUsed,omitempty,string"`
714
715	// Name: The name of the application that the user, represented by their
716	// userId, entered when the ASP was created.
717	Name string `json:"name,omitempty"`
718
719	// UserKey: The unique ID of the user who issued the ASP.
720	UserKey string `json:"userKey,omitempty"`
721
722	// ServerResponse contains the HTTP response code and headers from the
723	// server.
724	googleapi.ServerResponse `json:"-"`
725
726	// ForceSendFields is a list of field names (e.g. "CodeId") to
727	// unconditionally include in API requests. By default, fields with
728	// empty values are omitted from API requests. However, any non-pointer,
729	// non-interface field appearing in ForceSendFields will be sent to the
730	// server regardless of whether the field is empty or not. This may be
731	// used to include empty fields in Patch requests.
732	ForceSendFields []string `json:"-"`
733
734	// NullFields is a list of field names (e.g. "CodeId") to include in API
735	// requests with the JSON null value. By default, fields with empty
736	// values are omitted from API requests. However, any field with an
737	// empty value appearing in NullFields will be sent to the server as
738	// null. It is an error if a field in this list has a non-empty value.
739	// This may be used to include null fields in Patch requests.
740	NullFields []string `json:"-"`
741}
742
743func (s *Asp) MarshalJSON() ([]byte, error) {
744	type NoMethod Asp
745	raw := NoMethod(*s)
746	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
747}
748
749type Asps struct {
750	// Etag: ETag of the resource.
751	Etag string `json:"etag,omitempty"`
752
753	// Items: A list of ASP resources.
754	Items []*Asp `json:"items,omitempty"`
755
756	// Kind: The type of the API resource. This is always
757	// admin#directory#aspList.
758	Kind string `json:"kind,omitempty"`
759
760	// ServerResponse contains the HTTP response code and headers from the
761	// server.
762	googleapi.ServerResponse `json:"-"`
763
764	// ForceSendFields is a list of field names (e.g. "Etag") to
765	// unconditionally include in API requests. By default, fields with
766	// empty values are omitted from API requests. However, any non-pointer,
767	// non-interface field appearing in ForceSendFields will be sent to the
768	// server regardless of whether the field is empty or not. This may be
769	// used to include empty fields in Patch requests.
770	ForceSendFields []string `json:"-"`
771
772	// NullFields is a list of field names (e.g. "Etag") to include in API
773	// requests with the JSON null value. By default, fields with empty
774	// values are omitted from API requests. However, any field with an
775	// empty value appearing in NullFields will be sent to the server as
776	// null. It is an error if a field in this list has a non-empty value.
777	// This may be used to include null fields in Patch requests.
778	NullFields []string `json:"-"`
779}
780
781func (s *Asps) MarshalJSON() ([]byte, error) {
782	type NoMethod Asps
783	raw := NoMethod(*s)
784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
785}
786
787// Building: JSON template for Building object in Directory API.
788type Building struct {
789	// Address: The postal address of the building. See PostalAddress for
790	// details. Note that only a single address line and region code are
791	// required.
792	Address *BuildingAddress `json:"address,omitempty"`
793
794	// BuildingId: Unique identifier for the building. The maximum length is
795	// 100 characters.
796	BuildingId string `json:"buildingId,omitempty"`
797
798	// BuildingName: The building name as seen by users in Calendar. Must be
799	// unique for the customer. For example, "NYC-CHEL". The maximum length
800	// is 100 characters.
801	BuildingName string `json:"buildingName,omitempty"`
802
803	// Coordinates: The geographic coordinates of the center of the
804	// building, expressed as latitude and longitude in decimal degrees.
805	Coordinates *BuildingCoordinates `json:"coordinates,omitempty"`
806
807	// Description: A brief description of the building. For example,
808	// "Chelsea Market".
809	Description string `json:"description,omitempty"`
810
811	// Etags: ETag of the resource.
812	Etags string `json:"etags,omitempty"`
813
814	// FloorNames: The display names for all floors in this building. The
815	// floors are expected to be sorted in ascending order, from lowest
816	// floor to highest floor. For example, ["B2", "B1", "L", "1", "2",
817	// "2M", "3", "PH"] Must contain at least one entry.
818	FloorNames []string `json:"floorNames,omitempty"`
819
820	// Kind: Kind of resource this is.
821	Kind string `json:"kind,omitempty"`
822
823	// ServerResponse contains the HTTP response code and headers from the
824	// server.
825	googleapi.ServerResponse `json:"-"`
826
827	// ForceSendFields is a list of field names (e.g. "Address") to
828	// unconditionally include in API requests. By default, fields with
829	// empty values are omitted from API requests. However, any non-pointer,
830	// non-interface field appearing in ForceSendFields will be sent to the
831	// server regardless of whether the field is empty or not. This may be
832	// used to include empty fields in Patch requests.
833	ForceSendFields []string `json:"-"`
834
835	// NullFields is a list of field names (e.g. "Address") to include in
836	// API requests with the JSON null value. By default, fields with empty
837	// values are omitted from API requests. However, any field with an
838	// empty value appearing in NullFields will be sent to the server as
839	// null. It is an error if a field in this list has a non-empty value.
840	// This may be used to include null fields in Patch requests.
841	NullFields []string `json:"-"`
842}
843
844func (s *Building) MarshalJSON() ([]byte, error) {
845	type NoMethod Building
846	raw := NoMethod(*s)
847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
848}
849
850// BuildingAddress: JSON template for the postal address of a building
851// in Directory API.
852type BuildingAddress struct {
853	// AddressLines: Unstructured address lines describing the lower levels
854	// of an address.
855	AddressLines []string `json:"addressLines,omitempty"`
856
857	// AdministrativeArea: Optional. Highest administrative subdivision
858	// which is used for postal addresses of a country or region.
859	AdministrativeArea string `json:"administrativeArea,omitempty"`
860
861	// LanguageCode: Optional. BCP-47 language code of the contents of this
862	// address (if known).
863	LanguageCode string `json:"languageCode,omitempty"`
864
865	// Locality: Optional. Generally refers to the city/town portion of the
866	// address. Examples: US city, IT comune, UK post town. In regions of
867	// the world where localities are not well defined or do not fit into
868	// this structure well, leave locality empty and use addressLines.
869	Locality string `json:"locality,omitempty"`
870
871	// PostalCode: Optional. Postal code of the address.
872	PostalCode string `json:"postalCode,omitempty"`
873
874	// RegionCode: Required. CLDR region code of the country/region of the
875	// address.
876	RegionCode string `json:"regionCode,omitempty"`
877
878	// Sublocality: Optional. Sublocality of the address.
879	Sublocality string `json:"sublocality,omitempty"`
880
881	// ForceSendFields is a list of field names (e.g. "AddressLines") to
882	// unconditionally include in API requests. By default, fields with
883	// empty values are omitted from API requests. However, any non-pointer,
884	// non-interface field appearing in ForceSendFields will be sent to the
885	// server regardless of whether the field is empty or not. This may be
886	// used to include empty fields in Patch requests.
887	ForceSendFields []string `json:"-"`
888
889	// NullFields is a list of field names (e.g. "AddressLines") to include
890	// in API requests with the JSON null value. By default, fields with
891	// empty values are omitted from API requests. However, any field with
892	// an empty value appearing in NullFields will be sent to the server as
893	// null. It is an error if a field in this list has a non-empty value.
894	// This may be used to include null fields in Patch requests.
895	NullFields []string `json:"-"`
896}
897
898func (s *BuildingAddress) MarshalJSON() ([]byte, error) {
899	type NoMethod BuildingAddress
900	raw := NoMethod(*s)
901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
902}
903
904// BuildingCoordinates: JSON template for coordinates of a building in
905// Directory API.
906type BuildingCoordinates struct {
907	// Latitude: Latitude in decimal degrees.
908	Latitude float64 `json:"latitude,omitempty"`
909
910	// Longitude: Longitude in decimal degrees.
911	Longitude float64 `json:"longitude,omitempty"`
912
913	// ForceSendFields is a list of field names (e.g. "Latitude") to
914	// unconditionally include in API requests. By default, fields with
915	// empty values are omitted from API requests. However, any non-pointer,
916	// non-interface field appearing in ForceSendFields will be sent to the
917	// server regardless of whether the field is empty or not. This may be
918	// used to include empty fields in Patch requests.
919	ForceSendFields []string `json:"-"`
920
921	// NullFields is a list of field names (e.g. "Latitude") to include in
922	// API requests with the JSON null value. By default, fields with empty
923	// values are omitted from API requests. However, any field with an
924	// empty value appearing in NullFields will be sent to the server as
925	// null. It is an error if a field in this list has a non-empty value.
926	// This may be used to include null fields in Patch requests.
927	NullFields []string `json:"-"`
928}
929
930func (s *BuildingCoordinates) MarshalJSON() ([]byte, error) {
931	type NoMethod BuildingCoordinates
932	raw := NoMethod(*s)
933	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
934}
935
936func (s *BuildingCoordinates) UnmarshalJSON(data []byte) error {
937	type NoMethod BuildingCoordinates
938	var s1 struct {
939		Latitude  gensupport.JSONFloat64 `json:"latitude"`
940		Longitude gensupport.JSONFloat64 `json:"longitude"`
941		*NoMethod
942	}
943	s1.NoMethod = (*NoMethod)(s)
944	if err := json.Unmarshal(data, &s1); err != nil {
945		return err
946	}
947	s.Latitude = float64(s1.Latitude)
948	s.Longitude = float64(s1.Longitude)
949	return nil
950}
951
952// Buildings: JSON template for Building List Response object in
953// Directory API.
954type Buildings struct {
955	// Buildings: The Buildings in this page of results.
956	Buildings []*Building `json:"buildings,omitempty"`
957
958	// Etag: ETag of the resource.
959	Etag string `json:"etag,omitempty"`
960
961	// Kind: Kind of resource this is.
962	Kind string `json:"kind,omitempty"`
963
964	// NextPageToken: The continuation token, used to page through large
965	// result sets. Provide this value in a subsequent request to return the
966	// next page of results.
967	NextPageToken string `json:"nextPageToken,omitempty"`
968
969	// ServerResponse contains the HTTP response code and headers from the
970	// server.
971	googleapi.ServerResponse `json:"-"`
972
973	// ForceSendFields is a list of field names (e.g. "Buildings") to
974	// unconditionally include in API requests. By default, fields with
975	// empty values are omitted from API requests. However, any non-pointer,
976	// non-interface field appearing in ForceSendFields will be sent to the
977	// server regardless of whether the field is empty or not. This may be
978	// used to include empty fields in Patch requests.
979	ForceSendFields []string `json:"-"`
980
981	// NullFields is a list of field names (e.g. "Buildings") to include in
982	// API requests with the JSON null value. By default, fields with empty
983	// values are omitted from API requests. However, any field with an
984	// empty value appearing in NullFields will be sent to the server as
985	// null. It is an error if a field in this list has a non-empty value.
986	// This may be used to include null fields in Patch requests.
987	NullFields []string `json:"-"`
988}
989
990func (s *Buildings) MarshalJSON() ([]byte, error) {
991	type NoMethod Buildings
992	raw := NoMethod(*s)
993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
994}
995
996// CalendarResource: JSON template for Calendar Resource object in
997// Directory API.
998type CalendarResource struct {
999	// BuildingId: Unique ID for the building a resource is located in.
1000	BuildingId string `json:"buildingId,omitempty"`
1001
1002	// Capacity: Capacity of a resource, number of seats in a room.
1003	Capacity int64 `json:"capacity,omitempty"`
1004
1005	// Etags: ETag of the resource.
1006	Etags string `json:"etags,omitempty"`
1007
1008	FeatureInstances interface{} `json:"featureInstances,omitempty"`
1009
1010	// FloorName: Name of the floor a resource is located on.
1011	FloorName string `json:"floorName,omitempty"`
1012
1013	// FloorSection: Name of the section within a floor a resource is
1014	// located in.
1015	FloorSection string `json:"floorSection,omitempty"`
1016
1017	// GeneratedResourceName: The read-only auto-generated name of the
1018	// calendar resource which includes metadata about the resource such as
1019	// building name, floor, capacity, etc. For example, "NYC-2-Training
1020	// Room 1A (16)".
1021	GeneratedResourceName string `json:"generatedResourceName,omitempty"`
1022
1023	// Kind: The type of the resource. For calendar resources, the value is
1024	// admin#directory#resources#calendars#CalendarResource.
1025	Kind string `json:"kind,omitempty"`
1026
1027	// ResourceCategory: The category of the calendar resource. Either
1028	// CONFERENCE_ROOM or OTHER. Legacy data is set to CATEGORY_UNKNOWN.
1029	ResourceCategory string `json:"resourceCategory,omitempty"`
1030
1031	// ResourceDescription: Description of the resource, visible only to
1032	// admins.
1033	ResourceDescription string `json:"resourceDescription,omitempty"`
1034
1035	// ResourceEmail: The read-only email for the calendar resource.
1036	// Generated as part of creating a new calendar resource.
1037	ResourceEmail string `json:"resourceEmail,omitempty"`
1038
1039	// ResourceId: The unique ID for the calendar resource.
1040	ResourceId string `json:"resourceId,omitempty"`
1041
1042	// ResourceName: The name of the calendar resource. For example,
1043	// "Training Room 1A".
1044	ResourceName string `json:"resourceName,omitempty"`
1045
1046	// ResourceType: The type of the calendar resource, intended for
1047	// non-room resources.
1048	ResourceType string `json:"resourceType,omitempty"`
1049
1050	// UserVisibleDescription: Description of the resource, visible to users
1051	// and admins.
1052	UserVisibleDescription string `json:"userVisibleDescription,omitempty"`
1053
1054	// ServerResponse contains the HTTP response code and headers from the
1055	// server.
1056	googleapi.ServerResponse `json:"-"`
1057
1058	// ForceSendFields is a list of field names (e.g. "BuildingId") to
1059	// unconditionally include in API requests. By default, fields with
1060	// empty values are omitted from API requests. However, any non-pointer,
1061	// non-interface field appearing in ForceSendFields will be sent to the
1062	// server regardless of whether the field is empty or not. This may be
1063	// used to include empty fields in Patch requests.
1064	ForceSendFields []string `json:"-"`
1065
1066	// NullFields is a list of field names (e.g. "BuildingId") to include in
1067	// API requests with the JSON null value. By default, fields with empty
1068	// values are omitted from API requests. However, any field with an
1069	// empty value appearing in NullFields will be sent to the server as
1070	// null. It is an error if a field in this list has a non-empty value.
1071	// This may be used to include null fields in Patch requests.
1072	NullFields []string `json:"-"`
1073}
1074
1075func (s *CalendarResource) MarshalJSON() ([]byte, error) {
1076	type NoMethod CalendarResource
1077	raw := NoMethod(*s)
1078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1079}
1080
1081// CalendarResources: JSON template for Calendar Resource List Response
1082// object in Directory API.
1083type CalendarResources struct {
1084	// Etag: ETag of the resource.
1085	Etag string `json:"etag,omitempty"`
1086
1087	// Items: The CalendarResources in this page of results.
1088	Items []*CalendarResource `json:"items,omitempty"`
1089
1090	// Kind: Identifies this as a collection of CalendarResources. This is
1091	// always admin#directory#resources#calendars#calendarResourcesList.
1092	Kind string `json:"kind,omitempty"`
1093
1094	// NextPageToken: The continuation token, used to page through large
1095	// result sets. Provide this value in a subsequent request to return the
1096	// next page of results.
1097	NextPageToken string `json:"nextPageToken,omitempty"`
1098
1099	// ServerResponse contains the HTTP response code and headers from the
1100	// server.
1101	googleapi.ServerResponse `json:"-"`
1102
1103	// ForceSendFields is a list of field names (e.g. "Etag") to
1104	// unconditionally include in API requests. By default, fields with
1105	// empty values are omitted from API requests. However, any non-pointer,
1106	// non-interface field appearing in ForceSendFields will be sent to the
1107	// server regardless of whether the field is empty or not. This may be
1108	// used to include empty fields in Patch requests.
1109	ForceSendFields []string `json:"-"`
1110
1111	// NullFields is a list of field names (e.g. "Etag") to include in API
1112	// requests with the JSON null value. By default, fields with empty
1113	// values are omitted from API requests. However, any field with an
1114	// empty value appearing in NullFields will be sent to the server as
1115	// null. It is an error if a field in this list has a non-empty value.
1116	// This may be used to include null fields in Patch requests.
1117	NullFields []string `json:"-"`
1118}
1119
1120func (s *CalendarResources) MarshalJSON() ([]byte, error) {
1121	type NoMethod CalendarResources
1122	raw := NoMethod(*s)
1123	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1124}
1125
1126// Channel: An notification channel used to watch for resource changes.
1127type Channel struct {
1128	// Address: The address where notifications are delivered for this
1129	// channel.
1130	Address string `json:"address,omitempty"`
1131
1132	// Expiration: Date and time of notification channel expiration,
1133	// expressed as a Unix timestamp, in milliseconds. Optional.
1134	Expiration int64 `json:"expiration,omitempty,string"`
1135
1136	// Id: A UUID or similar unique string that identifies this channel.
1137	Id string `json:"id,omitempty"`
1138
1139	// Kind: Identifies this as a notification channel used to watch for
1140	// changes to a resource. Value: the fixed string "api#channel".
1141	Kind string `json:"kind,omitempty"`
1142
1143	// Params: Additional parameters controlling delivery channel behavior.
1144	// Optional.
1145	Params map[string]string `json:"params,omitempty"`
1146
1147	// Payload: A Boolean value to indicate whether payload is wanted.
1148	// Optional.
1149	Payload bool `json:"payload,omitempty"`
1150
1151	// ResourceId: An opaque ID that identifies the resource being watched
1152	// on this channel. Stable across different API versions.
1153	ResourceId string `json:"resourceId,omitempty"`
1154
1155	// ResourceUri: A version-specific identifier for the watched resource.
1156	ResourceUri string `json:"resourceUri,omitempty"`
1157
1158	// Token: An arbitrary string delivered to the target address with each
1159	// notification delivered over this channel. Optional.
1160	Token string `json:"token,omitempty"`
1161
1162	// Type: The type of delivery mechanism used for this channel.
1163	Type string `json:"type,omitempty"`
1164
1165	// ServerResponse contains the HTTP response code and headers from the
1166	// server.
1167	googleapi.ServerResponse `json:"-"`
1168
1169	// ForceSendFields is a list of field names (e.g. "Address") to
1170	// unconditionally include in API requests. By default, fields with
1171	// empty values are omitted from API requests. However, any non-pointer,
1172	// non-interface field appearing in ForceSendFields will be sent to the
1173	// server regardless of whether the field is empty or not. This may be
1174	// used to include empty fields in Patch requests.
1175	ForceSendFields []string `json:"-"`
1176
1177	// NullFields is a list of field names (e.g. "Address") to include in
1178	// API requests with the JSON null value. By default, fields with empty
1179	// values are omitted from API requests. However, any field with an
1180	// empty value appearing in NullFields will be sent to the server as
1181	// null. It is an error if a field in this list has a non-empty value.
1182	// This may be used to include null fields in Patch requests.
1183	NullFields []string `json:"-"`
1184}
1185
1186func (s *Channel) MarshalJSON() ([]byte, error) {
1187	type NoMethod Channel
1188	raw := NoMethod(*s)
1189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1190}
1191
1192// ChromeOsDevice: JSON template for Chrome Os Device resource in
1193// Directory API.
1194type ChromeOsDevice struct {
1195	// ActiveTimeRanges: List of active time ranges (Read-only)
1196	ActiveTimeRanges []*ChromeOsDeviceActiveTimeRanges `json:"activeTimeRanges,omitempty"`
1197
1198	// AnnotatedAssetId: AssetId specified during enrollment or through
1199	// later annotation
1200	AnnotatedAssetId string `json:"annotatedAssetId,omitempty"`
1201
1202	// AnnotatedLocation: Address or location of the device as noted by the
1203	// administrator
1204	AnnotatedLocation string `json:"annotatedLocation,omitempty"`
1205
1206	// AnnotatedUser: User of the device
1207	AnnotatedUser string `json:"annotatedUser,omitempty"`
1208
1209	// BootMode: Chromebook boot mode (Read-only)
1210	BootMode string `json:"bootMode,omitempty"`
1211
1212	// CpuStatusReports: Reports of CPU utilization and temperature
1213	// (Read-only)
1214	CpuStatusReports []*ChromeOsDeviceCpuStatusReports `json:"cpuStatusReports,omitempty"`
1215
1216	// DeviceFiles: List of device files to download (Read-only)
1217	DeviceFiles []*ChromeOsDeviceDeviceFiles `json:"deviceFiles,omitempty"`
1218
1219	// DeviceId: Unique identifier of Chrome OS Device (Read-only)
1220	DeviceId string `json:"deviceId,omitempty"`
1221
1222	// DiskVolumeReports: Reports of disk space and other info about
1223	// mounted/connected volumes.
1224	DiskVolumeReports []*ChromeOsDeviceDiskVolumeReports `json:"diskVolumeReports,omitempty"`
1225
1226	// Etag: ETag of the resource.
1227	Etag string `json:"etag,omitempty"`
1228
1229	// EthernetMacAddress: Chromebook Mac Address on ethernet network
1230	// interface (Read-only)
1231	EthernetMacAddress string `json:"ethernetMacAddress,omitempty"`
1232
1233	// FirmwareVersion: Chromebook firmware version (Read-only)
1234	FirmwareVersion string `json:"firmwareVersion,omitempty"`
1235
1236	// Kind: Kind of resource this is.
1237	Kind string `json:"kind,omitempty"`
1238
1239	// LastEnrollmentTime: Date and time the device was last enrolled
1240	// (Read-only)
1241	LastEnrollmentTime string `json:"lastEnrollmentTime,omitempty"`
1242
1243	// LastSync: Date and time the device was last synchronized with the
1244	// policy settings in the G Suite administrator control panel
1245	// (Read-only)
1246	LastSync string `json:"lastSync,omitempty"`
1247
1248	// MacAddress: Chromebook Mac Address on wifi network interface
1249	// (Read-only)
1250	MacAddress string `json:"macAddress,omitempty"`
1251
1252	// Meid: Mobile Equipment identifier for the 3G mobile card in the
1253	// Chromebook (Read-only)
1254	Meid string `json:"meid,omitempty"`
1255
1256	// Model: Chromebook Model (Read-only)
1257	Model string `json:"model,omitempty"`
1258
1259	// Notes: Notes added by the administrator
1260	Notes string `json:"notes,omitempty"`
1261
1262	// OrderNumber: Chromebook order number (Read-only)
1263	OrderNumber string `json:"orderNumber,omitempty"`
1264
1265	// OrgUnitPath: OrgUnit of the device
1266	OrgUnitPath string `json:"orgUnitPath,omitempty"`
1267
1268	// OsVersion: Chromebook Os Version (Read-only)
1269	OsVersion string `json:"osVersion,omitempty"`
1270
1271	// PlatformVersion: Chromebook platform version (Read-only)
1272	PlatformVersion string `json:"platformVersion,omitempty"`
1273
1274	// RecentUsers: List of recent device users, in descending order by last
1275	// login time (Read-only)
1276	RecentUsers []*ChromeOsDeviceRecentUsers `json:"recentUsers,omitempty"`
1277
1278	// SerialNumber: Chromebook serial number (Read-only)
1279	SerialNumber string `json:"serialNumber,omitempty"`
1280
1281	// Status: status of the device (Read-only)
1282	Status string `json:"status,omitempty"`
1283
1284	// SupportEndDate: Final date the device will be supported (Read-only)
1285	SupportEndDate string `json:"supportEndDate,omitempty"`
1286
1287	// SystemRamFreeReports: Reports of amounts of available RAM memory
1288	// (Read-only)
1289	SystemRamFreeReports []*ChromeOsDeviceSystemRamFreeReports `json:"systemRamFreeReports,omitempty"`
1290
1291	// SystemRamTotal: Total RAM on the device [in bytes] (Read-only)
1292	SystemRamTotal int64 `json:"systemRamTotal,omitempty,string"`
1293
1294	// TpmVersionInfo: Trusted Platform Module (TPM) (Read-only)
1295	TpmVersionInfo *ChromeOsDeviceTpmVersionInfo `json:"tpmVersionInfo,omitempty"`
1296
1297	// WillAutoRenew: Will Chromebook auto renew after support end date
1298	// (Read-only)
1299	WillAutoRenew bool `json:"willAutoRenew,omitempty"`
1300
1301	// ServerResponse contains the HTTP response code and headers from the
1302	// server.
1303	googleapi.ServerResponse `json:"-"`
1304
1305	// ForceSendFields is a list of field names (e.g. "ActiveTimeRanges") to
1306	// unconditionally include in API requests. By default, fields with
1307	// empty values are omitted from API requests. However, any non-pointer,
1308	// non-interface field appearing in ForceSendFields will be sent to the
1309	// server regardless of whether the field is empty or not. This may be
1310	// used to include empty fields in Patch requests.
1311	ForceSendFields []string `json:"-"`
1312
1313	// NullFields is a list of field names (e.g. "ActiveTimeRanges") to
1314	// include in API requests with the JSON null value. By default, fields
1315	// with empty values are omitted from API requests. However, any field
1316	// with an empty value appearing in NullFields will be sent to the
1317	// server as null. It is an error if a field in this list has a
1318	// non-empty value. This may be used to include null fields in Patch
1319	// requests.
1320	NullFields []string `json:"-"`
1321}
1322
1323func (s *ChromeOsDevice) MarshalJSON() ([]byte, error) {
1324	type NoMethod ChromeOsDevice
1325	raw := NoMethod(*s)
1326	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1327}
1328
1329type ChromeOsDeviceActiveTimeRanges struct {
1330	// ActiveTime: Duration in milliseconds
1331	ActiveTime int64 `json:"activeTime,omitempty"`
1332
1333	// Date: Date of usage
1334	Date string `json:"date,omitempty"`
1335
1336	// ForceSendFields is a list of field names (e.g. "ActiveTime") to
1337	// unconditionally include in API requests. By default, fields with
1338	// empty values are omitted from API requests. However, any non-pointer,
1339	// non-interface field appearing in ForceSendFields will be sent to the
1340	// server regardless of whether the field is empty or not. This may be
1341	// used to include empty fields in Patch requests.
1342	ForceSendFields []string `json:"-"`
1343
1344	// NullFields is a list of field names (e.g. "ActiveTime") to include in
1345	// API requests with the JSON null value. By default, fields with empty
1346	// values are omitted from API requests. However, any field with an
1347	// empty value appearing in NullFields will be sent to the server as
1348	// null. It is an error if a field in this list has a non-empty value.
1349	// This may be used to include null fields in Patch requests.
1350	NullFields []string `json:"-"`
1351}
1352
1353func (s *ChromeOsDeviceActiveTimeRanges) MarshalJSON() ([]byte, error) {
1354	type NoMethod ChromeOsDeviceActiveTimeRanges
1355	raw := NoMethod(*s)
1356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1357}
1358
1359type ChromeOsDeviceCpuStatusReports struct {
1360	// CpuTemperatureInfo: List of CPU temperature samples.
1361	CpuTemperatureInfo []*ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo `json:"cpuTemperatureInfo,omitempty"`
1362
1363	CpuUtilizationPercentageInfo []int64 `json:"cpuUtilizationPercentageInfo,omitempty"`
1364
1365	// ReportTime: Date and time the report was received.
1366	ReportTime string `json:"reportTime,omitempty"`
1367
1368	// ForceSendFields is a list of field names (e.g. "CpuTemperatureInfo")
1369	// to unconditionally include in API requests. By default, fields with
1370	// empty values are omitted from API requests. However, any non-pointer,
1371	// non-interface field appearing in ForceSendFields will be sent to the
1372	// server regardless of whether the field is empty or not. This may be
1373	// used to include empty fields in Patch requests.
1374	ForceSendFields []string `json:"-"`
1375
1376	// NullFields is a list of field names (e.g. "CpuTemperatureInfo") to
1377	// include in API requests with the JSON null value. By default, fields
1378	// with empty values are omitted from API requests. However, any field
1379	// with an empty value appearing in NullFields will be sent to the
1380	// server as null. It is an error if a field in this list has a
1381	// non-empty value. This may be used to include null fields in Patch
1382	// requests.
1383	NullFields []string `json:"-"`
1384}
1385
1386func (s *ChromeOsDeviceCpuStatusReports) MarshalJSON() ([]byte, error) {
1387	type NoMethod ChromeOsDeviceCpuStatusReports
1388	raw := NoMethod(*s)
1389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1390}
1391
1392type ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo struct {
1393	// Label: CPU label
1394	Label string `json:"label,omitempty"`
1395
1396	// Temperature: Temperature in Celsius degrees.
1397	Temperature int64 `json:"temperature,omitempty"`
1398
1399	// ForceSendFields is a list of field names (e.g. "Label") to
1400	// unconditionally include in API requests. By default, fields with
1401	// empty values are omitted from API requests. However, any non-pointer,
1402	// non-interface field appearing in ForceSendFields will be sent to the
1403	// server regardless of whether the field is empty or not. This may be
1404	// used to include empty fields in Patch requests.
1405	ForceSendFields []string `json:"-"`
1406
1407	// NullFields is a list of field names (e.g. "Label") to include in API
1408	// requests with the JSON null value. By default, fields with empty
1409	// values are omitted from API requests. However, any field with an
1410	// empty value appearing in NullFields will be sent to the server as
1411	// null. It is an error if a field in this list has a non-empty value.
1412	// This may be used to include null fields in Patch requests.
1413	NullFields []string `json:"-"`
1414}
1415
1416func (s *ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo) MarshalJSON() ([]byte, error) {
1417	type NoMethod ChromeOsDeviceCpuStatusReportsCpuTemperatureInfo
1418	raw := NoMethod(*s)
1419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1420}
1421
1422type ChromeOsDeviceDeviceFiles struct {
1423	// CreateTime: Date and time the file was created
1424	CreateTime string `json:"createTime,omitempty"`
1425
1426	// DownloadUrl: File download URL
1427	DownloadUrl string `json:"downloadUrl,omitempty"`
1428
1429	// Name: File name
1430	Name string `json:"name,omitempty"`
1431
1432	// Type: File type
1433	Type string `json:"type,omitempty"`
1434
1435	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1436	// unconditionally include in API requests. By default, fields with
1437	// empty values are omitted from API requests. However, any non-pointer,
1438	// non-interface field appearing in ForceSendFields will be sent to the
1439	// server regardless of whether the field is empty or not. This may be
1440	// used to include empty fields in Patch requests.
1441	ForceSendFields []string `json:"-"`
1442
1443	// NullFields is a list of field names (e.g. "CreateTime") to include in
1444	// API requests with the JSON null value. By default, fields with empty
1445	// values are omitted from API requests. However, any field with an
1446	// empty value appearing in NullFields will be sent to the server as
1447	// null. It is an error if a field in this list has a non-empty value.
1448	// This may be used to include null fields in Patch requests.
1449	NullFields []string `json:"-"`
1450}
1451
1452func (s *ChromeOsDeviceDeviceFiles) MarshalJSON() ([]byte, error) {
1453	type NoMethod ChromeOsDeviceDeviceFiles
1454	raw := NoMethod(*s)
1455	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1456}
1457
1458type ChromeOsDeviceDiskVolumeReports struct {
1459	// VolumeInfo: Disk volumes
1460	VolumeInfo []*ChromeOsDeviceDiskVolumeReportsVolumeInfo `json:"volumeInfo,omitempty"`
1461
1462	// ForceSendFields is a list of field names (e.g. "VolumeInfo") to
1463	// unconditionally include in API requests. By default, fields with
1464	// empty values are omitted from API requests. However, any non-pointer,
1465	// non-interface field appearing in ForceSendFields will be sent to the
1466	// server regardless of whether the field is empty or not. This may be
1467	// used to include empty fields in Patch requests.
1468	ForceSendFields []string `json:"-"`
1469
1470	// NullFields is a list of field names (e.g. "VolumeInfo") to include in
1471	// API requests with the JSON null value. By default, fields with empty
1472	// values are omitted from API requests. However, any field with an
1473	// empty value appearing in NullFields will be sent to the server as
1474	// null. It is an error if a field in this list has a non-empty value.
1475	// This may be used to include null fields in Patch requests.
1476	NullFields []string `json:"-"`
1477}
1478
1479func (s *ChromeOsDeviceDiskVolumeReports) MarshalJSON() ([]byte, error) {
1480	type NoMethod ChromeOsDeviceDiskVolumeReports
1481	raw := NoMethod(*s)
1482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1483}
1484
1485type ChromeOsDeviceDiskVolumeReportsVolumeInfo struct {
1486	// StorageFree: Free disk space [in bytes]
1487	StorageFree int64 `json:"storageFree,omitempty,string"`
1488
1489	// StorageTotal: Total disk space [in bytes]
1490	StorageTotal int64 `json:"storageTotal,omitempty,string"`
1491
1492	// VolumeId: Volume id
1493	VolumeId string `json:"volumeId,omitempty"`
1494
1495	// ForceSendFields is a list of field names (e.g. "StorageFree") to
1496	// unconditionally include in API requests. By default, fields with
1497	// empty values are omitted from API requests. However, any non-pointer,
1498	// non-interface field appearing in ForceSendFields will be sent to the
1499	// server regardless of whether the field is empty or not. This may be
1500	// used to include empty fields in Patch requests.
1501	ForceSendFields []string `json:"-"`
1502
1503	// NullFields is a list of field names (e.g. "StorageFree") to include
1504	// in API requests with the JSON null value. By default, fields with
1505	// empty values are omitted from API requests. However, any field with
1506	// an empty value appearing in NullFields will be sent to the server as
1507	// null. It is an error if a field in this list has a non-empty value.
1508	// This may be used to include null fields in Patch requests.
1509	NullFields []string `json:"-"`
1510}
1511
1512func (s *ChromeOsDeviceDiskVolumeReportsVolumeInfo) MarshalJSON() ([]byte, error) {
1513	type NoMethod ChromeOsDeviceDiskVolumeReportsVolumeInfo
1514	raw := NoMethod(*s)
1515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1516}
1517
1518type ChromeOsDeviceRecentUsers struct {
1519	// Email: Email address of the user. Present only if the user type is
1520	// managed
1521	Email string `json:"email,omitempty"`
1522
1523	// Type: The type of the user
1524	Type string `json:"type,omitempty"`
1525
1526	// ForceSendFields is a list of field names (e.g. "Email") to
1527	// unconditionally include in API requests. By default, fields with
1528	// empty values are omitted from API requests. However, any non-pointer,
1529	// non-interface field appearing in ForceSendFields will be sent to the
1530	// server regardless of whether the field is empty or not. This may be
1531	// used to include empty fields in Patch requests.
1532	ForceSendFields []string `json:"-"`
1533
1534	// NullFields is a list of field names (e.g. "Email") to include in API
1535	// requests with the JSON null value. By default, fields with empty
1536	// values are omitted from API requests. However, any field with an
1537	// empty value appearing in NullFields will be sent to the server as
1538	// null. It is an error if a field in this list has a non-empty value.
1539	// This may be used to include null fields in Patch requests.
1540	NullFields []string `json:"-"`
1541}
1542
1543func (s *ChromeOsDeviceRecentUsers) MarshalJSON() ([]byte, error) {
1544	type NoMethod ChromeOsDeviceRecentUsers
1545	raw := NoMethod(*s)
1546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1547}
1548
1549type ChromeOsDeviceSystemRamFreeReports struct {
1550	// ReportTime: Date and time the report was received.
1551	ReportTime string `json:"reportTime,omitempty"`
1552
1553	SystemRamFreeInfo googleapi.Int64s `json:"systemRamFreeInfo,omitempty"`
1554
1555	// ForceSendFields is a list of field names (e.g. "ReportTime") to
1556	// unconditionally include in API requests. By default, fields with
1557	// empty values are omitted from API requests. However, any non-pointer,
1558	// non-interface field appearing in ForceSendFields will be sent to the
1559	// server regardless of whether the field is empty or not. This may be
1560	// used to include empty fields in Patch requests.
1561	ForceSendFields []string `json:"-"`
1562
1563	// NullFields is a list of field names (e.g. "ReportTime") to include in
1564	// API requests with the JSON null value. By default, fields with empty
1565	// values are omitted from API requests. However, any field with an
1566	// empty value appearing in NullFields will be sent to the server as
1567	// null. It is an error if a field in this list has a non-empty value.
1568	// This may be used to include null fields in Patch requests.
1569	NullFields []string `json:"-"`
1570}
1571
1572func (s *ChromeOsDeviceSystemRamFreeReports) MarshalJSON() ([]byte, error) {
1573	type NoMethod ChromeOsDeviceSystemRamFreeReports
1574	raw := NoMethod(*s)
1575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1576}
1577
1578// ChromeOsDeviceTpmVersionInfo: Trusted Platform Module (TPM)
1579// (Read-only)
1580type ChromeOsDeviceTpmVersionInfo struct {
1581	// Family: TPM family.
1582	Family string `json:"family,omitempty"`
1583
1584	// FirmwareVersion: TPM firmware version.
1585	FirmwareVersion string `json:"firmwareVersion,omitempty"`
1586
1587	// Manufacturer: TPM manufacturer code.
1588	Manufacturer string `json:"manufacturer,omitempty"`
1589
1590	// SpecLevel: TPM specification level.
1591	SpecLevel string `json:"specLevel,omitempty"`
1592
1593	// TpmModel: TPM model number.
1594	TpmModel string `json:"tpmModel,omitempty"`
1595
1596	// VendorSpecific: Vendor-specific information such as Vendor ID.
1597	VendorSpecific string `json:"vendorSpecific,omitempty"`
1598
1599	// ForceSendFields is a list of field names (e.g. "Family") to
1600	// unconditionally include in API requests. By default, fields with
1601	// empty values are omitted from API requests. However, any non-pointer,
1602	// non-interface field appearing in ForceSendFields will be sent to the
1603	// server regardless of whether the field is empty or not. This may be
1604	// used to include empty fields in Patch requests.
1605	ForceSendFields []string `json:"-"`
1606
1607	// NullFields is a list of field names (e.g. "Family") to include in API
1608	// requests with the JSON null value. By default, fields with empty
1609	// values are omitted from API requests. However, any field with an
1610	// empty value appearing in NullFields will be sent to the server as
1611	// null. It is an error if a field in this list has a non-empty value.
1612	// This may be used to include null fields in Patch requests.
1613	NullFields []string `json:"-"`
1614}
1615
1616func (s *ChromeOsDeviceTpmVersionInfo) MarshalJSON() ([]byte, error) {
1617	type NoMethod ChromeOsDeviceTpmVersionInfo
1618	raw := NoMethod(*s)
1619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1620}
1621
1622// ChromeOsDeviceAction: JSON request template for firing actions on
1623// ChromeOs Device in Directory Devices API.
1624type ChromeOsDeviceAction struct {
1625	// Action: Action to be taken on the ChromeOs Device
1626	Action string `json:"action,omitempty"`
1627
1628	DeprovisionReason string `json:"deprovisionReason,omitempty"`
1629
1630	// ForceSendFields is a list of field names (e.g. "Action") to
1631	// unconditionally include in API requests. By default, fields with
1632	// empty values are omitted from API requests. However, any non-pointer,
1633	// non-interface field appearing in ForceSendFields will be sent to the
1634	// server regardless of whether the field is empty or not. This may be
1635	// used to include empty fields in Patch requests.
1636	ForceSendFields []string `json:"-"`
1637
1638	// NullFields is a list of field names (e.g. "Action") to include in API
1639	// requests with the JSON null value. By default, fields with empty
1640	// values are omitted from API requests. However, any field with an
1641	// empty value appearing in NullFields will be sent to the server as
1642	// null. It is an error if a field in this list has a non-empty value.
1643	// This may be used to include null fields in Patch requests.
1644	NullFields []string `json:"-"`
1645}
1646
1647func (s *ChromeOsDeviceAction) MarshalJSON() ([]byte, error) {
1648	type NoMethod ChromeOsDeviceAction
1649	raw := NoMethod(*s)
1650	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1651}
1652
1653// ChromeOsDevices: JSON response template for List Chrome OS Devices
1654// operation in Directory API.
1655type ChromeOsDevices struct {
1656	// Chromeosdevices: List of Chrome OS Device objects.
1657	Chromeosdevices []*ChromeOsDevice `json:"chromeosdevices,omitempty"`
1658
1659	// Etag: ETag of the resource.
1660	Etag string `json:"etag,omitempty"`
1661
1662	// Kind: Kind of resource this is.
1663	Kind string `json:"kind,omitempty"`
1664
1665	// NextPageToken: Token used to access next page of this result.
1666	NextPageToken string `json:"nextPageToken,omitempty"`
1667
1668	// ServerResponse contains the HTTP response code and headers from the
1669	// server.
1670	googleapi.ServerResponse `json:"-"`
1671
1672	// ForceSendFields is a list of field names (e.g. "Chromeosdevices") to
1673	// unconditionally include in API requests. By default, fields with
1674	// empty values are omitted from API requests. However, any non-pointer,
1675	// non-interface field appearing in ForceSendFields will be sent to the
1676	// server regardless of whether the field is empty or not. This may be
1677	// used to include empty fields in Patch requests.
1678	ForceSendFields []string `json:"-"`
1679
1680	// NullFields is a list of field names (e.g. "Chromeosdevices") to
1681	// include in API requests with the JSON null value. By default, fields
1682	// with empty values are omitted from API requests. However, any field
1683	// with an empty value appearing in NullFields will be sent to the
1684	// server as null. It is an error if a field in this list has a
1685	// non-empty value. This may be used to include null fields in Patch
1686	// requests.
1687	NullFields []string `json:"-"`
1688}
1689
1690func (s *ChromeOsDevices) MarshalJSON() ([]byte, error) {
1691	type NoMethod ChromeOsDevices
1692	raw := NoMethod(*s)
1693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1694}
1695
1696// ChromeOsMoveDevicesToOu: JSON request template for moving ChromeOs
1697// Device to given OU in Directory Devices API.
1698type ChromeOsMoveDevicesToOu struct {
1699	// DeviceIds: ChromeOs Devices to be moved to OU
1700	DeviceIds []string `json:"deviceIds,omitempty"`
1701
1702	// ForceSendFields is a list of field names (e.g. "DeviceIds") to
1703	// unconditionally include in API requests. By default, fields with
1704	// empty values are omitted from API requests. However, any non-pointer,
1705	// non-interface field appearing in ForceSendFields will be sent to the
1706	// server regardless of whether the field is empty or not. This may be
1707	// used to include empty fields in Patch requests.
1708	ForceSendFields []string `json:"-"`
1709
1710	// NullFields is a list of field names (e.g. "DeviceIds") to include in
1711	// API requests with the JSON null value. By default, fields with empty
1712	// values are omitted from API requests. However, any field with an
1713	// empty value appearing in NullFields will be sent to the server as
1714	// null. It is an error if a field in this list has a non-empty value.
1715	// This may be used to include null fields in Patch requests.
1716	NullFields []string `json:"-"`
1717}
1718
1719func (s *ChromeOsMoveDevicesToOu) MarshalJSON() ([]byte, error) {
1720	type NoMethod ChromeOsMoveDevicesToOu
1721	raw := NoMethod(*s)
1722	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1723}
1724
1725// Customer: JSON template for Customer Resource object in Directory
1726// API.
1727type Customer struct {
1728	// AlternateEmail: The customer's secondary contact email address. This
1729	// email address cannot be on the same domain as the customerDomain
1730	AlternateEmail string `json:"alternateEmail,omitempty"`
1731
1732	// CustomerCreationTime: The customer's creation time (Readonly)
1733	CustomerCreationTime string `json:"customerCreationTime,omitempty"`
1734
1735	// CustomerDomain: The customer's primary domain name string. Do not
1736	// include the www prefix when creating a new customer.
1737	CustomerDomain string `json:"customerDomain,omitempty"`
1738
1739	// Etag: ETag of the resource.
1740	Etag string `json:"etag,omitempty"`
1741
1742	// Id: The unique ID for the customer's G Suite account. (Readonly)
1743	Id string `json:"id,omitempty"`
1744
1745	// Kind: Identifies the resource as a customer. Value:
1746	// admin#directory#customer
1747	Kind string `json:"kind,omitempty"`
1748
1749	// Language: The customer's ISO 639-2 language code. The default value
1750	// is en-US
1751	Language string `json:"language,omitempty"`
1752
1753	// PhoneNumber: The customer's contact phone number in E.164 format.
1754	PhoneNumber string `json:"phoneNumber,omitempty"`
1755
1756	// PostalAddress: The customer's postal address information.
1757	PostalAddress *CustomerPostalAddress `json:"postalAddress,omitempty"`
1758
1759	// ServerResponse contains the HTTP response code and headers from the
1760	// server.
1761	googleapi.ServerResponse `json:"-"`
1762
1763	// ForceSendFields is a list of field names (e.g. "AlternateEmail") to
1764	// unconditionally include in API requests. By default, fields with
1765	// empty values are omitted from API requests. However, any non-pointer,
1766	// non-interface field appearing in ForceSendFields will be sent to the
1767	// server regardless of whether the field is empty or not. This may be
1768	// used to include empty fields in Patch requests.
1769	ForceSendFields []string `json:"-"`
1770
1771	// NullFields is a list of field names (e.g. "AlternateEmail") to
1772	// include in API requests with the JSON null value. By default, fields
1773	// with empty values are omitted from API requests. However, any field
1774	// with an empty value appearing in NullFields will be sent to the
1775	// server as null. It is an error if a field in this list has a
1776	// non-empty value. This may be used to include null fields in Patch
1777	// requests.
1778	NullFields []string `json:"-"`
1779}
1780
1781func (s *Customer) MarshalJSON() ([]byte, error) {
1782	type NoMethod Customer
1783	raw := NoMethod(*s)
1784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1785}
1786
1787// CustomerPostalAddress: JSON template for postal address of a
1788// customer.
1789type CustomerPostalAddress struct {
1790	// AddressLine1: A customer's physical address. The address can be
1791	// composed of one to three lines.
1792	AddressLine1 string `json:"addressLine1,omitempty"`
1793
1794	// AddressLine2: Address line 2 of the address.
1795	AddressLine2 string `json:"addressLine2,omitempty"`
1796
1797	// AddressLine3: Address line 3 of the address.
1798	AddressLine3 string `json:"addressLine3,omitempty"`
1799
1800	// ContactName: The customer contact's name.
1801	ContactName string `json:"contactName,omitempty"`
1802
1803	// CountryCode: This is a required property. For countryCode information
1804	// see the ISO 3166 country code elements.
1805	CountryCode string `json:"countryCode,omitempty"`
1806
1807	// Locality: Name of the locality. An example of a locality value is the
1808	// city of San Francisco.
1809	Locality string `json:"locality,omitempty"`
1810
1811	// OrganizationName: The company or company division name.
1812	OrganizationName string `json:"organizationName,omitempty"`
1813
1814	// PostalCode: The postal code. A postalCode example is a postal zip
1815	// code such as 10009. This is in accordance with -
1816	// http://portablecontacts.net/draft-spec.html#address_element.
1817	PostalCode string `json:"postalCode,omitempty"`
1818
1819	// Region: Name of the region. An example of a region value is NY for
1820	// the state of New York.
1821	Region string `json:"region,omitempty"`
1822
1823	// ForceSendFields is a list of field names (e.g. "AddressLine1") to
1824	// unconditionally include in API requests. By default, fields with
1825	// empty values are omitted from API requests. However, any non-pointer,
1826	// non-interface field appearing in ForceSendFields will be sent to the
1827	// server regardless of whether the field is empty or not. This may be
1828	// used to include empty fields in Patch requests.
1829	ForceSendFields []string `json:"-"`
1830
1831	// NullFields is a list of field names (e.g. "AddressLine1") to include
1832	// in API requests with the JSON null value. By default, fields with
1833	// empty values are omitted from API requests. However, any field with
1834	// an empty value appearing in NullFields will be sent to the server as
1835	// null. It is an error if a field in this list has a non-empty value.
1836	// This may be used to include null fields in Patch requests.
1837	NullFields []string `json:"-"`
1838}
1839
1840func (s *CustomerPostalAddress) MarshalJSON() ([]byte, error) {
1841	type NoMethod CustomerPostalAddress
1842	raw := NoMethod(*s)
1843	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1844}
1845
1846// DomainAlias: JSON template for Domain Alias object in Directory API.
1847type DomainAlias struct {
1848	// CreationTime: The creation time of the domain alias. (Read-only).
1849	CreationTime int64 `json:"creationTime,omitempty,string"`
1850
1851	// DomainAliasName: The domain alias name.
1852	DomainAliasName string `json:"domainAliasName,omitempty"`
1853
1854	// Etag: ETag of the resource.
1855	Etag string `json:"etag,omitempty"`
1856
1857	// Kind: Kind of resource this is.
1858	Kind string `json:"kind,omitempty"`
1859
1860	// ParentDomainName: The parent domain name that the domain alias is
1861	// associated with. This can either be a primary or secondary domain
1862	// name within a customer.
1863	ParentDomainName string `json:"parentDomainName,omitempty"`
1864
1865	// Verified: Indicates the verification state of a domain alias.
1866	// (Read-only)
1867	Verified bool `json:"verified,omitempty"`
1868
1869	// ServerResponse contains the HTTP response code and headers from the
1870	// server.
1871	googleapi.ServerResponse `json:"-"`
1872
1873	// ForceSendFields is a list of field names (e.g. "CreationTime") to
1874	// unconditionally include in API requests. By default, fields with
1875	// empty values are omitted from API requests. However, any non-pointer,
1876	// non-interface field appearing in ForceSendFields will be sent to the
1877	// server regardless of whether the field is empty or not. This may be
1878	// used to include empty fields in Patch requests.
1879	ForceSendFields []string `json:"-"`
1880
1881	// NullFields is a list of field names (e.g. "CreationTime") to include
1882	// in API requests with the JSON null value. By default, fields with
1883	// empty values are omitted from API requests. However, any field with
1884	// an empty value appearing in NullFields will be sent to the server as
1885	// null. It is an error if a field in this list has a non-empty value.
1886	// This may be used to include null fields in Patch requests.
1887	NullFields []string `json:"-"`
1888}
1889
1890func (s *DomainAlias) MarshalJSON() ([]byte, error) {
1891	type NoMethod DomainAlias
1892	raw := NoMethod(*s)
1893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1894}
1895
1896// DomainAliases: JSON response template to list domain aliases in
1897// Directory API.
1898type DomainAliases struct {
1899	// DomainAliases: List of domain alias objects.
1900	DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
1901
1902	// Etag: ETag of the resource.
1903	Etag string `json:"etag,omitempty"`
1904
1905	// Kind: Kind of resource this is.
1906	Kind string `json:"kind,omitempty"`
1907
1908	// ServerResponse contains the HTTP response code and headers from the
1909	// server.
1910	googleapi.ServerResponse `json:"-"`
1911
1912	// ForceSendFields is a list of field names (e.g. "DomainAliases") to
1913	// unconditionally include in API requests. By default, fields with
1914	// empty values are omitted from API requests. However, any non-pointer,
1915	// non-interface field appearing in ForceSendFields will be sent to the
1916	// server regardless of whether the field is empty or not. This may be
1917	// used to include empty fields in Patch requests.
1918	ForceSendFields []string `json:"-"`
1919
1920	// NullFields is a list of field names (e.g. "DomainAliases") to include
1921	// in API requests with the JSON null value. By default, fields with
1922	// empty values are omitted from API requests. However, any field with
1923	// an empty value appearing in NullFields will be sent to the server as
1924	// null. It is an error if a field in this list has a non-empty value.
1925	// This may be used to include null fields in Patch requests.
1926	NullFields []string `json:"-"`
1927}
1928
1929func (s *DomainAliases) MarshalJSON() ([]byte, error) {
1930	type NoMethod DomainAliases
1931	raw := NoMethod(*s)
1932	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1933}
1934
1935// Domains: JSON template for Domain object in Directory API.
1936type Domains struct {
1937	// CreationTime: Creation time of the domain. (Read-only).
1938	CreationTime int64 `json:"creationTime,omitempty,string"`
1939
1940	// DomainAliases: List of domain alias objects. (Read-only)
1941	DomainAliases []*DomainAlias `json:"domainAliases,omitempty"`
1942
1943	// DomainName: The domain name of the customer.
1944	DomainName string `json:"domainName,omitempty"`
1945
1946	// Etag: ETag of the resource.
1947	Etag string `json:"etag,omitempty"`
1948
1949	// IsPrimary: Indicates if the domain is a primary domain (Read-only).
1950	IsPrimary bool `json:"isPrimary,omitempty"`
1951
1952	// Kind: Kind of resource this is.
1953	Kind string `json:"kind,omitempty"`
1954
1955	// Verified: Indicates the verification state of a domain. (Read-only).
1956	Verified bool `json:"verified,omitempty"`
1957
1958	// ServerResponse contains the HTTP response code and headers from the
1959	// server.
1960	googleapi.ServerResponse `json:"-"`
1961
1962	// ForceSendFields is a list of field names (e.g. "CreationTime") to
1963	// unconditionally include in API requests. By default, fields with
1964	// empty values are omitted from API requests. However, any non-pointer,
1965	// non-interface field appearing in ForceSendFields will be sent to the
1966	// server regardless of whether the field is empty or not. This may be
1967	// used to include empty fields in Patch requests.
1968	ForceSendFields []string `json:"-"`
1969
1970	// NullFields is a list of field names (e.g. "CreationTime") to include
1971	// in API requests with the JSON null value. By default, fields with
1972	// empty values are omitted from API requests. However, any field with
1973	// an empty value appearing in NullFields will be sent to the server as
1974	// null. It is an error if a field in this list has a non-empty value.
1975	// This may be used to include null fields in Patch requests.
1976	NullFields []string `json:"-"`
1977}
1978
1979func (s *Domains) MarshalJSON() ([]byte, error) {
1980	type NoMethod Domains
1981	raw := NoMethod(*s)
1982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1983}
1984
1985// Domains2: JSON response template to list Domains in Directory API.
1986type Domains2 struct {
1987	// Domains: List of domain objects.
1988	Domains []*Domains `json:"domains,omitempty"`
1989
1990	// Etag: ETag of the resource.
1991	Etag string `json:"etag,omitempty"`
1992
1993	// Kind: Kind of resource this is.
1994	Kind string `json:"kind,omitempty"`
1995
1996	// ServerResponse contains the HTTP response code and headers from the
1997	// server.
1998	googleapi.ServerResponse `json:"-"`
1999
2000	// ForceSendFields is a list of field names (e.g. "Domains") to
2001	// unconditionally include in API requests. By default, fields with
2002	// empty values are omitted from API requests. However, any non-pointer,
2003	// non-interface field appearing in ForceSendFields will be sent to the
2004	// server regardless of whether the field is empty or not. This may be
2005	// used to include empty fields in Patch requests.
2006	ForceSendFields []string `json:"-"`
2007
2008	// NullFields is a list of field names (e.g. "Domains") to include in
2009	// API requests with the JSON null value. By default, fields with empty
2010	// values are omitted from API requests. However, any field with an
2011	// empty value appearing in NullFields will be sent to the server as
2012	// null. It is an error if a field in this list has a non-empty value.
2013	// This may be used to include null fields in Patch requests.
2014	NullFields []string `json:"-"`
2015}
2016
2017func (s *Domains2) MarshalJSON() ([]byte, error) {
2018	type NoMethod Domains2
2019	raw := NoMethod(*s)
2020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2021}
2022
2023// Feature: JSON template for Feature object in Directory API.
2024type Feature struct {
2025	// Etags: ETag of the resource.
2026	Etags string `json:"etags,omitempty"`
2027
2028	// Kind: Kind of resource this is.
2029	Kind string `json:"kind,omitempty"`
2030
2031	// Name: The name of the feature.
2032	Name string `json:"name,omitempty"`
2033
2034	// ServerResponse contains the HTTP response code and headers from the
2035	// server.
2036	googleapi.ServerResponse `json:"-"`
2037
2038	// ForceSendFields is a list of field names (e.g. "Etags") to
2039	// unconditionally include in API requests. By default, fields with
2040	// empty values are omitted from API requests. However, any non-pointer,
2041	// non-interface field appearing in ForceSendFields will be sent to the
2042	// server regardless of whether the field is empty or not. This may be
2043	// used to include empty fields in Patch requests.
2044	ForceSendFields []string `json:"-"`
2045
2046	// NullFields is a list of field names (e.g. "Etags") to include in API
2047	// requests with the JSON null value. By default, fields with empty
2048	// values are omitted from API requests. However, any field with an
2049	// empty value appearing in NullFields will be sent to the server as
2050	// null. It is an error if a field in this list has a non-empty value.
2051	// This may be used to include null fields in Patch requests.
2052	NullFields []string `json:"-"`
2053}
2054
2055func (s *Feature) MarshalJSON() ([]byte, error) {
2056	type NoMethod Feature
2057	raw := NoMethod(*s)
2058	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2059}
2060
2061// FeatureInstance: JSON template for a "feature instance".
2062type FeatureInstance struct {
2063	// Feature: The feature that this is an instance of. A calendar resource
2064	// may have multiple instances of a feature.
2065	Feature *Feature `json:"feature,omitempty"`
2066
2067	// ForceSendFields is a list of field names (e.g. "Feature") to
2068	// unconditionally include in API requests. By default, fields with
2069	// empty values are omitted from API requests. However, any non-pointer,
2070	// non-interface field appearing in ForceSendFields will be sent to the
2071	// server regardless of whether the field is empty or not. This may be
2072	// used to include empty fields in Patch requests.
2073	ForceSendFields []string `json:"-"`
2074
2075	// NullFields is a list of field names (e.g. "Feature") to include in
2076	// API requests with the JSON null value. By default, fields with empty
2077	// values are omitted from API requests. However, any field with an
2078	// empty value appearing in NullFields will be sent to the server as
2079	// null. It is an error if a field in this list has a non-empty value.
2080	// This may be used to include null fields in Patch requests.
2081	NullFields []string `json:"-"`
2082}
2083
2084func (s *FeatureInstance) MarshalJSON() ([]byte, error) {
2085	type NoMethod FeatureInstance
2086	raw := NoMethod(*s)
2087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2088}
2089
2090// FeatureRename: JSON request template for renaming a feature.
2091type FeatureRename struct {
2092	// NewName: New name of the feature.
2093	NewName string `json:"newName,omitempty"`
2094
2095	// ForceSendFields is a list of field names (e.g. "NewName") to
2096	// unconditionally include in API requests. By default, fields with
2097	// empty values are omitted from API requests. However, any non-pointer,
2098	// non-interface field appearing in ForceSendFields will be sent to the
2099	// server regardless of whether the field is empty or not. This may be
2100	// used to include empty fields in Patch requests.
2101	ForceSendFields []string `json:"-"`
2102
2103	// NullFields is a list of field names (e.g. "NewName") to include in
2104	// API requests with the JSON null value. By default, fields with empty
2105	// values are omitted from API requests. However, any field with an
2106	// empty value appearing in NullFields will be sent to the server as
2107	// null. It is an error if a field in this list has a non-empty value.
2108	// This may be used to include null fields in Patch requests.
2109	NullFields []string `json:"-"`
2110}
2111
2112func (s *FeatureRename) MarshalJSON() ([]byte, error) {
2113	type NoMethod FeatureRename
2114	raw := NoMethod(*s)
2115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2116}
2117
2118// Features: JSON template for Feature List Response object in Directory
2119// API.
2120type Features struct {
2121	// Etag: ETag of the resource.
2122	Etag string `json:"etag,omitempty"`
2123
2124	// Features: The Features in this page of results.
2125	Features []*Feature `json:"features,omitempty"`
2126
2127	// Kind: Kind of resource this is.
2128	Kind string `json:"kind,omitempty"`
2129
2130	// NextPageToken: The continuation token, used to page through large
2131	// result sets. Provide this value in a subsequent request to return the
2132	// next page of results.
2133	NextPageToken string `json:"nextPageToken,omitempty"`
2134
2135	// ServerResponse contains the HTTP response code and headers from the
2136	// server.
2137	googleapi.ServerResponse `json:"-"`
2138
2139	// ForceSendFields is a list of field names (e.g. "Etag") to
2140	// unconditionally include in API requests. By default, fields with
2141	// empty values are omitted from API requests. However, any non-pointer,
2142	// non-interface field appearing in ForceSendFields will be sent to the
2143	// server regardless of whether the field is empty or not. This may be
2144	// used to include empty fields in Patch requests.
2145	ForceSendFields []string `json:"-"`
2146
2147	// NullFields is a list of field names (e.g. "Etag") to include in API
2148	// requests with the JSON null value. By default, fields with empty
2149	// values are omitted from API requests. However, any field with an
2150	// empty value appearing in NullFields will be sent to the server as
2151	// null. It is an error if a field in this list has a non-empty value.
2152	// This may be used to include null fields in Patch requests.
2153	NullFields []string `json:"-"`
2154}
2155
2156func (s *Features) MarshalJSON() ([]byte, error) {
2157	type NoMethod Features
2158	raw := NoMethod(*s)
2159	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2160}
2161
2162// Group: JSON template for Group resource in Directory API.
2163type Group struct {
2164	// AdminCreated: Is the group created by admin (Read-only) *
2165	AdminCreated bool `json:"adminCreated,omitempty"`
2166
2167	// Aliases: List of aliases (Read-only)
2168	Aliases []string `json:"aliases,omitempty"`
2169
2170	// Description: Description of the group
2171	Description string `json:"description,omitempty"`
2172
2173	// DirectMembersCount: Group direct members count
2174	DirectMembersCount int64 `json:"directMembersCount,omitempty,string"`
2175
2176	// Email: Email of Group
2177	Email string `json:"email,omitempty"`
2178
2179	// Etag: ETag of the resource.
2180	Etag string `json:"etag,omitempty"`
2181
2182	// Id: Unique identifier of Group (Read-only)
2183	Id string `json:"id,omitempty"`
2184
2185	// Kind: Kind of resource this is.
2186	Kind string `json:"kind,omitempty"`
2187
2188	// Name: Group name
2189	Name string `json:"name,omitempty"`
2190
2191	// NonEditableAliases: List of non editable aliases (Read-only)
2192	NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
2193
2194	// ServerResponse contains the HTTP response code and headers from the
2195	// server.
2196	googleapi.ServerResponse `json:"-"`
2197
2198	// ForceSendFields is a list of field names (e.g. "AdminCreated") to
2199	// unconditionally include in API requests. By default, fields with
2200	// empty values are omitted from API requests. However, any non-pointer,
2201	// non-interface field appearing in ForceSendFields will be sent to the
2202	// server regardless of whether the field is empty or not. This may be
2203	// used to include empty fields in Patch requests.
2204	ForceSendFields []string `json:"-"`
2205
2206	// NullFields is a list of field names (e.g. "AdminCreated") to include
2207	// in API requests with the JSON null value. By default, fields with
2208	// empty values are omitted from API requests. However, any field with
2209	// an empty value appearing in NullFields will be sent to the server as
2210	// null. It is an error if a field in this list has a non-empty value.
2211	// This may be used to include null fields in Patch requests.
2212	NullFields []string `json:"-"`
2213}
2214
2215func (s *Group) MarshalJSON() ([]byte, error) {
2216	type NoMethod Group
2217	raw := NoMethod(*s)
2218	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2219}
2220
2221// Groups: JSON response template for List Groups operation in Directory
2222// API.
2223type Groups struct {
2224	// Etag: ETag of the resource.
2225	Etag string `json:"etag,omitempty"`
2226
2227	// Groups: List of group objects.
2228	Groups []*Group `json:"groups,omitempty"`
2229
2230	// Kind: Kind of resource this is.
2231	Kind string `json:"kind,omitempty"`
2232
2233	// NextPageToken: Token used to access next page of this result.
2234	NextPageToken string `json:"nextPageToken,omitempty"`
2235
2236	// ServerResponse contains the HTTP response code and headers from the
2237	// server.
2238	googleapi.ServerResponse `json:"-"`
2239
2240	// ForceSendFields is a list of field names (e.g. "Etag") to
2241	// unconditionally include in API requests. By default, fields with
2242	// empty values are omitted from API requests. However, any non-pointer,
2243	// non-interface field appearing in ForceSendFields will be sent to the
2244	// server regardless of whether the field is empty or not. This may be
2245	// used to include empty fields in Patch requests.
2246	ForceSendFields []string `json:"-"`
2247
2248	// NullFields is a list of field names (e.g. "Etag") to include in API
2249	// requests with the JSON null value. By default, fields with empty
2250	// values are omitted from API requests. However, any field with an
2251	// empty value appearing in NullFields will be sent to the server as
2252	// null. It is an error if a field in this list has a non-empty value.
2253	// This may be used to include null fields in Patch requests.
2254	NullFields []string `json:"-"`
2255}
2256
2257func (s *Groups) MarshalJSON() ([]byte, error) {
2258	type NoMethod Groups
2259	raw := NoMethod(*s)
2260	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2261}
2262
2263// Member: JSON template for Member resource in Directory API.
2264type Member struct {
2265	// DeliverySettings: Delivery settings of member
2266	DeliverySettings string `json:"delivery_settings,omitempty"`
2267
2268	// Email: Email of member (Read-only)
2269	Email string `json:"email,omitempty"`
2270
2271	// Etag: ETag of the resource.
2272	Etag string `json:"etag,omitempty"`
2273
2274	// Id: Unique identifier of customer member (Read-only) Unique
2275	// identifier of group (Read-only) Unique identifier of member
2276	// (Read-only)
2277	Id string `json:"id,omitempty"`
2278
2279	// Kind: Kind of resource this is.
2280	Kind string `json:"kind,omitempty"`
2281
2282	// Role: Role of member
2283	Role string `json:"role,omitempty"`
2284
2285	// Status: Status of member (Immutable)
2286	Status string `json:"status,omitempty"`
2287
2288	// Type: Type of member (Immutable)
2289	Type string `json:"type,omitempty"`
2290
2291	// ServerResponse contains the HTTP response code and headers from the
2292	// server.
2293	googleapi.ServerResponse `json:"-"`
2294
2295	// ForceSendFields is a list of field names (e.g. "DeliverySettings") to
2296	// unconditionally include in API requests. By default, fields with
2297	// empty values are omitted from API requests. However, any non-pointer,
2298	// non-interface field appearing in ForceSendFields will be sent to the
2299	// server regardless of whether the field is empty or not. This may be
2300	// used to include empty fields in Patch requests.
2301	ForceSendFields []string `json:"-"`
2302
2303	// NullFields is a list of field names (e.g. "DeliverySettings") to
2304	// include in API requests with the JSON null value. By default, fields
2305	// with empty values are omitted from API requests. However, any field
2306	// with an empty value appearing in NullFields will be sent to the
2307	// server as null. It is an error if a field in this list has a
2308	// non-empty value. This may be used to include null fields in Patch
2309	// requests.
2310	NullFields []string `json:"-"`
2311}
2312
2313func (s *Member) MarshalJSON() ([]byte, error) {
2314	type NoMethod Member
2315	raw := NoMethod(*s)
2316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2317}
2318
2319// Members: JSON response template for List Members operation in
2320// Directory API.
2321type Members struct {
2322	// Etag: ETag of the resource.
2323	Etag string `json:"etag,omitempty"`
2324
2325	// Kind: Kind of resource this is.
2326	Kind string `json:"kind,omitempty"`
2327
2328	// Members: List of member objects.
2329	Members []*Member `json:"members,omitempty"`
2330
2331	// NextPageToken: Token used to access next page of this result.
2332	NextPageToken string `json:"nextPageToken,omitempty"`
2333
2334	// ServerResponse contains the HTTP response code and headers from the
2335	// server.
2336	googleapi.ServerResponse `json:"-"`
2337
2338	// ForceSendFields is a list of field names (e.g. "Etag") to
2339	// unconditionally include in API requests. By default, fields with
2340	// empty values are omitted from API requests. However, any non-pointer,
2341	// non-interface field appearing in ForceSendFields will be sent to the
2342	// server regardless of whether the field is empty or not. This may be
2343	// used to include empty fields in Patch requests.
2344	ForceSendFields []string `json:"-"`
2345
2346	// NullFields is a list of field names (e.g. "Etag") to include in API
2347	// requests with the JSON null value. By default, fields with empty
2348	// values are omitted from API requests. However, any field with an
2349	// empty value appearing in NullFields will be sent to the server as
2350	// null. It is an error if a field in this list has a non-empty value.
2351	// This may be used to include null fields in Patch requests.
2352	NullFields []string `json:"-"`
2353}
2354
2355func (s *Members) MarshalJSON() ([]byte, error) {
2356	type NoMethod Members
2357	raw := NoMethod(*s)
2358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2359}
2360
2361// MembersHasMember: JSON template for Has Member response in Directory
2362// API.
2363type MembersHasMember struct {
2364	// IsMember: Identifies whether the given user is a member of the group.
2365	// Membership can be direct or nested.
2366	IsMember bool `json:"isMember,omitempty"`
2367
2368	// ServerResponse contains the HTTP response code and headers from the
2369	// server.
2370	googleapi.ServerResponse `json:"-"`
2371
2372	// ForceSendFields is a list of field names (e.g. "IsMember") to
2373	// unconditionally include in API requests. By default, fields with
2374	// empty values are omitted from API requests. However, any non-pointer,
2375	// non-interface field appearing in ForceSendFields will be sent to the
2376	// server regardless of whether the field is empty or not. This may be
2377	// used to include empty fields in Patch requests.
2378	ForceSendFields []string `json:"-"`
2379
2380	// NullFields is a list of field names (e.g. "IsMember") to include in
2381	// API requests with the JSON null value. By default, fields with empty
2382	// values are omitted from API requests. However, any field with an
2383	// empty value appearing in NullFields will be sent to the server as
2384	// null. It is an error if a field in this list has a non-empty value.
2385	// This may be used to include null fields in Patch requests.
2386	NullFields []string `json:"-"`
2387}
2388
2389func (s *MembersHasMember) MarshalJSON() ([]byte, error) {
2390	type NoMethod MembersHasMember
2391	raw := NoMethod(*s)
2392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2393}
2394
2395// MobileDevice: JSON template for Mobile Device resource in Directory
2396// API.
2397type MobileDevice struct {
2398	// AdbStatus: Adb (USB debugging) enabled or disabled on device
2399	// (Read-only)
2400	AdbStatus bool `json:"adbStatus,omitempty"`
2401
2402	// Applications: List of applications installed on Mobile Device
2403	Applications []*MobileDeviceApplications `json:"applications,omitempty"`
2404
2405	// BasebandVersion: Mobile Device Baseband version (Read-only)
2406	BasebandVersion string `json:"basebandVersion,omitempty"`
2407
2408	// BootloaderVersion: Mobile Device Bootloader version (Read-only)
2409	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
2410
2411	// Brand: Mobile Device Brand (Read-only)
2412	Brand string `json:"brand,omitempty"`
2413
2414	// BuildNumber: Mobile Device Build number (Read-only)
2415	BuildNumber string `json:"buildNumber,omitempty"`
2416
2417	// DefaultLanguage: The default locale used on the Mobile Device
2418	// (Read-only)
2419	DefaultLanguage string `json:"defaultLanguage,omitempty"`
2420
2421	// DeveloperOptionsStatus: Developer options enabled or disabled on
2422	// device (Read-only)
2423	DeveloperOptionsStatus bool `json:"developerOptionsStatus,omitempty"`
2424
2425	// DeviceCompromisedStatus: Mobile Device compromised status (Read-only)
2426	DeviceCompromisedStatus string `json:"deviceCompromisedStatus,omitempty"`
2427
2428	// DeviceId: Mobile Device serial number (Read-only)
2429	DeviceId string `json:"deviceId,omitempty"`
2430
2431	// DevicePasswordStatus: DevicePasswordStatus (Read-only)
2432	DevicePasswordStatus string `json:"devicePasswordStatus,omitempty"`
2433
2434	// Email: List of owner user's email addresses (Read-only)
2435	Email []string `json:"email,omitempty"`
2436
2437	// EncryptionStatus: Mobile Device Encryption Status (Read-only)
2438	EncryptionStatus string `json:"encryptionStatus,omitempty"`
2439
2440	// Etag: ETag of the resource.
2441	Etag string `json:"etag,omitempty"`
2442
2443	// FirstSync: Date and time the device was first synchronized with the
2444	// policy settings in the G Suite administrator control panel
2445	// (Read-only)
2446	FirstSync string `json:"firstSync,omitempty"`
2447
2448	// Hardware: Mobile Device Hardware (Read-only)
2449	Hardware string `json:"hardware,omitempty"`
2450
2451	// HardwareId: Mobile Device Hardware Id (Read-only)
2452	HardwareId string `json:"hardwareId,omitempty"`
2453
2454	// Imei: Mobile Device IMEI number (Read-only)
2455	Imei string `json:"imei,omitempty"`
2456
2457	// KernelVersion: Mobile Device Kernel version (Read-only)
2458	KernelVersion string `json:"kernelVersion,omitempty"`
2459
2460	// Kind: Kind of resource this is.
2461	Kind string `json:"kind,omitempty"`
2462
2463	// LastSync: Date and time the device was last synchronized with the
2464	// policy settings in the G Suite administrator control panel
2465	// (Read-only)
2466	LastSync string `json:"lastSync,omitempty"`
2467
2468	// ManagedAccountIsOnOwnerProfile: Boolean indicating if this account is
2469	// on owner/primary profile or not (Read-only)
2470	ManagedAccountIsOnOwnerProfile bool `json:"managedAccountIsOnOwnerProfile,omitempty"`
2471
2472	// Manufacturer: Mobile Device manufacturer (Read-only)
2473	Manufacturer string `json:"manufacturer,omitempty"`
2474
2475	// Meid: Mobile Device MEID number (Read-only)
2476	Meid string `json:"meid,omitempty"`
2477
2478	// Model: Name of the model of the device
2479	Model string `json:"model,omitempty"`
2480
2481	// Name: List of owner user's names (Read-only)
2482	Name []string `json:"name,omitempty"`
2483
2484	// NetworkOperator: Mobile Device mobile or network operator (if
2485	// available) (Read-only)
2486	NetworkOperator string `json:"networkOperator,omitempty"`
2487
2488	// Os: Name of the mobile operating system
2489	Os string `json:"os,omitempty"`
2490
2491	// OtherAccountsInfo: List of accounts added on device (Read-only)
2492	OtherAccountsInfo []string `json:"otherAccountsInfo,omitempty"`
2493
2494	// Privilege: DMAgentPermission (Read-only)
2495	Privilege string `json:"privilege,omitempty"`
2496
2497	// ReleaseVersion: Mobile Device release version version (Read-only)
2498	ReleaseVersion string `json:"releaseVersion,omitempty"`
2499
2500	// ResourceId: Unique identifier of Mobile Device (Read-only)
2501	ResourceId string `json:"resourceId,omitempty"`
2502
2503	// SecurityPatchLevel: Mobile Device Security patch level (Read-only)
2504	SecurityPatchLevel int64 `json:"securityPatchLevel,omitempty,string"`
2505
2506	// SerialNumber: Mobile Device SSN or Serial Number (Read-only)
2507	SerialNumber string `json:"serialNumber,omitempty"`
2508
2509	// Status: Status of the device (Read-only)
2510	Status string `json:"status,omitempty"`
2511
2512	// SupportsWorkProfile: Work profile supported on device (Read-only)
2513	SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
2514
2515	// Type: The type of device (Read-only)
2516	Type string `json:"type,omitempty"`
2517
2518	// UnknownSourcesStatus: Unknown sources enabled or disabled on device
2519	// (Read-only)
2520	UnknownSourcesStatus bool `json:"unknownSourcesStatus,omitempty"`
2521
2522	// UserAgent: Mobile Device user agent
2523	UserAgent string `json:"userAgent,omitempty"`
2524
2525	// WifiMacAddress: Mobile Device WiFi MAC address (Read-only)
2526	WifiMacAddress string `json:"wifiMacAddress,omitempty"`
2527
2528	// ServerResponse contains the HTTP response code and headers from the
2529	// server.
2530	googleapi.ServerResponse `json:"-"`
2531
2532	// ForceSendFields is a list of field names (e.g. "AdbStatus") to
2533	// unconditionally include in API requests. By default, fields with
2534	// empty values are omitted from API requests. However, any non-pointer,
2535	// non-interface field appearing in ForceSendFields will be sent to the
2536	// server regardless of whether the field is empty or not. This may be
2537	// used to include empty fields in Patch requests.
2538	ForceSendFields []string `json:"-"`
2539
2540	// NullFields is a list of field names (e.g. "AdbStatus") to include in
2541	// API requests with the JSON null value. By default, fields with empty
2542	// values are omitted from API requests. However, any field with an
2543	// empty value appearing in NullFields will be sent to the server as
2544	// null. It is an error if a field in this list has a non-empty value.
2545	// This may be used to include null fields in Patch requests.
2546	NullFields []string `json:"-"`
2547}
2548
2549func (s *MobileDevice) MarshalJSON() ([]byte, error) {
2550	type NoMethod MobileDevice
2551	raw := NoMethod(*s)
2552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2553}
2554
2555type MobileDeviceApplications struct {
2556	// DisplayName: Display name of application
2557	DisplayName string `json:"displayName,omitempty"`
2558
2559	// PackageName: Package name of application
2560	PackageName string `json:"packageName,omitempty"`
2561
2562	// Permission: List of Permissions for application
2563	Permission []string `json:"permission,omitempty"`
2564
2565	// VersionCode: Version code of application
2566	VersionCode int64 `json:"versionCode,omitempty"`
2567
2568	// VersionName: Version name of application
2569	VersionName string `json:"versionName,omitempty"`
2570
2571	// ForceSendFields is a list of field names (e.g. "DisplayName") to
2572	// unconditionally include in API requests. By default, fields with
2573	// empty values are omitted from API requests. However, any non-pointer,
2574	// non-interface field appearing in ForceSendFields will be sent to the
2575	// server regardless of whether the field is empty or not. This may be
2576	// used to include empty fields in Patch requests.
2577	ForceSendFields []string `json:"-"`
2578
2579	// NullFields is a list of field names (e.g. "DisplayName") to include
2580	// in API requests with the JSON null value. By default, fields with
2581	// empty values are omitted from API requests. However, any field with
2582	// an empty value appearing in NullFields will be sent to the server as
2583	// null. It is an error if a field in this list has a non-empty value.
2584	// This may be used to include null fields in Patch requests.
2585	NullFields []string `json:"-"`
2586}
2587
2588func (s *MobileDeviceApplications) MarshalJSON() ([]byte, error) {
2589	type NoMethod MobileDeviceApplications
2590	raw := NoMethod(*s)
2591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2592}
2593
2594// MobileDeviceAction: JSON request template for firing commands on
2595// Mobile Device in Directory Devices API.
2596type MobileDeviceAction struct {
2597	// Action: Action to be taken on the Mobile Device
2598	Action string `json:"action,omitempty"`
2599
2600	// ForceSendFields is a list of field names (e.g. "Action") to
2601	// unconditionally include in API requests. By default, fields with
2602	// empty values are omitted from API requests. However, any non-pointer,
2603	// non-interface field appearing in ForceSendFields will be sent to the
2604	// server regardless of whether the field is empty or not. This may be
2605	// used to include empty fields in Patch requests.
2606	ForceSendFields []string `json:"-"`
2607
2608	// NullFields is a list of field names (e.g. "Action") to include in API
2609	// requests with the JSON null value. By default, fields with empty
2610	// values are omitted from API requests. However, any field with an
2611	// empty value appearing in NullFields will be sent to the server as
2612	// null. It is an error if a field in this list has a non-empty value.
2613	// This may be used to include null fields in Patch requests.
2614	NullFields []string `json:"-"`
2615}
2616
2617func (s *MobileDeviceAction) MarshalJSON() ([]byte, error) {
2618	type NoMethod MobileDeviceAction
2619	raw := NoMethod(*s)
2620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2621}
2622
2623// MobileDevices: JSON response template for List Mobile Devices
2624// operation in Directory API.
2625type MobileDevices struct {
2626	// Etag: ETag of the resource.
2627	Etag string `json:"etag,omitempty"`
2628
2629	// Kind: Kind of resource this is.
2630	Kind string `json:"kind,omitempty"`
2631
2632	// Mobiledevices: List of Mobile Device objects.
2633	Mobiledevices []*MobileDevice `json:"mobiledevices,omitempty"`
2634
2635	// NextPageToken: Token used to access next page of this result.
2636	NextPageToken string `json:"nextPageToken,omitempty"`
2637
2638	// ServerResponse contains the HTTP response code and headers from the
2639	// server.
2640	googleapi.ServerResponse `json:"-"`
2641
2642	// ForceSendFields is a list of field names (e.g. "Etag") to
2643	// unconditionally include in API requests. By default, fields with
2644	// empty values are omitted from API requests. However, any non-pointer,
2645	// non-interface field appearing in ForceSendFields will be sent to the
2646	// server regardless of whether the field is empty or not. This may be
2647	// used to include empty fields in Patch requests.
2648	ForceSendFields []string `json:"-"`
2649
2650	// NullFields is a list of field names (e.g. "Etag") to include in API
2651	// requests with the JSON null value. By default, fields with empty
2652	// values are omitted from API requests. However, any field with an
2653	// empty value appearing in NullFields will be sent to the server as
2654	// null. It is an error if a field in this list has a non-empty value.
2655	// This may be used to include null fields in Patch requests.
2656	NullFields []string `json:"-"`
2657}
2658
2659func (s *MobileDevices) MarshalJSON() ([]byte, error) {
2660	type NoMethod MobileDevices
2661	raw := NoMethod(*s)
2662	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2663}
2664
2665// Notification: Template for a notification resource.
2666type Notification struct {
2667	// Body: Body of the notification (Read-only)
2668	Body string `json:"body,omitempty"`
2669
2670	// Etag: ETag of the resource.
2671	Etag string `json:"etag,omitempty"`
2672
2673	// FromAddress: Address from which the notification is received
2674	// (Read-only)
2675	FromAddress string `json:"fromAddress,omitempty"`
2676
2677	// IsUnread: Boolean indicating whether the notification is unread or
2678	// not.
2679	IsUnread bool `json:"isUnread,omitempty"`
2680
2681	// Kind: The type of the resource.
2682	Kind string `json:"kind,omitempty"`
2683
2684	NotificationId string `json:"notificationId,omitempty"`
2685
2686	// SendTime: Time at which notification was sent (Read-only)
2687	SendTime string `json:"sendTime,omitempty"`
2688
2689	// Subject: Subject of the notification (Read-only)
2690	Subject string `json:"subject,omitempty"`
2691
2692	// ServerResponse contains the HTTP response code and headers from the
2693	// server.
2694	googleapi.ServerResponse `json:"-"`
2695
2696	// ForceSendFields is a list of field names (e.g. "Body") to
2697	// unconditionally include in API requests. By default, fields with
2698	// empty values are omitted from API requests. However, any non-pointer,
2699	// non-interface field appearing in ForceSendFields will be sent to the
2700	// server regardless of whether the field is empty or not. This may be
2701	// used to include empty fields in Patch requests.
2702	ForceSendFields []string `json:"-"`
2703
2704	// NullFields is a list of field names (e.g. "Body") to include in API
2705	// requests with the JSON null value. By default, fields with empty
2706	// values are omitted from API requests. However, any field with an
2707	// empty value appearing in NullFields will be sent to the server as
2708	// null. It is an error if a field in this list has a non-empty value.
2709	// This may be used to include null fields in Patch requests.
2710	NullFields []string `json:"-"`
2711}
2712
2713func (s *Notification) MarshalJSON() ([]byte, error) {
2714	type NoMethod Notification
2715	raw := NoMethod(*s)
2716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2717}
2718
2719// Notifications: Template for notifications list response.
2720type Notifications struct {
2721	// Etag: ETag of the resource.
2722	Etag string `json:"etag,omitempty"`
2723
2724	// Items: List of notifications in this page.
2725	Items []*Notification `json:"items,omitempty"`
2726
2727	// Kind: The type of the resource.
2728	Kind string `json:"kind,omitempty"`
2729
2730	// NextPageToken: Token for fetching the next page of notifications.
2731	NextPageToken string `json:"nextPageToken,omitempty"`
2732
2733	// UnreadNotificationsCount: Number of unread notification for the
2734	// domain.
2735	UnreadNotificationsCount int64 `json:"unreadNotificationsCount,omitempty"`
2736
2737	// ServerResponse contains the HTTP response code and headers from the
2738	// server.
2739	googleapi.ServerResponse `json:"-"`
2740
2741	// ForceSendFields is a list of field names (e.g. "Etag") to
2742	// unconditionally include in API requests. By default, fields with
2743	// empty values are omitted from API requests. However, any non-pointer,
2744	// non-interface field appearing in ForceSendFields will be sent to the
2745	// server regardless of whether the field is empty or not. This may be
2746	// used to include empty fields in Patch requests.
2747	ForceSendFields []string `json:"-"`
2748
2749	// NullFields is a list of field names (e.g. "Etag") to include in API
2750	// requests with the JSON null value. By default, fields with empty
2751	// values are omitted from API requests. However, any field with an
2752	// empty value appearing in NullFields will be sent to the server as
2753	// null. It is an error if a field in this list has a non-empty value.
2754	// This may be used to include null fields in Patch requests.
2755	NullFields []string `json:"-"`
2756}
2757
2758func (s *Notifications) MarshalJSON() ([]byte, error) {
2759	type NoMethod Notifications
2760	raw := NoMethod(*s)
2761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2762}
2763
2764// OrgUnit: JSON template for Org Unit resource in Directory API.
2765type OrgUnit struct {
2766	// BlockInheritance: Should block inheritance
2767	BlockInheritance bool `json:"blockInheritance,omitempty"`
2768
2769	// Description: Description of OrgUnit
2770	Description string `json:"description,omitempty"`
2771
2772	// Etag: ETag of the resource.
2773	Etag string `json:"etag,omitempty"`
2774
2775	// Kind: Kind of resource this is.
2776	Kind string `json:"kind,omitempty"`
2777
2778	// Name: Name of OrgUnit
2779	Name string `json:"name,omitempty"`
2780
2781	// OrgUnitId: Id of OrgUnit
2782	OrgUnitId string `json:"orgUnitId,omitempty"`
2783
2784	// OrgUnitPath: Path of OrgUnit
2785	OrgUnitPath string `json:"orgUnitPath,omitempty"`
2786
2787	// ParentOrgUnitId: Id of parent OrgUnit
2788	ParentOrgUnitId string `json:"parentOrgUnitId,omitempty"`
2789
2790	// ParentOrgUnitPath: Path of parent OrgUnit
2791	ParentOrgUnitPath string `json:"parentOrgUnitPath,omitempty"`
2792
2793	// ServerResponse contains the HTTP response code and headers from the
2794	// server.
2795	googleapi.ServerResponse `json:"-"`
2796
2797	// ForceSendFields is a list of field names (e.g. "BlockInheritance") to
2798	// unconditionally include in API requests. By default, fields with
2799	// empty values are omitted from API requests. However, any non-pointer,
2800	// non-interface field appearing in ForceSendFields will be sent to the
2801	// server regardless of whether the field is empty or not. This may be
2802	// used to include empty fields in Patch requests.
2803	ForceSendFields []string `json:"-"`
2804
2805	// NullFields is a list of field names (e.g. "BlockInheritance") to
2806	// include in API requests with the JSON null value. By default, fields
2807	// with empty values are omitted from API requests. However, any field
2808	// with an empty value appearing in NullFields will be sent to the
2809	// server as null. It is an error if a field in this list has a
2810	// non-empty value. This may be used to include null fields in Patch
2811	// requests.
2812	NullFields []string `json:"-"`
2813}
2814
2815func (s *OrgUnit) MarshalJSON() ([]byte, error) {
2816	type NoMethod OrgUnit
2817	raw := NoMethod(*s)
2818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2819}
2820
2821// OrgUnits: JSON response template for List Organization Units
2822// operation in Directory API.
2823type OrgUnits struct {
2824	// Etag: ETag of the resource.
2825	Etag string `json:"etag,omitempty"`
2826
2827	// Kind: Kind of resource this is.
2828	Kind string `json:"kind,omitempty"`
2829
2830	// OrganizationUnits: List of user objects.
2831	OrganizationUnits []*OrgUnit `json:"organizationUnits,omitempty"`
2832
2833	// ServerResponse contains the HTTP response code and headers from the
2834	// server.
2835	googleapi.ServerResponse `json:"-"`
2836
2837	// ForceSendFields is a list of field names (e.g. "Etag") to
2838	// unconditionally include in API requests. By default, fields with
2839	// empty values are omitted from API requests. However, any non-pointer,
2840	// non-interface field appearing in ForceSendFields will be sent to the
2841	// server regardless of whether the field is empty or not. This may be
2842	// used to include empty fields in Patch requests.
2843	ForceSendFields []string `json:"-"`
2844
2845	// NullFields is a list of field names (e.g. "Etag") to include in API
2846	// requests with the JSON null value. By default, fields with empty
2847	// values are omitted from API requests. However, any field with an
2848	// empty value appearing in NullFields will be sent to the server as
2849	// null. It is an error if a field in this list has a non-empty value.
2850	// This may be used to include null fields in Patch requests.
2851	NullFields []string `json:"-"`
2852}
2853
2854func (s *OrgUnits) MarshalJSON() ([]byte, error) {
2855	type NoMethod OrgUnits
2856	raw := NoMethod(*s)
2857	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2858}
2859
2860// Privilege: JSON template for privilege resource in Directory API.
2861type Privilege struct {
2862	// ChildPrivileges: A list of child privileges. Privileges for a service
2863	// form a tree. Each privilege can have a list of child privileges; this
2864	// list is empty for a leaf privilege.
2865	ChildPrivileges []*Privilege `json:"childPrivileges,omitempty"`
2866
2867	// Etag: ETag of the resource.
2868	Etag string `json:"etag,omitempty"`
2869
2870	// IsOuScopable: If the privilege can be restricted to an organization
2871	// unit.
2872	IsOuScopable bool `json:"isOuScopable,omitempty"`
2873
2874	// Kind: The type of the API resource. This is always
2875	// admin#directory#privilege.
2876	Kind string `json:"kind,omitempty"`
2877
2878	// PrivilegeName: The name of the privilege.
2879	PrivilegeName string `json:"privilegeName,omitempty"`
2880
2881	// ServiceId: The obfuscated ID of the service this privilege is for.
2882	ServiceId string `json:"serviceId,omitempty"`
2883
2884	// ServiceName: The name of the service this privilege is for.
2885	ServiceName string `json:"serviceName,omitempty"`
2886
2887	// ForceSendFields is a list of field names (e.g. "ChildPrivileges") to
2888	// unconditionally include in API requests. By default, fields with
2889	// empty values are omitted from API requests. However, any non-pointer,
2890	// non-interface field appearing in ForceSendFields will be sent to the
2891	// server regardless of whether the field is empty or not. This may be
2892	// used to include empty fields in Patch requests.
2893	ForceSendFields []string `json:"-"`
2894
2895	// NullFields is a list of field names (e.g. "ChildPrivileges") to
2896	// include in API requests with the JSON null value. By default, fields
2897	// with empty values are omitted from API requests. However, any field
2898	// with an empty value appearing in NullFields will be sent to the
2899	// server as null. It is an error if a field in this list has a
2900	// non-empty value. This may be used to include null fields in Patch
2901	// requests.
2902	NullFields []string `json:"-"`
2903}
2904
2905func (s *Privilege) MarshalJSON() ([]byte, error) {
2906	type NoMethod Privilege
2907	raw := NoMethod(*s)
2908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2909}
2910
2911// Privileges: JSON response template for List privileges operation in
2912// Directory API.
2913type Privileges struct {
2914	// Etag: ETag of the resource.
2915	Etag string `json:"etag,omitempty"`
2916
2917	// Items: A list of Privilege resources.
2918	Items []*Privilege `json:"items,omitempty"`
2919
2920	// Kind: The type of the API resource. This is always
2921	// admin#directory#privileges.
2922	Kind string `json:"kind,omitempty"`
2923
2924	// ServerResponse contains the HTTP response code and headers from the
2925	// server.
2926	googleapi.ServerResponse `json:"-"`
2927
2928	// ForceSendFields is a list of field names (e.g. "Etag") to
2929	// unconditionally include in API requests. By default, fields with
2930	// empty values are omitted from API requests. However, any non-pointer,
2931	// non-interface field appearing in ForceSendFields will be sent to the
2932	// server regardless of whether the field is empty or not. This may be
2933	// used to include empty fields in Patch requests.
2934	ForceSendFields []string `json:"-"`
2935
2936	// NullFields is a list of field names (e.g. "Etag") to include in API
2937	// requests with the JSON null value. By default, fields with empty
2938	// values are omitted from API requests. However, any field with an
2939	// empty value appearing in NullFields will be sent to the server as
2940	// null. It is an error if a field in this list has a non-empty value.
2941	// This may be used to include null fields in Patch requests.
2942	NullFields []string `json:"-"`
2943}
2944
2945func (s *Privileges) MarshalJSON() ([]byte, error) {
2946	type NoMethod Privileges
2947	raw := NoMethod(*s)
2948	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2949}
2950
2951// Role: JSON template for role resource in Directory API.
2952type Role struct {
2953	// Etag: ETag of the resource.
2954	Etag string `json:"etag,omitempty"`
2955
2956	// IsSuperAdminRole: Returns true if the role is a super admin role.
2957	IsSuperAdminRole bool `json:"isSuperAdminRole,omitempty"`
2958
2959	// IsSystemRole: Returns true if this is a pre-defined system role.
2960	IsSystemRole bool `json:"isSystemRole,omitempty"`
2961
2962	// Kind: The type of the API resource. This is always
2963	// admin#directory#role.
2964	Kind string `json:"kind,omitempty"`
2965
2966	// RoleDescription: A short description of the role.
2967	RoleDescription string `json:"roleDescription,omitempty"`
2968
2969	// RoleId: ID of the role.
2970	RoleId int64 `json:"roleId,omitempty,string"`
2971
2972	// RoleName: Name of the role.
2973	RoleName string `json:"roleName,omitempty"`
2974
2975	// RolePrivileges: The set of privileges that are granted to this role.
2976	RolePrivileges []*RoleRolePrivileges `json:"rolePrivileges,omitempty"`
2977
2978	// ServerResponse contains the HTTP response code and headers from the
2979	// server.
2980	googleapi.ServerResponse `json:"-"`
2981
2982	// ForceSendFields is a list of field names (e.g. "Etag") to
2983	// unconditionally include in API requests. By default, fields with
2984	// empty values are omitted from API requests. However, any non-pointer,
2985	// non-interface field appearing in ForceSendFields will be sent to the
2986	// server regardless of whether the field is empty or not. This may be
2987	// used to include empty fields in Patch requests.
2988	ForceSendFields []string `json:"-"`
2989
2990	// NullFields is a list of field names (e.g. "Etag") to include in API
2991	// requests with the JSON null value. By default, fields with empty
2992	// values are omitted from API requests. However, any field with an
2993	// empty value appearing in NullFields will be sent to the server as
2994	// null. It is an error if a field in this list has a non-empty value.
2995	// This may be used to include null fields in Patch requests.
2996	NullFields []string `json:"-"`
2997}
2998
2999func (s *Role) MarshalJSON() ([]byte, error) {
3000	type NoMethod Role
3001	raw := NoMethod(*s)
3002	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3003}
3004
3005type RoleRolePrivileges struct {
3006	// PrivilegeName: The name of the privilege.
3007	PrivilegeName string `json:"privilegeName,omitempty"`
3008
3009	// ServiceId: The obfuscated ID of the service this privilege is for.
3010	ServiceId string `json:"serviceId,omitempty"`
3011
3012	// ForceSendFields is a list of field names (e.g. "PrivilegeName") to
3013	// unconditionally include in API requests. By default, fields with
3014	// empty values are omitted from API requests. However, any non-pointer,
3015	// non-interface field appearing in ForceSendFields will be sent to the
3016	// server regardless of whether the field is empty or not. This may be
3017	// used to include empty fields in Patch requests.
3018	ForceSendFields []string `json:"-"`
3019
3020	// NullFields is a list of field names (e.g. "PrivilegeName") to include
3021	// in API requests with the JSON null value. By default, fields with
3022	// empty values are omitted from API requests. However, any field with
3023	// an empty value appearing in NullFields will be sent to the server as
3024	// null. It is an error if a field in this list has a non-empty value.
3025	// This may be used to include null fields in Patch requests.
3026	NullFields []string `json:"-"`
3027}
3028
3029func (s *RoleRolePrivileges) MarshalJSON() ([]byte, error) {
3030	type NoMethod RoleRolePrivileges
3031	raw := NoMethod(*s)
3032	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3033}
3034
3035// RoleAssignment: JSON template for roleAssignment resource in
3036// Directory API.
3037type RoleAssignment struct {
3038	// AssignedTo: The unique ID of the user this role is assigned to.
3039	AssignedTo string `json:"assignedTo,omitempty"`
3040
3041	// Etag: ETag of the resource.
3042	Etag string `json:"etag,omitempty"`
3043
3044	// Kind: The type of the API resource. This is always
3045	// admin#directory#roleAssignment.
3046	Kind string `json:"kind,omitempty"`
3047
3048	// OrgUnitId: If the role is restricted to an organization unit, this
3049	// contains the ID for the organization unit the exercise of this role
3050	// is restricted to.
3051	OrgUnitId string `json:"orgUnitId,omitempty"`
3052
3053	// RoleAssignmentId: ID of this roleAssignment.
3054	RoleAssignmentId int64 `json:"roleAssignmentId,omitempty,string"`
3055
3056	// RoleId: The ID of the role that is assigned.
3057	RoleId int64 `json:"roleId,omitempty,string"`
3058
3059	// ScopeType: The scope in which this role is assigned. Possible values
3060	// are:
3061	// - CUSTOMER
3062	// - ORG_UNIT
3063	ScopeType string `json:"scopeType,omitempty"`
3064
3065	// ServerResponse contains the HTTP response code and headers from the
3066	// server.
3067	googleapi.ServerResponse `json:"-"`
3068
3069	// ForceSendFields is a list of field names (e.g. "AssignedTo") to
3070	// unconditionally include in API requests. By default, fields with
3071	// empty values are omitted from API requests. However, any non-pointer,
3072	// non-interface field appearing in ForceSendFields will be sent to the
3073	// server regardless of whether the field is empty or not. This may be
3074	// used to include empty fields in Patch requests.
3075	ForceSendFields []string `json:"-"`
3076
3077	// NullFields is a list of field names (e.g. "AssignedTo") to include in
3078	// API requests with the JSON null value. By default, fields with empty
3079	// values are omitted from API requests. However, any field with an
3080	// empty value appearing in NullFields will be sent to the server as
3081	// null. It is an error if a field in this list has a non-empty value.
3082	// This may be used to include null fields in Patch requests.
3083	NullFields []string `json:"-"`
3084}
3085
3086func (s *RoleAssignment) MarshalJSON() ([]byte, error) {
3087	type NoMethod RoleAssignment
3088	raw := NoMethod(*s)
3089	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3090}
3091
3092// RoleAssignments: JSON response template for List roleAssignments
3093// operation in Directory API.
3094type RoleAssignments struct {
3095	// Etag: ETag of the resource.
3096	Etag string `json:"etag,omitempty"`
3097
3098	// Items: A list of RoleAssignment resources.
3099	Items []*RoleAssignment `json:"items,omitempty"`
3100
3101	// Kind: The type of the API resource. This is always
3102	// admin#directory#roleAssignments.
3103	Kind string `json:"kind,omitempty"`
3104
3105	NextPageToken string `json:"nextPageToken,omitempty"`
3106
3107	// ServerResponse contains the HTTP response code and headers from the
3108	// server.
3109	googleapi.ServerResponse `json:"-"`
3110
3111	// ForceSendFields is a list of field names (e.g. "Etag") to
3112	// unconditionally include in API requests. By default, fields with
3113	// empty values are omitted from API requests. However, any non-pointer,
3114	// non-interface field appearing in ForceSendFields will be sent to the
3115	// server regardless of whether the field is empty or not. This may be
3116	// used to include empty fields in Patch requests.
3117	ForceSendFields []string `json:"-"`
3118
3119	// NullFields is a list of field names (e.g. "Etag") to include in API
3120	// requests with the JSON null value. By default, fields with empty
3121	// values are omitted from API requests. However, any field with an
3122	// empty value appearing in NullFields will be sent to the server as
3123	// null. It is an error if a field in this list has a non-empty value.
3124	// This may be used to include null fields in Patch requests.
3125	NullFields []string `json:"-"`
3126}
3127
3128func (s *RoleAssignments) MarshalJSON() ([]byte, error) {
3129	type NoMethod RoleAssignments
3130	raw := NoMethod(*s)
3131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3132}
3133
3134// Roles: JSON response template for List roles operation in Directory
3135// API.
3136type Roles struct {
3137	// Etag: ETag of the resource.
3138	Etag string `json:"etag,omitempty"`
3139
3140	// Items: A list of Role resources.
3141	Items []*Role `json:"items,omitempty"`
3142
3143	// Kind: The type of the API resource. This is always
3144	// admin#directory#roles.
3145	Kind string `json:"kind,omitempty"`
3146
3147	NextPageToken string `json:"nextPageToken,omitempty"`
3148
3149	// ServerResponse contains the HTTP response code and headers from the
3150	// server.
3151	googleapi.ServerResponse `json:"-"`
3152
3153	// ForceSendFields is a list of field names (e.g. "Etag") to
3154	// unconditionally include in API requests. By default, fields with
3155	// empty values are omitted from API requests. However, any non-pointer,
3156	// non-interface field appearing in ForceSendFields will be sent to the
3157	// server regardless of whether the field is empty or not. This may be
3158	// used to include empty fields in Patch requests.
3159	ForceSendFields []string `json:"-"`
3160
3161	// NullFields is a list of field names (e.g. "Etag") to include in API
3162	// requests with the JSON null value. By default, fields with empty
3163	// values are omitted from API requests. However, any field with an
3164	// empty value appearing in NullFields will be sent to the server as
3165	// null. It is an error if a field in this list has a non-empty value.
3166	// This may be used to include null fields in Patch requests.
3167	NullFields []string `json:"-"`
3168}
3169
3170func (s *Roles) MarshalJSON() ([]byte, error) {
3171	type NoMethod Roles
3172	raw := NoMethod(*s)
3173	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3174}
3175
3176// Schema: JSON template for Schema resource in Directory API.
3177type Schema struct {
3178	// DisplayName: Display name for the schema.
3179	DisplayName string `json:"displayName,omitempty"`
3180
3181	// Etag: ETag of the resource.
3182	Etag string `json:"etag,omitempty"`
3183
3184	// Fields: Fields of Schema
3185	Fields []*SchemaFieldSpec `json:"fields,omitempty"`
3186
3187	// Kind: Kind of resource this is.
3188	Kind string `json:"kind,omitempty"`
3189
3190	// SchemaId: Unique identifier of Schema (Read-only)
3191	SchemaId string `json:"schemaId,omitempty"`
3192
3193	// SchemaName: Schema name
3194	SchemaName string `json:"schemaName,omitempty"`
3195
3196	// ServerResponse contains the HTTP response code and headers from the
3197	// server.
3198	googleapi.ServerResponse `json:"-"`
3199
3200	// ForceSendFields is a list of field names (e.g. "DisplayName") to
3201	// unconditionally include in API requests. By default, fields with
3202	// empty values are omitted from API requests. However, any non-pointer,
3203	// non-interface field appearing in ForceSendFields will be sent to the
3204	// server regardless of whether the field is empty or not. This may be
3205	// used to include empty fields in Patch requests.
3206	ForceSendFields []string `json:"-"`
3207
3208	// NullFields is a list of field names (e.g. "DisplayName") to include
3209	// in API requests with the JSON null value. By default, fields with
3210	// empty values are omitted from API requests. However, any field with
3211	// an empty value appearing in NullFields will be sent to the server as
3212	// null. It is an error if a field in this list has a non-empty value.
3213	// This may be used to include null fields in Patch requests.
3214	NullFields []string `json:"-"`
3215}
3216
3217func (s *Schema) MarshalJSON() ([]byte, error) {
3218	type NoMethod Schema
3219	raw := NoMethod(*s)
3220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3221}
3222
3223// SchemaFieldSpec: JSON template for FieldSpec resource for Schemas in
3224// Directory API.
3225type SchemaFieldSpec struct {
3226	// DisplayName: Display Name of the field.
3227	DisplayName string `json:"displayName,omitempty"`
3228
3229	// Etag: ETag of the resource.
3230	Etag string `json:"etag,omitempty"`
3231
3232	// FieldId: Unique identifier of Field (Read-only)
3233	FieldId string `json:"fieldId,omitempty"`
3234
3235	// FieldName: Name of the field.
3236	FieldName string `json:"fieldName,omitempty"`
3237
3238	// FieldType: Type of the field.
3239	FieldType string `json:"fieldType,omitempty"`
3240
3241	// Indexed: Boolean specifying whether the field is indexed or not.
3242	//
3243	// Default: true
3244	Indexed *bool `json:"indexed,omitempty"`
3245
3246	// Kind: Kind of resource this is.
3247	Kind string `json:"kind,omitempty"`
3248
3249	// MultiValued: Boolean specifying whether this is a multi-valued field
3250	// or not.
3251	MultiValued bool `json:"multiValued,omitempty"`
3252
3253	// NumericIndexingSpec: Indexing spec for a numeric field. By default,
3254	// only exact match queries will be supported for numeric fields.
3255	// Setting the numericIndexingSpec allows range queries to be supported.
3256	NumericIndexingSpec *SchemaFieldSpecNumericIndexingSpec `json:"numericIndexingSpec,omitempty"`
3257
3258	// ReadAccessType: Read ACLs on the field specifying who can view values
3259	// of this field. Valid values are "ALL_DOMAIN_USERS" and
3260	// "ADMINS_AND_SELF".
3261	ReadAccessType string `json:"readAccessType,omitempty"`
3262
3263	// ForceSendFields is a list of field names (e.g. "DisplayName") to
3264	// unconditionally include in API requests. By default, fields with
3265	// empty values are omitted from API requests. However, any non-pointer,
3266	// non-interface field appearing in ForceSendFields will be sent to the
3267	// server regardless of whether the field is empty or not. This may be
3268	// used to include empty fields in Patch requests.
3269	ForceSendFields []string `json:"-"`
3270
3271	// NullFields is a list of field names (e.g. "DisplayName") to include
3272	// in API requests with the JSON null value. By default, fields with
3273	// empty values are omitted from API requests. However, any field with
3274	// an empty value appearing in NullFields will be sent to the server as
3275	// null. It is an error if a field in this list has a non-empty value.
3276	// This may be used to include null fields in Patch requests.
3277	NullFields []string `json:"-"`
3278}
3279
3280func (s *SchemaFieldSpec) MarshalJSON() ([]byte, error) {
3281	type NoMethod SchemaFieldSpec
3282	raw := NoMethod(*s)
3283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3284}
3285
3286// SchemaFieldSpecNumericIndexingSpec: Indexing spec for a numeric
3287// field. By default, only exact match queries will be supported for
3288// numeric fields. Setting the numericIndexingSpec allows range queries
3289// to be supported.
3290type SchemaFieldSpecNumericIndexingSpec struct {
3291	// MaxValue: Maximum value of this field. This is meant to be indicative
3292	// rather than enforced. Values outside this range will still be
3293	// indexed, but search may not be as performant.
3294	MaxValue float64 `json:"maxValue,omitempty"`
3295
3296	// MinValue: Minimum value of this field. This is meant to be indicative
3297	// rather than enforced. Values outside this range will still be
3298	// indexed, but search may not be as performant.
3299	MinValue float64 `json:"minValue,omitempty"`
3300
3301	// ForceSendFields is a list of field names (e.g. "MaxValue") to
3302	// unconditionally include in API requests. By default, fields with
3303	// empty values are omitted from API requests. However, any non-pointer,
3304	// non-interface field appearing in ForceSendFields will be sent to the
3305	// server regardless of whether the field is empty or not. This may be
3306	// used to include empty fields in Patch requests.
3307	ForceSendFields []string `json:"-"`
3308
3309	// NullFields is a list of field names (e.g. "MaxValue") to include in
3310	// API requests with the JSON null value. By default, fields with empty
3311	// values are omitted from API requests. However, any field with an
3312	// empty value appearing in NullFields will be sent to the server as
3313	// null. It is an error if a field in this list has a non-empty value.
3314	// This may be used to include null fields in Patch requests.
3315	NullFields []string `json:"-"`
3316}
3317
3318func (s *SchemaFieldSpecNumericIndexingSpec) MarshalJSON() ([]byte, error) {
3319	type NoMethod SchemaFieldSpecNumericIndexingSpec
3320	raw := NoMethod(*s)
3321	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3322}
3323
3324func (s *SchemaFieldSpecNumericIndexingSpec) UnmarshalJSON(data []byte) error {
3325	type NoMethod SchemaFieldSpecNumericIndexingSpec
3326	var s1 struct {
3327		MaxValue gensupport.JSONFloat64 `json:"maxValue"`
3328		MinValue gensupport.JSONFloat64 `json:"minValue"`
3329		*NoMethod
3330	}
3331	s1.NoMethod = (*NoMethod)(s)
3332	if err := json.Unmarshal(data, &s1); err != nil {
3333		return err
3334	}
3335	s.MaxValue = float64(s1.MaxValue)
3336	s.MinValue = float64(s1.MinValue)
3337	return nil
3338}
3339
3340// Schemas: JSON response template for List Schema operation in
3341// Directory API.
3342type Schemas struct {
3343	// Etag: ETag of the resource.
3344	Etag string `json:"etag,omitempty"`
3345
3346	// Kind: Kind of resource this is.
3347	Kind string `json:"kind,omitempty"`
3348
3349	// Schemas: List of UserSchema objects.
3350	Schemas []*Schema `json:"schemas,omitempty"`
3351
3352	// ServerResponse contains the HTTP response code and headers from the
3353	// server.
3354	googleapi.ServerResponse `json:"-"`
3355
3356	// ForceSendFields is a list of field names (e.g. "Etag") to
3357	// unconditionally include in API requests. By default, fields with
3358	// empty values are omitted from API requests. However, any non-pointer,
3359	// non-interface field appearing in ForceSendFields will be sent to the
3360	// server regardless of whether the field is empty or not. This may be
3361	// used to include empty fields in Patch requests.
3362	ForceSendFields []string `json:"-"`
3363
3364	// NullFields is a list of field names (e.g. "Etag") to include in API
3365	// requests with the JSON null value. By default, fields with empty
3366	// values are omitted from API requests. However, any field with an
3367	// empty value appearing in NullFields will be sent to the server as
3368	// null. It is an error if a field in this list has a non-empty value.
3369	// This may be used to include null fields in Patch requests.
3370	NullFields []string `json:"-"`
3371}
3372
3373func (s *Schemas) MarshalJSON() ([]byte, error) {
3374	type NoMethod Schemas
3375	raw := NoMethod(*s)
3376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3377}
3378
3379// Token: JSON template for token resource in Directory API.
3380type Token struct {
3381	// Anonymous: Whether the application is registered with Google. The
3382	// value is true if the application has an anonymous Client ID.
3383	Anonymous bool `json:"anonymous,omitempty"`
3384
3385	// ClientId: The Client ID of the application the token is issued to.
3386	ClientId string `json:"clientId,omitempty"`
3387
3388	// DisplayText: The displayable name of the application the token is
3389	// issued to.
3390	DisplayText string `json:"displayText,omitempty"`
3391
3392	// Etag: ETag of the resource.
3393	Etag string `json:"etag,omitempty"`
3394
3395	// Kind: The type of the API resource. This is always
3396	// admin#directory#token.
3397	Kind string `json:"kind,omitempty"`
3398
3399	// NativeApp: Whether the token is issued to an installed application.
3400	// The value is true if the application is installed to a desktop or
3401	// mobile device.
3402	NativeApp bool `json:"nativeApp,omitempty"`
3403
3404	// Scopes: A list of authorization scopes the application is granted.
3405	Scopes []string `json:"scopes,omitempty"`
3406
3407	// UserKey: The unique ID of the user that issued the token.
3408	UserKey string `json:"userKey,omitempty"`
3409
3410	// ServerResponse contains the HTTP response code and headers from the
3411	// server.
3412	googleapi.ServerResponse `json:"-"`
3413
3414	// ForceSendFields is a list of field names (e.g. "Anonymous") to
3415	// unconditionally include in API requests. By default, fields with
3416	// empty values are omitted from API requests. However, any non-pointer,
3417	// non-interface field appearing in ForceSendFields will be sent to the
3418	// server regardless of whether the field is empty or not. This may be
3419	// used to include empty fields in Patch requests.
3420	ForceSendFields []string `json:"-"`
3421
3422	// NullFields is a list of field names (e.g. "Anonymous") to include in
3423	// API requests with the JSON null value. By default, fields with empty
3424	// values are omitted from API requests. However, any field with an
3425	// empty value appearing in NullFields will be sent to the server as
3426	// null. It is an error if a field in this list has a non-empty value.
3427	// This may be used to include null fields in Patch requests.
3428	NullFields []string `json:"-"`
3429}
3430
3431func (s *Token) MarshalJSON() ([]byte, error) {
3432	type NoMethod Token
3433	raw := NoMethod(*s)
3434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3435}
3436
3437// Tokens: JSON response template for List tokens operation in Directory
3438// API.
3439type Tokens struct {
3440	// Etag: ETag of the resource.
3441	Etag string `json:"etag,omitempty"`
3442
3443	// Items: A list of Token resources.
3444	Items []*Token `json:"items,omitempty"`
3445
3446	// Kind: The type of the API resource. This is always
3447	// admin#directory#tokenList.
3448	Kind string `json:"kind,omitempty"`
3449
3450	// ServerResponse contains the HTTP response code and headers from the
3451	// server.
3452	googleapi.ServerResponse `json:"-"`
3453
3454	// ForceSendFields is a list of field names (e.g. "Etag") to
3455	// unconditionally include in API requests. By default, fields with
3456	// empty values are omitted from API requests. However, any non-pointer,
3457	// non-interface field appearing in ForceSendFields will be sent to the
3458	// server regardless of whether the field is empty or not. This may be
3459	// used to include empty fields in Patch requests.
3460	ForceSendFields []string `json:"-"`
3461
3462	// NullFields is a list of field names (e.g. "Etag") to include in API
3463	// requests with the JSON null value. By default, fields with empty
3464	// values are omitted from API requests. However, any field with an
3465	// empty value appearing in NullFields will be sent to the server as
3466	// null. It is an error if a field in this list has a non-empty value.
3467	// This may be used to include null fields in Patch requests.
3468	NullFields []string `json:"-"`
3469}
3470
3471func (s *Tokens) MarshalJSON() ([]byte, error) {
3472	type NoMethod Tokens
3473	raw := NoMethod(*s)
3474	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3475}
3476
3477// TrustedAppId: JSON template for Trusted App Ids Resource object in
3478// Directory API.
3479type TrustedAppId struct {
3480	// AndroidPackageName: Android package name.
3481	AndroidPackageName string `json:"androidPackageName,omitempty"`
3482
3483	// CertificateHashSHA1: SHA1 signature of the app certificate.
3484	CertificateHashSHA1 string `json:"certificateHashSHA1,omitempty"`
3485
3486	// CertificateHashSHA256: SHA256 signature of the app certificate.
3487	CertificateHashSHA256 string `json:"certificateHashSHA256,omitempty"`
3488
3489	Etag string `json:"etag,omitempty"`
3490
3491	// Kind: Identifies the resource as a trusted AppId.
3492	Kind string `json:"kind,omitempty"`
3493
3494	// ForceSendFields is a list of field names (e.g. "AndroidPackageName")
3495	// to unconditionally include in API requests. By default, fields with
3496	// empty values are omitted from API requests. However, any non-pointer,
3497	// non-interface field appearing in ForceSendFields will be sent to the
3498	// server regardless of whether the field is empty or not. This may be
3499	// used to include empty fields in Patch requests.
3500	ForceSendFields []string `json:"-"`
3501
3502	// NullFields is a list of field names (e.g. "AndroidPackageName") to
3503	// include in API requests with the JSON null value. By default, fields
3504	// with empty values are omitted from API requests. However, any field
3505	// with an empty value appearing in NullFields will be sent to the
3506	// server as null. It is an error if a field in this list has a
3507	// non-empty value. This may be used to include null fields in Patch
3508	// requests.
3509	NullFields []string `json:"-"`
3510}
3511
3512func (s *TrustedAppId) MarshalJSON() ([]byte, error) {
3513	type NoMethod TrustedAppId
3514	raw := NoMethod(*s)
3515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3516}
3517
3518// TrustedApps: JSON template for Trusted Apps response object of a user
3519// in Directory API.
3520type TrustedApps struct {
3521	// Etag: ETag of the resource.
3522	Etag string `json:"etag,omitempty"`
3523
3524	// Kind: Identifies the resource as trusted apps response.
3525	Kind string `json:"kind,omitempty"`
3526
3527	NextPageToken string `json:"nextPageToken,omitempty"`
3528
3529	// TrustedApps: Trusted Apps list.
3530	TrustedApps []*TrustedAppId `json:"trustedApps,omitempty"`
3531
3532	// ServerResponse contains the HTTP response code and headers from the
3533	// server.
3534	googleapi.ServerResponse `json:"-"`
3535
3536	// ForceSendFields is a list of field names (e.g. "Etag") to
3537	// unconditionally include in API requests. By default, fields with
3538	// empty values are omitted from API requests. However, any non-pointer,
3539	// non-interface field appearing in ForceSendFields will be sent to the
3540	// server regardless of whether the field is empty or not. This may be
3541	// used to include empty fields in Patch requests.
3542	ForceSendFields []string `json:"-"`
3543
3544	// NullFields is a list of field names (e.g. "Etag") to include in API
3545	// requests with the JSON null value. By default, fields with empty
3546	// values are omitted from API requests. However, any field with an
3547	// empty value appearing in NullFields will be sent to the server as
3548	// null. It is an error if a field in this list has a non-empty value.
3549	// This may be used to include null fields in Patch requests.
3550	NullFields []string `json:"-"`
3551}
3552
3553func (s *TrustedApps) MarshalJSON() ([]byte, error) {
3554	type NoMethod TrustedApps
3555	raw := NoMethod(*s)
3556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3557}
3558
3559// User: JSON template for User object in Directory API.
3560type User struct {
3561	Addresses interface{} `json:"addresses,omitempty"`
3562
3563	// AgreedToTerms: Indicates if user has agreed to terms (Read-only)
3564	AgreedToTerms bool `json:"agreedToTerms,omitempty"`
3565
3566	// Aliases: List of aliases (Read-only)
3567	Aliases []string `json:"aliases,omitempty"`
3568
3569	// Archived: Indicates if user is archived.
3570	Archived bool `json:"archived,omitempty"`
3571
3572	// ChangePasswordAtNextLogin: Boolean indicating if the user should
3573	// change password in next login
3574	ChangePasswordAtNextLogin bool `json:"changePasswordAtNextLogin,omitempty"`
3575
3576	// CreationTime: User's G Suite account creation time. (Read-only)
3577	CreationTime string `json:"creationTime,omitempty"`
3578
3579	// CustomSchemas: Custom fields of the user.
3580	CustomSchemas map[string]googleapi.RawMessage `json:"customSchemas,omitempty"`
3581
3582	// CustomerId: CustomerId of User (Read-only)
3583	CustomerId string `json:"customerId,omitempty"`
3584
3585	DeletionTime string `json:"deletionTime,omitempty"`
3586
3587	Emails interface{} `json:"emails,omitempty"`
3588
3589	// Etag: ETag of the resource.
3590	Etag string `json:"etag,omitempty"`
3591
3592	ExternalIds interface{} `json:"externalIds,omitempty"`
3593
3594	Gender interface{} `json:"gender,omitempty"`
3595
3596	// HashFunction: Hash function name for password. Supported are MD5,
3597	// SHA-1 and crypt
3598	HashFunction string `json:"hashFunction,omitempty"`
3599
3600	// Id: Unique identifier of User (Read-only)
3601	Id string `json:"id,omitempty"`
3602
3603	Ims interface{} `json:"ims,omitempty"`
3604
3605	// IncludeInGlobalAddressList: Boolean indicating if user is included in
3606	// Global Address List
3607	IncludeInGlobalAddressList bool `json:"includeInGlobalAddressList,omitempty"`
3608
3609	// IpWhitelisted: Boolean indicating if ip is whitelisted
3610	IpWhitelisted bool `json:"ipWhitelisted,omitempty"`
3611
3612	// IsAdmin: Boolean indicating if the user is admin (Read-only)
3613	IsAdmin bool `json:"isAdmin,omitempty"`
3614
3615	// IsDelegatedAdmin: Boolean indicating if the user is delegated admin
3616	// (Read-only)
3617	IsDelegatedAdmin bool `json:"isDelegatedAdmin,omitempty"`
3618
3619	// IsEnforcedIn2Sv: Is 2-step verification enforced (Read-only)
3620	IsEnforcedIn2Sv bool `json:"isEnforcedIn2Sv,omitempty"`
3621
3622	// IsEnrolledIn2Sv: Is enrolled in 2-step verification (Read-only)
3623	IsEnrolledIn2Sv bool `json:"isEnrolledIn2Sv,omitempty"`
3624
3625	// IsMailboxSetup: Is mailbox setup (Read-only)
3626	IsMailboxSetup bool `json:"isMailboxSetup,omitempty"`
3627
3628	Keywords interface{} `json:"keywords,omitempty"`
3629
3630	// Kind: Kind of resource this is.
3631	Kind string `json:"kind,omitempty"`
3632
3633	Languages interface{} `json:"languages,omitempty"`
3634
3635	// LastLoginTime: User's last login time. (Read-only)
3636	LastLoginTime string `json:"lastLoginTime,omitempty"`
3637
3638	Locations interface{} `json:"locations,omitempty"`
3639
3640	// Name: User's name
3641	Name *UserName `json:"name,omitempty"`
3642
3643	// NonEditableAliases: List of non editable aliases (Read-only)
3644	NonEditableAliases []string `json:"nonEditableAliases,omitempty"`
3645
3646	Notes interface{} `json:"notes,omitempty"`
3647
3648	// OrgUnitPath: OrgUnit of User
3649	OrgUnitPath string `json:"orgUnitPath,omitempty"`
3650
3651	Organizations interface{} `json:"organizations,omitempty"`
3652
3653	// Password: User's password
3654	Password string `json:"password,omitempty"`
3655
3656	Phones interface{} `json:"phones,omitempty"`
3657
3658	PosixAccounts interface{} `json:"posixAccounts,omitempty"`
3659
3660	// PrimaryEmail: username of User
3661	PrimaryEmail string `json:"primaryEmail,omitempty"`
3662
3663	Relations interface{} `json:"relations,omitempty"`
3664
3665	SshPublicKeys interface{} `json:"sshPublicKeys,omitempty"`
3666
3667	// Suspended: Indicates if user is suspended.
3668	Suspended bool `json:"suspended,omitempty"`
3669
3670	// SuspensionReason: Suspension reason if user is suspended (Read-only)
3671	SuspensionReason string `json:"suspensionReason,omitempty"`
3672
3673	// ThumbnailPhotoEtag: ETag of the user's photo (Read-only)
3674	ThumbnailPhotoEtag string `json:"thumbnailPhotoEtag,omitempty"`
3675
3676	// ThumbnailPhotoUrl: Photo Url of the user (Read-only)
3677	ThumbnailPhotoUrl string `json:"thumbnailPhotoUrl,omitempty"`
3678
3679	Websites interface{} `json:"websites,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. "Addresses") to
3686	// unconditionally include in API requests. By default, fields with
3687	// empty values are omitted from API requests. However, any non-pointer,
3688	// non-interface field appearing in ForceSendFields will be sent to the
3689	// server regardless of whether the field is empty or not. This may be
3690	// used to include empty fields in Patch requests.
3691	ForceSendFields []string `json:"-"`
3692
3693	// NullFields is a list of field names (e.g. "Addresses") to include in
3694	// API requests with the JSON null value. By default, fields with empty
3695	// values are omitted from API requests. However, any field with an
3696	// empty value appearing in NullFields will be sent to the server as
3697	// null. It is an error if a field in this list has a non-empty value.
3698	// This may be used to include null fields in Patch requests.
3699	NullFields []string `json:"-"`
3700}
3701
3702func (s *User) MarshalJSON() ([]byte, error) {
3703	type NoMethod User
3704	raw := NoMethod(*s)
3705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3706}
3707
3708// UserAbout: JSON template for About (notes) of a user in Directory
3709// API.
3710type UserAbout struct {
3711	// ContentType: About entry can have a type which indicates the content
3712	// type. It can either be plain or html. By default, notes contents are
3713	// assumed to contain plain text.
3714	ContentType string `json:"contentType,omitempty"`
3715
3716	// Value: Actual value of notes.
3717	Value string `json:"value,omitempty"`
3718
3719	// ForceSendFields is a list of field names (e.g. "ContentType") to
3720	// unconditionally include in API requests. By default, fields with
3721	// empty values are omitted from API requests. However, any non-pointer,
3722	// non-interface field appearing in ForceSendFields will be sent to the
3723	// server regardless of whether the field is empty or not. This may be
3724	// used to include empty fields in Patch requests.
3725	ForceSendFields []string `json:"-"`
3726
3727	// NullFields is a list of field names (e.g. "ContentType") to include
3728	// in API requests with the JSON null value. By default, fields with
3729	// empty values are omitted from API requests. However, any field with
3730	// an empty value appearing in NullFields will be sent to the server as
3731	// null. It is an error if a field in this list has a non-empty value.
3732	// This may be used to include null fields in Patch requests.
3733	NullFields []string `json:"-"`
3734}
3735
3736func (s *UserAbout) MarshalJSON() ([]byte, error) {
3737	type NoMethod UserAbout
3738	raw := NoMethod(*s)
3739	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3740}
3741
3742// UserAddress: JSON template for address.
3743type UserAddress struct {
3744	// Country: Country.
3745	Country string `json:"country,omitempty"`
3746
3747	// CountryCode: Country code.
3748	CountryCode string `json:"countryCode,omitempty"`
3749
3750	// CustomType: Custom type.
3751	CustomType string `json:"customType,omitempty"`
3752
3753	// ExtendedAddress: Extended Address.
3754	ExtendedAddress string `json:"extendedAddress,omitempty"`
3755
3756	// Formatted: Formatted address.
3757	Formatted string `json:"formatted,omitempty"`
3758
3759	// Locality: Locality.
3760	Locality string `json:"locality,omitempty"`
3761
3762	// PoBox: Other parts of address.
3763	PoBox string `json:"poBox,omitempty"`
3764
3765	// PostalCode: Postal code.
3766	PostalCode string `json:"postalCode,omitempty"`
3767
3768	// Primary: If this is user's primary address. Only one entry could be
3769	// marked as primary.
3770	Primary bool `json:"primary,omitempty"`
3771
3772	// Region: Region.
3773	Region string `json:"region,omitempty"`
3774
3775	// SourceIsStructured: User supplied address was structured. Structured
3776	// addresses are NOT supported at this time. You might be able to write
3777	// structured addresses, but any values will eventually be clobbered.
3778	SourceIsStructured bool `json:"sourceIsStructured,omitempty"`
3779
3780	// StreetAddress: Street.
3781	StreetAddress string `json:"streetAddress,omitempty"`
3782
3783	// Type: Each entry can have a type which indicates standard values of
3784	// that entry. For example address could be of home, work etc. In
3785	// addition to the standard type, an entry can have a custom type and
3786	// can take any value. Such type should have the CUSTOM value as type
3787	// and also have a customType value.
3788	Type string `json:"type,omitempty"`
3789
3790	// ForceSendFields is a list of field names (e.g. "Country") to
3791	// unconditionally include in API requests. By default, fields with
3792	// empty values are omitted from API requests. However, any non-pointer,
3793	// non-interface field appearing in ForceSendFields will be sent to the
3794	// server regardless of whether the field is empty or not. This may be
3795	// used to include empty fields in Patch requests.
3796	ForceSendFields []string `json:"-"`
3797
3798	// NullFields is a list of field names (e.g. "Country") to include in
3799	// API requests with the JSON null value. By default, fields with empty
3800	// values are omitted from API requests. However, any field with an
3801	// empty value appearing in NullFields will be sent to the server as
3802	// null. It is an error if a field in this list has a non-empty value.
3803	// This may be used to include null fields in Patch requests.
3804	NullFields []string `json:"-"`
3805}
3806
3807func (s *UserAddress) MarshalJSON() ([]byte, error) {
3808	type NoMethod UserAddress
3809	raw := NoMethod(*s)
3810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3811}
3812
3813// UserEmail: JSON template for an email.
3814type UserEmail struct {
3815	// Address: Email id of the user.
3816	Address string `json:"address,omitempty"`
3817
3818	// CustomType: Custom Type.
3819	CustomType string `json:"customType,omitempty"`
3820
3821	// Primary: If this is user's primary email. Only one entry could be
3822	// marked as primary.
3823	Primary bool `json:"primary,omitempty"`
3824
3825	// Type: Each entry can have a type which indicates standard types of
3826	// that entry. For example email could be of home, work etc. In addition
3827	// to the standard type, an entry can have a custom type and can take
3828	// any value Such types should have the CUSTOM value as type and also
3829	// have a customType value.
3830	Type string `json:"type,omitempty"`
3831
3832	// ForceSendFields is a list of field names (e.g. "Address") to
3833	// unconditionally include in API requests. By default, fields with
3834	// empty values are omitted from API requests. However, any non-pointer,
3835	// non-interface field appearing in ForceSendFields will be sent to the
3836	// server regardless of whether the field is empty or not. This may be
3837	// used to include empty fields in Patch requests.
3838	ForceSendFields []string `json:"-"`
3839
3840	// NullFields is a list of field names (e.g. "Address") to include in
3841	// API requests with the JSON null value. By default, fields with empty
3842	// values are omitted from API requests. However, any field with an
3843	// empty value appearing in NullFields will be sent to the server as
3844	// null. It is an error if a field in this list has a non-empty value.
3845	// This may be used to include null fields in Patch requests.
3846	NullFields []string `json:"-"`
3847}
3848
3849func (s *UserEmail) MarshalJSON() ([]byte, error) {
3850	type NoMethod UserEmail
3851	raw := NoMethod(*s)
3852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3853}
3854
3855// UserExternalId: JSON template for an externalId entry.
3856type UserExternalId struct {
3857	// CustomType: Custom type.
3858	CustomType string `json:"customType,omitempty"`
3859
3860	// Type: The type of the Id.
3861	Type string `json:"type,omitempty"`
3862
3863	// Value: The value of the id.
3864	Value string `json:"value,omitempty"`
3865
3866	// ForceSendFields is a list of field names (e.g. "CustomType") to
3867	// unconditionally include in API requests. By default, fields with
3868	// empty values are omitted from API requests. However, any non-pointer,
3869	// non-interface field appearing in ForceSendFields will be sent to the
3870	// server regardless of whether the field is empty or not. This may be
3871	// used to include empty fields in Patch requests.
3872	ForceSendFields []string `json:"-"`
3873
3874	// NullFields is a list of field names (e.g. "CustomType") to include in
3875	// API requests with the JSON null value. By default, fields with empty
3876	// values are omitted from API requests. However, any field with an
3877	// empty value appearing in NullFields will be sent to the server as
3878	// null. It is an error if a field in this list has a non-empty value.
3879	// This may be used to include null fields in Patch requests.
3880	NullFields []string `json:"-"`
3881}
3882
3883func (s *UserExternalId) MarshalJSON() ([]byte, error) {
3884	type NoMethod UserExternalId
3885	raw := NoMethod(*s)
3886	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3887}
3888
3889type UserGender struct {
3890	// AddressMeAs: AddressMeAs. A human-readable string containing the
3891	// proper way to refer to the profile owner by humans, for example
3892	// "he/him/his" or "they/them/their".
3893	AddressMeAs string `json:"addressMeAs,omitempty"`
3894
3895	// CustomGender: Custom gender.
3896	CustomGender string `json:"customGender,omitempty"`
3897
3898	// Type: Gender.
3899	Type string `json:"type,omitempty"`
3900
3901	// ForceSendFields is a list of field names (e.g. "AddressMeAs") to
3902	// unconditionally include in API requests. By default, fields with
3903	// empty values are omitted from API requests. However, any non-pointer,
3904	// non-interface field appearing in ForceSendFields will be sent to the
3905	// server regardless of whether the field is empty or not. This may be
3906	// used to include empty fields in Patch requests.
3907	ForceSendFields []string `json:"-"`
3908
3909	// NullFields is a list of field names (e.g. "AddressMeAs") to include
3910	// in API requests with the JSON null value. By default, fields with
3911	// empty values are omitted from API requests. However, any field with
3912	// an empty value appearing in NullFields will be sent to the server as
3913	// null. It is an error if a field in this list has a non-empty value.
3914	// This may be used to include null fields in Patch requests.
3915	NullFields []string `json:"-"`
3916}
3917
3918func (s *UserGender) MarshalJSON() ([]byte, error) {
3919	type NoMethod UserGender
3920	raw := NoMethod(*s)
3921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3922}
3923
3924// UserIm: JSON template for instant messenger of an user.
3925type UserIm struct {
3926	// CustomProtocol: Custom protocol.
3927	CustomProtocol string `json:"customProtocol,omitempty"`
3928
3929	// CustomType: Custom type.
3930	CustomType string `json:"customType,omitempty"`
3931
3932	// Im: Instant messenger id.
3933	Im string `json:"im,omitempty"`
3934
3935	// Primary: If this is user's primary im. Only one entry could be marked
3936	// as primary.
3937	Primary bool `json:"primary,omitempty"`
3938
3939	// Protocol: Protocol used in the instant messenger. It should be one of
3940	// the values from ImProtocolTypes map. Similar to type, it can take a
3941	// CUSTOM value and specify the custom name in customProtocol field.
3942	Protocol string `json:"protocol,omitempty"`
3943
3944	// Type: Each entry can have a type which indicates standard types of
3945	// that entry. For example instant messengers could be of home, work
3946	// etc. In addition to the standard type, an entry can have a custom
3947	// type and can take any value. Such types should have the CUSTOM value
3948	// as type and also have a customType value.
3949	Type string `json:"type,omitempty"`
3950
3951	// ForceSendFields is a list of field names (e.g. "CustomProtocol") to
3952	// unconditionally include in API requests. By default, fields with
3953	// empty values are omitted from API requests. However, any non-pointer,
3954	// non-interface field appearing in ForceSendFields will be sent to the
3955	// server regardless of whether the field is empty or not. This may be
3956	// used to include empty fields in Patch requests.
3957	ForceSendFields []string `json:"-"`
3958
3959	// NullFields is a list of field names (e.g. "CustomProtocol") to
3960	// include in API requests with the JSON null value. By default, fields
3961	// with empty values are omitted from API requests. However, any field
3962	// with an empty value appearing in NullFields will be sent to the
3963	// server as null. It is an error if a field in this list has a
3964	// non-empty value. This may be used to include null fields in Patch
3965	// requests.
3966	NullFields []string `json:"-"`
3967}
3968
3969func (s *UserIm) MarshalJSON() ([]byte, error) {
3970	type NoMethod UserIm
3971	raw := NoMethod(*s)
3972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3973}
3974
3975// UserKeyword: JSON template for a keyword entry.
3976type UserKeyword struct {
3977	// CustomType: Custom Type.
3978	CustomType string `json:"customType,omitempty"`
3979
3980	// Type: Each entry can have a type which indicates standard type of
3981	// that entry. For example, keyword could be of type occupation or
3982	// outlook. In addition to the standard type, an entry can have a custom
3983	// type and can give it any name. Such types should have the CUSTOM
3984	// value as type and also have a customType value.
3985	Type string `json:"type,omitempty"`
3986
3987	// Value: Keyword.
3988	Value string `json:"value,omitempty"`
3989
3990	// ForceSendFields is a list of field names (e.g. "CustomType") to
3991	// unconditionally include in API requests. By default, fields with
3992	// empty values are omitted from API requests. However, any non-pointer,
3993	// non-interface field appearing in ForceSendFields will be sent to the
3994	// server regardless of whether the field is empty or not. This may be
3995	// used to include empty fields in Patch requests.
3996	ForceSendFields []string `json:"-"`
3997
3998	// NullFields is a list of field names (e.g. "CustomType") to include in
3999	// API requests with the JSON null value. By default, fields with empty
4000	// values are omitted from API requests. However, any field with an
4001	// empty value appearing in NullFields will be sent to the server as
4002	// null. It is an error if a field in this list has a non-empty value.
4003	// This may be used to include null fields in Patch requests.
4004	NullFields []string `json:"-"`
4005}
4006
4007func (s *UserKeyword) MarshalJSON() ([]byte, error) {
4008	type NoMethod UserKeyword
4009	raw := NoMethod(*s)
4010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4011}
4012
4013// UserLanguage: JSON template for a language entry.
4014type UserLanguage struct {
4015	// CustomLanguage: Other language. User can provide own language name if
4016	// there is no corresponding Google III language code. If this is set
4017	// LanguageCode can't be set
4018	CustomLanguage string `json:"customLanguage,omitempty"`
4019
4020	// LanguageCode: Language Code. Should be used for storing Google III
4021	// LanguageCode string representation for language. Illegal values cause
4022	// SchemaException.
4023	LanguageCode string `json:"languageCode,omitempty"`
4024
4025	// ForceSendFields is a list of field names (e.g. "CustomLanguage") to
4026	// unconditionally include in API requests. By default, fields with
4027	// empty values are omitted from API requests. However, any non-pointer,
4028	// non-interface field appearing in ForceSendFields will be sent to the
4029	// server regardless of whether the field is empty or not. This may be
4030	// used to include empty fields in Patch requests.
4031	ForceSendFields []string `json:"-"`
4032
4033	// NullFields is a list of field names (e.g. "CustomLanguage") to
4034	// include in API requests with the JSON null value. By default, fields
4035	// with empty values are omitted from API requests. However, any field
4036	// with an empty value appearing in NullFields will be sent to the
4037	// server as null. It is an error if a field in this list has a
4038	// non-empty value. This may be used to include null fields in Patch
4039	// requests.
4040	NullFields []string `json:"-"`
4041}
4042
4043func (s *UserLanguage) MarshalJSON() ([]byte, error) {
4044	type NoMethod UserLanguage
4045	raw := NoMethod(*s)
4046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4047}
4048
4049// UserLocation: JSON template for a location entry.
4050type UserLocation struct {
4051	// Area: Textual location. This is most useful for display purposes to
4052	// concisely describe the location. For example, "Mountain View, CA",
4053	// "Near Seattle", "US-NYC-9TH 9A209A".
4054	Area string `json:"area,omitempty"`
4055
4056	// BuildingId: Building Identifier.
4057	BuildingId string `json:"buildingId,omitempty"`
4058
4059	// CustomType: Custom Type.
4060	CustomType string `json:"customType,omitempty"`
4061
4062	// DeskCode: Most specific textual code of individual desk location.
4063	DeskCode string `json:"deskCode,omitempty"`
4064
4065	// FloorName: Floor name/number.
4066	FloorName string `json:"floorName,omitempty"`
4067
4068	// FloorSection: Floor section. More specific location within the floor.
4069	// For example, if a floor is divided into sections "A", "B", and "C",
4070	// this field would identify one of those values.
4071	FloorSection string `json:"floorSection,omitempty"`
4072
4073	// Type: Each entry can have a type which indicates standard types of
4074	// that entry. For example location could be of types default and desk.
4075	// In addition to standard type, an entry can have a custom type and can
4076	// give it any name. Such types should have "custom" as type and also
4077	// have a customType value.
4078	Type string `json:"type,omitempty"`
4079
4080	// ForceSendFields is a list of field names (e.g. "Area") to
4081	// unconditionally include in API requests. By default, fields with
4082	// empty values are omitted from API requests. However, any non-pointer,
4083	// non-interface field appearing in ForceSendFields will be sent to the
4084	// server regardless of whether the field is empty or not. This may be
4085	// used to include empty fields in Patch requests.
4086	ForceSendFields []string `json:"-"`
4087
4088	// NullFields is a list of field names (e.g. "Area") to include in API
4089	// requests with the JSON null value. By default, fields with empty
4090	// values are omitted from API requests. However, any field with an
4091	// empty value appearing in NullFields will be sent to the server as
4092	// null. It is an error if a field in this list has a non-empty value.
4093	// This may be used to include null fields in Patch requests.
4094	NullFields []string `json:"-"`
4095}
4096
4097func (s *UserLocation) MarshalJSON() ([]byte, error) {
4098	type NoMethod UserLocation
4099	raw := NoMethod(*s)
4100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4101}
4102
4103// UserMakeAdmin: JSON request template for setting/revoking admin
4104// status of a user in Directory API.
4105type UserMakeAdmin struct {
4106	// Status: Boolean indicating new admin status of the user
4107	Status bool `json:"status,omitempty"`
4108
4109	// ForceSendFields is a list of field names (e.g. "Status") to
4110	// unconditionally include in API requests. By default, fields with
4111	// empty values are omitted from API requests. However, any non-pointer,
4112	// non-interface field appearing in ForceSendFields will be sent to the
4113	// server regardless of whether the field is empty or not. This may be
4114	// used to include empty fields in Patch requests.
4115	ForceSendFields []string `json:"-"`
4116
4117	// NullFields is a list of field names (e.g. "Status") to include in API
4118	// requests with the JSON null value. By default, fields with empty
4119	// values are omitted from API requests. However, any field with an
4120	// empty value appearing in NullFields will be sent to the server as
4121	// null. It is an error if a field in this list has a non-empty value.
4122	// This may be used to include null fields in Patch requests.
4123	NullFields []string `json:"-"`
4124}
4125
4126func (s *UserMakeAdmin) MarshalJSON() ([]byte, error) {
4127	type NoMethod UserMakeAdmin
4128	raw := NoMethod(*s)
4129	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4130}
4131
4132// UserName: JSON template for name of a user in Directory API.
4133type UserName struct {
4134	// FamilyName: Last Name
4135	FamilyName string `json:"familyName,omitempty"`
4136
4137	// FullName: Full Name
4138	FullName string `json:"fullName,omitempty"`
4139
4140	// GivenName: First Name
4141	GivenName string `json:"givenName,omitempty"`
4142
4143	// ForceSendFields is a list of field names (e.g. "FamilyName") to
4144	// unconditionally include in API requests. By default, fields with
4145	// empty values are omitted from API requests. However, any non-pointer,
4146	// non-interface field appearing in ForceSendFields will be sent to the
4147	// server regardless of whether the field is empty or not. This may be
4148	// used to include empty fields in Patch requests.
4149	ForceSendFields []string `json:"-"`
4150
4151	// NullFields is a list of field names (e.g. "FamilyName") to include in
4152	// API requests with the JSON null value. By default, fields with empty
4153	// values are omitted from API requests. However, any field with an
4154	// empty value appearing in NullFields will be sent to the server as
4155	// null. It is an error if a field in this list has a non-empty value.
4156	// This may be used to include null fields in Patch requests.
4157	NullFields []string `json:"-"`
4158}
4159
4160func (s *UserName) MarshalJSON() ([]byte, error) {
4161	type NoMethod UserName
4162	raw := NoMethod(*s)
4163	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4164}
4165
4166// UserOrganization: JSON template for an organization entry.
4167type UserOrganization struct {
4168	// CostCenter: The cost center of the users department.
4169	CostCenter string `json:"costCenter,omitempty"`
4170
4171	// CustomType: Custom type.
4172	CustomType string `json:"customType,omitempty"`
4173
4174	// Department: Department within the organization.
4175	Department string `json:"department,omitempty"`
4176
4177	// Description: Description of the organization.
4178	Description string `json:"description,omitempty"`
4179
4180	// Domain: The domain to which the organization belongs to.
4181	Domain string `json:"domain,omitempty"`
4182
4183	// FullTimeEquivalent: The full-time equivalent percent within the
4184	// organization (100000 = 100%).
4185	FullTimeEquivalent int64 `json:"fullTimeEquivalent,omitempty"`
4186
4187	// Location: Location of the organization. This need not be fully
4188	// qualified address.
4189	Location string `json:"location,omitempty"`
4190
4191	// Name: Name of the organization
4192	Name string `json:"name,omitempty"`
4193
4194	// Primary: If it user's primary organization.
4195	Primary bool `json:"primary,omitempty"`
4196
4197	// Symbol: Symbol of the organization.
4198	Symbol string `json:"symbol,omitempty"`
4199
4200	// Title: Title (designation) of the user in the organization.
4201	Title string `json:"title,omitempty"`
4202
4203	// Type: Each entry can have a type which indicates standard types of
4204	// that entry. For example organization could be of school, work etc. In
4205	// addition to the standard type, an entry can have a custom type and
4206	// can give it any name. Such types should have the CUSTOM value as type
4207	// and also have a CustomType value.
4208	Type string `json:"type,omitempty"`
4209
4210	// ForceSendFields is a list of field names (e.g. "CostCenter") to
4211	// unconditionally include in API requests. By default, fields with
4212	// empty values are omitted from API requests. However, any non-pointer,
4213	// non-interface field appearing in ForceSendFields will be sent to the
4214	// server regardless of whether the field is empty or not. This may be
4215	// used to include empty fields in Patch requests.
4216	ForceSendFields []string `json:"-"`
4217
4218	// NullFields is a list of field names (e.g. "CostCenter") to include in
4219	// API requests with the JSON null value. By default, fields with empty
4220	// values are omitted from API requests. However, any field with an
4221	// empty value appearing in NullFields will be sent to the server as
4222	// null. It is an error if a field in this list has a non-empty value.
4223	// This may be used to include null fields in Patch requests.
4224	NullFields []string `json:"-"`
4225}
4226
4227func (s *UserOrganization) MarshalJSON() ([]byte, error) {
4228	type NoMethod UserOrganization
4229	raw := NoMethod(*s)
4230	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4231}
4232
4233// UserPhone: JSON template for a phone entry.
4234type UserPhone struct {
4235	// CustomType: Custom Type.
4236	CustomType string `json:"customType,omitempty"`
4237
4238	// Primary: If this is user's primary phone or not.
4239	Primary bool `json:"primary,omitempty"`
4240
4241	// Type: Each entry can have a type which indicates standard types of
4242	// that entry. For example phone could be of home_fax, work, mobile etc.
4243	// In addition to the standard type, an entry can have a custom type and
4244	// can give it any name. Such types should have the CUSTOM value as type
4245	// and also have a customType value.
4246	Type string `json:"type,omitempty"`
4247
4248	// Value: Phone number.
4249	Value string `json:"value,omitempty"`
4250
4251	// ForceSendFields is a list of field names (e.g. "CustomType") to
4252	// unconditionally include in API requests. By default, fields with
4253	// empty values are omitted from API requests. However, any non-pointer,
4254	// non-interface field appearing in ForceSendFields will be sent to the
4255	// server regardless of whether the field is empty or not. This may be
4256	// used to include empty fields in Patch requests.
4257	ForceSendFields []string `json:"-"`
4258
4259	// NullFields is a list of field names (e.g. "CustomType") to include in
4260	// API requests with the JSON null value. By default, fields with empty
4261	// values are omitted from API requests. However, any field with an
4262	// empty value appearing in NullFields will be sent to the server as
4263	// null. It is an error if a field in this list has a non-empty value.
4264	// This may be used to include null fields in Patch requests.
4265	NullFields []string `json:"-"`
4266}
4267
4268func (s *UserPhone) MarshalJSON() ([]byte, error) {
4269	type NoMethod UserPhone
4270	raw := NoMethod(*s)
4271	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4272}
4273
4274// UserPhoto: JSON template for Photo object in Directory API.
4275type UserPhoto struct {
4276	// Etag: ETag of the resource.
4277	Etag string `json:"etag,omitempty"`
4278
4279	// Height: Height in pixels of the photo
4280	Height int64 `json:"height,omitempty"`
4281
4282	// Id: Unique identifier of User (Read-only)
4283	Id string `json:"id,omitempty"`
4284
4285	// Kind: Kind of resource this is.
4286	Kind string `json:"kind,omitempty"`
4287
4288	// MimeType: Mime Type of the photo
4289	MimeType string `json:"mimeType,omitempty"`
4290
4291	// PhotoData: Base64 encoded photo data
4292	PhotoData string `json:"photoData,omitempty"`
4293
4294	// PrimaryEmail: Primary email of User (Read-only)
4295	PrimaryEmail string `json:"primaryEmail,omitempty"`
4296
4297	// Width: Width in pixels of the photo
4298	Width int64 `json:"width,omitempty"`
4299
4300	// ServerResponse contains the HTTP response code and headers from the
4301	// server.
4302	googleapi.ServerResponse `json:"-"`
4303
4304	// ForceSendFields is a list of field names (e.g. "Etag") to
4305	// unconditionally include in API requests. By default, fields with
4306	// empty values are omitted from API requests. However, any non-pointer,
4307	// non-interface field appearing in ForceSendFields will be sent to the
4308	// server regardless of whether the field is empty or not. This may be
4309	// used to include empty fields in Patch requests.
4310	ForceSendFields []string `json:"-"`
4311
4312	// NullFields is a list of field names (e.g. "Etag") to include in API
4313	// requests with the JSON null value. By default, fields with empty
4314	// values are omitted from API requests. However, any field with an
4315	// empty value appearing in NullFields will be sent to the server as
4316	// null. It is an error if a field in this list has a non-empty value.
4317	// This may be used to include null fields in Patch requests.
4318	NullFields []string `json:"-"`
4319}
4320
4321func (s *UserPhoto) MarshalJSON() ([]byte, error) {
4322	type NoMethod UserPhoto
4323	raw := NoMethod(*s)
4324	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4325}
4326
4327// UserPosixAccount: JSON template for a POSIX account entry.
4328// Description of the field family: go/fbs-posix.
4329type UserPosixAccount struct {
4330	// AccountId: A POSIX account field identifier.
4331	AccountId string `json:"accountId,omitempty"`
4332
4333	// Gecos: The GECOS (user information) for this account.
4334	Gecos string `json:"gecos,omitempty"`
4335
4336	// Gid: The default group ID.
4337	Gid uint64 `json:"gid,omitempty,string"`
4338
4339	// HomeDirectory: The path to the home directory for this account.
4340	HomeDirectory string `json:"homeDirectory,omitempty"`
4341
4342	// OperatingSystemType: The operating system type for this account.
4343	OperatingSystemType string `json:"operatingSystemType,omitempty"`
4344
4345	// Primary: If this is user's primary account within the SystemId.
4346	Primary bool `json:"primary,omitempty"`
4347
4348	// Shell: The path to the login shell for this account.
4349	Shell string `json:"shell,omitempty"`
4350
4351	// SystemId: System identifier for which account Username or Uid apply
4352	// to.
4353	SystemId string `json:"systemId,omitempty"`
4354
4355	// Uid: The POSIX compliant user ID.
4356	Uid uint64 `json:"uid,omitempty,string"`
4357
4358	// Username: The username of the account.
4359	Username string `json:"username,omitempty"`
4360
4361	// ForceSendFields is a list of field names (e.g. "AccountId") to
4362	// unconditionally include in API requests. By default, fields with
4363	// empty values are omitted from API requests. However, any non-pointer,
4364	// non-interface field appearing in ForceSendFields will be sent to the
4365	// server regardless of whether the field is empty or not. This may be
4366	// used to include empty fields in Patch requests.
4367	ForceSendFields []string `json:"-"`
4368
4369	// NullFields is a list of field names (e.g. "AccountId") to include in
4370	// API requests with the JSON null value. By default, fields with empty
4371	// values are omitted from API requests. However, any field with an
4372	// empty value appearing in NullFields will be sent to the server as
4373	// null. It is an error if a field in this list has a non-empty value.
4374	// This may be used to include null fields in Patch requests.
4375	NullFields []string `json:"-"`
4376}
4377
4378func (s *UserPosixAccount) MarshalJSON() ([]byte, error) {
4379	type NoMethod UserPosixAccount
4380	raw := NoMethod(*s)
4381	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4382}
4383
4384// UserRelation: JSON template for a relation entry.
4385type UserRelation struct {
4386	// CustomType: Custom Type.
4387	CustomType string `json:"customType,omitempty"`
4388
4389	// Type: The relation of the user. Some of the possible values are
4390	// mother, father, sister, brother, manager, assistant, partner.
4391	Type string `json:"type,omitempty"`
4392
4393	// Value: The name of the relation.
4394	Value string `json:"value,omitempty"`
4395
4396	// ForceSendFields is a list of field names (e.g. "CustomType") to
4397	// unconditionally include in API requests. By default, fields with
4398	// empty values are omitted from API requests. However, any non-pointer,
4399	// non-interface field appearing in ForceSendFields will be sent to the
4400	// server regardless of whether the field is empty or not. This may be
4401	// used to include empty fields in Patch requests.
4402	ForceSendFields []string `json:"-"`
4403
4404	// NullFields is a list of field names (e.g. "CustomType") to include in
4405	// API requests with the JSON null value. By default, fields with empty
4406	// values are omitted from API requests. However, any field with an
4407	// empty value appearing in NullFields will be sent to the server as
4408	// null. It is an error if a field in this list has a non-empty value.
4409	// This may be used to include null fields in Patch requests.
4410	NullFields []string `json:"-"`
4411}
4412
4413func (s *UserRelation) MarshalJSON() ([]byte, error) {
4414	type NoMethod UserRelation
4415	raw := NoMethod(*s)
4416	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4417}
4418
4419// UserSshPublicKey: JSON template for a POSIX account entry.
4420type UserSshPublicKey struct {
4421	// ExpirationTimeUsec: An expiration time in microseconds since epoch.
4422	ExpirationTimeUsec int64 `json:"expirationTimeUsec,omitempty,string"`
4423
4424	// Fingerprint: A SHA-256 fingerprint of the SSH public key. (Read-only)
4425	Fingerprint string `json:"fingerprint,omitempty"`
4426
4427	// Key: An SSH public key.
4428	Key string `json:"key,omitempty"`
4429
4430	// ForceSendFields is a list of field names (e.g. "ExpirationTimeUsec")
4431	// to unconditionally include in API requests. By default, fields with
4432	// empty values are omitted from API requests. However, any non-pointer,
4433	// non-interface field appearing in ForceSendFields will be sent to the
4434	// server regardless of whether the field is empty or not. This may be
4435	// used to include empty fields in Patch requests.
4436	ForceSendFields []string `json:"-"`
4437
4438	// NullFields is a list of field names (e.g. "ExpirationTimeUsec") to
4439	// include in API requests with the JSON null value. By default, fields
4440	// with empty values are omitted from API requests. However, any field
4441	// with an empty value appearing in NullFields will be sent to the
4442	// server as null. It is an error if a field in this list has a
4443	// non-empty value. This may be used to include null fields in Patch
4444	// requests.
4445	NullFields []string `json:"-"`
4446}
4447
4448func (s *UserSshPublicKey) MarshalJSON() ([]byte, error) {
4449	type NoMethod UserSshPublicKey
4450	raw := NoMethod(*s)
4451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4452}
4453
4454// UserUndelete: JSON request template to undelete a user in Directory
4455// API.
4456type UserUndelete struct {
4457	// OrgUnitPath: OrgUnit of User
4458	OrgUnitPath string `json:"orgUnitPath,omitempty"`
4459
4460	// ForceSendFields is a list of field names (e.g. "OrgUnitPath") to
4461	// unconditionally include in API requests. By default, fields with
4462	// empty values are omitted from API requests. However, any non-pointer,
4463	// non-interface field appearing in ForceSendFields will be sent to the
4464	// server regardless of whether the field is empty or not. This may be
4465	// used to include empty fields in Patch requests.
4466	ForceSendFields []string `json:"-"`
4467
4468	// NullFields is a list of field names (e.g. "OrgUnitPath") to include
4469	// in API requests with the JSON null value. By default, fields with
4470	// empty values are omitted from API requests. However, any field with
4471	// an empty value appearing in NullFields will be sent to the server as
4472	// null. It is an error if a field in this list has a non-empty value.
4473	// This may be used to include null fields in Patch requests.
4474	NullFields []string `json:"-"`
4475}
4476
4477func (s *UserUndelete) MarshalJSON() ([]byte, error) {
4478	type NoMethod UserUndelete
4479	raw := NoMethod(*s)
4480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4481}
4482
4483// UserWebsite: JSON template for a website entry.
4484type UserWebsite struct {
4485	// CustomType: Custom Type.
4486	CustomType string `json:"customType,omitempty"`
4487
4488	// Primary: If this is user's primary website or not.
4489	Primary bool `json:"primary,omitempty"`
4490
4491	// Type: Each entry can have a type which indicates standard types of
4492	// that entry. For example website could be of home, work, blog etc. In
4493	// addition to the standard type, an entry can have a custom type and
4494	// can give it any name. Such types should have the CUSTOM value as type
4495	// and also have a customType value.
4496	Type string `json:"type,omitempty"`
4497
4498	// Value: Website.
4499	Value string `json:"value,omitempty"`
4500
4501	// ForceSendFields is a list of field names (e.g. "CustomType") to
4502	// unconditionally include in API requests. By default, fields with
4503	// empty values are omitted from API requests. However, any non-pointer,
4504	// non-interface field appearing in ForceSendFields will be sent to the
4505	// server regardless of whether the field is empty or not. This may be
4506	// used to include empty fields in Patch requests.
4507	ForceSendFields []string `json:"-"`
4508
4509	// NullFields is a list of field names (e.g. "CustomType") to include in
4510	// API requests with the JSON null value. By default, fields with empty
4511	// values are omitted from API requests. However, any field with an
4512	// empty value appearing in NullFields will be sent to the server as
4513	// null. It is an error if a field in this list has a non-empty value.
4514	// This may be used to include null fields in Patch requests.
4515	NullFields []string `json:"-"`
4516}
4517
4518func (s *UserWebsite) MarshalJSON() ([]byte, error) {
4519	type NoMethod UserWebsite
4520	raw := NoMethod(*s)
4521	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4522}
4523
4524// Users: JSON response template for List Users operation in Apps
4525// Directory API.
4526type Users struct {
4527	// Etag: ETag of the resource.
4528	Etag string `json:"etag,omitempty"`
4529
4530	// Kind: Kind of resource this is.
4531	Kind string `json:"kind,omitempty"`
4532
4533	// NextPageToken: Token used to access next page of this result.
4534	NextPageToken string `json:"nextPageToken,omitempty"`
4535
4536	// TriggerEvent: Event that triggered this response (only used in case
4537	// of Push Response)
4538	TriggerEvent string `json:"trigger_event,omitempty"`
4539
4540	// Users: List of user objects.
4541	Users []*User `json:"users,omitempty"`
4542
4543	// ServerResponse contains the HTTP response code and headers from the
4544	// server.
4545	googleapi.ServerResponse `json:"-"`
4546
4547	// ForceSendFields is a list of field names (e.g. "Etag") to
4548	// unconditionally include in API requests. By default, fields with
4549	// empty values are omitted from API requests. However, any non-pointer,
4550	// non-interface field appearing in ForceSendFields will be sent to the
4551	// server regardless of whether the field is empty or not. This may be
4552	// used to include empty fields in Patch requests.
4553	ForceSendFields []string `json:"-"`
4554
4555	// NullFields is a list of field names (e.g. "Etag") to include in API
4556	// requests with the JSON null value. By default, fields with empty
4557	// values are omitted from API requests. However, any field with an
4558	// empty value appearing in NullFields will be sent to the server as
4559	// null. It is an error if a field in this list has a non-empty value.
4560	// This may be used to include null fields in Patch requests.
4561	NullFields []string `json:"-"`
4562}
4563
4564func (s *Users) MarshalJSON() ([]byte, error) {
4565	type NoMethod Users
4566	raw := NoMethod(*s)
4567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4568}
4569
4570// VerificationCode: JSON template for verification codes in Directory
4571// API.
4572type VerificationCode struct {
4573	// Etag: ETag of the resource.
4574	Etag string `json:"etag,omitempty"`
4575
4576	// Kind: The type of the resource. This is always
4577	// admin#directory#verificationCode.
4578	Kind string `json:"kind,omitempty"`
4579
4580	// UserId: The obfuscated unique ID of the user.
4581	UserId string `json:"userId,omitempty"`
4582
4583	// VerificationCode: A current verification code for the user.
4584	// Invalidated or used verification codes are not returned as part of
4585	// the result.
4586	VerificationCode string `json:"verificationCode,omitempty"`
4587
4588	// ForceSendFields is a list of field names (e.g. "Etag") to
4589	// unconditionally include in API requests. By default, fields with
4590	// empty values are omitted from API requests. However, any non-pointer,
4591	// non-interface field appearing in ForceSendFields will be sent to the
4592	// server regardless of whether the field is empty or not. This may be
4593	// used to include empty fields in Patch requests.
4594	ForceSendFields []string `json:"-"`
4595
4596	// NullFields is a list of field names (e.g. "Etag") to include in API
4597	// 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 *VerificationCode) MarshalJSON() ([]byte, error) {
4606	type NoMethod VerificationCode
4607	raw := NoMethod(*s)
4608	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4609}
4610
4611// VerificationCodes: JSON response template for List verification codes
4612// operation in Directory API.
4613type VerificationCodes struct {
4614	// Etag: ETag of the resource.
4615	Etag string `json:"etag,omitempty"`
4616
4617	// Items: A list of verification code resources.
4618	Items []*VerificationCode `json:"items,omitempty"`
4619
4620	// Kind: The type of the resource. This is always
4621	// admin#directory#verificationCodesList.
4622	Kind string `json:"kind,omitempty"`
4623
4624	// ServerResponse contains the HTTP response code and headers from the
4625	// server.
4626	googleapi.ServerResponse `json:"-"`
4627
4628	// ForceSendFields is a list of field names (e.g. "Etag") to
4629	// unconditionally include in API requests. By default, fields with
4630	// empty values are omitted from API requests. However, any non-pointer,
4631	// non-interface field appearing in ForceSendFields will be sent to the
4632	// server regardless of whether the field is empty or not. This may be
4633	// used to include empty fields in Patch requests.
4634	ForceSendFields []string `json:"-"`
4635
4636	// NullFields is a list of field names (e.g. "Etag") to include in API
4637	// requests with the JSON null value. By default, fields with empty
4638	// values are omitted from API requests. However, any field with an
4639	// empty value appearing in NullFields will be sent to the server as
4640	// null. It is an error if a field in this list has a non-empty value.
4641	// This may be used to include null fields in Patch requests.
4642	NullFields []string `json:"-"`
4643}
4644
4645func (s *VerificationCodes) MarshalJSON() ([]byte, error) {
4646	type NoMethod VerificationCodes
4647	raw := NoMethod(*s)
4648	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4649}
4650
4651// method id "directory.asps.delete":
4652
4653type AspsDeleteCall struct {
4654	s          *Service
4655	userKey    string
4656	codeId     int64
4657	urlParams_ gensupport.URLParams
4658	ctx_       context.Context
4659	header_    http.Header
4660}
4661
4662// Delete: Delete an ASP issued by a user.
4663func (r *AspsService) Delete(userKey string, codeId int64) *AspsDeleteCall {
4664	c := &AspsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4665	c.userKey = userKey
4666	c.codeId = codeId
4667	return c
4668}
4669
4670// Fields allows partial responses to be retrieved. See
4671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4672// for more information.
4673func (c *AspsDeleteCall) Fields(s ...googleapi.Field) *AspsDeleteCall {
4674	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4675	return c
4676}
4677
4678// Context sets the context to be used in this call's Do method. Any
4679// pending HTTP request will be aborted if the provided context is
4680// canceled.
4681func (c *AspsDeleteCall) Context(ctx context.Context) *AspsDeleteCall {
4682	c.ctx_ = ctx
4683	return c
4684}
4685
4686// Header returns an http.Header that can be modified by the caller to
4687// add HTTP headers to the request.
4688func (c *AspsDeleteCall) Header() http.Header {
4689	if c.header_ == nil {
4690		c.header_ = make(http.Header)
4691	}
4692	return c.header_
4693}
4694
4695func (c *AspsDeleteCall) doRequest(alt string) (*http.Response, error) {
4696	reqHeaders := make(http.Header)
4697	for k, v := range c.header_ {
4698		reqHeaders[k] = v
4699	}
4700	reqHeaders.Set("User-Agent", c.s.userAgent())
4701	var body io.Reader = nil
4702	c.urlParams_.Set("alt", alt)
4703	c.urlParams_.Set("prettyPrint", "false")
4704	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps/{codeId}")
4705	urls += "?" + c.urlParams_.Encode()
4706	req, err := http.NewRequest("DELETE", urls, body)
4707	if err != nil {
4708		return nil, err
4709	}
4710	req.Header = reqHeaders
4711	googleapi.Expand(req.URL, map[string]string{
4712		"userKey": c.userKey,
4713		"codeId":  strconv.FormatInt(c.codeId, 10),
4714	})
4715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4716}
4717
4718// Do executes the "directory.asps.delete" call.
4719func (c *AspsDeleteCall) Do(opts ...googleapi.CallOption) error {
4720	gensupport.SetOptions(c.urlParams_, opts...)
4721	res, err := c.doRequest("json")
4722	if err != nil {
4723		return err
4724	}
4725	defer googleapi.CloseBody(res)
4726	if err := googleapi.CheckResponse(res); err != nil {
4727		return err
4728	}
4729	return nil
4730	// {
4731	//   "description": "Delete an ASP issued by a user.",
4732	//   "httpMethod": "DELETE",
4733	//   "id": "directory.asps.delete",
4734	//   "parameterOrder": [
4735	//     "userKey",
4736	//     "codeId"
4737	//   ],
4738	//   "parameters": {
4739	//     "codeId": {
4740	//       "description": "The unique ID of the ASP to be deleted.",
4741	//       "format": "int32",
4742	//       "location": "path",
4743	//       "required": true,
4744	//       "type": "integer"
4745	//     },
4746	//     "userKey": {
4747	//       "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.",
4748	//       "location": "path",
4749	//       "required": true,
4750	//       "type": "string"
4751	//     }
4752	//   },
4753	//   "path": "users/{userKey}/asps/{codeId}",
4754	//   "scopes": [
4755	//     "https://www.googleapis.com/auth/admin.directory.user.security"
4756	//   ]
4757	// }
4758
4759}
4760
4761// method id "directory.asps.get":
4762
4763type AspsGetCall struct {
4764	s            *Service
4765	userKey      string
4766	codeId       int64
4767	urlParams_   gensupport.URLParams
4768	ifNoneMatch_ string
4769	ctx_         context.Context
4770	header_      http.Header
4771}
4772
4773// Get: Get information about an ASP issued by a user.
4774func (r *AspsService) Get(userKey string, codeId int64) *AspsGetCall {
4775	c := &AspsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4776	c.userKey = userKey
4777	c.codeId = codeId
4778	return c
4779}
4780
4781// Fields allows partial responses to be retrieved. See
4782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4783// for more information.
4784func (c *AspsGetCall) Fields(s ...googleapi.Field) *AspsGetCall {
4785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4786	return c
4787}
4788
4789// IfNoneMatch sets the optional parameter which makes the operation
4790// fail if the object's ETag matches the given value. This is useful for
4791// getting updates only after the object has changed since the last
4792// request. Use googleapi.IsNotModified to check whether the response
4793// error from Do is the result of In-None-Match.
4794func (c *AspsGetCall) IfNoneMatch(entityTag string) *AspsGetCall {
4795	c.ifNoneMatch_ = entityTag
4796	return c
4797}
4798
4799// Context sets the context to be used in this call's Do method. Any
4800// pending HTTP request will be aborted if the provided context is
4801// canceled.
4802func (c *AspsGetCall) Context(ctx context.Context) *AspsGetCall {
4803	c.ctx_ = ctx
4804	return c
4805}
4806
4807// Header returns an http.Header that can be modified by the caller to
4808// add HTTP headers to the request.
4809func (c *AspsGetCall) Header() http.Header {
4810	if c.header_ == nil {
4811		c.header_ = make(http.Header)
4812	}
4813	return c.header_
4814}
4815
4816func (c *AspsGetCall) doRequest(alt string) (*http.Response, error) {
4817	reqHeaders := make(http.Header)
4818	for k, v := range c.header_ {
4819		reqHeaders[k] = v
4820	}
4821	reqHeaders.Set("User-Agent", c.s.userAgent())
4822	if c.ifNoneMatch_ != "" {
4823		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4824	}
4825	var body io.Reader = nil
4826	c.urlParams_.Set("alt", alt)
4827	c.urlParams_.Set("prettyPrint", "false")
4828	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps/{codeId}")
4829	urls += "?" + c.urlParams_.Encode()
4830	req, err := http.NewRequest("GET", urls, body)
4831	if err != nil {
4832		return nil, err
4833	}
4834	req.Header = reqHeaders
4835	googleapi.Expand(req.URL, map[string]string{
4836		"userKey": c.userKey,
4837		"codeId":  strconv.FormatInt(c.codeId, 10),
4838	})
4839	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4840}
4841
4842// Do executes the "directory.asps.get" call.
4843// Exactly one of *Asp or error will be non-nil. Any non-2xx status code
4844// is an error. Response headers are in either
4845// *Asp.ServerResponse.Header or (if a response was returned at all) in
4846// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4847// whether the returned error was because http.StatusNotModified was
4848// returned.
4849func (c *AspsGetCall) Do(opts ...googleapi.CallOption) (*Asp, error) {
4850	gensupport.SetOptions(c.urlParams_, opts...)
4851	res, err := c.doRequest("json")
4852	if res != nil && res.StatusCode == http.StatusNotModified {
4853		if res.Body != nil {
4854			res.Body.Close()
4855		}
4856		return nil, &googleapi.Error{
4857			Code:   res.StatusCode,
4858			Header: res.Header,
4859		}
4860	}
4861	if err != nil {
4862		return nil, err
4863	}
4864	defer googleapi.CloseBody(res)
4865	if err := googleapi.CheckResponse(res); err != nil {
4866		return nil, err
4867	}
4868	ret := &Asp{
4869		ServerResponse: googleapi.ServerResponse{
4870			Header:         res.Header,
4871			HTTPStatusCode: res.StatusCode,
4872		},
4873	}
4874	target := &ret
4875	if err := gensupport.DecodeResponse(target, res); err != nil {
4876		return nil, err
4877	}
4878	return ret, nil
4879	// {
4880	//   "description": "Get information about an ASP issued by a user.",
4881	//   "httpMethod": "GET",
4882	//   "id": "directory.asps.get",
4883	//   "parameterOrder": [
4884	//     "userKey",
4885	//     "codeId"
4886	//   ],
4887	//   "parameters": {
4888	//     "codeId": {
4889	//       "description": "The unique ID of the ASP.",
4890	//       "format": "int32",
4891	//       "location": "path",
4892	//       "required": true,
4893	//       "type": "integer"
4894	//     },
4895	//     "userKey": {
4896	//       "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.",
4897	//       "location": "path",
4898	//       "required": true,
4899	//       "type": "string"
4900	//     }
4901	//   },
4902	//   "path": "users/{userKey}/asps/{codeId}",
4903	//   "response": {
4904	//     "$ref": "Asp"
4905	//   },
4906	//   "scopes": [
4907	//     "https://www.googleapis.com/auth/admin.directory.user.security"
4908	//   ]
4909	// }
4910
4911}
4912
4913// method id "directory.asps.list":
4914
4915type AspsListCall struct {
4916	s            *Service
4917	userKey      string
4918	urlParams_   gensupport.URLParams
4919	ifNoneMatch_ string
4920	ctx_         context.Context
4921	header_      http.Header
4922}
4923
4924// List: List the ASPs issued by a user.
4925func (r *AspsService) List(userKey string) *AspsListCall {
4926	c := &AspsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4927	c.userKey = userKey
4928	return c
4929}
4930
4931// Fields allows partial responses to be retrieved. See
4932// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4933// for more information.
4934func (c *AspsListCall) Fields(s ...googleapi.Field) *AspsListCall {
4935	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4936	return c
4937}
4938
4939// IfNoneMatch sets the optional parameter which makes the operation
4940// fail if the object's ETag matches the given value. This is useful for
4941// getting updates only after the object has changed since the last
4942// request. Use googleapi.IsNotModified to check whether the response
4943// error from Do is the result of In-None-Match.
4944func (c *AspsListCall) IfNoneMatch(entityTag string) *AspsListCall {
4945	c.ifNoneMatch_ = entityTag
4946	return c
4947}
4948
4949// Context sets the context to be used in this call's Do method. Any
4950// pending HTTP request will be aborted if the provided context is
4951// canceled.
4952func (c *AspsListCall) Context(ctx context.Context) *AspsListCall {
4953	c.ctx_ = ctx
4954	return c
4955}
4956
4957// Header returns an http.Header that can be modified by the caller to
4958// add HTTP headers to the request.
4959func (c *AspsListCall) Header() http.Header {
4960	if c.header_ == nil {
4961		c.header_ = make(http.Header)
4962	}
4963	return c.header_
4964}
4965
4966func (c *AspsListCall) doRequest(alt string) (*http.Response, error) {
4967	reqHeaders := make(http.Header)
4968	for k, v := range c.header_ {
4969		reqHeaders[k] = v
4970	}
4971	reqHeaders.Set("User-Agent", c.s.userAgent())
4972	if c.ifNoneMatch_ != "" {
4973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4974	}
4975	var body io.Reader = nil
4976	c.urlParams_.Set("alt", alt)
4977	c.urlParams_.Set("prettyPrint", "false")
4978	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/asps")
4979	urls += "?" + c.urlParams_.Encode()
4980	req, err := http.NewRequest("GET", urls, body)
4981	if err != nil {
4982		return nil, err
4983	}
4984	req.Header = reqHeaders
4985	googleapi.Expand(req.URL, map[string]string{
4986		"userKey": c.userKey,
4987	})
4988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4989}
4990
4991// Do executes the "directory.asps.list" call.
4992// Exactly one of *Asps or error will be non-nil. Any non-2xx status
4993// code is an error. Response headers are in either
4994// *Asps.ServerResponse.Header or (if a response was returned at all) in
4995// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4996// whether the returned error was because http.StatusNotModified was
4997// returned.
4998func (c *AspsListCall) Do(opts ...googleapi.CallOption) (*Asps, error) {
4999	gensupport.SetOptions(c.urlParams_, opts...)
5000	res, err := c.doRequest("json")
5001	if res != nil && res.StatusCode == http.StatusNotModified {
5002		if res.Body != nil {
5003			res.Body.Close()
5004		}
5005		return nil, &googleapi.Error{
5006			Code:   res.StatusCode,
5007			Header: res.Header,
5008		}
5009	}
5010	if err != nil {
5011		return nil, err
5012	}
5013	defer googleapi.CloseBody(res)
5014	if err := googleapi.CheckResponse(res); err != nil {
5015		return nil, err
5016	}
5017	ret := &Asps{
5018		ServerResponse: googleapi.ServerResponse{
5019			Header:         res.Header,
5020			HTTPStatusCode: res.StatusCode,
5021		},
5022	}
5023	target := &ret
5024	if err := gensupport.DecodeResponse(target, res); err != nil {
5025		return nil, err
5026	}
5027	return ret, nil
5028	// {
5029	//   "description": "List the ASPs issued by a user.",
5030	//   "httpMethod": "GET",
5031	//   "id": "directory.asps.list",
5032	//   "parameterOrder": [
5033	//     "userKey"
5034	//   ],
5035	//   "parameters": {
5036	//     "userKey": {
5037	//       "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.",
5038	//       "location": "path",
5039	//       "required": true,
5040	//       "type": "string"
5041	//     }
5042	//   },
5043	//   "path": "users/{userKey}/asps",
5044	//   "response": {
5045	//     "$ref": "Asps"
5046	//   },
5047	//   "scopes": [
5048	//     "https://www.googleapis.com/auth/admin.directory.user.security"
5049	//   ]
5050	// }
5051
5052}
5053
5054// method id "admin.channels.stop":
5055
5056type ChannelsStopCall struct {
5057	s          *Service
5058	channel    *Channel
5059	urlParams_ gensupport.URLParams
5060	ctx_       context.Context
5061	header_    http.Header
5062}
5063
5064// Stop: Stop watching resources through this channel
5065func (r *ChannelsService) Stop(channel *Channel) *ChannelsStopCall {
5066	c := &ChannelsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5067	c.channel = channel
5068	return c
5069}
5070
5071// Fields allows partial responses to be retrieved. See
5072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5073// for more information.
5074func (c *ChannelsStopCall) Fields(s ...googleapi.Field) *ChannelsStopCall {
5075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5076	return c
5077}
5078
5079// Context sets the context to be used in this call's Do method. Any
5080// pending HTTP request will be aborted if the provided context is
5081// canceled.
5082func (c *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
5083	c.ctx_ = ctx
5084	return c
5085}
5086
5087// Header returns an http.Header that can be modified by the caller to
5088// add HTTP headers to the request.
5089func (c *ChannelsStopCall) Header() http.Header {
5090	if c.header_ == nil {
5091		c.header_ = make(http.Header)
5092	}
5093	return c.header_
5094}
5095
5096func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
5097	reqHeaders := make(http.Header)
5098	for k, v := range c.header_ {
5099		reqHeaders[k] = v
5100	}
5101	reqHeaders.Set("User-Agent", c.s.userAgent())
5102	var body io.Reader = nil
5103	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
5104	if err != nil {
5105		return nil, err
5106	}
5107	reqHeaders.Set("Content-Type", "application/json")
5108	c.urlParams_.Set("alt", alt)
5109	c.urlParams_.Set("prettyPrint", "false")
5110	urls := googleapi.ResolveRelative(c.s.BasePath, "/admin/directory_v1/channels/stop")
5111	urls += "?" + c.urlParams_.Encode()
5112	req, err := http.NewRequest("POST", urls, body)
5113	if err != nil {
5114		return nil, err
5115	}
5116	req.Header = reqHeaders
5117	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5118}
5119
5120// Do executes the "admin.channels.stop" call.
5121func (c *ChannelsStopCall) Do(opts ...googleapi.CallOption) error {
5122	gensupport.SetOptions(c.urlParams_, opts...)
5123	res, err := c.doRequest("json")
5124	if err != nil {
5125		return err
5126	}
5127	defer googleapi.CloseBody(res)
5128	if err := googleapi.CheckResponse(res); err != nil {
5129		return err
5130	}
5131	return nil
5132	// {
5133	//   "description": "Stop watching resources through this channel",
5134	//   "httpMethod": "POST",
5135	//   "id": "admin.channels.stop",
5136	//   "path": "/admin/directory_v1/channels/stop",
5137	//   "request": {
5138	//     "$ref": "Channel",
5139	//     "parameterName": "resource"
5140	//   },
5141	//   "scopes": [
5142	//     "https://www.googleapis.com/auth/admin.directory.user",
5143	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
5144	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
5145	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
5146	//   ]
5147	// }
5148
5149}
5150
5151// method id "directory.chromeosdevices.action":
5152
5153type ChromeosdevicesActionCall struct {
5154	s                    *Service
5155	customerId           string
5156	resourceId           string
5157	chromeosdeviceaction *ChromeOsDeviceAction
5158	urlParams_           gensupport.URLParams
5159	ctx_                 context.Context
5160	header_              http.Header
5161}
5162
5163// Action: Take action on Chrome OS Device
5164func (r *ChromeosdevicesService) Action(customerId string, resourceId string, chromeosdeviceaction *ChromeOsDeviceAction) *ChromeosdevicesActionCall {
5165	c := &ChromeosdevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5166	c.customerId = customerId
5167	c.resourceId = resourceId
5168	c.chromeosdeviceaction = chromeosdeviceaction
5169	return c
5170}
5171
5172// Fields allows partial responses to be retrieved. See
5173// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5174// for more information.
5175func (c *ChromeosdevicesActionCall) Fields(s ...googleapi.Field) *ChromeosdevicesActionCall {
5176	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5177	return c
5178}
5179
5180// Context sets the context to be used in this call's Do method. Any
5181// pending HTTP request will be aborted if the provided context is
5182// canceled.
5183func (c *ChromeosdevicesActionCall) Context(ctx context.Context) *ChromeosdevicesActionCall {
5184	c.ctx_ = ctx
5185	return c
5186}
5187
5188// Header returns an http.Header that can be modified by the caller to
5189// add HTTP headers to the request.
5190func (c *ChromeosdevicesActionCall) Header() http.Header {
5191	if c.header_ == nil {
5192		c.header_ = make(http.Header)
5193	}
5194	return c.header_
5195}
5196
5197func (c *ChromeosdevicesActionCall) doRequest(alt string) (*http.Response, error) {
5198	reqHeaders := make(http.Header)
5199	for k, v := range c.header_ {
5200		reqHeaders[k] = v
5201	}
5202	reqHeaders.Set("User-Agent", c.s.userAgent())
5203	var body io.Reader = nil
5204	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdeviceaction)
5205	if err != nil {
5206		return nil, err
5207	}
5208	reqHeaders.Set("Content-Type", "application/json")
5209	c.urlParams_.Set("alt", alt)
5210	c.urlParams_.Set("prettyPrint", "false")
5211	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{resourceId}/action")
5212	urls += "?" + c.urlParams_.Encode()
5213	req, err := http.NewRequest("POST", urls, body)
5214	if err != nil {
5215		return nil, err
5216	}
5217	req.Header = reqHeaders
5218	googleapi.Expand(req.URL, map[string]string{
5219		"customerId": c.customerId,
5220		"resourceId": c.resourceId,
5221	})
5222	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5223}
5224
5225// Do executes the "directory.chromeosdevices.action" call.
5226func (c *ChromeosdevicesActionCall) Do(opts ...googleapi.CallOption) error {
5227	gensupport.SetOptions(c.urlParams_, opts...)
5228	res, err := c.doRequest("json")
5229	if err != nil {
5230		return err
5231	}
5232	defer googleapi.CloseBody(res)
5233	if err := googleapi.CheckResponse(res); err != nil {
5234		return err
5235	}
5236	return nil
5237	// {
5238	//   "description": "Take action on Chrome OS Device",
5239	//   "httpMethod": "POST",
5240	//   "id": "directory.chromeosdevices.action",
5241	//   "parameterOrder": [
5242	//     "customerId",
5243	//     "resourceId"
5244	//   ],
5245	//   "parameters": {
5246	//     "customerId": {
5247	//       "description": "Immutable ID of the G Suite account",
5248	//       "location": "path",
5249	//       "required": true,
5250	//       "type": "string"
5251	//     },
5252	//     "resourceId": {
5253	//       "description": "Immutable ID of Chrome OS Device",
5254	//       "location": "path",
5255	//       "required": true,
5256	//       "type": "string"
5257	//     }
5258	//   },
5259	//   "path": "customer/{customerId}/devices/chromeos/{resourceId}/action",
5260	//   "request": {
5261	//     "$ref": "ChromeOsDeviceAction"
5262	//   },
5263	//   "scopes": [
5264	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
5265	//   ]
5266	// }
5267
5268}
5269
5270// method id "directory.chromeosdevices.get":
5271
5272type ChromeosdevicesGetCall struct {
5273	s            *Service
5274	customerId   string
5275	deviceId     string
5276	urlParams_   gensupport.URLParams
5277	ifNoneMatch_ string
5278	ctx_         context.Context
5279	header_      http.Header
5280}
5281
5282// Get: Retrieve Chrome OS Device
5283func (r *ChromeosdevicesService) Get(customerId string, deviceId string) *ChromeosdevicesGetCall {
5284	c := &ChromeosdevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5285	c.customerId = customerId
5286	c.deviceId = deviceId
5287	return c
5288}
5289
5290// Projection sets the optional parameter "projection": Restrict
5291// information returned to a set of selected fields.
5292//
5293// Possible values:
5294//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
5295// serialNumber, status, and user)
5296//   "FULL" - Includes all metadata fields
5297func (c *ChromeosdevicesGetCall) Projection(projection string) *ChromeosdevicesGetCall {
5298	c.urlParams_.Set("projection", projection)
5299	return c
5300}
5301
5302// Fields allows partial responses to be retrieved. See
5303// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5304// for more information.
5305func (c *ChromeosdevicesGetCall) Fields(s ...googleapi.Field) *ChromeosdevicesGetCall {
5306	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5307	return c
5308}
5309
5310// IfNoneMatch sets the optional parameter which makes the operation
5311// fail if the object's ETag matches the given value. This is useful for
5312// getting updates only after the object has changed since the last
5313// request. Use googleapi.IsNotModified to check whether the response
5314// error from Do is the result of In-None-Match.
5315func (c *ChromeosdevicesGetCall) IfNoneMatch(entityTag string) *ChromeosdevicesGetCall {
5316	c.ifNoneMatch_ = entityTag
5317	return c
5318}
5319
5320// Context sets the context to be used in this call's Do method. Any
5321// pending HTTP request will be aborted if the provided context is
5322// canceled.
5323func (c *ChromeosdevicesGetCall) Context(ctx context.Context) *ChromeosdevicesGetCall {
5324	c.ctx_ = ctx
5325	return c
5326}
5327
5328// Header returns an http.Header that can be modified by the caller to
5329// add HTTP headers to the request.
5330func (c *ChromeosdevicesGetCall) Header() http.Header {
5331	if c.header_ == nil {
5332		c.header_ = make(http.Header)
5333	}
5334	return c.header_
5335}
5336
5337func (c *ChromeosdevicesGetCall) doRequest(alt string) (*http.Response, error) {
5338	reqHeaders := make(http.Header)
5339	for k, v := range c.header_ {
5340		reqHeaders[k] = v
5341	}
5342	reqHeaders.Set("User-Agent", c.s.userAgent())
5343	if c.ifNoneMatch_ != "" {
5344		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5345	}
5346	var body io.Reader = nil
5347	c.urlParams_.Set("alt", alt)
5348	c.urlParams_.Set("prettyPrint", "false")
5349	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}")
5350	urls += "?" + c.urlParams_.Encode()
5351	req, err := http.NewRequest("GET", urls, body)
5352	if err != nil {
5353		return nil, err
5354	}
5355	req.Header = reqHeaders
5356	googleapi.Expand(req.URL, map[string]string{
5357		"customerId": c.customerId,
5358		"deviceId":   c.deviceId,
5359	})
5360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5361}
5362
5363// Do executes the "directory.chromeosdevices.get" call.
5364// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
5365// status code is an error. Response headers are in either
5366// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
5367// at all) in error.(*googleapi.Error).Header. Use
5368// googleapi.IsNotModified to check whether the returned error was
5369// because http.StatusNotModified was returned.
5370func (c *ChromeosdevicesGetCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
5371	gensupport.SetOptions(c.urlParams_, opts...)
5372	res, err := c.doRequest("json")
5373	if res != nil && res.StatusCode == http.StatusNotModified {
5374		if res.Body != nil {
5375			res.Body.Close()
5376		}
5377		return nil, &googleapi.Error{
5378			Code:   res.StatusCode,
5379			Header: res.Header,
5380		}
5381	}
5382	if err != nil {
5383		return nil, err
5384	}
5385	defer googleapi.CloseBody(res)
5386	if err := googleapi.CheckResponse(res); err != nil {
5387		return nil, err
5388	}
5389	ret := &ChromeOsDevice{
5390		ServerResponse: googleapi.ServerResponse{
5391			Header:         res.Header,
5392			HTTPStatusCode: res.StatusCode,
5393		},
5394	}
5395	target := &ret
5396	if err := gensupport.DecodeResponse(target, res); err != nil {
5397		return nil, err
5398	}
5399	return ret, nil
5400	// {
5401	//   "description": "Retrieve Chrome OS Device",
5402	//   "httpMethod": "GET",
5403	//   "id": "directory.chromeosdevices.get",
5404	//   "parameterOrder": [
5405	//     "customerId",
5406	//     "deviceId"
5407	//   ],
5408	//   "parameters": {
5409	//     "customerId": {
5410	//       "description": "Immutable ID of the G Suite account",
5411	//       "location": "path",
5412	//       "required": true,
5413	//       "type": "string"
5414	//     },
5415	//     "deviceId": {
5416	//       "description": "Immutable ID of Chrome OS Device",
5417	//       "location": "path",
5418	//       "required": true,
5419	//       "type": "string"
5420	//     },
5421	//     "projection": {
5422	//       "description": "Restrict information returned to a set of selected fields.",
5423	//       "enum": [
5424	//         "BASIC",
5425	//         "FULL"
5426	//       ],
5427	//       "enumDescriptions": [
5428	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
5429	//         "Includes all metadata fields"
5430	//       ],
5431	//       "location": "query",
5432	//       "type": "string"
5433	//     }
5434	//   },
5435	//   "path": "customer/{customerId}/devices/chromeos/{deviceId}",
5436	//   "response": {
5437	//     "$ref": "ChromeOsDevice"
5438	//   },
5439	//   "scopes": [
5440	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos",
5441	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
5442	//   ]
5443	// }
5444
5445}
5446
5447// method id "directory.chromeosdevices.list":
5448
5449type ChromeosdevicesListCall struct {
5450	s            *Service
5451	customerId   string
5452	urlParams_   gensupport.URLParams
5453	ifNoneMatch_ string
5454	ctx_         context.Context
5455	header_      http.Header
5456}
5457
5458// List: Retrieve all Chrome OS Devices of a customer (paginated)
5459func (r *ChromeosdevicesService) List(customerId string) *ChromeosdevicesListCall {
5460	c := &ChromeosdevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5461	c.customerId = customerId
5462	return c
5463}
5464
5465// MaxResults sets the optional parameter "maxResults": Maximum number
5466// of results to return. Default is 100
5467func (c *ChromeosdevicesListCall) MaxResults(maxResults int64) *ChromeosdevicesListCall {
5468	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5469	return c
5470}
5471
5472// OrderBy sets the optional parameter "orderBy": Column to use for
5473// sorting results
5474//
5475// Possible values:
5476//   "annotatedLocation" - Chromebook location as annotated by the
5477// administrator.
5478//   "annotatedUser" - Chromebook user as annotated by administrator.
5479//   "lastSync" - Chromebook last sync.
5480//   "notes" - Chromebook notes as annotated by the administrator.
5481//   "serialNumber" - Chromebook Serial Number.
5482//   "status" - Chromebook status.
5483//   "supportEndDate" - Chromebook support end date.
5484func (c *ChromeosdevicesListCall) OrderBy(orderBy string) *ChromeosdevicesListCall {
5485	c.urlParams_.Set("orderBy", orderBy)
5486	return c
5487}
5488
5489// OrgUnitPath sets the optional parameter "orgUnitPath": Full path of
5490// the organizational unit or its ID
5491func (c *ChromeosdevicesListCall) OrgUnitPath(orgUnitPath string) *ChromeosdevicesListCall {
5492	c.urlParams_.Set("orgUnitPath", orgUnitPath)
5493	return c
5494}
5495
5496// PageToken sets the optional parameter "pageToken": Token to specify
5497// next page in the list
5498func (c *ChromeosdevicesListCall) PageToken(pageToken string) *ChromeosdevicesListCall {
5499	c.urlParams_.Set("pageToken", pageToken)
5500	return c
5501}
5502
5503// Projection sets the optional parameter "projection": Restrict
5504// information returned to a set of selected fields.
5505//
5506// Possible values:
5507//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
5508// serialNumber, status, and user)
5509//   "FULL" - Includes all metadata fields
5510func (c *ChromeosdevicesListCall) Projection(projection string) *ChromeosdevicesListCall {
5511	c.urlParams_.Set("projection", projection)
5512	return c
5513}
5514
5515// Query sets the optional parameter "query": Search string in the
5516// format given at
5517// http://support.google.com/chromeos/a/bin/answer.py?answer=1698333
5518func (c *ChromeosdevicesListCall) Query(query string) *ChromeosdevicesListCall {
5519	c.urlParams_.Set("query", query)
5520	return c
5521}
5522
5523// SortOrder sets the optional parameter "sortOrder": Whether to return
5524// results in ascending or descending order. Only of use when orderBy is
5525// also used
5526//
5527// Possible values:
5528//   "ASCENDING" - Ascending order.
5529//   "DESCENDING" - Descending order.
5530func (c *ChromeosdevicesListCall) SortOrder(sortOrder string) *ChromeosdevicesListCall {
5531	c.urlParams_.Set("sortOrder", sortOrder)
5532	return c
5533}
5534
5535// Fields allows partial responses to be retrieved. See
5536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5537// for more information.
5538func (c *ChromeosdevicesListCall) Fields(s ...googleapi.Field) *ChromeosdevicesListCall {
5539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5540	return c
5541}
5542
5543// IfNoneMatch sets the optional parameter which makes the operation
5544// fail if the object's ETag matches the given value. This is useful for
5545// getting updates only after the object has changed since the last
5546// request. Use googleapi.IsNotModified to check whether the response
5547// error from Do is the result of In-None-Match.
5548func (c *ChromeosdevicesListCall) IfNoneMatch(entityTag string) *ChromeosdevicesListCall {
5549	c.ifNoneMatch_ = entityTag
5550	return c
5551}
5552
5553// Context sets the context to be used in this call's Do method. Any
5554// pending HTTP request will be aborted if the provided context is
5555// canceled.
5556func (c *ChromeosdevicesListCall) Context(ctx context.Context) *ChromeosdevicesListCall {
5557	c.ctx_ = ctx
5558	return c
5559}
5560
5561// Header returns an http.Header that can be modified by the caller to
5562// add HTTP headers to the request.
5563func (c *ChromeosdevicesListCall) Header() http.Header {
5564	if c.header_ == nil {
5565		c.header_ = make(http.Header)
5566	}
5567	return c.header_
5568}
5569
5570func (c *ChromeosdevicesListCall) doRequest(alt string) (*http.Response, error) {
5571	reqHeaders := make(http.Header)
5572	for k, v := range c.header_ {
5573		reqHeaders[k] = v
5574	}
5575	reqHeaders.Set("User-Agent", c.s.userAgent())
5576	if c.ifNoneMatch_ != "" {
5577		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5578	}
5579	var body io.Reader = nil
5580	c.urlParams_.Set("alt", alt)
5581	c.urlParams_.Set("prettyPrint", "false")
5582	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos")
5583	urls += "?" + c.urlParams_.Encode()
5584	req, err := http.NewRequest("GET", urls, body)
5585	if err != nil {
5586		return nil, err
5587	}
5588	req.Header = reqHeaders
5589	googleapi.Expand(req.URL, map[string]string{
5590		"customerId": c.customerId,
5591	})
5592	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5593}
5594
5595// Do executes the "directory.chromeosdevices.list" call.
5596// Exactly one of *ChromeOsDevices or error will be non-nil. Any non-2xx
5597// status code is an error. Response headers are in either
5598// *ChromeOsDevices.ServerResponse.Header or (if a response was returned
5599// at all) in error.(*googleapi.Error).Header. Use
5600// googleapi.IsNotModified to check whether the returned error was
5601// because http.StatusNotModified was returned.
5602func (c *ChromeosdevicesListCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevices, error) {
5603	gensupport.SetOptions(c.urlParams_, opts...)
5604	res, err := c.doRequest("json")
5605	if res != nil && res.StatusCode == http.StatusNotModified {
5606		if res.Body != nil {
5607			res.Body.Close()
5608		}
5609		return nil, &googleapi.Error{
5610			Code:   res.StatusCode,
5611			Header: res.Header,
5612		}
5613	}
5614	if err != nil {
5615		return nil, err
5616	}
5617	defer googleapi.CloseBody(res)
5618	if err := googleapi.CheckResponse(res); err != nil {
5619		return nil, err
5620	}
5621	ret := &ChromeOsDevices{
5622		ServerResponse: googleapi.ServerResponse{
5623			Header:         res.Header,
5624			HTTPStatusCode: res.StatusCode,
5625		},
5626	}
5627	target := &ret
5628	if err := gensupport.DecodeResponse(target, res); err != nil {
5629		return nil, err
5630	}
5631	return ret, nil
5632	// {
5633	//   "description": "Retrieve all Chrome OS Devices of a customer (paginated)",
5634	//   "httpMethod": "GET",
5635	//   "id": "directory.chromeosdevices.list",
5636	//   "parameterOrder": [
5637	//     "customerId"
5638	//   ],
5639	//   "parameters": {
5640	//     "customerId": {
5641	//       "description": "Immutable ID of the G Suite account",
5642	//       "location": "path",
5643	//       "required": true,
5644	//       "type": "string"
5645	//     },
5646	//     "maxResults": {
5647	//       "description": "Maximum number of results to return. Default is 100",
5648	//       "format": "int32",
5649	//       "location": "query",
5650	//       "minimum": "1",
5651	//       "type": "integer"
5652	//     },
5653	//     "orderBy": {
5654	//       "description": "Column to use for sorting results",
5655	//       "enum": [
5656	//         "annotatedLocation",
5657	//         "annotatedUser",
5658	//         "lastSync",
5659	//         "notes",
5660	//         "serialNumber",
5661	//         "status",
5662	//         "supportEndDate"
5663	//       ],
5664	//       "enumDescriptions": [
5665	//         "Chromebook location as annotated by the administrator.",
5666	//         "Chromebook user as annotated by administrator.",
5667	//         "Chromebook last sync.",
5668	//         "Chromebook notes as annotated by the administrator.",
5669	//         "Chromebook Serial Number.",
5670	//         "Chromebook status.",
5671	//         "Chromebook support end date."
5672	//       ],
5673	//       "location": "query",
5674	//       "type": "string"
5675	//     },
5676	//     "orgUnitPath": {
5677	//       "description": "Full path of the organizational unit or its ID",
5678	//       "location": "query",
5679	//       "type": "string"
5680	//     },
5681	//     "pageToken": {
5682	//       "description": "Token to specify next page in the list",
5683	//       "location": "query",
5684	//       "type": "string"
5685	//     },
5686	//     "projection": {
5687	//       "description": "Restrict information returned to a set of selected fields.",
5688	//       "enum": [
5689	//         "BASIC",
5690	//         "FULL"
5691	//       ],
5692	//       "enumDescriptions": [
5693	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
5694	//         "Includes all metadata fields"
5695	//       ],
5696	//       "location": "query",
5697	//       "type": "string"
5698	//     },
5699	//     "query": {
5700	//       "description": "Search string in the format given at http://support.google.com/chromeos/a/bin/answer.py?answer=1698333",
5701	//       "location": "query",
5702	//       "type": "string"
5703	//     },
5704	//     "sortOrder": {
5705	//       "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used",
5706	//       "enum": [
5707	//         "ASCENDING",
5708	//         "DESCENDING"
5709	//       ],
5710	//       "enumDescriptions": [
5711	//         "Ascending order.",
5712	//         "Descending order."
5713	//       ],
5714	//       "location": "query",
5715	//       "type": "string"
5716	//     }
5717	//   },
5718	//   "path": "customer/{customerId}/devices/chromeos",
5719	//   "response": {
5720	//     "$ref": "ChromeOsDevices"
5721	//   },
5722	//   "scopes": [
5723	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos",
5724	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly"
5725	//   ]
5726	// }
5727
5728}
5729
5730// Pages invokes f for each page of results.
5731// A non-nil error returned from f will halt the iteration.
5732// The provided context supersedes any context provided to the Context method.
5733func (c *ChromeosdevicesListCall) Pages(ctx context.Context, f func(*ChromeOsDevices) error) error {
5734	c.ctx_ = ctx
5735	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5736	for {
5737		x, err := c.Do()
5738		if err != nil {
5739			return err
5740		}
5741		if err := f(x); err != nil {
5742			return err
5743		}
5744		if x.NextPageToken == "" {
5745			return nil
5746		}
5747		c.PageToken(x.NextPageToken)
5748	}
5749}
5750
5751// method id "directory.chromeosdevices.moveDevicesToOu":
5752
5753type ChromeosdevicesMoveDevicesToOuCall struct {
5754	s                       *Service
5755	customerId              string
5756	chromeosmovedevicestoou *ChromeOsMoveDevicesToOu
5757	urlParams_              gensupport.URLParams
5758	ctx_                    context.Context
5759	header_                 http.Header
5760}
5761
5762// MoveDevicesToOu: Move or insert multiple Chrome OS Devices to
5763// organizational unit
5764func (r *ChromeosdevicesService) MoveDevicesToOu(customerId string, orgUnitPath string, chromeosmovedevicestoou *ChromeOsMoveDevicesToOu) *ChromeosdevicesMoveDevicesToOuCall {
5765	c := &ChromeosdevicesMoveDevicesToOuCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5766	c.customerId = customerId
5767	c.urlParams_.Set("orgUnitPath", orgUnitPath)
5768	c.chromeosmovedevicestoou = chromeosmovedevicestoou
5769	return c
5770}
5771
5772// Fields allows partial responses to be retrieved. See
5773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5774// for more information.
5775func (c *ChromeosdevicesMoveDevicesToOuCall) Fields(s ...googleapi.Field) *ChromeosdevicesMoveDevicesToOuCall {
5776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5777	return c
5778}
5779
5780// Context sets the context to be used in this call's Do method. Any
5781// pending HTTP request will be aborted if the provided context is
5782// canceled.
5783func (c *ChromeosdevicesMoveDevicesToOuCall) Context(ctx context.Context) *ChromeosdevicesMoveDevicesToOuCall {
5784	c.ctx_ = ctx
5785	return c
5786}
5787
5788// Header returns an http.Header that can be modified by the caller to
5789// add HTTP headers to the request.
5790func (c *ChromeosdevicesMoveDevicesToOuCall) Header() http.Header {
5791	if c.header_ == nil {
5792		c.header_ = make(http.Header)
5793	}
5794	return c.header_
5795}
5796
5797func (c *ChromeosdevicesMoveDevicesToOuCall) doRequest(alt string) (*http.Response, error) {
5798	reqHeaders := make(http.Header)
5799	for k, v := range c.header_ {
5800		reqHeaders[k] = v
5801	}
5802	reqHeaders.Set("User-Agent", c.s.userAgent())
5803	var body io.Reader = nil
5804	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosmovedevicestoou)
5805	if err != nil {
5806		return nil, err
5807	}
5808	reqHeaders.Set("Content-Type", "application/json")
5809	c.urlParams_.Set("alt", alt)
5810	c.urlParams_.Set("prettyPrint", "false")
5811	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/moveDevicesToOu")
5812	urls += "?" + c.urlParams_.Encode()
5813	req, err := http.NewRequest("POST", urls, body)
5814	if err != nil {
5815		return nil, err
5816	}
5817	req.Header = reqHeaders
5818	googleapi.Expand(req.URL, map[string]string{
5819		"customerId": c.customerId,
5820	})
5821	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5822}
5823
5824// Do executes the "directory.chromeosdevices.moveDevicesToOu" call.
5825func (c *ChromeosdevicesMoveDevicesToOuCall) Do(opts ...googleapi.CallOption) error {
5826	gensupport.SetOptions(c.urlParams_, opts...)
5827	res, err := c.doRequest("json")
5828	if err != nil {
5829		return err
5830	}
5831	defer googleapi.CloseBody(res)
5832	if err := googleapi.CheckResponse(res); err != nil {
5833		return err
5834	}
5835	return nil
5836	// {
5837	//   "description": "Move or insert multiple Chrome OS Devices to organizational unit",
5838	//   "httpMethod": "POST",
5839	//   "id": "directory.chromeosdevices.moveDevicesToOu",
5840	//   "parameterOrder": [
5841	//     "customerId",
5842	//     "orgUnitPath"
5843	//   ],
5844	//   "parameters": {
5845	//     "customerId": {
5846	//       "description": "Immutable ID of the G Suite account",
5847	//       "location": "path",
5848	//       "required": true,
5849	//       "type": "string"
5850	//     },
5851	//     "orgUnitPath": {
5852	//       "description": "Full path of the target organizational unit or its ID",
5853	//       "location": "query",
5854	//       "required": true,
5855	//       "type": "string"
5856	//     }
5857	//   },
5858	//   "path": "customer/{customerId}/devices/chromeos/moveDevicesToOu",
5859	//   "request": {
5860	//     "$ref": "ChromeOsMoveDevicesToOu"
5861	//   },
5862	//   "scopes": [
5863	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
5864	//   ]
5865	// }
5866
5867}
5868
5869// method id "directory.chromeosdevices.patch":
5870
5871type ChromeosdevicesPatchCall struct {
5872	s              *Service
5873	customerId     string
5874	deviceId       string
5875	chromeosdevice *ChromeOsDevice
5876	urlParams_     gensupport.URLParams
5877	ctx_           context.Context
5878	header_        http.Header
5879}
5880
5881// Patch: Update Chrome OS Device. This method supports patch semantics.
5882func (r *ChromeosdevicesService) Patch(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesPatchCall {
5883	c := &ChromeosdevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5884	c.customerId = customerId
5885	c.deviceId = deviceId
5886	c.chromeosdevice = chromeosdevice
5887	return c
5888}
5889
5890// Projection sets the optional parameter "projection": Restrict
5891// information returned to a set of selected fields.
5892//
5893// Possible values:
5894//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
5895// serialNumber, status, and user)
5896//   "FULL" - Includes all metadata fields
5897func (c *ChromeosdevicesPatchCall) Projection(projection string) *ChromeosdevicesPatchCall {
5898	c.urlParams_.Set("projection", projection)
5899	return c
5900}
5901
5902// Fields allows partial responses to be retrieved. See
5903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5904// for more information.
5905func (c *ChromeosdevicesPatchCall) Fields(s ...googleapi.Field) *ChromeosdevicesPatchCall {
5906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5907	return c
5908}
5909
5910// Context sets the context to be used in this call's Do method. Any
5911// pending HTTP request will be aborted if the provided context is
5912// canceled.
5913func (c *ChromeosdevicesPatchCall) Context(ctx context.Context) *ChromeosdevicesPatchCall {
5914	c.ctx_ = ctx
5915	return c
5916}
5917
5918// Header returns an http.Header that can be modified by the caller to
5919// add HTTP headers to the request.
5920func (c *ChromeosdevicesPatchCall) Header() http.Header {
5921	if c.header_ == nil {
5922		c.header_ = make(http.Header)
5923	}
5924	return c.header_
5925}
5926
5927func (c *ChromeosdevicesPatchCall) doRequest(alt string) (*http.Response, error) {
5928	reqHeaders := make(http.Header)
5929	for k, v := range c.header_ {
5930		reqHeaders[k] = v
5931	}
5932	reqHeaders.Set("User-Agent", c.s.userAgent())
5933	var body io.Reader = nil
5934	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
5935	if err != nil {
5936		return nil, err
5937	}
5938	reqHeaders.Set("Content-Type", "application/json")
5939	c.urlParams_.Set("alt", alt)
5940	c.urlParams_.Set("prettyPrint", "false")
5941	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}")
5942	urls += "?" + c.urlParams_.Encode()
5943	req, err := http.NewRequest("PATCH", urls, body)
5944	if err != nil {
5945		return nil, err
5946	}
5947	req.Header = reqHeaders
5948	googleapi.Expand(req.URL, map[string]string{
5949		"customerId": c.customerId,
5950		"deviceId":   c.deviceId,
5951	})
5952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5953}
5954
5955// Do executes the "directory.chromeosdevices.patch" call.
5956// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
5957// status code is an error. Response headers are in either
5958// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
5959// at all) in error.(*googleapi.Error).Header. Use
5960// googleapi.IsNotModified to check whether the returned error was
5961// because http.StatusNotModified was returned.
5962func (c *ChromeosdevicesPatchCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
5963	gensupport.SetOptions(c.urlParams_, opts...)
5964	res, err := c.doRequest("json")
5965	if res != nil && res.StatusCode == http.StatusNotModified {
5966		if res.Body != nil {
5967			res.Body.Close()
5968		}
5969		return nil, &googleapi.Error{
5970			Code:   res.StatusCode,
5971			Header: res.Header,
5972		}
5973	}
5974	if err != nil {
5975		return nil, err
5976	}
5977	defer googleapi.CloseBody(res)
5978	if err := googleapi.CheckResponse(res); err != nil {
5979		return nil, err
5980	}
5981	ret := &ChromeOsDevice{
5982		ServerResponse: googleapi.ServerResponse{
5983			Header:         res.Header,
5984			HTTPStatusCode: res.StatusCode,
5985		},
5986	}
5987	target := &ret
5988	if err := gensupport.DecodeResponse(target, res); err != nil {
5989		return nil, err
5990	}
5991	return ret, nil
5992	// {
5993	//   "description": "Update Chrome OS Device. This method supports patch semantics.",
5994	//   "httpMethod": "PATCH",
5995	//   "id": "directory.chromeosdevices.patch",
5996	//   "parameterOrder": [
5997	//     "customerId",
5998	//     "deviceId"
5999	//   ],
6000	//   "parameters": {
6001	//     "customerId": {
6002	//       "description": "Immutable ID of the G Suite account",
6003	//       "location": "path",
6004	//       "required": true,
6005	//       "type": "string"
6006	//     },
6007	//     "deviceId": {
6008	//       "description": "Immutable ID of Chrome OS Device",
6009	//       "location": "path",
6010	//       "required": true,
6011	//       "type": "string"
6012	//     },
6013	//     "projection": {
6014	//       "description": "Restrict information returned to a set of selected fields.",
6015	//       "enum": [
6016	//         "BASIC",
6017	//         "FULL"
6018	//       ],
6019	//       "enumDescriptions": [
6020	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
6021	//         "Includes all metadata fields"
6022	//       ],
6023	//       "location": "query",
6024	//       "type": "string"
6025	//     }
6026	//   },
6027	//   "path": "customer/{customerId}/devices/chromeos/{deviceId}",
6028	//   "request": {
6029	//     "$ref": "ChromeOsDevice"
6030	//   },
6031	//   "response": {
6032	//     "$ref": "ChromeOsDevice"
6033	//   },
6034	//   "scopes": [
6035	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
6036	//   ]
6037	// }
6038
6039}
6040
6041// method id "directory.chromeosdevices.update":
6042
6043type ChromeosdevicesUpdateCall struct {
6044	s              *Service
6045	customerId     string
6046	deviceId       string
6047	chromeosdevice *ChromeOsDevice
6048	urlParams_     gensupport.URLParams
6049	ctx_           context.Context
6050	header_        http.Header
6051}
6052
6053// Update: Update Chrome OS Device
6054func (r *ChromeosdevicesService) Update(customerId string, deviceId string, chromeosdevice *ChromeOsDevice) *ChromeosdevicesUpdateCall {
6055	c := &ChromeosdevicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6056	c.customerId = customerId
6057	c.deviceId = deviceId
6058	c.chromeosdevice = chromeosdevice
6059	return c
6060}
6061
6062// Projection sets the optional parameter "projection": Restrict
6063// information returned to a set of selected fields.
6064//
6065// Possible values:
6066//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
6067// serialNumber, status, and user)
6068//   "FULL" - Includes all metadata fields
6069func (c *ChromeosdevicesUpdateCall) Projection(projection string) *ChromeosdevicesUpdateCall {
6070	c.urlParams_.Set("projection", projection)
6071	return c
6072}
6073
6074// Fields allows partial responses to be retrieved. See
6075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6076// for more information.
6077func (c *ChromeosdevicesUpdateCall) Fields(s ...googleapi.Field) *ChromeosdevicesUpdateCall {
6078	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6079	return c
6080}
6081
6082// Context sets the context to be used in this call's Do method. Any
6083// pending HTTP request will be aborted if the provided context is
6084// canceled.
6085func (c *ChromeosdevicesUpdateCall) Context(ctx context.Context) *ChromeosdevicesUpdateCall {
6086	c.ctx_ = ctx
6087	return c
6088}
6089
6090// Header returns an http.Header that can be modified by the caller to
6091// add HTTP headers to the request.
6092func (c *ChromeosdevicesUpdateCall) Header() http.Header {
6093	if c.header_ == nil {
6094		c.header_ = make(http.Header)
6095	}
6096	return c.header_
6097}
6098
6099func (c *ChromeosdevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
6100	reqHeaders := make(http.Header)
6101	for k, v := range c.header_ {
6102		reqHeaders[k] = v
6103	}
6104	reqHeaders.Set("User-Agent", c.s.userAgent())
6105	var body io.Reader = nil
6106	body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
6107	if err != nil {
6108		return nil, err
6109	}
6110	reqHeaders.Set("Content-Type", "application/json")
6111	c.urlParams_.Set("alt", alt)
6112	c.urlParams_.Set("prettyPrint", "false")
6113	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/chromeos/{deviceId}")
6114	urls += "?" + c.urlParams_.Encode()
6115	req, err := http.NewRequest("PUT", urls, body)
6116	if err != nil {
6117		return nil, err
6118	}
6119	req.Header = reqHeaders
6120	googleapi.Expand(req.URL, map[string]string{
6121		"customerId": c.customerId,
6122		"deviceId":   c.deviceId,
6123	})
6124	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6125}
6126
6127// Do executes the "directory.chromeosdevices.update" call.
6128// Exactly one of *ChromeOsDevice or error will be non-nil. Any non-2xx
6129// status code is an error. Response headers are in either
6130// *ChromeOsDevice.ServerResponse.Header or (if a response was returned
6131// at all) in error.(*googleapi.Error).Header. Use
6132// googleapi.IsNotModified to check whether the returned error was
6133// because http.StatusNotModified was returned.
6134func (c *ChromeosdevicesUpdateCall) Do(opts ...googleapi.CallOption) (*ChromeOsDevice, error) {
6135	gensupport.SetOptions(c.urlParams_, opts...)
6136	res, err := c.doRequest("json")
6137	if res != nil && res.StatusCode == http.StatusNotModified {
6138		if res.Body != nil {
6139			res.Body.Close()
6140		}
6141		return nil, &googleapi.Error{
6142			Code:   res.StatusCode,
6143			Header: res.Header,
6144		}
6145	}
6146	if err != nil {
6147		return nil, err
6148	}
6149	defer googleapi.CloseBody(res)
6150	if err := googleapi.CheckResponse(res); err != nil {
6151		return nil, err
6152	}
6153	ret := &ChromeOsDevice{
6154		ServerResponse: googleapi.ServerResponse{
6155			Header:         res.Header,
6156			HTTPStatusCode: res.StatusCode,
6157		},
6158	}
6159	target := &ret
6160	if err := gensupport.DecodeResponse(target, res); err != nil {
6161		return nil, err
6162	}
6163	return ret, nil
6164	// {
6165	//   "description": "Update Chrome OS Device",
6166	//   "httpMethod": "PUT",
6167	//   "id": "directory.chromeosdevices.update",
6168	//   "parameterOrder": [
6169	//     "customerId",
6170	//     "deviceId"
6171	//   ],
6172	//   "parameters": {
6173	//     "customerId": {
6174	//       "description": "Immutable ID of the G Suite account",
6175	//       "location": "path",
6176	//       "required": true,
6177	//       "type": "string"
6178	//     },
6179	//     "deviceId": {
6180	//       "description": "Immutable ID of Chrome OS Device",
6181	//       "location": "path",
6182	//       "required": true,
6183	//       "type": "string"
6184	//     },
6185	//     "projection": {
6186	//       "description": "Restrict information returned to a set of selected fields.",
6187	//       "enum": [
6188	//         "BASIC",
6189	//         "FULL"
6190	//       ],
6191	//       "enumDescriptions": [
6192	//         "Includes only the basic metadata fields (e.g., deviceId, serialNumber, status, and user)",
6193	//         "Includes all metadata fields"
6194	//       ],
6195	//       "location": "query",
6196	//       "type": "string"
6197	//     }
6198	//   },
6199	//   "path": "customer/{customerId}/devices/chromeos/{deviceId}",
6200	//   "request": {
6201	//     "$ref": "ChromeOsDevice"
6202	//   },
6203	//   "response": {
6204	//     "$ref": "ChromeOsDevice"
6205	//   },
6206	//   "scopes": [
6207	//     "https://www.googleapis.com/auth/admin.directory.device.chromeos"
6208	//   ]
6209	// }
6210
6211}
6212
6213// method id "directory.customers.get":
6214
6215type CustomersGetCall struct {
6216	s            *Service
6217	customerKey  string
6218	urlParams_   gensupport.URLParams
6219	ifNoneMatch_ string
6220	ctx_         context.Context
6221	header_      http.Header
6222}
6223
6224// Get: Retrieves a customer.
6225func (r *CustomersService) Get(customerKey string) *CustomersGetCall {
6226	c := &CustomersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6227	c.customerKey = customerKey
6228	return c
6229}
6230
6231// Fields allows partial responses to be retrieved. See
6232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6233// for more information.
6234func (c *CustomersGetCall) Fields(s ...googleapi.Field) *CustomersGetCall {
6235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6236	return c
6237}
6238
6239// IfNoneMatch sets the optional parameter which makes the operation
6240// fail if the object's ETag matches the given value. This is useful for
6241// getting updates only after the object has changed since the last
6242// request. Use googleapi.IsNotModified to check whether the response
6243// error from Do is the result of In-None-Match.
6244func (c *CustomersGetCall) IfNoneMatch(entityTag string) *CustomersGetCall {
6245	c.ifNoneMatch_ = entityTag
6246	return c
6247}
6248
6249// Context sets the context to be used in this call's Do method. Any
6250// pending HTTP request will be aborted if the provided context is
6251// canceled.
6252func (c *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
6253	c.ctx_ = ctx
6254	return c
6255}
6256
6257// Header returns an http.Header that can be modified by the caller to
6258// add HTTP headers to the request.
6259func (c *CustomersGetCall) Header() http.Header {
6260	if c.header_ == nil {
6261		c.header_ = make(http.Header)
6262	}
6263	return c.header_
6264}
6265
6266func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
6267	reqHeaders := make(http.Header)
6268	for k, v := range c.header_ {
6269		reqHeaders[k] = v
6270	}
6271	reqHeaders.Set("User-Agent", c.s.userAgent())
6272	if c.ifNoneMatch_ != "" {
6273		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6274	}
6275	var body io.Reader = nil
6276	c.urlParams_.Set("alt", alt)
6277	c.urlParams_.Set("prettyPrint", "false")
6278	urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}")
6279	urls += "?" + c.urlParams_.Encode()
6280	req, err := http.NewRequest("GET", urls, body)
6281	if err != nil {
6282		return nil, err
6283	}
6284	req.Header = reqHeaders
6285	googleapi.Expand(req.URL, map[string]string{
6286		"customerKey": c.customerKey,
6287	})
6288	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6289}
6290
6291// Do executes the "directory.customers.get" call.
6292// Exactly one of *Customer or error will be non-nil. Any non-2xx status
6293// code is an error. Response headers are in either
6294// *Customer.ServerResponse.Header or (if a response was returned at
6295// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6296// to check whether the returned error was because
6297// http.StatusNotModified was returned.
6298func (c *CustomersGetCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
6299	gensupport.SetOptions(c.urlParams_, opts...)
6300	res, err := c.doRequest("json")
6301	if res != nil && res.StatusCode == http.StatusNotModified {
6302		if res.Body != nil {
6303			res.Body.Close()
6304		}
6305		return nil, &googleapi.Error{
6306			Code:   res.StatusCode,
6307			Header: res.Header,
6308		}
6309	}
6310	if err != nil {
6311		return nil, err
6312	}
6313	defer googleapi.CloseBody(res)
6314	if err := googleapi.CheckResponse(res); err != nil {
6315		return nil, err
6316	}
6317	ret := &Customer{
6318		ServerResponse: googleapi.ServerResponse{
6319			Header:         res.Header,
6320			HTTPStatusCode: res.StatusCode,
6321		},
6322	}
6323	target := &ret
6324	if err := gensupport.DecodeResponse(target, res); err != nil {
6325		return nil, err
6326	}
6327	return ret, nil
6328	// {
6329	//   "description": "Retrieves a customer.",
6330	//   "httpMethod": "GET",
6331	//   "id": "directory.customers.get",
6332	//   "parameterOrder": [
6333	//     "customerKey"
6334	//   ],
6335	//   "parameters": {
6336	//     "customerKey": {
6337	//       "description": "Id of the customer to be retrieved",
6338	//       "location": "path",
6339	//       "required": true,
6340	//       "type": "string"
6341	//     }
6342	//   },
6343	//   "path": "customers/{customerKey}",
6344	//   "response": {
6345	//     "$ref": "Customer"
6346	//   },
6347	//   "scopes": [
6348	//     "https://www.googleapis.com/auth/admin.directory.customer",
6349	//     "https://www.googleapis.com/auth/admin.directory.customer.readonly"
6350	//   ]
6351	// }
6352
6353}
6354
6355// method id "directory.customers.patch":
6356
6357type CustomersPatchCall struct {
6358	s           *Service
6359	customerKey string
6360	customer    *Customer
6361	urlParams_  gensupport.URLParams
6362	ctx_        context.Context
6363	header_     http.Header
6364}
6365
6366// Patch: Updates a customer. This method supports patch semantics.
6367func (r *CustomersService) Patch(customerKey string, customer *Customer) *CustomersPatchCall {
6368	c := &CustomersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6369	c.customerKey = customerKey
6370	c.customer = customer
6371	return c
6372}
6373
6374// Fields allows partial responses to be retrieved. See
6375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6376// for more information.
6377func (c *CustomersPatchCall) Fields(s ...googleapi.Field) *CustomersPatchCall {
6378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6379	return c
6380}
6381
6382// Context sets the context to be used in this call's Do method. Any
6383// pending HTTP request will be aborted if the provided context is
6384// canceled.
6385func (c *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
6386	c.ctx_ = ctx
6387	return c
6388}
6389
6390// Header returns an http.Header that can be modified by the caller to
6391// add HTTP headers to the request.
6392func (c *CustomersPatchCall) Header() http.Header {
6393	if c.header_ == nil {
6394		c.header_ = make(http.Header)
6395	}
6396	return c.header_
6397}
6398
6399func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
6400	reqHeaders := make(http.Header)
6401	for k, v := range c.header_ {
6402		reqHeaders[k] = v
6403	}
6404	reqHeaders.Set("User-Agent", c.s.userAgent())
6405	var body io.Reader = nil
6406	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
6407	if err != nil {
6408		return nil, err
6409	}
6410	reqHeaders.Set("Content-Type", "application/json")
6411	c.urlParams_.Set("alt", alt)
6412	c.urlParams_.Set("prettyPrint", "false")
6413	urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}")
6414	urls += "?" + c.urlParams_.Encode()
6415	req, err := http.NewRequest("PATCH", urls, body)
6416	if err != nil {
6417		return nil, err
6418	}
6419	req.Header = reqHeaders
6420	googleapi.Expand(req.URL, map[string]string{
6421		"customerKey": c.customerKey,
6422	})
6423	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6424}
6425
6426// Do executes the "directory.customers.patch" call.
6427// Exactly one of *Customer or error will be non-nil. Any non-2xx status
6428// code is an error. Response headers are in either
6429// *Customer.ServerResponse.Header or (if a response was returned at
6430// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6431// to check whether the returned error was because
6432// http.StatusNotModified was returned.
6433func (c *CustomersPatchCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
6434	gensupport.SetOptions(c.urlParams_, opts...)
6435	res, err := c.doRequest("json")
6436	if res != nil && res.StatusCode == http.StatusNotModified {
6437		if res.Body != nil {
6438			res.Body.Close()
6439		}
6440		return nil, &googleapi.Error{
6441			Code:   res.StatusCode,
6442			Header: res.Header,
6443		}
6444	}
6445	if err != nil {
6446		return nil, err
6447	}
6448	defer googleapi.CloseBody(res)
6449	if err := googleapi.CheckResponse(res); err != nil {
6450		return nil, err
6451	}
6452	ret := &Customer{
6453		ServerResponse: googleapi.ServerResponse{
6454			Header:         res.Header,
6455			HTTPStatusCode: res.StatusCode,
6456		},
6457	}
6458	target := &ret
6459	if err := gensupport.DecodeResponse(target, res); err != nil {
6460		return nil, err
6461	}
6462	return ret, nil
6463	// {
6464	//   "description": "Updates a customer. This method supports patch semantics.",
6465	//   "httpMethod": "PATCH",
6466	//   "id": "directory.customers.patch",
6467	//   "parameterOrder": [
6468	//     "customerKey"
6469	//   ],
6470	//   "parameters": {
6471	//     "customerKey": {
6472	//       "description": "Id of the customer to be updated",
6473	//       "location": "path",
6474	//       "required": true,
6475	//       "type": "string"
6476	//     }
6477	//   },
6478	//   "path": "customers/{customerKey}",
6479	//   "request": {
6480	//     "$ref": "Customer"
6481	//   },
6482	//   "response": {
6483	//     "$ref": "Customer"
6484	//   },
6485	//   "scopes": [
6486	//     "https://www.googleapis.com/auth/admin.directory.customer"
6487	//   ]
6488	// }
6489
6490}
6491
6492// method id "directory.customers.update":
6493
6494type CustomersUpdateCall struct {
6495	s           *Service
6496	customerKey string
6497	customer    *Customer
6498	urlParams_  gensupport.URLParams
6499	ctx_        context.Context
6500	header_     http.Header
6501}
6502
6503// Update: Updates a customer.
6504func (r *CustomersService) Update(customerKey string, customer *Customer) *CustomersUpdateCall {
6505	c := &CustomersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6506	c.customerKey = customerKey
6507	c.customer = customer
6508	return c
6509}
6510
6511// Fields allows partial responses to be retrieved. See
6512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6513// for more information.
6514func (c *CustomersUpdateCall) Fields(s ...googleapi.Field) *CustomersUpdateCall {
6515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6516	return c
6517}
6518
6519// Context sets the context to be used in this call's Do method. Any
6520// pending HTTP request will be aborted if the provided context is
6521// canceled.
6522func (c *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall {
6523	c.ctx_ = ctx
6524	return c
6525}
6526
6527// Header returns an http.Header that can be modified by the caller to
6528// add HTTP headers to the request.
6529func (c *CustomersUpdateCall) Header() http.Header {
6530	if c.header_ == nil {
6531		c.header_ = make(http.Header)
6532	}
6533	return c.header_
6534}
6535
6536func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) {
6537	reqHeaders := make(http.Header)
6538	for k, v := range c.header_ {
6539		reqHeaders[k] = v
6540	}
6541	reqHeaders.Set("User-Agent", c.s.userAgent())
6542	var body io.Reader = nil
6543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
6544	if err != nil {
6545		return nil, err
6546	}
6547	reqHeaders.Set("Content-Type", "application/json")
6548	c.urlParams_.Set("alt", alt)
6549	c.urlParams_.Set("prettyPrint", "false")
6550	urls := googleapi.ResolveRelative(c.s.BasePath, "customers/{customerKey}")
6551	urls += "?" + c.urlParams_.Encode()
6552	req, err := http.NewRequest("PUT", urls, body)
6553	if err != nil {
6554		return nil, err
6555	}
6556	req.Header = reqHeaders
6557	googleapi.Expand(req.URL, map[string]string{
6558		"customerKey": c.customerKey,
6559	})
6560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6561}
6562
6563// Do executes the "directory.customers.update" call.
6564// Exactly one of *Customer or error will be non-nil. Any non-2xx status
6565// code is an error. Response headers are in either
6566// *Customer.ServerResponse.Header or (if a response was returned at
6567// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6568// to check whether the returned error was because
6569// http.StatusNotModified was returned.
6570func (c *CustomersUpdateCall) Do(opts ...googleapi.CallOption) (*Customer, error) {
6571	gensupport.SetOptions(c.urlParams_, opts...)
6572	res, err := c.doRequest("json")
6573	if res != nil && res.StatusCode == http.StatusNotModified {
6574		if res.Body != nil {
6575			res.Body.Close()
6576		}
6577		return nil, &googleapi.Error{
6578			Code:   res.StatusCode,
6579			Header: res.Header,
6580		}
6581	}
6582	if err != nil {
6583		return nil, err
6584	}
6585	defer googleapi.CloseBody(res)
6586	if err := googleapi.CheckResponse(res); err != nil {
6587		return nil, err
6588	}
6589	ret := &Customer{
6590		ServerResponse: googleapi.ServerResponse{
6591			Header:         res.Header,
6592			HTTPStatusCode: res.StatusCode,
6593		},
6594	}
6595	target := &ret
6596	if err := gensupport.DecodeResponse(target, res); err != nil {
6597		return nil, err
6598	}
6599	return ret, nil
6600	// {
6601	//   "description": "Updates a customer.",
6602	//   "httpMethod": "PUT",
6603	//   "id": "directory.customers.update",
6604	//   "parameterOrder": [
6605	//     "customerKey"
6606	//   ],
6607	//   "parameters": {
6608	//     "customerKey": {
6609	//       "description": "Id of the customer to be updated",
6610	//       "location": "path",
6611	//       "required": true,
6612	//       "type": "string"
6613	//     }
6614	//   },
6615	//   "path": "customers/{customerKey}",
6616	//   "request": {
6617	//     "$ref": "Customer"
6618	//   },
6619	//   "response": {
6620	//     "$ref": "Customer"
6621	//   },
6622	//   "scopes": [
6623	//     "https://www.googleapis.com/auth/admin.directory.customer"
6624	//   ]
6625	// }
6626
6627}
6628
6629// method id "directory.domainAliases.delete":
6630
6631type DomainAliasesDeleteCall struct {
6632	s               *Service
6633	customer        string
6634	domainAliasName string
6635	urlParams_      gensupport.URLParams
6636	ctx_            context.Context
6637	header_         http.Header
6638}
6639
6640// Delete: Deletes a Domain Alias of the customer.
6641func (r *DomainAliasesService) Delete(customer string, domainAliasName string) *DomainAliasesDeleteCall {
6642	c := &DomainAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6643	c.customer = customer
6644	c.domainAliasName = domainAliasName
6645	return c
6646}
6647
6648// Fields allows partial responses to be retrieved. See
6649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6650// for more information.
6651func (c *DomainAliasesDeleteCall) Fields(s ...googleapi.Field) *DomainAliasesDeleteCall {
6652	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6653	return c
6654}
6655
6656// Context sets the context to be used in this call's Do method. Any
6657// pending HTTP request will be aborted if the provided context is
6658// canceled.
6659func (c *DomainAliasesDeleteCall) Context(ctx context.Context) *DomainAliasesDeleteCall {
6660	c.ctx_ = ctx
6661	return c
6662}
6663
6664// Header returns an http.Header that can be modified by the caller to
6665// add HTTP headers to the request.
6666func (c *DomainAliasesDeleteCall) Header() http.Header {
6667	if c.header_ == nil {
6668		c.header_ = make(http.Header)
6669	}
6670	return c.header_
6671}
6672
6673func (c *DomainAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
6674	reqHeaders := make(http.Header)
6675	for k, v := range c.header_ {
6676		reqHeaders[k] = v
6677	}
6678	reqHeaders.Set("User-Agent", c.s.userAgent())
6679	var body io.Reader = nil
6680	c.urlParams_.Set("alt", alt)
6681	c.urlParams_.Set("prettyPrint", "false")
6682	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases/{domainAliasName}")
6683	urls += "?" + c.urlParams_.Encode()
6684	req, err := http.NewRequest("DELETE", urls, body)
6685	if err != nil {
6686		return nil, err
6687	}
6688	req.Header = reqHeaders
6689	googleapi.Expand(req.URL, map[string]string{
6690		"customer":        c.customer,
6691		"domainAliasName": c.domainAliasName,
6692	})
6693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6694}
6695
6696// Do executes the "directory.domainAliases.delete" call.
6697func (c *DomainAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
6698	gensupport.SetOptions(c.urlParams_, opts...)
6699	res, err := c.doRequest("json")
6700	if err != nil {
6701		return err
6702	}
6703	defer googleapi.CloseBody(res)
6704	if err := googleapi.CheckResponse(res); err != nil {
6705		return err
6706	}
6707	return nil
6708	// {
6709	//   "description": "Deletes a Domain Alias of the customer.",
6710	//   "httpMethod": "DELETE",
6711	//   "id": "directory.domainAliases.delete",
6712	//   "parameterOrder": [
6713	//     "customer",
6714	//     "domainAliasName"
6715	//   ],
6716	//   "parameters": {
6717	//     "customer": {
6718	//       "description": "Immutable ID of the G Suite account.",
6719	//       "location": "path",
6720	//       "required": true,
6721	//       "type": "string"
6722	//     },
6723	//     "domainAliasName": {
6724	//       "description": "Name of domain alias to be retrieved.",
6725	//       "location": "path",
6726	//       "required": true,
6727	//       "type": "string"
6728	//     }
6729	//   },
6730	//   "path": "customer/{customer}/domainaliases/{domainAliasName}",
6731	//   "scopes": [
6732	//     "https://www.googleapis.com/auth/admin.directory.domain"
6733	//   ]
6734	// }
6735
6736}
6737
6738// method id "directory.domainAliases.get":
6739
6740type DomainAliasesGetCall struct {
6741	s               *Service
6742	customer        string
6743	domainAliasName string
6744	urlParams_      gensupport.URLParams
6745	ifNoneMatch_    string
6746	ctx_            context.Context
6747	header_         http.Header
6748}
6749
6750// Get: Retrieves a domain alias of the customer.
6751func (r *DomainAliasesService) Get(customer string, domainAliasName string) *DomainAliasesGetCall {
6752	c := &DomainAliasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6753	c.customer = customer
6754	c.domainAliasName = domainAliasName
6755	return c
6756}
6757
6758// Fields allows partial responses to be retrieved. See
6759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6760// for more information.
6761func (c *DomainAliasesGetCall) Fields(s ...googleapi.Field) *DomainAliasesGetCall {
6762	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6763	return c
6764}
6765
6766// IfNoneMatch sets the optional parameter which makes the operation
6767// fail if the object's ETag matches the given value. This is useful for
6768// getting updates only after the object has changed since the last
6769// request. Use googleapi.IsNotModified to check whether the response
6770// error from Do is the result of In-None-Match.
6771func (c *DomainAliasesGetCall) IfNoneMatch(entityTag string) *DomainAliasesGetCall {
6772	c.ifNoneMatch_ = entityTag
6773	return c
6774}
6775
6776// Context sets the context to be used in this call's Do method. Any
6777// pending HTTP request will be aborted if the provided context is
6778// canceled.
6779func (c *DomainAliasesGetCall) Context(ctx context.Context) *DomainAliasesGetCall {
6780	c.ctx_ = ctx
6781	return c
6782}
6783
6784// Header returns an http.Header that can be modified by the caller to
6785// add HTTP headers to the request.
6786func (c *DomainAliasesGetCall) Header() http.Header {
6787	if c.header_ == nil {
6788		c.header_ = make(http.Header)
6789	}
6790	return c.header_
6791}
6792
6793func (c *DomainAliasesGetCall) doRequest(alt string) (*http.Response, error) {
6794	reqHeaders := make(http.Header)
6795	for k, v := range c.header_ {
6796		reqHeaders[k] = v
6797	}
6798	reqHeaders.Set("User-Agent", c.s.userAgent())
6799	if c.ifNoneMatch_ != "" {
6800		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6801	}
6802	var body io.Reader = nil
6803	c.urlParams_.Set("alt", alt)
6804	c.urlParams_.Set("prettyPrint", "false")
6805	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases/{domainAliasName}")
6806	urls += "?" + c.urlParams_.Encode()
6807	req, err := http.NewRequest("GET", urls, body)
6808	if err != nil {
6809		return nil, err
6810	}
6811	req.Header = reqHeaders
6812	googleapi.Expand(req.URL, map[string]string{
6813		"customer":        c.customer,
6814		"domainAliasName": c.domainAliasName,
6815	})
6816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6817}
6818
6819// Do executes the "directory.domainAliases.get" call.
6820// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx
6821// status code is an error. Response headers are in either
6822// *DomainAlias.ServerResponse.Header or (if a response was returned at
6823// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6824// to check whether the returned error was because
6825// http.StatusNotModified was returned.
6826func (c *DomainAliasesGetCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
6827	gensupport.SetOptions(c.urlParams_, opts...)
6828	res, err := c.doRequest("json")
6829	if res != nil && res.StatusCode == http.StatusNotModified {
6830		if res.Body != nil {
6831			res.Body.Close()
6832		}
6833		return nil, &googleapi.Error{
6834			Code:   res.StatusCode,
6835			Header: res.Header,
6836		}
6837	}
6838	if err != nil {
6839		return nil, err
6840	}
6841	defer googleapi.CloseBody(res)
6842	if err := googleapi.CheckResponse(res); err != nil {
6843		return nil, err
6844	}
6845	ret := &DomainAlias{
6846		ServerResponse: googleapi.ServerResponse{
6847			Header:         res.Header,
6848			HTTPStatusCode: res.StatusCode,
6849		},
6850	}
6851	target := &ret
6852	if err := gensupport.DecodeResponse(target, res); err != nil {
6853		return nil, err
6854	}
6855	return ret, nil
6856	// {
6857	//   "description": "Retrieves a domain alias of the customer.",
6858	//   "httpMethod": "GET",
6859	//   "id": "directory.domainAliases.get",
6860	//   "parameterOrder": [
6861	//     "customer",
6862	//     "domainAliasName"
6863	//   ],
6864	//   "parameters": {
6865	//     "customer": {
6866	//       "description": "Immutable ID of the G Suite account.",
6867	//       "location": "path",
6868	//       "required": true,
6869	//       "type": "string"
6870	//     },
6871	//     "domainAliasName": {
6872	//       "description": "Name of domain alias to be retrieved.",
6873	//       "location": "path",
6874	//       "required": true,
6875	//       "type": "string"
6876	//     }
6877	//   },
6878	//   "path": "customer/{customer}/domainaliases/{domainAliasName}",
6879	//   "response": {
6880	//     "$ref": "DomainAlias"
6881	//   },
6882	//   "scopes": [
6883	//     "https://www.googleapis.com/auth/admin.directory.domain",
6884	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
6885	//   ]
6886	// }
6887
6888}
6889
6890// method id "directory.domainAliases.insert":
6891
6892type DomainAliasesInsertCall struct {
6893	s           *Service
6894	customer    string
6895	domainalias *DomainAlias
6896	urlParams_  gensupport.URLParams
6897	ctx_        context.Context
6898	header_     http.Header
6899}
6900
6901// Insert: Inserts a Domain alias of the customer.
6902func (r *DomainAliasesService) Insert(customer string, domainalias *DomainAlias) *DomainAliasesInsertCall {
6903	c := &DomainAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6904	c.customer = customer
6905	c.domainalias = domainalias
6906	return c
6907}
6908
6909// Fields allows partial responses to be retrieved. See
6910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6911// for more information.
6912func (c *DomainAliasesInsertCall) Fields(s ...googleapi.Field) *DomainAliasesInsertCall {
6913	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6914	return c
6915}
6916
6917// Context sets the context to be used in this call's Do method. Any
6918// pending HTTP request will be aborted if the provided context is
6919// canceled.
6920func (c *DomainAliasesInsertCall) Context(ctx context.Context) *DomainAliasesInsertCall {
6921	c.ctx_ = ctx
6922	return c
6923}
6924
6925// Header returns an http.Header that can be modified by the caller to
6926// add HTTP headers to the request.
6927func (c *DomainAliasesInsertCall) Header() http.Header {
6928	if c.header_ == nil {
6929		c.header_ = make(http.Header)
6930	}
6931	return c.header_
6932}
6933
6934func (c *DomainAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
6935	reqHeaders := make(http.Header)
6936	for k, v := range c.header_ {
6937		reqHeaders[k] = v
6938	}
6939	reqHeaders.Set("User-Agent", c.s.userAgent())
6940	var body io.Reader = nil
6941	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainalias)
6942	if err != nil {
6943		return nil, err
6944	}
6945	reqHeaders.Set("Content-Type", "application/json")
6946	c.urlParams_.Set("alt", alt)
6947	c.urlParams_.Set("prettyPrint", "false")
6948	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases")
6949	urls += "?" + c.urlParams_.Encode()
6950	req, err := http.NewRequest("POST", urls, body)
6951	if err != nil {
6952		return nil, err
6953	}
6954	req.Header = reqHeaders
6955	googleapi.Expand(req.URL, map[string]string{
6956		"customer": c.customer,
6957	})
6958	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6959}
6960
6961// Do executes the "directory.domainAliases.insert" call.
6962// Exactly one of *DomainAlias or error will be non-nil. Any non-2xx
6963// status code is an error. Response headers are in either
6964// *DomainAlias.ServerResponse.Header or (if a response was returned at
6965// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6966// to check whether the returned error was because
6967// http.StatusNotModified was returned.
6968func (c *DomainAliasesInsertCall) Do(opts ...googleapi.CallOption) (*DomainAlias, error) {
6969	gensupport.SetOptions(c.urlParams_, opts...)
6970	res, err := c.doRequest("json")
6971	if res != nil && res.StatusCode == http.StatusNotModified {
6972		if res.Body != nil {
6973			res.Body.Close()
6974		}
6975		return nil, &googleapi.Error{
6976			Code:   res.StatusCode,
6977			Header: res.Header,
6978		}
6979	}
6980	if err != nil {
6981		return nil, err
6982	}
6983	defer googleapi.CloseBody(res)
6984	if err := googleapi.CheckResponse(res); err != nil {
6985		return nil, err
6986	}
6987	ret := &DomainAlias{
6988		ServerResponse: googleapi.ServerResponse{
6989			Header:         res.Header,
6990			HTTPStatusCode: res.StatusCode,
6991		},
6992	}
6993	target := &ret
6994	if err := gensupport.DecodeResponse(target, res); err != nil {
6995		return nil, err
6996	}
6997	return ret, nil
6998	// {
6999	//   "description": "Inserts a Domain alias of the customer.",
7000	//   "httpMethod": "POST",
7001	//   "id": "directory.domainAliases.insert",
7002	//   "parameterOrder": [
7003	//     "customer"
7004	//   ],
7005	//   "parameters": {
7006	//     "customer": {
7007	//       "description": "Immutable ID of the G Suite account.",
7008	//       "location": "path",
7009	//       "required": true,
7010	//       "type": "string"
7011	//     }
7012	//   },
7013	//   "path": "customer/{customer}/domainaliases",
7014	//   "request": {
7015	//     "$ref": "DomainAlias"
7016	//   },
7017	//   "response": {
7018	//     "$ref": "DomainAlias"
7019	//   },
7020	//   "scopes": [
7021	//     "https://www.googleapis.com/auth/admin.directory.domain"
7022	//   ]
7023	// }
7024
7025}
7026
7027// method id "directory.domainAliases.list":
7028
7029type DomainAliasesListCall struct {
7030	s            *Service
7031	customer     string
7032	urlParams_   gensupport.URLParams
7033	ifNoneMatch_ string
7034	ctx_         context.Context
7035	header_      http.Header
7036}
7037
7038// List: Lists the domain aliases of the customer.
7039func (r *DomainAliasesService) List(customer string) *DomainAliasesListCall {
7040	c := &DomainAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7041	c.customer = customer
7042	return c
7043}
7044
7045// ParentDomainName sets the optional parameter "parentDomainName": Name
7046// of the parent domain for which domain aliases are to be fetched.
7047func (c *DomainAliasesListCall) ParentDomainName(parentDomainName string) *DomainAliasesListCall {
7048	c.urlParams_.Set("parentDomainName", parentDomainName)
7049	return c
7050}
7051
7052// Fields allows partial responses to be retrieved. See
7053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7054// for more information.
7055func (c *DomainAliasesListCall) Fields(s ...googleapi.Field) *DomainAliasesListCall {
7056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7057	return c
7058}
7059
7060// IfNoneMatch sets the optional parameter which makes the operation
7061// fail if the object's ETag matches the given value. This is useful for
7062// getting updates only after the object has changed since the last
7063// request. Use googleapi.IsNotModified to check whether the response
7064// error from Do is the result of In-None-Match.
7065func (c *DomainAliasesListCall) IfNoneMatch(entityTag string) *DomainAliasesListCall {
7066	c.ifNoneMatch_ = entityTag
7067	return c
7068}
7069
7070// Context sets the context to be used in this call's Do method. Any
7071// pending HTTP request will be aborted if the provided context is
7072// canceled.
7073func (c *DomainAliasesListCall) Context(ctx context.Context) *DomainAliasesListCall {
7074	c.ctx_ = ctx
7075	return c
7076}
7077
7078// Header returns an http.Header that can be modified by the caller to
7079// add HTTP headers to the request.
7080func (c *DomainAliasesListCall) Header() http.Header {
7081	if c.header_ == nil {
7082		c.header_ = make(http.Header)
7083	}
7084	return c.header_
7085}
7086
7087func (c *DomainAliasesListCall) doRequest(alt string) (*http.Response, error) {
7088	reqHeaders := make(http.Header)
7089	for k, v := range c.header_ {
7090		reqHeaders[k] = v
7091	}
7092	reqHeaders.Set("User-Agent", c.s.userAgent())
7093	if c.ifNoneMatch_ != "" {
7094		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7095	}
7096	var body io.Reader = nil
7097	c.urlParams_.Set("alt", alt)
7098	c.urlParams_.Set("prettyPrint", "false")
7099	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domainaliases")
7100	urls += "?" + c.urlParams_.Encode()
7101	req, err := http.NewRequest("GET", urls, body)
7102	if err != nil {
7103		return nil, err
7104	}
7105	req.Header = reqHeaders
7106	googleapi.Expand(req.URL, map[string]string{
7107		"customer": c.customer,
7108	})
7109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7110}
7111
7112// Do executes the "directory.domainAliases.list" call.
7113// Exactly one of *DomainAliases or error will be non-nil. Any non-2xx
7114// status code is an error. Response headers are in either
7115// *DomainAliases.ServerResponse.Header or (if a response was returned
7116// at all) in error.(*googleapi.Error).Header. Use
7117// googleapi.IsNotModified to check whether the returned error was
7118// because http.StatusNotModified was returned.
7119func (c *DomainAliasesListCall) Do(opts ...googleapi.CallOption) (*DomainAliases, error) {
7120	gensupport.SetOptions(c.urlParams_, opts...)
7121	res, err := c.doRequest("json")
7122	if res != nil && res.StatusCode == http.StatusNotModified {
7123		if res.Body != nil {
7124			res.Body.Close()
7125		}
7126		return nil, &googleapi.Error{
7127			Code:   res.StatusCode,
7128			Header: res.Header,
7129		}
7130	}
7131	if err != nil {
7132		return nil, err
7133	}
7134	defer googleapi.CloseBody(res)
7135	if err := googleapi.CheckResponse(res); err != nil {
7136		return nil, err
7137	}
7138	ret := &DomainAliases{
7139		ServerResponse: googleapi.ServerResponse{
7140			Header:         res.Header,
7141			HTTPStatusCode: res.StatusCode,
7142		},
7143	}
7144	target := &ret
7145	if err := gensupport.DecodeResponse(target, res); err != nil {
7146		return nil, err
7147	}
7148	return ret, nil
7149	// {
7150	//   "description": "Lists the domain aliases of the customer.",
7151	//   "httpMethod": "GET",
7152	//   "id": "directory.domainAliases.list",
7153	//   "parameterOrder": [
7154	//     "customer"
7155	//   ],
7156	//   "parameters": {
7157	//     "customer": {
7158	//       "description": "Immutable ID of the G Suite account.",
7159	//       "location": "path",
7160	//       "required": true,
7161	//       "type": "string"
7162	//     },
7163	//     "parentDomainName": {
7164	//       "description": "Name of the parent domain for which domain aliases are to be fetched.",
7165	//       "location": "query",
7166	//       "type": "string"
7167	//     }
7168	//   },
7169	//   "path": "customer/{customer}/domainaliases",
7170	//   "response": {
7171	//     "$ref": "DomainAliases"
7172	//   },
7173	//   "scopes": [
7174	//     "https://www.googleapis.com/auth/admin.directory.domain",
7175	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
7176	//   ]
7177	// }
7178
7179}
7180
7181// method id "directory.domains.delete":
7182
7183type DomainsDeleteCall struct {
7184	s          *Service
7185	customer   string
7186	domainName string
7187	urlParams_ gensupport.URLParams
7188	ctx_       context.Context
7189	header_    http.Header
7190}
7191
7192// Delete: Deletes a domain of the customer.
7193func (r *DomainsService) Delete(customer string, domainName string) *DomainsDeleteCall {
7194	c := &DomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7195	c.customer = customer
7196	c.domainName = domainName
7197	return c
7198}
7199
7200// Fields allows partial responses to be retrieved. See
7201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7202// for more information.
7203func (c *DomainsDeleteCall) Fields(s ...googleapi.Field) *DomainsDeleteCall {
7204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7205	return c
7206}
7207
7208// Context sets the context to be used in this call's Do method. Any
7209// pending HTTP request will be aborted if the provided context is
7210// canceled.
7211func (c *DomainsDeleteCall) Context(ctx context.Context) *DomainsDeleteCall {
7212	c.ctx_ = ctx
7213	return c
7214}
7215
7216// Header returns an http.Header that can be modified by the caller to
7217// add HTTP headers to the request.
7218func (c *DomainsDeleteCall) Header() http.Header {
7219	if c.header_ == nil {
7220		c.header_ = make(http.Header)
7221	}
7222	return c.header_
7223}
7224
7225func (c *DomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
7226	reqHeaders := make(http.Header)
7227	for k, v := range c.header_ {
7228		reqHeaders[k] = v
7229	}
7230	reqHeaders.Set("User-Agent", c.s.userAgent())
7231	var body io.Reader = nil
7232	c.urlParams_.Set("alt", alt)
7233	c.urlParams_.Set("prettyPrint", "false")
7234	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains/{domainName}")
7235	urls += "?" + c.urlParams_.Encode()
7236	req, err := http.NewRequest("DELETE", urls, body)
7237	if err != nil {
7238		return nil, err
7239	}
7240	req.Header = reqHeaders
7241	googleapi.Expand(req.URL, map[string]string{
7242		"customer":   c.customer,
7243		"domainName": c.domainName,
7244	})
7245	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7246}
7247
7248// Do executes the "directory.domains.delete" call.
7249func (c *DomainsDeleteCall) Do(opts ...googleapi.CallOption) error {
7250	gensupport.SetOptions(c.urlParams_, opts...)
7251	res, err := c.doRequest("json")
7252	if err != nil {
7253		return err
7254	}
7255	defer googleapi.CloseBody(res)
7256	if err := googleapi.CheckResponse(res); err != nil {
7257		return err
7258	}
7259	return nil
7260	// {
7261	//   "description": "Deletes a domain of the customer.",
7262	//   "httpMethod": "DELETE",
7263	//   "id": "directory.domains.delete",
7264	//   "parameterOrder": [
7265	//     "customer",
7266	//     "domainName"
7267	//   ],
7268	//   "parameters": {
7269	//     "customer": {
7270	//       "description": "Immutable ID of the G Suite account.",
7271	//       "location": "path",
7272	//       "required": true,
7273	//       "type": "string"
7274	//     },
7275	//     "domainName": {
7276	//       "description": "Name of domain to be deleted",
7277	//       "location": "path",
7278	//       "required": true,
7279	//       "type": "string"
7280	//     }
7281	//   },
7282	//   "path": "customer/{customer}/domains/{domainName}",
7283	//   "scopes": [
7284	//     "https://www.googleapis.com/auth/admin.directory.domain"
7285	//   ]
7286	// }
7287
7288}
7289
7290// method id "directory.domains.get":
7291
7292type DomainsGetCall struct {
7293	s            *Service
7294	customer     string
7295	domainName   string
7296	urlParams_   gensupport.URLParams
7297	ifNoneMatch_ string
7298	ctx_         context.Context
7299	header_      http.Header
7300}
7301
7302// Get: Retrieves a domain of the customer.
7303func (r *DomainsService) Get(customer string, domainName string) *DomainsGetCall {
7304	c := &DomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7305	c.customer = customer
7306	c.domainName = domainName
7307	return c
7308}
7309
7310// Fields allows partial responses to be retrieved. See
7311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7312// for more information.
7313func (c *DomainsGetCall) Fields(s ...googleapi.Field) *DomainsGetCall {
7314	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7315	return c
7316}
7317
7318// IfNoneMatch sets the optional parameter which makes the operation
7319// fail if the object's ETag matches the given value. This is useful for
7320// getting updates only after the object has changed since the last
7321// request. Use googleapi.IsNotModified to check whether the response
7322// error from Do is the result of In-None-Match.
7323func (c *DomainsGetCall) IfNoneMatch(entityTag string) *DomainsGetCall {
7324	c.ifNoneMatch_ = entityTag
7325	return c
7326}
7327
7328// Context sets the context to be used in this call's Do method. Any
7329// pending HTTP request will be aborted if the provided context is
7330// canceled.
7331func (c *DomainsGetCall) Context(ctx context.Context) *DomainsGetCall {
7332	c.ctx_ = ctx
7333	return c
7334}
7335
7336// Header returns an http.Header that can be modified by the caller to
7337// add HTTP headers to the request.
7338func (c *DomainsGetCall) Header() http.Header {
7339	if c.header_ == nil {
7340		c.header_ = make(http.Header)
7341	}
7342	return c.header_
7343}
7344
7345func (c *DomainsGetCall) doRequest(alt string) (*http.Response, error) {
7346	reqHeaders := make(http.Header)
7347	for k, v := range c.header_ {
7348		reqHeaders[k] = v
7349	}
7350	reqHeaders.Set("User-Agent", c.s.userAgent())
7351	if c.ifNoneMatch_ != "" {
7352		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7353	}
7354	var body io.Reader = nil
7355	c.urlParams_.Set("alt", alt)
7356	c.urlParams_.Set("prettyPrint", "false")
7357	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains/{domainName}")
7358	urls += "?" + c.urlParams_.Encode()
7359	req, err := http.NewRequest("GET", urls, body)
7360	if err != nil {
7361		return nil, err
7362	}
7363	req.Header = reqHeaders
7364	googleapi.Expand(req.URL, map[string]string{
7365		"customer":   c.customer,
7366		"domainName": c.domainName,
7367	})
7368	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7369}
7370
7371// Do executes the "directory.domains.get" call.
7372// Exactly one of *Domains or error will be non-nil. Any non-2xx status
7373// code is an error. Response headers are in either
7374// *Domains.ServerResponse.Header or (if a response was returned at all)
7375// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7376// check whether the returned error was because http.StatusNotModified
7377// was returned.
7378func (c *DomainsGetCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
7379	gensupport.SetOptions(c.urlParams_, opts...)
7380	res, err := c.doRequest("json")
7381	if res != nil && res.StatusCode == http.StatusNotModified {
7382		if res.Body != nil {
7383			res.Body.Close()
7384		}
7385		return nil, &googleapi.Error{
7386			Code:   res.StatusCode,
7387			Header: res.Header,
7388		}
7389	}
7390	if err != nil {
7391		return nil, err
7392	}
7393	defer googleapi.CloseBody(res)
7394	if err := googleapi.CheckResponse(res); err != nil {
7395		return nil, err
7396	}
7397	ret := &Domains{
7398		ServerResponse: googleapi.ServerResponse{
7399			Header:         res.Header,
7400			HTTPStatusCode: res.StatusCode,
7401		},
7402	}
7403	target := &ret
7404	if err := gensupport.DecodeResponse(target, res); err != nil {
7405		return nil, err
7406	}
7407	return ret, nil
7408	// {
7409	//   "description": "Retrieves a domain of the customer.",
7410	//   "httpMethod": "GET",
7411	//   "id": "directory.domains.get",
7412	//   "parameterOrder": [
7413	//     "customer",
7414	//     "domainName"
7415	//   ],
7416	//   "parameters": {
7417	//     "customer": {
7418	//       "description": "Immutable ID of the G Suite account.",
7419	//       "location": "path",
7420	//       "required": true,
7421	//       "type": "string"
7422	//     },
7423	//     "domainName": {
7424	//       "description": "Name of domain to be retrieved",
7425	//       "location": "path",
7426	//       "required": true,
7427	//       "type": "string"
7428	//     }
7429	//   },
7430	//   "path": "customer/{customer}/domains/{domainName}",
7431	//   "response": {
7432	//     "$ref": "Domains"
7433	//   },
7434	//   "scopes": [
7435	//     "https://www.googleapis.com/auth/admin.directory.domain",
7436	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
7437	//   ]
7438	// }
7439
7440}
7441
7442// method id "directory.domains.insert":
7443
7444type DomainsInsertCall struct {
7445	s          *Service
7446	customer   string
7447	domains    *Domains
7448	urlParams_ gensupport.URLParams
7449	ctx_       context.Context
7450	header_    http.Header
7451}
7452
7453// Insert: Inserts a domain of the customer.
7454func (r *DomainsService) Insert(customer string, domains *Domains) *DomainsInsertCall {
7455	c := &DomainsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7456	c.customer = customer
7457	c.domains = domains
7458	return c
7459}
7460
7461// Fields allows partial responses to be retrieved. See
7462// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7463// for more information.
7464func (c *DomainsInsertCall) Fields(s ...googleapi.Field) *DomainsInsertCall {
7465	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7466	return c
7467}
7468
7469// Context sets the context to be used in this call's Do method. Any
7470// pending HTTP request will be aborted if the provided context is
7471// canceled.
7472func (c *DomainsInsertCall) Context(ctx context.Context) *DomainsInsertCall {
7473	c.ctx_ = ctx
7474	return c
7475}
7476
7477// Header returns an http.Header that can be modified by the caller to
7478// add HTTP headers to the request.
7479func (c *DomainsInsertCall) Header() http.Header {
7480	if c.header_ == nil {
7481		c.header_ = make(http.Header)
7482	}
7483	return c.header_
7484}
7485
7486func (c *DomainsInsertCall) doRequest(alt string) (*http.Response, error) {
7487	reqHeaders := make(http.Header)
7488	for k, v := range c.header_ {
7489		reqHeaders[k] = v
7490	}
7491	reqHeaders.Set("User-Agent", c.s.userAgent())
7492	var body io.Reader = nil
7493	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domains)
7494	if err != nil {
7495		return nil, err
7496	}
7497	reqHeaders.Set("Content-Type", "application/json")
7498	c.urlParams_.Set("alt", alt)
7499	c.urlParams_.Set("prettyPrint", "false")
7500	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains")
7501	urls += "?" + c.urlParams_.Encode()
7502	req, err := http.NewRequest("POST", urls, body)
7503	if err != nil {
7504		return nil, err
7505	}
7506	req.Header = reqHeaders
7507	googleapi.Expand(req.URL, map[string]string{
7508		"customer": c.customer,
7509	})
7510	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7511}
7512
7513// Do executes the "directory.domains.insert" call.
7514// Exactly one of *Domains or error will be non-nil. Any non-2xx status
7515// code is an error. Response headers are in either
7516// *Domains.ServerResponse.Header or (if a response was returned at all)
7517// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7518// check whether the returned error was because http.StatusNotModified
7519// was returned.
7520func (c *DomainsInsertCall) Do(opts ...googleapi.CallOption) (*Domains, error) {
7521	gensupport.SetOptions(c.urlParams_, opts...)
7522	res, err := c.doRequest("json")
7523	if res != nil && res.StatusCode == http.StatusNotModified {
7524		if res.Body != nil {
7525			res.Body.Close()
7526		}
7527		return nil, &googleapi.Error{
7528			Code:   res.StatusCode,
7529			Header: res.Header,
7530		}
7531	}
7532	if err != nil {
7533		return nil, err
7534	}
7535	defer googleapi.CloseBody(res)
7536	if err := googleapi.CheckResponse(res); err != nil {
7537		return nil, err
7538	}
7539	ret := &Domains{
7540		ServerResponse: googleapi.ServerResponse{
7541			Header:         res.Header,
7542			HTTPStatusCode: res.StatusCode,
7543		},
7544	}
7545	target := &ret
7546	if err := gensupport.DecodeResponse(target, res); err != nil {
7547		return nil, err
7548	}
7549	return ret, nil
7550	// {
7551	//   "description": "Inserts a domain of the customer.",
7552	//   "httpMethod": "POST",
7553	//   "id": "directory.domains.insert",
7554	//   "parameterOrder": [
7555	//     "customer"
7556	//   ],
7557	//   "parameters": {
7558	//     "customer": {
7559	//       "description": "Immutable ID of the G Suite account.",
7560	//       "location": "path",
7561	//       "required": true,
7562	//       "type": "string"
7563	//     }
7564	//   },
7565	//   "path": "customer/{customer}/domains",
7566	//   "request": {
7567	//     "$ref": "Domains"
7568	//   },
7569	//   "response": {
7570	//     "$ref": "Domains"
7571	//   },
7572	//   "scopes": [
7573	//     "https://www.googleapis.com/auth/admin.directory.domain"
7574	//   ]
7575	// }
7576
7577}
7578
7579// method id "directory.domains.list":
7580
7581type DomainsListCall struct {
7582	s            *Service
7583	customer     string
7584	urlParams_   gensupport.URLParams
7585	ifNoneMatch_ string
7586	ctx_         context.Context
7587	header_      http.Header
7588}
7589
7590// List: Lists the domains of the customer.
7591func (r *DomainsService) List(customer string) *DomainsListCall {
7592	c := &DomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7593	c.customer = customer
7594	return c
7595}
7596
7597// Fields allows partial responses to be retrieved. See
7598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7599// for more information.
7600func (c *DomainsListCall) Fields(s ...googleapi.Field) *DomainsListCall {
7601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7602	return c
7603}
7604
7605// IfNoneMatch sets the optional parameter which makes the operation
7606// fail if the object's ETag matches the given value. This is useful for
7607// getting updates only after the object has changed since the last
7608// request. Use googleapi.IsNotModified to check whether the response
7609// error from Do is the result of In-None-Match.
7610func (c *DomainsListCall) IfNoneMatch(entityTag string) *DomainsListCall {
7611	c.ifNoneMatch_ = entityTag
7612	return c
7613}
7614
7615// Context sets the context to be used in this call's Do method. Any
7616// pending HTTP request will be aborted if the provided context is
7617// canceled.
7618func (c *DomainsListCall) Context(ctx context.Context) *DomainsListCall {
7619	c.ctx_ = ctx
7620	return c
7621}
7622
7623// Header returns an http.Header that can be modified by the caller to
7624// add HTTP headers to the request.
7625func (c *DomainsListCall) Header() http.Header {
7626	if c.header_ == nil {
7627		c.header_ = make(http.Header)
7628	}
7629	return c.header_
7630}
7631
7632func (c *DomainsListCall) doRequest(alt string) (*http.Response, error) {
7633	reqHeaders := make(http.Header)
7634	for k, v := range c.header_ {
7635		reqHeaders[k] = v
7636	}
7637	reqHeaders.Set("User-Agent", c.s.userAgent())
7638	if c.ifNoneMatch_ != "" {
7639		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7640	}
7641	var body io.Reader = nil
7642	c.urlParams_.Set("alt", alt)
7643	c.urlParams_.Set("prettyPrint", "false")
7644	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/domains")
7645	urls += "?" + c.urlParams_.Encode()
7646	req, err := http.NewRequest("GET", urls, body)
7647	if err != nil {
7648		return nil, err
7649	}
7650	req.Header = reqHeaders
7651	googleapi.Expand(req.URL, map[string]string{
7652		"customer": c.customer,
7653	})
7654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7655}
7656
7657// Do executes the "directory.domains.list" call.
7658// Exactly one of *Domains2 or error will be non-nil. Any non-2xx status
7659// code is an error. Response headers are in either
7660// *Domains2.ServerResponse.Header or (if a response was returned at
7661// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7662// to check whether the returned error was because
7663// http.StatusNotModified was returned.
7664func (c *DomainsListCall) Do(opts ...googleapi.CallOption) (*Domains2, error) {
7665	gensupport.SetOptions(c.urlParams_, opts...)
7666	res, err := c.doRequest("json")
7667	if res != nil && res.StatusCode == http.StatusNotModified {
7668		if res.Body != nil {
7669			res.Body.Close()
7670		}
7671		return nil, &googleapi.Error{
7672			Code:   res.StatusCode,
7673			Header: res.Header,
7674		}
7675	}
7676	if err != nil {
7677		return nil, err
7678	}
7679	defer googleapi.CloseBody(res)
7680	if err := googleapi.CheckResponse(res); err != nil {
7681		return nil, err
7682	}
7683	ret := &Domains2{
7684		ServerResponse: googleapi.ServerResponse{
7685			Header:         res.Header,
7686			HTTPStatusCode: res.StatusCode,
7687		},
7688	}
7689	target := &ret
7690	if err := gensupport.DecodeResponse(target, res); err != nil {
7691		return nil, err
7692	}
7693	return ret, nil
7694	// {
7695	//   "description": "Lists the domains of the customer.",
7696	//   "httpMethod": "GET",
7697	//   "id": "directory.domains.list",
7698	//   "parameterOrder": [
7699	//     "customer"
7700	//   ],
7701	//   "parameters": {
7702	//     "customer": {
7703	//       "description": "Immutable ID of the G Suite account.",
7704	//       "location": "path",
7705	//       "required": true,
7706	//       "type": "string"
7707	//     }
7708	//   },
7709	//   "path": "customer/{customer}/domains",
7710	//   "response": {
7711	//     "$ref": "Domains2"
7712	//   },
7713	//   "scopes": [
7714	//     "https://www.googleapis.com/auth/admin.directory.domain",
7715	//     "https://www.googleapis.com/auth/admin.directory.domain.readonly"
7716	//   ]
7717	// }
7718
7719}
7720
7721// method id "directory.groups.delete":
7722
7723type GroupsDeleteCall struct {
7724	s          *Service
7725	groupKey   string
7726	urlParams_ gensupport.URLParams
7727	ctx_       context.Context
7728	header_    http.Header
7729}
7730
7731// Delete: Delete Group
7732func (r *GroupsService) Delete(groupKey string) *GroupsDeleteCall {
7733	c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7734	c.groupKey = groupKey
7735	return c
7736}
7737
7738// Fields allows partial responses to be retrieved. See
7739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7740// for more information.
7741func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall {
7742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7743	return c
7744}
7745
7746// Context sets the context to be used in this call's Do method. Any
7747// pending HTTP request will be aborted if the provided context is
7748// canceled.
7749func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
7750	c.ctx_ = ctx
7751	return c
7752}
7753
7754// Header returns an http.Header that can be modified by the caller to
7755// add HTTP headers to the request.
7756func (c *GroupsDeleteCall) Header() http.Header {
7757	if c.header_ == nil {
7758		c.header_ = make(http.Header)
7759	}
7760	return c.header_
7761}
7762
7763func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
7764	reqHeaders := make(http.Header)
7765	for k, v := range c.header_ {
7766		reqHeaders[k] = v
7767	}
7768	reqHeaders.Set("User-Agent", c.s.userAgent())
7769	var body io.Reader = nil
7770	c.urlParams_.Set("alt", alt)
7771	c.urlParams_.Set("prettyPrint", "false")
7772	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}")
7773	urls += "?" + c.urlParams_.Encode()
7774	req, err := http.NewRequest("DELETE", urls, body)
7775	if err != nil {
7776		return nil, err
7777	}
7778	req.Header = reqHeaders
7779	googleapi.Expand(req.URL, map[string]string{
7780		"groupKey": c.groupKey,
7781	})
7782	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7783}
7784
7785// Do executes the "directory.groups.delete" call.
7786func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
7787	gensupport.SetOptions(c.urlParams_, opts...)
7788	res, err := c.doRequest("json")
7789	if err != nil {
7790		return err
7791	}
7792	defer googleapi.CloseBody(res)
7793	if err := googleapi.CheckResponse(res); err != nil {
7794		return err
7795	}
7796	return nil
7797	// {
7798	//   "description": "Delete Group",
7799	//   "httpMethod": "DELETE",
7800	//   "id": "directory.groups.delete",
7801	//   "parameterOrder": [
7802	//     "groupKey"
7803	//   ],
7804	//   "parameters": {
7805	//     "groupKey": {
7806	//       "description": "Email or immutable ID of the group",
7807	//       "location": "path",
7808	//       "required": true,
7809	//       "type": "string"
7810	//     }
7811	//   },
7812	//   "path": "groups/{groupKey}",
7813	//   "scopes": [
7814	//     "https://www.googleapis.com/auth/admin.directory.group"
7815	//   ]
7816	// }
7817
7818}
7819
7820// method id "directory.groups.get":
7821
7822type GroupsGetCall struct {
7823	s            *Service
7824	groupKey     string
7825	urlParams_   gensupport.URLParams
7826	ifNoneMatch_ string
7827	ctx_         context.Context
7828	header_      http.Header
7829}
7830
7831// Get: Retrieve Group
7832func (r *GroupsService) Get(groupKey string) *GroupsGetCall {
7833	c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7834	c.groupKey = groupKey
7835	return c
7836}
7837
7838// Fields allows partial responses to be retrieved. See
7839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7840// for more information.
7841func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
7842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7843	return c
7844}
7845
7846// IfNoneMatch sets the optional parameter which makes the operation
7847// fail if the object's ETag matches the given value. This is useful for
7848// getting updates only after the object has changed since the last
7849// request. Use googleapi.IsNotModified to check whether the response
7850// error from Do is the result of In-None-Match.
7851func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
7852	c.ifNoneMatch_ = entityTag
7853	return c
7854}
7855
7856// Context sets the context to be used in this call's Do method. Any
7857// pending HTTP request will be aborted if the provided context is
7858// canceled.
7859func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
7860	c.ctx_ = ctx
7861	return c
7862}
7863
7864// Header returns an http.Header that can be modified by the caller to
7865// add HTTP headers to the request.
7866func (c *GroupsGetCall) Header() http.Header {
7867	if c.header_ == nil {
7868		c.header_ = make(http.Header)
7869	}
7870	return c.header_
7871}
7872
7873func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
7874	reqHeaders := make(http.Header)
7875	for k, v := range c.header_ {
7876		reqHeaders[k] = v
7877	}
7878	reqHeaders.Set("User-Agent", c.s.userAgent())
7879	if c.ifNoneMatch_ != "" {
7880		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7881	}
7882	var body io.Reader = nil
7883	c.urlParams_.Set("alt", alt)
7884	c.urlParams_.Set("prettyPrint", "false")
7885	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}")
7886	urls += "?" + c.urlParams_.Encode()
7887	req, err := http.NewRequest("GET", urls, body)
7888	if err != nil {
7889		return nil, err
7890	}
7891	req.Header = reqHeaders
7892	googleapi.Expand(req.URL, map[string]string{
7893		"groupKey": c.groupKey,
7894	})
7895	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7896}
7897
7898// Do executes the "directory.groups.get" call.
7899// Exactly one of *Group or error will be non-nil. Any non-2xx status
7900// code is an error. Response headers are in either
7901// *Group.ServerResponse.Header or (if a response was returned at all)
7902// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7903// check whether the returned error was because http.StatusNotModified
7904// was returned.
7905func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
7906	gensupport.SetOptions(c.urlParams_, opts...)
7907	res, err := c.doRequest("json")
7908	if res != nil && res.StatusCode == http.StatusNotModified {
7909		if res.Body != nil {
7910			res.Body.Close()
7911		}
7912		return nil, &googleapi.Error{
7913			Code:   res.StatusCode,
7914			Header: res.Header,
7915		}
7916	}
7917	if err != nil {
7918		return nil, err
7919	}
7920	defer googleapi.CloseBody(res)
7921	if err := googleapi.CheckResponse(res); err != nil {
7922		return nil, err
7923	}
7924	ret := &Group{
7925		ServerResponse: googleapi.ServerResponse{
7926			Header:         res.Header,
7927			HTTPStatusCode: res.StatusCode,
7928		},
7929	}
7930	target := &ret
7931	if err := gensupport.DecodeResponse(target, res); err != nil {
7932		return nil, err
7933	}
7934	return ret, nil
7935	// {
7936	//   "description": "Retrieve Group",
7937	//   "httpMethod": "GET",
7938	//   "id": "directory.groups.get",
7939	//   "parameterOrder": [
7940	//     "groupKey"
7941	//   ],
7942	//   "parameters": {
7943	//     "groupKey": {
7944	//       "description": "Email or immutable ID of the group",
7945	//       "location": "path",
7946	//       "required": true,
7947	//       "type": "string"
7948	//     }
7949	//   },
7950	//   "path": "groups/{groupKey}",
7951	//   "response": {
7952	//     "$ref": "Group"
7953	//   },
7954	//   "scopes": [
7955	//     "https://www.googleapis.com/auth/admin.directory.group",
7956	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
7957	//   ]
7958	// }
7959
7960}
7961
7962// method id "directory.groups.insert":
7963
7964type GroupsInsertCall struct {
7965	s          *Service
7966	group      *Group
7967	urlParams_ gensupport.URLParams
7968	ctx_       context.Context
7969	header_    http.Header
7970}
7971
7972// Insert: Create Group
7973func (r *GroupsService) Insert(group *Group) *GroupsInsertCall {
7974	c := &GroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7975	c.group = group
7976	return c
7977}
7978
7979// Fields allows partial responses to be retrieved. See
7980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7981// for more information.
7982func (c *GroupsInsertCall) Fields(s ...googleapi.Field) *GroupsInsertCall {
7983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7984	return c
7985}
7986
7987// Context sets the context to be used in this call's Do method. Any
7988// pending HTTP request will be aborted if the provided context is
7989// canceled.
7990func (c *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
7991	c.ctx_ = ctx
7992	return c
7993}
7994
7995// Header returns an http.Header that can be modified by the caller to
7996// add HTTP headers to the request.
7997func (c *GroupsInsertCall) Header() http.Header {
7998	if c.header_ == nil {
7999		c.header_ = make(http.Header)
8000	}
8001	return c.header_
8002}
8003
8004func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
8005	reqHeaders := make(http.Header)
8006	for k, v := range c.header_ {
8007		reqHeaders[k] = v
8008	}
8009	reqHeaders.Set("User-Agent", c.s.userAgent())
8010	var body io.Reader = nil
8011	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
8012	if err != nil {
8013		return nil, err
8014	}
8015	reqHeaders.Set("Content-Type", "application/json")
8016	c.urlParams_.Set("alt", alt)
8017	c.urlParams_.Set("prettyPrint", "false")
8018	urls := googleapi.ResolveRelative(c.s.BasePath, "groups")
8019	urls += "?" + c.urlParams_.Encode()
8020	req, err := http.NewRequest("POST", urls, body)
8021	if err != nil {
8022		return nil, err
8023	}
8024	req.Header = reqHeaders
8025	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8026}
8027
8028// Do executes the "directory.groups.insert" call.
8029// Exactly one of *Group or error will be non-nil. Any non-2xx status
8030// code is an error. Response headers are in either
8031// *Group.ServerResponse.Header or (if a response was returned at all)
8032// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8033// check whether the returned error was because http.StatusNotModified
8034// was returned.
8035func (c *GroupsInsertCall) Do(opts ...googleapi.CallOption) (*Group, error) {
8036	gensupport.SetOptions(c.urlParams_, opts...)
8037	res, err := c.doRequest("json")
8038	if res != nil && res.StatusCode == http.StatusNotModified {
8039		if res.Body != nil {
8040			res.Body.Close()
8041		}
8042		return nil, &googleapi.Error{
8043			Code:   res.StatusCode,
8044			Header: res.Header,
8045		}
8046	}
8047	if err != nil {
8048		return nil, err
8049	}
8050	defer googleapi.CloseBody(res)
8051	if err := googleapi.CheckResponse(res); err != nil {
8052		return nil, err
8053	}
8054	ret := &Group{
8055		ServerResponse: googleapi.ServerResponse{
8056			Header:         res.Header,
8057			HTTPStatusCode: res.StatusCode,
8058		},
8059	}
8060	target := &ret
8061	if err := gensupport.DecodeResponse(target, res); err != nil {
8062		return nil, err
8063	}
8064	return ret, nil
8065	// {
8066	//   "description": "Create Group",
8067	//   "httpMethod": "POST",
8068	//   "id": "directory.groups.insert",
8069	//   "path": "groups",
8070	//   "request": {
8071	//     "$ref": "Group"
8072	//   },
8073	//   "response": {
8074	//     "$ref": "Group"
8075	//   },
8076	//   "scopes": [
8077	//     "https://www.googleapis.com/auth/admin.directory.group"
8078	//   ]
8079	// }
8080
8081}
8082
8083// method id "directory.groups.list":
8084
8085type GroupsListCall struct {
8086	s            *Service
8087	urlParams_   gensupport.URLParams
8088	ifNoneMatch_ string
8089	ctx_         context.Context
8090	header_      http.Header
8091}
8092
8093// List: Retrieve all groups of a domain or of a user given a userKey
8094// (paginated)
8095func (r *GroupsService) List() *GroupsListCall {
8096	c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8097	return c
8098}
8099
8100// Customer sets the optional parameter "customer": Immutable ID of the
8101// G Suite account. In case of multi-domain, to fetch all groups for a
8102// customer, fill this field instead of domain.
8103func (c *GroupsListCall) Customer(customer string) *GroupsListCall {
8104	c.urlParams_.Set("customer", customer)
8105	return c
8106}
8107
8108// Domain sets the optional parameter "domain": Name of the domain. Fill
8109// this field to get groups from only this domain. To return all groups
8110// in a multi-domain fill customer field instead.
8111func (c *GroupsListCall) Domain(domain string) *GroupsListCall {
8112	c.urlParams_.Set("domain", domain)
8113	return c
8114}
8115
8116// MaxResults sets the optional parameter "maxResults": Maximum number
8117// of results to return. Default is 200
8118func (c *GroupsListCall) MaxResults(maxResults int64) *GroupsListCall {
8119	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8120	return c
8121}
8122
8123// OrderBy sets the optional parameter "orderBy": Column to use for
8124// sorting results
8125//
8126// Possible values:
8127//   "email" - Email of the group.
8128func (c *GroupsListCall) OrderBy(orderBy string) *GroupsListCall {
8129	c.urlParams_.Set("orderBy", orderBy)
8130	return c
8131}
8132
8133// PageToken sets the optional parameter "pageToken": Token to specify
8134// next page in the list
8135func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall {
8136	c.urlParams_.Set("pageToken", pageToken)
8137	return c
8138}
8139
8140// Query sets the optional parameter "query": Query string search.
8141// Should be of the form "". Complete documentation is at
8142// https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
8143func (c *GroupsListCall) Query(query string) *GroupsListCall {
8144	c.urlParams_.Set("query", query)
8145	return c
8146}
8147
8148// SortOrder sets the optional parameter "sortOrder": Whether to return
8149// results in ascending or descending order. Only of use when orderBy is
8150// also used
8151//
8152// Possible values:
8153//   "ASCENDING" - Ascending order.
8154//   "DESCENDING" - Descending order.
8155func (c *GroupsListCall) SortOrder(sortOrder string) *GroupsListCall {
8156	c.urlParams_.Set("sortOrder", sortOrder)
8157	return c
8158}
8159
8160// UserKey sets the optional parameter "userKey": Email or immutable Id
8161// of the user if only those groups are to be listed, the given user is
8162// a member of. If Id, it should match with id of user object
8163func (c *GroupsListCall) UserKey(userKey string) *GroupsListCall {
8164	c.urlParams_.Set("userKey", userKey)
8165	return c
8166}
8167
8168// Fields allows partial responses to be retrieved. See
8169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8170// for more information.
8171func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall {
8172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8173	return c
8174}
8175
8176// IfNoneMatch sets the optional parameter which makes the operation
8177// fail if the object's ETag matches the given value. This is useful for
8178// getting updates only after the object has changed since the last
8179// request. Use googleapi.IsNotModified to check whether the response
8180// error from Do is the result of In-None-Match.
8181func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall {
8182	c.ifNoneMatch_ = entityTag
8183	return c
8184}
8185
8186// Context sets the context to be used in this call's Do method. Any
8187// pending HTTP request will be aborted if the provided context is
8188// canceled.
8189func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
8190	c.ctx_ = ctx
8191	return c
8192}
8193
8194// Header returns an http.Header that can be modified by the caller to
8195// add HTTP headers to the request.
8196func (c *GroupsListCall) Header() http.Header {
8197	if c.header_ == nil {
8198		c.header_ = make(http.Header)
8199	}
8200	return c.header_
8201}
8202
8203func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
8204	reqHeaders := make(http.Header)
8205	for k, v := range c.header_ {
8206		reqHeaders[k] = v
8207	}
8208	reqHeaders.Set("User-Agent", c.s.userAgent())
8209	if c.ifNoneMatch_ != "" {
8210		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8211	}
8212	var body io.Reader = nil
8213	c.urlParams_.Set("alt", alt)
8214	c.urlParams_.Set("prettyPrint", "false")
8215	urls := googleapi.ResolveRelative(c.s.BasePath, "groups")
8216	urls += "?" + c.urlParams_.Encode()
8217	req, err := http.NewRequest("GET", urls, body)
8218	if err != nil {
8219		return nil, err
8220	}
8221	req.Header = reqHeaders
8222	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8223}
8224
8225// Do executes the "directory.groups.list" call.
8226// Exactly one of *Groups or error will be non-nil. Any non-2xx status
8227// code is an error. Response headers are in either
8228// *Groups.ServerResponse.Header or (if a response was returned at all)
8229// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8230// check whether the returned error was because http.StatusNotModified
8231// was returned.
8232func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
8233	gensupport.SetOptions(c.urlParams_, opts...)
8234	res, err := c.doRequest("json")
8235	if res != nil && res.StatusCode == http.StatusNotModified {
8236		if res.Body != nil {
8237			res.Body.Close()
8238		}
8239		return nil, &googleapi.Error{
8240			Code:   res.StatusCode,
8241			Header: res.Header,
8242		}
8243	}
8244	if err != nil {
8245		return nil, err
8246	}
8247	defer googleapi.CloseBody(res)
8248	if err := googleapi.CheckResponse(res); err != nil {
8249		return nil, err
8250	}
8251	ret := &Groups{
8252		ServerResponse: googleapi.ServerResponse{
8253			Header:         res.Header,
8254			HTTPStatusCode: res.StatusCode,
8255		},
8256	}
8257	target := &ret
8258	if err := gensupport.DecodeResponse(target, res); err != nil {
8259		return nil, err
8260	}
8261	return ret, nil
8262	// {
8263	//   "description": "Retrieve all groups of a domain or of a user given a userKey (paginated)",
8264	//   "httpMethod": "GET",
8265	//   "id": "directory.groups.list",
8266	//   "parameters": {
8267	//     "customer": {
8268	//       "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.",
8269	//       "location": "query",
8270	//       "type": "string"
8271	//     },
8272	//     "domain": {
8273	//       "description": "Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.",
8274	//       "location": "query",
8275	//       "type": "string"
8276	//     },
8277	//     "maxResults": {
8278	//       "description": "Maximum number of results to return. Default is 200",
8279	//       "format": "int32",
8280	//       "location": "query",
8281	//       "minimum": "1",
8282	//       "type": "integer"
8283	//     },
8284	//     "orderBy": {
8285	//       "description": "Column to use for sorting results",
8286	//       "enum": [
8287	//         "email"
8288	//       ],
8289	//       "enumDescriptions": [
8290	//         "Email of the group."
8291	//       ],
8292	//       "location": "query",
8293	//       "type": "string"
8294	//     },
8295	//     "pageToken": {
8296	//       "description": "Token to specify next page in the list",
8297	//       "location": "query",
8298	//       "type": "string"
8299	//     },
8300	//     "query": {
8301	//       "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups",
8302	//       "location": "query",
8303	//       "type": "string"
8304	//     },
8305	//     "sortOrder": {
8306	//       "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used",
8307	//       "enum": [
8308	//         "ASCENDING",
8309	//         "DESCENDING"
8310	//       ],
8311	//       "enumDescriptions": [
8312	//         "Ascending order.",
8313	//         "Descending order."
8314	//       ],
8315	//       "location": "query",
8316	//       "type": "string"
8317	//     },
8318	//     "userKey": {
8319	//       "description": "Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object",
8320	//       "location": "query",
8321	//       "type": "string"
8322	//     }
8323	//   },
8324	//   "path": "groups",
8325	//   "response": {
8326	//     "$ref": "Groups"
8327	//   },
8328	//   "scopes": [
8329	//     "https://www.googleapis.com/auth/admin.directory.group",
8330	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
8331	//   ]
8332	// }
8333
8334}
8335
8336// Pages invokes f for each page of results.
8337// A non-nil error returned from f will halt the iteration.
8338// The provided context supersedes any context provided to the Context method.
8339func (c *GroupsListCall) Pages(ctx context.Context, f func(*Groups) error) error {
8340	c.ctx_ = ctx
8341	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8342	for {
8343		x, err := c.Do()
8344		if err != nil {
8345			return err
8346		}
8347		if err := f(x); err != nil {
8348			return err
8349		}
8350		if x.NextPageToken == "" {
8351			return nil
8352		}
8353		c.PageToken(x.NextPageToken)
8354	}
8355}
8356
8357// method id "directory.groups.patch":
8358
8359type GroupsPatchCall struct {
8360	s          *Service
8361	groupKey   string
8362	group      *Group
8363	urlParams_ gensupport.URLParams
8364	ctx_       context.Context
8365	header_    http.Header
8366}
8367
8368// Patch: Update Group. This method supports patch semantics.
8369func (r *GroupsService) Patch(groupKey string, group *Group) *GroupsPatchCall {
8370	c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8371	c.groupKey = groupKey
8372	c.group = group
8373	return c
8374}
8375
8376// Fields allows partial responses to be retrieved. See
8377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8378// for more information.
8379func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
8380	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8381	return c
8382}
8383
8384// Context sets the context to be used in this call's Do method. Any
8385// pending HTTP request will be aborted if the provided context is
8386// canceled.
8387func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
8388	c.ctx_ = ctx
8389	return c
8390}
8391
8392// Header returns an http.Header that can be modified by the caller to
8393// add HTTP headers to the request.
8394func (c *GroupsPatchCall) Header() http.Header {
8395	if c.header_ == nil {
8396		c.header_ = make(http.Header)
8397	}
8398	return c.header_
8399}
8400
8401func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
8402	reqHeaders := make(http.Header)
8403	for k, v := range c.header_ {
8404		reqHeaders[k] = v
8405	}
8406	reqHeaders.Set("User-Agent", c.s.userAgent())
8407	var body io.Reader = nil
8408	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
8409	if err != nil {
8410		return nil, err
8411	}
8412	reqHeaders.Set("Content-Type", "application/json")
8413	c.urlParams_.Set("alt", alt)
8414	c.urlParams_.Set("prettyPrint", "false")
8415	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}")
8416	urls += "?" + c.urlParams_.Encode()
8417	req, err := http.NewRequest("PATCH", urls, body)
8418	if err != nil {
8419		return nil, err
8420	}
8421	req.Header = reqHeaders
8422	googleapi.Expand(req.URL, map[string]string{
8423		"groupKey": c.groupKey,
8424	})
8425	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8426}
8427
8428// Do executes the "directory.groups.patch" call.
8429// Exactly one of *Group or error will be non-nil. Any non-2xx status
8430// code is an error. Response headers are in either
8431// *Group.ServerResponse.Header or (if a response was returned at all)
8432// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8433// check whether the returned error was because http.StatusNotModified
8434// was returned.
8435func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Group, error) {
8436	gensupport.SetOptions(c.urlParams_, opts...)
8437	res, err := c.doRequest("json")
8438	if res != nil && res.StatusCode == http.StatusNotModified {
8439		if res.Body != nil {
8440			res.Body.Close()
8441		}
8442		return nil, &googleapi.Error{
8443			Code:   res.StatusCode,
8444			Header: res.Header,
8445		}
8446	}
8447	if err != nil {
8448		return nil, err
8449	}
8450	defer googleapi.CloseBody(res)
8451	if err := googleapi.CheckResponse(res); err != nil {
8452		return nil, err
8453	}
8454	ret := &Group{
8455		ServerResponse: googleapi.ServerResponse{
8456			Header:         res.Header,
8457			HTTPStatusCode: res.StatusCode,
8458		},
8459	}
8460	target := &ret
8461	if err := gensupport.DecodeResponse(target, res); err != nil {
8462		return nil, err
8463	}
8464	return ret, nil
8465	// {
8466	//   "description": "Update Group. This method supports patch semantics.",
8467	//   "httpMethod": "PATCH",
8468	//   "id": "directory.groups.patch",
8469	//   "parameterOrder": [
8470	//     "groupKey"
8471	//   ],
8472	//   "parameters": {
8473	//     "groupKey": {
8474	//       "description": "Email or immutable ID of the group. If ID, it should match with id of group object",
8475	//       "location": "path",
8476	//       "required": true,
8477	//       "type": "string"
8478	//     }
8479	//   },
8480	//   "path": "groups/{groupKey}",
8481	//   "request": {
8482	//     "$ref": "Group"
8483	//   },
8484	//   "response": {
8485	//     "$ref": "Group"
8486	//   },
8487	//   "scopes": [
8488	//     "https://www.googleapis.com/auth/admin.directory.group"
8489	//   ]
8490	// }
8491
8492}
8493
8494// method id "directory.groups.update":
8495
8496type GroupsUpdateCall struct {
8497	s          *Service
8498	groupKey   string
8499	group      *Group
8500	urlParams_ gensupport.URLParams
8501	ctx_       context.Context
8502	header_    http.Header
8503}
8504
8505// Update: Update Group
8506func (r *GroupsService) Update(groupKey string, group *Group) *GroupsUpdateCall {
8507	c := &GroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8508	c.groupKey = groupKey
8509	c.group = group
8510	return c
8511}
8512
8513// Fields allows partial responses to be retrieved. See
8514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8515// for more information.
8516func (c *GroupsUpdateCall) Fields(s ...googleapi.Field) *GroupsUpdateCall {
8517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8518	return c
8519}
8520
8521// Context sets the context to be used in this call's Do method. Any
8522// pending HTTP request will be aborted if the provided context is
8523// canceled.
8524func (c *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
8525	c.ctx_ = ctx
8526	return c
8527}
8528
8529// Header returns an http.Header that can be modified by the caller to
8530// add HTTP headers to the request.
8531func (c *GroupsUpdateCall) Header() http.Header {
8532	if c.header_ == nil {
8533		c.header_ = make(http.Header)
8534	}
8535	return c.header_
8536}
8537
8538func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
8539	reqHeaders := make(http.Header)
8540	for k, v := range c.header_ {
8541		reqHeaders[k] = v
8542	}
8543	reqHeaders.Set("User-Agent", c.s.userAgent())
8544	var body io.Reader = nil
8545	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
8546	if err != nil {
8547		return nil, err
8548	}
8549	reqHeaders.Set("Content-Type", "application/json")
8550	c.urlParams_.Set("alt", alt)
8551	c.urlParams_.Set("prettyPrint", "false")
8552	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}")
8553	urls += "?" + c.urlParams_.Encode()
8554	req, err := http.NewRequest("PUT", urls, body)
8555	if err != nil {
8556		return nil, err
8557	}
8558	req.Header = reqHeaders
8559	googleapi.Expand(req.URL, map[string]string{
8560		"groupKey": c.groupKey,
8561	})
8562	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8563}
8564
8565// Do executes the "directory.groups.update" call.
8566// Exactly one of *Group or error will be non-nil. Any non-2xx status
8567// code is an error. Response headers are in either
8568// *Group.ServerResponse.Header or (if a response was returned at all)
8569// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8570// check whether the returned error was because http.StatusNotModified
8571// was returned.
8572func (c *GroupsUpdateCall) Do(opts ...googleapi.CallOption) (*Group, error) {
8573	gensupport.SetOptions(c.urlParams_, opts...)
8574	res, err := c.doRequest("json")
8575	if res != nil && res.StatusCode == http.StatusNotModified {
8576		if res.Body != nil {
8577			res.Body.Close()
8578		}
8579		return nil, &googleapi.Error{
8580			Code:   res.StatusCode,
8581			Header: res.Header,
8582		}
8583	}
8584	if err != nil {
8585		return nil, err
8586	}
8587	defer googleapi.CloseBody(res)
8588	if err := googleapi.CheckResponse(res); err != nil {
8589		return nil, err
8590	}
8591	ret := &Group{
8592		ServerResponse: googleapi.ServerResponse{
8593			Header:         res.Header,
8594			HTTPStatusCode: res.StatusCode,
8595		},
8596	}
8597	target := &ret
8598	if err := gensupport.DecodeResponse(target, res); err != nil {
8599		return nil, err
8600	}
8601	return ret, nil
8602	// {
8603	//   "description": "Update Group",
8604	//   "httpMethod": "PUT",
8605	//   "id": "directory.groups.update",
8606	//   "parameterOrder": [
8607	//     "groupKey"
8608	//   ],
8609	//   "parameters": {
8610	//     "groupKey": {
8611	//       "description": "Email or immutable ID of the group. If ID, it should match with id of group object",
8612	//       "location": "path",
8613	//       "required": true,
8614	//       "type": "string"
8615	//     }
8616	//   },
8617	//   "path": "groups/{groupKey}",
8618	//   "request": {
8619	//     "$ref": "Group"
8620	//   },
8621	//   "response": {
8622	//     "$ref": "Group"
8623	//   },
8624	//   "scopes": [
8625	//     "https://www.googleapis.com/auth/admin.directory.group"
8626	//   ]
8627	// }
8628
8629}
8630
8631// method id "directory.groups.aliases.delete":
8632
8633type GroupsAliasesDeleteCall struct {
8634	s          *Service
8635	groupKey   string
8636	alias      string
8637	urlParams_ gensupport.URLParams
8638	ctx_       context.Context
8639	header_    http.Header
8640}
8641
8642// Delete: Remove a alias for the group
8643func (r *GroupsAliasesService) Delete(groupKey string, alias string) *GroupsAliasesDeleteCall {
8644	c := &GroupsAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8645	c.groupKey = groupKey
8646	c.alias = alias
8647	return c
8648}
8649
8650// Fields allows partial responses to be retrieved. See
8651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8652// for more information.
8653func (c *GroupsAliasesDeleteCall) Fields(s ...googleapi.Field) *GroupsAliasesDeleteCall {
8654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8655	return c
8656}
8657
8658// Context sets the context to be used in this call's Do method. Any
8659// pending HTTP request will be aborted if the provided context is
8660// canceled.
8661func (c *GroupsAliasesDeleteCall) Context(ctx context.Context) *GroupsAliasesDeleteCall {
8662	c.ctx_ = ctx
8663	return c
8664}
8665
8666// Header returns an http.Header that can be modified by the caller to
8667// add HTTP headers to the request.
8668func (c *GroupsAliasesDeleteCall) Header() http.Header {
8669	if c.header_ == nil {
8670		c.header_ = make(http.Header)
8671	}
8672	return c.header_
8673}
8674
8675func (c *GroupsAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
8676	reqHeaders := make(http.Header)
8677	for k, v := range c.header_ {
8678		reqHeaders[k] = v
8679	}
8680	reqHeaders.Set("User-Agent", c.s.userAgent())
8681	var body io.Reader = nil
8682	c.urlParams_.Set("alt", alt)
8683	c.urlParams_.Set("prettyPrint", "false")
8684	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases/{alias}")
8685	urls += "?" + c.urlParams_.Encode()
8686	req, err := http.NewRequest("DELETE", urls, body)
8687	if err != nil {
8688		return nil, err
8689	}
8690	req.Header = reqHeaders
8691	googleapi.Expand(req.URL, map[string]string{
8692		"groupKey": c.groupKey,
8693		"alias":    c.alias,
8694	})
8695	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8696}
8697
8698// Do executes the "directory.groups.aliases.delete" call.
8699func (c *GroupsAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
8700	gensupport.SetOptions(c.urlParams_, opts...)
8701	res, err := c.doRequest("json")
8702	if err != nil {
8703		return err
8704	}
8705	defer googleapi.CloseBody(res)
8706	if err := googleapi.CheckResponse(res); err != nil {
8707		return err
8708	}
8709	return nil
8710	// {
8711	//   "description": "Remove a alias for the group",
8712	//   "httpMethod": "DELETE",
8713	//   "id": "directory.groups.aliases.delete",
8714	//   "parameterOrder": [
8715	//     "groupKey",
8716	//     "alias"
8717	//   ],
8718	//   "parameters": {
8719	//     "alias": {
8720	//       "description": "The alias to be removed",
8721	//       "location": "path",
8722	//       "required": true,
8723	//       "type": "string"
8724	//     },
8725	//     "groupKey": {
8726	//       "description": "Email or immutable ID of the group",
8727	//       "location": "path",
8728	//       "required": true,
8729	//       "type": "string"
8730	//     }
8731	//   },
8732	//   "path": "groups/{groupKey}/aliases/{alias}",
8733	//   "scopes": [
8734	//     "https://www.googleapis.com/auth/admin.directory.group"
8735	//   ]
8736	// }
8737
8738}
8739
8740// method id "directory.groups.aliases.insert":
8741
8742type GroupsAliasesInsertCall struct {
8743	s          *Service
8744	groupKey   string
8745	alias      *Alias
8746	urlParams_ gensupport.URLParams
8747	ctx_       context.Context
8748	header_    http.Header
8749}
8750
8751// Insert: Add a alias for the group
8752func (r *GroupsAliasesService) Insert(groupKey string, alias *Alias) *GroupsAliasesInsertCall {
8753	c := &GroupsAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8754	c.groupKey = groupKey
8755	c.alias = alias
8756	return c
8757}
8758
8759// Fields allows partial responses to be retrieved. See
8760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8761// for more information.
8762func (c *GroupsAliasesInsertCall) Fields(s ...googleapi.Field) *GroupsAliasesInsertCall {
8763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8764	return c
8765}
8766
8767// Context sets the context to be used in this call's Do method. Any
8768// pending HTTP request will be aborted if the provided context is
8769// canceled.
8770func (c *GroupsAliasesInsertCall) Context(ctx context.Context) *GroupsAliasesInsertCall {
8771	c.ctx_ = ctx
8772	return c
8773}
8774
8775// Header returns an http.Header that can be modified by the caller to
8776// add HTTP headers to the request.
8777func (c *GroupsAliasesInsertCall) Header() http.Header {
8778	if c.header_ == nil {
8779		c.header_ = make(http.Header)
8780	}
8781	return c.header_
8782}
8783
8784func (c *GroupsAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
8785	reqHeaders := make(http.Header)
8786	for k, v := range c.header_ {
8787		reqHeaders[k] = v
8788	}
8789	reqHeaders.Set("User-Agent", c.s.userAgent())
8790	var body io.Reader = nil
8791	body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
8792	if err != nil {
8793		return nil, err
8794	}
8795	reqHeaders.Set("Content-Type", "application/json")
8796	c.urlParams_.Set("alt", alt)
8797	c.urlParams_.Set("prettyPrint", "false")
8798	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases")
8799	urls += "?" + c.urlParams_.Encode()
8800	req, err := http.NewRequest("POST", urls, body)
8801	if err != nil {
8802		return nil, err
8803	}
8804	req.Header = reqHeaders
8805	googleapi.Expand(req.URL, map[string]string{
8806		"groupKey": c.groupKey,
8807	})
8808	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8809}
8810
8811// Do executes the "directory.groups.aliases.insert" call.
8812// Exactly one of *Alias or error will be non-nil. Any non-2xx status
8813// code is an error. Response headers are in either
8814// *Alias.ServerResponse.Header or (if a response was returned at all)
8815// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8816// check whether the returned error was because http.StatusNotModified
8817// was returned.
8818func (c *GroupsAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
8819	gensupport.SetOptions(c.urlParams_, opts...)
8820	res, err := c.doRequest("json")
8821	if res != nil && res.StatusCode == http.StatusNotModified {
8822		if res.Body != nil {
8823			res.Body.Close()
8824		}
8825		return nil, &googleapi.Error{
8826			Code:   res.StatusCode,
8827			Header: res.Header,
8828		}
8829	}
8830	if err != nil {
8831		return nil, err
8832	}
8833	defer googleapi.CloseBody(res)
8834	if err := googleapi.CheckResponse(res); err != nil {
8835		return nil, err
8836	}
8837	ret := &Alias{
8838		ServerResponse: googleapi.ServerResponse{
8839			Header:         res.Header,
8840			HTTPStatusCode: res.StatusCode,
8841		},
8842	}
8843	target := &ret
8844	if err := gensupport.DecodeResponse(target, res); err != nil {
8845		return nil, err
8846	}
8847	return ret, nil
8848	// {
8849	//   "description": "Add a alias for the group",
8850	//   "httpMethod": "POST",
8851	//   "id": "directory.groups.aliases.insert",
8852	//   "parameterOrder": [
8853	//     "groupKey"
8854	//   ],
8855	//   "parameters": {
8856	//     "groupKey": {
8857	//       "description": "Email or immutable ID of the group",
8858	//       "location": "path",
8859	//       "required": true,
8860	//       "type": "string"
8861	//     }
8862	//   },
8863	//   "path": "groups/{groupKey}/aliases",
8864	//   "request": {
8865	//     "$ref": "Alias"
8866	//   },
8867	//   "response": {
8868	//     "$ref": "Alias"
8869	//   },
8870	//   "scopes": [
8871	//     "https://www.googleapis.com/auth/admin.directory.group"
8872	//   ]
8873	// }
8874
8875}
8876
8877// method id "directory.groups.aliases.list":
8878
8879type GroupsAliasesListCall struct {
8880	s            *Service
8881	groupKey     string
8882	urlParams_   gensupport.URLParams
8883	ifNoneMatch_ string
8884	ctx_         context.Context
8885	header_      http.Header
8886}
8887
8888// List: List all aliases for a group
8889func (r *GroupsAliasesService) List(groupKey string) *GroupsAliasesListCall {
8890	c := &GroupsAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8891	c.groupKey = groupKey
8892	return c
8893}
8894
8895// Fields allows partial responses to be retrieved. See
8896// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8897// for more information.
8898func (c *GroupsAliasesListCall) Fields(s ...googleapi.Field) *GroupsAliasesListCall {
8899	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8900	return c
8901}
8902
8903// IfNoneMatch sets the optional parameter which makes the operation
8904// fail if the object's ETag matches the given value. This is useful for
8905// getting updates only after the object has changed since the last
8906// request. Use googleapi.IsNotModified to check whether the response
8907// error from Do is the result of In-None-Match.
8908func (c *GroupsAliasesListCall) IfNoneMatch(entityTag string) *GroupsAliasesListCall {
8909	c.ifNoneMatch_ = entityTag
8910	return c
8911}
8912
8913// Context sets the context to be used in this call's Do method. Any
8914// pending HTTP request will be aborted if the provided context is
8915// canceled.
8916func (c *GroupsAliasesListCall) Context(ctx context.Context) *GroupsAliasesListCall {
8917	c.ctx_ = ctx
8918	return c
8919}
8920
8921// Header returns an http.Header that can be modified by the caller to
8922// add HTTP headers to the request.
8923func (c *GroupsAliasesListCall) Header() http.Header {
8924	if c.header_ == nil {
8925		c.header_ = make(http.Header)
8926	}
8927	return c.header_
8928}
8929
8930func (c *GroupsAliasesListCall) doRequest(alt string) (*http.Response, error) {
8931	reqHeaders := make(http.Header)
8932	for k, v := range c.header_ {
8933		reqHeaders[k] = v
8934	}
8935	reqHeaders.Set("User-Agent", c.s.userAgent())
8936	if c.ifNoneMatch_ != "" {
8937		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8938	}
8939	var body io.Reader = nil
8940	c.urlParams_.Set("alt", alt)
8941	c.urlParams_.Set("prettyPrint", "false")
8942	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/aliases")
8943	urls += "?" + c.urlParams_.Encode()
8944	req, err := http.NewRequest("GET", urls, body)
8945	if err != nil {
8946		return nil, err
8947	}
8948	req.Header = reqHeaders
8949	googleapi.Expand(req.URL, map[string]string{
8950		"groupKey": c.groupKey,
8951	})
8952	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8953}
8954
8955// Do executes the "directory.groups.aliases.list" call.
8956// Exactly one of *Aliases or error will be non-nil. Any non-2xx status
8957// code is an error. Response headers are in either
8958// *Aliases.ServerResponse.Header or (if a response was returned at all)
8959// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8960// check whether the returned error was because http.StatusNotModified
8961// was returned.
8962func (c *GroupsAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
8963	gensupport.SetOptions(c.urlParams_, opts...)
8964	res, err := c.doRequest("json")
8965	if res != nil && res.StatusCode == http.StatusNotModified {
8966		if res.Body != nil {
8967			res.Body.Close()
8968		}
8969		return nil, &googleapi.Error{
8970			Code:   res.StatusCode,
8971			Header: res.Header,
8972		}
8973	}
8974	if err != nil {
8975		return nil, err
8976	}
8977	defer googleapi.CloseBody(res)
8978	if err := googleapi.CheckResponse(res); err != nil {
8979		return nil, err
8980	}
8981	ret := &Aliases{
8982		ServerResponse: googleapi.ServerResponse{
8983			Header:         res.Header,
8984			HTTPStatusCode: res.StatusCode,
8985		},
8986	}
8987	target := &ret
8988	if err := gensupport.DecodeResponse(target, res); err != nil {
8989		return nil, err
8990	}
8991	return ret, nil
8992	// {
8993	//   "description": "List all aliases for a group",
8994	//   "httpMethod": "GET",
8995	//   "id": "directory.groups.aliases.list",
8996	//   "parameterOrder": [
8997	//     "groupKey"
8998	//   ],
8999	//   "parameters": {
9000	//     "groupKey": {
9001	//       "description": "Email or immutable ID of the group",
9002	//       "location": "path",
9003	//       "required": true,
9004	//       "type": "string"
9005	//     }
9006	//   },
9007	//   "path": "groups/{groupKey}/aliases",
9008	//   "response": {
9009	//     "$ref": "Aliases"
9010	//   },
9011	//   "scopes": [
9012	//     "https://www.googleapis.com/auth/admin.directory.group",
9013	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
9014	//   ],
9015	//   "supportsSubscription": true
9016	// }
9017
9018}
9019
9020// method id "directory.members.delete":
9021
9022type MembersDeleteCall struct {
9023	s          *Service
9024	groupKey   string
9025	memberKey  string
9026	urlParams_ gensupport.URLParams
9027	ctx_       context.Context
9028	header_    http.Header
9029}
9030
9031// Delete: Remove membership.
9032func (r *MembersService) Delete(groupKey string, memberKey string) *MembersDeleteCall {
9033	c := &MembersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9034	c.groupKey = groupKey
9035	c.memberKey = memberKey
9036	return c
9037}
9038
9039// Fields allows partial responses to be retrieved. See
9040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9041// for more information.
9042func (c *MembersDeleteCall) Fields(s ...googleapi.Field) *MembersDeleteCall {
9043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9044	return c
9045}
9046
9047// Context sets the context to be used in this call's Do method. Any
9048// pending HTTP request will be aborted if the provided context is
9049// canceled.
9050func (c *MembersDeleteCall) Context(ctx context.Context) *MembersDeleteCall {
9051	c.ctx_ = ctx
9052	return c
9053}
9054
9055// Header returns an http.Header that can be modified by the caller to
9056// add HTTP headers to the request.
9057func (c *MembersDeleteCall) Header() http.Header {
9058	if c.header_ == nil {
9059		c.header_ = make(http.Header)
9060	}
9061	return c.header_
9062}
9063
9064func (c *MembersDeleteCall) doRequest(alt string) (*http.Response, error) {
9065	reqHeaders := make(http.Header)
9066	for k, v := range c.header_ {
9067		reqHeaders[k] = v
9068	}
9069	reqHeaders.Set("User-Agent", c.s.userAgent())
9070	var body io.Reader = nil
9071	c.urlParams_.Set("alt", alt)
9072	c.urlParams_.Set("prettyPrint", "false")
9073	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}")
9074	urls += "?" + c.urlParams_.Encode()
9075	req, err := http.NewRequest("DELETE", urls, body)
9076	if err != nil {
9077		return nil, err
9078	}
9079	req.Header = reqHeaders
9080	googleapi.Expand(req.URL, map[string]string{
9081		"groupKey":  c.groupKey,
9082		"memberKey": c.memberKey,
9083	})
9084	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9085}
9086
9087// Do executes the "directory.members.delete" call.
9088func (c *MembersDeleteCall) Do(opts ...googleapi.CallOption) error {
9089	gensupport.SetOptions(c.urlParams_, opts...)
9090	res, err := c.doRequest("json")
9091	if err != nil {
9092		return err
9093	}
9094	defer googleapi.CloseBody(res)
9095	if err := googleapi.CheckResponse(res); err != nil {
9096		return err
9097	}
9098	return nil
9099	// {
9100	//   "description": "Remove membership.",
9101	//   "httpMethod": "DELETE",
9102	//   "id": "directory.members.delete",
9103	//   "parameterOrder": [
9104	//     "groupKey",
9105	//     "memberKey"
9106	//   ],
9107	//   "parameters": {
9108	//     "groupKey": {
9109	//       "description": "Email or immutable ID of the group",
9110	//       "location": "path",
9111	//       "required": true,
9112	//       "type": "string"
9113	//     },
9114	//     "memberKey": {
9115	//       "description": "Email or immutable ID of the member",
9116	//       "location": "path",
9117	//       "required": true,
9118	//       "type": "string"
9119	//     }
9120	//   },
9121	//   "path": "groups/{groupKey}/members/{memberKey}",
9122	//   "scopes": [
9123	//     "https://www.googleapis.com/auth/admin.directory.group",
9124	//     "https://www.googleapis.com/auth/admin.directory.group.member"
9125	//   ]
9126	// }
9127
9128}
9129
9130// method id "directory.members.get":
9131
9132type MembersGetCall struct {
9133	s            *Service
9134	groupKey     string
9135	memberKey    string
9136	urlParams_   gensupport.URLParams
9137	ifNoneMatch_ string
9138	ctx_         context.Context
9139	header_      http.Header
9140}
9141
9142// Get: Retrieve Group Member
9143func (r *MembersService) Get(groupKey string, memberKey string) *MembersGetCall {
9144	c := &MembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9145	c.groupKey = groupKey
9146	c.memberKey = memberKey
9147	return c
9148}
9149
9150// Fields allows partial responses to be retrieved. See
9151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9152// for more information.
9153func (c *MembersGetCall) Fields(s ...googleapi.Field) *MembersGetCall {
9154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9155	return c
9156}
9157
9158// IfNoneMatch sets the optional parameter which makes the operation
9159// fail if the object's ETag matches the given value. This is useful for
9160// getting updates only after the object has changed since the last
9161// request. Use googleapi.IsNotModified to check whether the response
9162// error from Do is the result of In-None-Match.
9163func (c *MembersGetCall) IfNoneMatch(entityTag string) *MembersGetCall {
9164	c.ifNoneMatch_ = entityTag
9165	return c
9166}
9167
9168// Context sets the context to be used in this call's Do method. Any
9169// pending HTTP request will be aborted if the provided context is
9170// canceled.
9171func (c *MembersGetCall) Context(ctx context.Context) *MembersGetCall {
9172	c.ctx_ = ctx
9173	return c
9174}
9175
9176// Header returns an http.Header that can be modified by the caller to
9177// add HTTP headers to the request.
9178func (c *MembersGetCall) Header() http.Header {
9179	if c.header_ == nil {
9180		c.header_ = make(http.Header)
9181	}
9182	return c.header_
9183}
9184
9185func (c *MembersGetCall) doRequest(alt string) (*http.Response, error) {
9186	reqHeaders := make(http.Header)
9187	for k, v := range c.header_ {
9188		reqHeaders[k] = v
9189	}
9190	reqHeaders.Set("User-Agent", c.s.userAgent())
9191	if c.ifNoneMatch_ != "" {
9192		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9193	}
9194	var body io.Reader = nil
9195	c.urlParams_.Set("alt", alt)
9196	c.urlParams_.Set("prettyPrint", "false")
9197	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}")
9198	urls += "?" + c.urlParams_.Encode()
9199	req, err := http.NewRequest("GET", urls, body)
9200	if err != nil {
9201		return nil, err
9202	}
9203	req.Header = reqHeaders
9204	googleapi.Expand(req.URL, map[string]string{
9205		"groupKey":  c.groupKey,
9206		"memberKey": c.memberKey,
9207	})
9208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9209}
9210
9211// Do executes the "directory.members.get" call.
9212// Exactly one of *Member or error will be non-nil. Any non-2xx status
9213// code is an error. Response headers are in either
9214// *Member.ServerResponse.Header or (if a response was returned at all)
9215// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9216// check whether the returned error was because http.StatusNotModified
9217// was returned.
9218func (c *MembersGetCall) Do(opts ...googleapi.CallOption) (*Member, error) {
9219	gensupport.SetOptions(c.urlParams_, opts...)
9220	res, err := c.doRequest("json")
9221	if res != nil && res.StatusCode == http.StatusNotModified {
9222		if res.Body != nil {
9223			res.Body.Close()
9224		}
9225		return nil, &googleapi.Error{
9226			Code:   res.StatusCode,
9227			Header: res.Header,
9228		}
9229	}
9230	if err != nil {
9231		return nil, err
9232	}
9233	defer googleapi.CloseBody(res)
9234	if err := googleapi.CheckResponse(res); err != nil {
9235		return nil, err
9236	}
9237	ret := &Member{
9238		ServerResponse: googleapi.ServerResponse{
9239			Header:         res.Header,
9240			HTTPStatusCode: res.StatusCode,
9241		},
9242	}
9243	target := &ret
9244	if err := gensupport.DecodeResponse(target, res); err != nil {
9245		return nil, err
9246	}
9247	return ret, nil
9248	// {
9249	//   "description": "Retrieve Group Member",
9250	//   "httpMethod": "GET",
9251	//   "id": "directory.members.get",
9252	//   "parameterOrder": [
9253	//     "groupKey",
9254	//     "memberKey"
9255	//   ],
9256	//   "parameters": {
9257	//     "groupKey": {
9258	//       "description": "Email or immutable ID of the group",
9259	//       "location": "path",
9260	//       "required": true,
9261	//       "type": "string"
9262	//     },
9263	//     "memberKey": {
9264	//       "description": "Email or immutable ID of the member",
9265	//       "location": "path",
9266	//       "required": true,
9267	//       "type": "string"
9268	//     }
9269	//   },
9270	//   "path": "groups/{groupKey}/members/{memberKey}",
9271	//   "response": {
9272	//     "$ref": "Member"
9273	//   },
9274	//   "scopes": [
9275	//     "https://www.googleapis.com/auth/admin.directory.group",
9276	//     "https://www.googleapis.com/auth/admin.directory.group.member",
9277	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
9278	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
9279	//   ]
9280	// }
9281
9282}
9283
9284// method id "directory.members.hasMember":
9285
9286type MembersHasMemberCall struct {
9287	s            *Service
9288	groupKey     string
9289	memberKey    string
9290	urlParams_   gensupport.URLParams
9291	ifNoneMatch_ string
9292	ctx_         context.Context
9293	header_      http.Header
9294}
9295
9296// HasMember: Checks whether the given user is a member of the group.
9297// Membership can be direct or nested.
9298func (r *MembersService) HasMember(groupKey string, memberKey string) *MembersHasMemberCall {
9299	c := &MembersHasMemberCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9300	c.groupKey = groupKey
9301	c.memberKey = memberKey
9302	return c
9303}
9304
9305// Fields allows partial responses to be retrieved. See
9306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9307// for more information.
9308func (c *MembersHasMemberCall) Fields(s ...googleapi.Field) *MembersHasMemberCall {
9309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9310	return c
9311}
9312
9313// IfNoneMatch sets the optional parameter which makes the operation
9314// fail if the object's ETag matches the given value. This is useful for
9315// getting updates only after the object has changed since the last
9316// request. Use googleapi.IsNotModified to check whether the response
9317// error from Do is the result of In-None-Match.
9318func (c *MembersHasMemberCall) IfNoneMatch(entityTag string) *MembersHasMemberCall {
9319	c.ifNoneMatch_ = entityTag
9320	return c
9321}
9322
9323// Context sets the context to be used in this call's Do method. Any
9324// pending HTTP request will be aborted if the provided context is
9325// canceled.
9326func (c *MembersHasMemberCall) Context(ctx context.Context) *MembersHasMemberCall {
9327	c.ctx_ = ctx
9328	return c
9329}
9330
9331// Header returns an http.Header that can be modified by the caller to
9332// add HTTP headers to the request.
9333func (c *MembersHasMemberCall) Header() http.Header {
9334	if c.header_ == nil {
9335		c.header_ = make(http.Header)
9336	}
9337	return c.header_
9338}
9339
9340func (c *MembersHasMemberCall) doRequest(alt string) (*http.Response, error) {
9341	reqHeaders := make(http.Header)
9342	for k, v := range c.header_ {
9343		reqHeaders[k] = v
9344	}
9345	reqHeaders.Set("User-Agent", c.s.userAgent())
9346	if c.ifNoneMatch_ != "" {
9347		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9348	}
9349	var body io.Reader = nil
9350	c.urlParams_.Set("alt", alt)
9351	c.urlParams_.Set("prettyPrint", "false")
9352	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/hasMember/{memberKey}")
9353	urls += "?" + c.urlParams_.Encode()
9354	req, err := http.NewRequest("GET", urls, body)
9355	if err != nil {
9356		return nil, err
9357	}
9358	req.Header = reqHeaders
9359	googleapi.Expand(req.URL, map[string]string{
9360		"groupKey":  c.groupKey,
9361		"memberKey": c.memberKey,
9362	})
9363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9364}
9365
9366// Do executes the "directory.members.hasMember" call.
9367// Exactly one of *MembersHasMember or error will be non-nil. Any
9368// non-2xx status code is an error. Response headers are in either
9369// *MembersHasMember.ServerResponse.Header or (if a response was
9370// returned at all) in error.(*googleapi.Error).Header. Use
9371// googleapi.IsNotModified to check whether the returned error was
9372// because http.StatusNotModified was returned.
9373func (c *MembersHasMemberCall) Do(opts ...googleapi.CallOption) (*MembersHasMember, error) {
9374	gensupport.SetOptions(c.urlParams_, opts...)
9375	res, err := c.doRequest("json")
9376	if res != nil && res.StatusCode == http.StatusNotModified {
9377		if res.Body != nil {
9378			res.Body.Close()
9379		}
9380		return nil, &googleapi.Error{
9381			Code:   res.StatusCode,
9382			Header: res.Header,
9383		}
9384	}
9385	if err != nil {
9386		return nil, err
9387	}
9388	defer googleapi.CloseBody(res)
9389	if err := googleapi.CheckResponse(res); err != nil {
9390		return nil, err
9391	}
9392	ret := &MembersHasMember{
9393		ServerResponse: googleapi.ServerResponse{
9394			Header:         res.Header,
9395			HTTPStatusCode: res.StatusCode,
9396		},
9397	}
9398	target := &ret
9399	if err := gensupport.DecodeResponse(target, res); err != nil {
9400		return nil, err
9401	}
9402	return ret, nil
9403	// {
9404	//   "description": "Checks whether the given user is a member of the group. Membership can be direct or nested.",
9405	//   "httpMethod": "GET",
9406	//   "id": "directory.members.hasMember",
9407	//   "parameterOrder": [
9408	//     "groupKey",
9409	//     "memberKey"
9410	//   ],
9411	//   "parameters": {
9412	//     "groupKey": {
9413	//       "description": "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.",
9414	//       "location": "path",
9415	//       "required": true,
9416	//       "type": "string"
9417	//     },
9418	//     "memberKey": {
9419	//       "description": "Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique ID.",
9420	//       "location": "path",
9421	//       "required": true,
9422	//       "type": "string"
9423	//     }
9424	//   },
9425	//   "path": "groups/{groupKey}/hasMember/{memberKey}",
9426	//   "response": {
9427	//     "$ref": "MembersHasMember"
9428	//   },
9429	//   "scopes": [
9430	//     "https://www.googleapis.com/auth/admin.directory.group",
9431	//     "https://www.googleapis.com/auth/admin.directory.group.member",
9432	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
9433	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
9434	//   ]
9435	// }
9436
9437}
9438
9439// method id "directory.members.insert":
9440
9441type MembersInsertCall struct {
9442	s          *Service
9443	groupKey   string
9444	member     *Member
9445	urlParams_ gensupport.URLParams
9446	ctx_       context.Context
9447	header_    http.Header
9448}
9449
9450// Insert: Add user to the specified group.
9451func (r *MembersService) Insert(groupKey string, member *Member) *MembersInsertCall {
9452	c := &MembersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9453	c.groupKey = groupKey
9454	c.member = member
9455	return c
9456}
9457
9458// Fields allows partial responses to be retrieved. See
9459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9460// for more information.
9461func (c *MembersInsertCall) Fields(s ...googleapi.Field) *MembersInsertCall {
9462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9463	return c
9464}
9465
9466// Context sets the context to be used in this call's Do method. Any
9467// pending HTTP request will be aborted if the provided context is
9468// canceled.
9469func (c *MembersInsertCall) Context(ctx context.Context) *MembersInsertCall {
9470	c.ctx_ = ctx
9471	return c
9472}
9473
9474// Header returns an http.Header that can be modified by the caller to
9475// add HTTP headers to the request.
9476func (c *MembersInsertCall) Header() http.Header {
9477	if c.header_ == nil {
9478		c.header_ = make(http.Header)
9479	}
9480	return c.header_
9481}
9482
9483func (c *MembersInsertCall) doRequest(alt string) (*http.Response, error) {
9484	reqHeaders := make(http.Header)
9485	for k, v := range c.header_ {
9486		reqHeaders[k] = v
9487	}
9488	reqHeaders.Set("User-Agent", c.s.userAgent())
9489	var body io.Reader = nil
9490	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
9491	if err != nil {
9492		return nil, err
9493	}
9494	reqHeaders.Set("Content-Type", "application/json")
9495	c.urlParams_.Set("alt", alt)
9496	c.urlParams_.Set("prettyPrint", "false")
9497	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members")
9498	urls += "?" + c.urlParams_.Encode()
9499	req, err := http.NewRequest("POST", urls, body)
9500	if err != nil {
9501		return nil, err
9502	}
9503	req.Header = reqHeaders
9504	googleapi.Expand(req.URL, map[string]string{
9505		"groupKey": c.groupKey,
9506	})
9507	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9508}
9509
9510// Do executes the "directory.members.insert" call.
9511// Exactly one of *Member or error will be non-nil. Any non-2xx status
9512// code is an error. Response headers are in either
9513// *Member.ServerResponse.Header or (if a response was returned at all)
9514// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9515// check whether the returned error was because http.StatusNotModified
9516// was returned.
9517func (c *MembersInsertCall) Do(opts ...googleapi.CallOption) (*Member, error) {
9518	gensupport.SetOptions(c.urlParams_, opts...)
9519	res, err := c.doRequest("json")
9520	if res != nil && res.StatusCode == http.StatusNotModified {
9521		if res.Body != nil {
9522			res.Body.Close()
9523		}
9524		return nil, &googleapi.Error{
9525			Code:   res.StatusCode,
9526			Header: res.Header,
9527		}
9528	}
9529	if err != nil {
9530		return nil, err
9531	}
9532	defer googleapi.CloseBody(res)
9533	if err := googleapi.CheckResponse(res); err != nil {
9534		return nil, err
9535	}
9536	ret := &Member{
9537		ServerResponse: googleapi.ServerResponse{
9538			Header:         res.Header,
9539			HTTPStatusCode: res.StatusCode,
9540		},
9541	}
9542	target := &ret
9543	if err := gensupport.DecodeResponse(target, res); err != nil {
9544		return nil, err
9545	}
9546	return ret, nil
9547	// {
9548	//   "description": "Add user to the specified group.",
9549	//   "httpMethod": "POST",
9550	//   "id": "directory.members.insert",
9551	//   "parameterOrder": [
9552	//     "groupKey"
9553	//   ],
9554	//   "parameters": {
9555	//     "groupKey": {
9556	//       "description": "Email or immutable ID of the group",
9557	//       "location": "path",
9558	//       "required": true,
9559	//       "type": "string"
9560	//     }
9561	//   },
9562	//   "path": "groups/{groupKey}/members",
9563	//   "request": {
9564	//     "$ref": "Member"
9565	//   },
9566	//   "response": {
9567	//     "$ref": "Member"
9568	//   },
9569	//   "scopes": [
9570	//     "https://www.googleapis.com/auth/admin.directory.group",
9571	//     "https://www.googleapis.com/auth/admin.directory.group.member"
9572	//   ]
9573	// }
9574
9575}
9576
9577// method id "directory.members.list":
9578
9579type MembersListCall struct {
9580	s            *Service
9581	groupKey     string
9582	urlParams_   gensupport.URLParams
9583	ifNoneMatch_ string
9584	ctx_         context.Context
9585	header_      http.Header
9586}
9587
9588// List: Retrieve all members in a group (paginated)
9589func (r *MembersService) List(groupKey string) *MembersListCall {
9590	c := &MembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9591	c.groupKey = groupKey
9592	return c
9593}
9594
9595// IncludeDerivedMembership sets the optional parameter
9596// "includeDerivedMembership": Whether to list indirect memberships.
9597// Default: false.
9598func (c *MembersListCall) IncludeDerivedMembership(includeDerivedMembership bool) *MembersListCall {
9599	c.urlParams_.Set("includeDerivedMembership", fmt.Sprint(includeDerivedMembership))
9600	return c
9601}
9602
9603// MaxResults sets the optional parameter "maxResults": Maximum number
9604// of results to return. Default is 200
9605func (c *MembersListCall) MaxResults(maxResults int64) *MembersListCall {
9606	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9607	return c
9608}
9609
9610// PageToken sets the optional parameter "pageToken": Token to specify
9611// next page in the list
9612func (c *MembersListCall) PageToken(pageToken string) *MembersListCall {
9613	c.urlParams_.Set("pageToken", pageToken)
9614	return c
9615}
9616
9617// Roles sets the optional parameter "roles": Comma separated role
9618// values to filter list results on.
9619func (c *MembersListCall) Roles(roles string) *MembersListCall {
9620	c.urlParams_.Set("roles", roles)
9621	return c
9622}
9623
9624// Fields allows partial responses to be retrieved. See
9625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9626// for more information.
9627func (c *MembersListCall) Fields(s ...googleapi.Field) *MembersListCall {
9628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9629	return c
9630}
9631
9632// IfNoneMatch sets the optional parameter which makes the operation
9633// fail if the object's ETag matches the given value. This is useful for
9634// getting updates only after the object has changed since the last
9635// request. Use googleapi.IsNotModified to check whether the response
9636// error from Do is the result of In-None-Match.
9637func (c *MembersListCall) IfNoneMatch(entityTag string) *MembersListCall {
9638	c.ifNoneMatch_ = entityTag
9639	return c
9640}
9641
9642// Context sets the context to be used in this call's Do method. Any
9643// pending HTTP request will be aborted if the provided context is
9644// canceled.
9645func (c *MembersListCall) Context(ctx context.Context) *MembersListCall {
9646	c.ctx_ = ctx
9647	return c
9648}
9649
9650// Header returns an http.Header that can be modified by the caller to
9651// add HTTP headers to the request.
9652func (c *MembersListCall) Header() http.Header {
9653	if c.header_ == nil {
9654		c.header_ = make(http.Header)
9655	}
9656	return c.header_
9657}
9658
9659func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
9660	reqHeaders := make(http.Header)
9661	for k, v := range c.header_ {
9662		reqHeaders[k] = v
9663	}
9664	reqHeaders.Set("User-Agent", c.s.userAgent())
9665	if c.ifNoneMatch_ != "" {
9666		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9667	}
9668	var body io.Reader = nil
9669	c.urlParams_.Set("alt", alt)
9670	c.urlParams_.Set("prettyPrint", "false")
9671	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members")
9672	urls += "?" + c.urlParams_.Encode()
9673	req, err := http.NewRequest("GET", urls, body)
9674	if err != nil {
9675		return nil, err
9676	}
9677	req.Header = reqHeaders
9678	googleapi.Expand(req.URL, map[string]string{
9679		"groupKey": c.groupKey,
9680	})
9681	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9682}
9683
9684// Do executes the "directory.members.list" call.
9685// Exactly one of *Members or error will be non-nil. Any non-2xx status
9686// code is an error. Response headers are in either
9687// *Members.ServerResponse.Header or (if a response was returned at all)
9688// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9689// check whether the returned error was because http.StatusNotModified
9690// was returned.
9691func (c *MembersListCall) Do(opts ...googleapi.CallOption) (*Members, error) {
9692	gensupport.SetOptions(c.urlParams_, opts...)
9693	res, err := c.doRequest("json")
9694	if res != nil && res.StatusCode == http.StatusNotModified {
9695		if res.Body != nil {
9696			res.Body.Close()
9697		}
9698		return nil, &googleapi.Error{
9699			Code:   res.StatusCode,
9700			Header: res.Header,
9701		}
9702	}
9703	if err != nil {
9704		return nil, err
9705	}
9706	defer googleapi.CloseBody(res)
9707	if err := googleapi.CheckResponse(res); err != nil {
9708		return nil, err
9709	}
9710	ret := &Members{
9711		ServerResponse: googleapi.ServerResponse{
9712			Header:         res.Header,
9713			HTTPStatusCode: res.StatusCode,
9714		},
9715	}
9716	target := &ret
9717	if err := gensupport.DecodeResponse(target, res); err != nil {
9718		return nil, err
9719	}
9720	return ret, nil
9721	// {
9722	//   "description": "Retrieve all members in a group (paginated)",
9723	//   "httpMethod": "GET",
9724	//   "id": "directory.members.list",
9725	//   "parameterOrder": [
9726	//     "groupKey"
9727	//   ],
9728	//   "parameters": {
9729	//     "groupKey": {
9730	//       "description": "Email or immutable ID of the group",
9731	//       "location": "path",
9732	//       "required": true,
9733	//       "type": "string"
9734	//     },
9735	//     "includeDerivedMembership": {
9736	//       "description": "Whether to list indirect memberships. Default: false.",
9737	//       "location": "query",
9738	//       "type": "boolean"
9739	//     },
9740	//     "maxResults": {
9741	//       "description": "Maximum number of results to return. Default is 200",
9742	//       "format": "int32",
9743	//       "location": "query",
9744	//       "minimum": "1",
9745	//       "type": "integer"
9746	//     },
9747	//     "pageToken": {
9748	//       "description": "Token to specify next page in the list",
9749	//       "location": "query",
9750	//       "type": "string"
9751	//     },
9752	//     "roles": {
9753	//       "description": "Comma separated role values to filter list results on.",
9754	//       "location": "query",
9755	//       "type": "string"
9756	//     }
9757	//   },
9758	//   "path": "groups/{groupKey}/members",
9759	//   "response": {
9760	//     "$ref": "Members"
9761	//   },
9762	//   "scopes": [
9763	//     "https://www.googleapis.com/auth/admin.directory.group",
9764	//     "https://www.googleapis.com/auth/admin.directory.group.member",
9765	//     "https://www.googleapis.com/auth/admin.directory.group.member.readonly",
9766	//     "https://www.googleapis.com/auth/admin.directory.group.readonly"
9767	//   ]
9768	// }
9769
9770}
9771
9772// Pages invokes f for each page of results.
9773// A non-nil error returned from f will halt the iteration.
9774// The provided context supersedes any context provided to the Context method.
9775func (c *MembersListCall) Pages(ctx context.Context, f func(*Members) error) error {
9776	c.ctx_ = ctx
9777	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9778	for {
9779		x, err := c.Do()
9780		if err != nil {
9781			return err
9782		}
9783		if err := f(x); err != nil {
9784			return err
9785		}
9786		if x.NextPageToken == "" {
9787			return nil
9788		}
9789		c.PageToken(x.NextPageToken)
9790	}
9791}
9792
9793// method id "directory.members.patch":
9794
9795type MembersPatchCall struct {
9796	s          *Service
9797	groupKey   string
9798	memberKey  string
9799	member     *Member
9800	urlParams_ gensupport.URLParams
9801	ctx_       context.Context
9802	header_    http.Header
9803}
9804
9805// Patch: Update membership of a user in the specified group. This
9806// method supports patch semantics.
9807func (r *MembersService) Patch(groupKey string, memberKey string, member *Member) *MembersPatchCall {
9808	c := &MembersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9809	c.groupKey = groupKey
9810	c.memberKey = memberKey
9811	c.member = member
9812	return c
9813}
9814
9815// Fields allows partial responses to be retrieved. See
9816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9817// for more information.
9818func (c *MembersPatchCall) Fields(s ...googleapi.Field) *MembersPatchCall {
9819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9820	return c
9821}
9822
9823// Context sets the context to be used in this call's Do method. Any
9824// pending HTTP request will be aborted if the provided context is
9825// canceled.
9826func (c *MembersPatchCall) Context(ctx context.Context) *MembersPatchCall {
9827	c.ctx_ = ctx
9828	return c
9829}
9830
9831// Header returns an http.Header that can be modified by the caller to
9832// add HTTP headers to the request.
9833func (c *MembersPatchCall) Header() http.Header {
9834	if c.header_ == nil {
9835		c.header_ = make(http.Header)
9836	}
9837	return c.header_
9838}
9839
9840func (c *MembersPatchCall) doRequest(alt string) (*http.Response, error) {
9841	reqHeaders := make(http.Header)
9842	for k, v := range c.header_ {
9843		reqHeaders[k] = v
9844	}
9845	reqHeaders.Set("User-Agent", c.s.userAgent())
9846	var body io.Reader = nil
9847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
9848	if err != nil {
9849		return nil, err
9850	}
9851	reqHeaders.Set("Content-Type", "application/json")
9852	c.urlParams_.Set("alt", alt)
9853	c.urlParams_.Set("prettyPrint", "false")
9854	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}")
9855	urls += "?" + c.urlParams_.Encode()
9856	req, err := http.NewRequest("PATCH", urls, body)
9857	if err != nil {
9858		return nil, err
9859	}
9860	req.Header = reqHeaders
9861	googleapi.Expand(req.URL, map[string]string{
9862		"groupKey":  c.groupKey,
9863		"memberKey": c.memberKey,
9864	})
9865	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9866}
9867
9868// Do executes the "directory.members.patch" call.
9869// Exactly one of *Member or error will be non-nil. Any non-2xx status
9870// code is an error. Response headers are in either
9871// *Member.ServerResponse.Header or (if a response was returned at all)
9872// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9873// check whether the returned error was because http.StatusNotModified
9874// was returned.
9875func (c *MembersPatchCall) Do(opts ...googleapi.CallOption) (*Member, error) {
9876	gensupport.SetOptions(c.urlParams_, opts...)
9877	res, err := c.doRequest("json")
9878	if res != nil && res.StatusCode == http.StatusNotModified {
9879		if res.Body != nil {
9880			res.Body.Close()
9881		}
9882		return nil, &googleapi.Error{
9883			Code:   res.StatusCode,
9884			Header: res.Header,
9885		}
9886	}
9887	if err != nil {
9888		return nil, err
9889	}
9890	defer googleapi.CloseBody(res)
9891	if err := googleapi.CheckResponse(res); err != nil {
9892		return nil, err
9893	}
9894	ret := &Member{
9895		ServerResponse: googleapi.ServerResponse{
9896			Header:         res.Header,
9897			HTTPStatusCode: res.StatusCode,
9898		},
9899	}
9900	target := &ret
9901	if err := gensupport.DecodeResponse(target, res); err != nil {
9902		return nil, err
9903	}
9904	return ret, nil
9905	// {
9906	//   "description": "Update membership of a user in the specified group. This method supports patch semantics.",
9907	//   "httpMethod": "PATCH",
9908	//   "id": "directory.members.patch",
9909	//   "parameterOrder": [
9910	//     "groupKey",
9911	//     "memberKey"
9912	//   ],
9913	//   "parameters": {
9914	//     "groupKey": {
9915	//       "description": "Email or immutable ID of the group. If ID, it should match with id of group object",
9916	//       "location": "path",
9917	//       "required": true,
9918	//       "type": "string"
9919	//     },
9920	//     "memberKey": {
9921	//       "description": "Email or immutable ID of the user. If ID, it should match with id of member object",
9922	//       "location": "path",
9923	//       "required": true,
9924	//       "type": "string"
9925	//     }
9926	//   },
9927	//   "path": "groups/{groupKey}/members/{memberKey}",
9928	//   "request": {
9929	//     "$ref": "Member"
9930	//   },
9931	//   "response": {
9932	//     "$ref": "Member"
9933	//   },
9934	//   "scopes": [
9935	//     "https://www.googleapis.com/auth/admin.directory.group",
9936	//     "https://www.googleapis.com/auth/admin.directory.group.member"
9937	//   ]
9938	// }
9939
9940}
9941
9942// method id "directory.members.update":
9943
9944type MembersUpdateCall struct {
9945	s          *Service
9946	groupKey   string
9947	memberKey  string
9948	member     *Member
9949	urlParams_ gensupport.URLParams
9950	ctx_       context.Context
9951	header_    http.Header
9952}
9953
9954// Update: Update membership of a user in the specified group.
9955func (r *MembersService) Update(groupKey string, memberKey string, member *Member) *MembersUpdateCall {
9956	c := &MembersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9957	c.groupKey = groupKey
9958	c.memberKey = memberKey
9959	c.member = member
9960	return c
9961}
9962
9963// Fields allows partial responses to be retrieved. See
9964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9965// for more information.
9966func (c *MembersUpdateCall) Fields(s ...googleapi.Field) *MembersUpdateCall {
9967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9968	return c
9969}
9970
9971// Context sets the context to be used in this call's Do method. Any
9972// pending HTTP request will be aborted if the provided context is
9973// canceled.
9974func (c *MembersUpdateCall) Context(ctx context.Context) *MembersUpdateCall {
9975	c.ctx_ = ctx
9976	return c
9977}
9978
9979// Header returns an http.Header that can be modified by the caller to
9980// add HTTP headers to the request.
9981func (c *MembersUpdateCall) Header() http.Header {
9982	if c.header_ == nil {
9983		c.header_ = make(http.Header)
9984	}
9985	return c.header_
9986}
9987
9988func (c *MembersUpdateCall) doRequest(alt string) (*http.Response, error) {
9989	reqHeaders := make(http.Header)
9990	for k, v := range c.header_ {
9991		reqHeaders[k] = v
9992	}
9993	reqHeaders.Set("User-Agent", c.s.userAgent())
9994	var body io.Reader = nil
9995	body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
9996	if err != nil {
9997		return nil, err
9998	}
9999	reqHeaders.Set("Content-Type", "application/json")
10000	c.urlParams_.Set("alt", alt)
10001	c.urlParams_.Set("prettyPrint", "false")
10002	urls := googleapi.ResolveRelative(c.s.BasePath, "groups/{groupKey}/members/{memberKey}")
10003	urls += "?" + c.urlParams_.Encode()
10004	req, err := http.NewRequest("PUT", urls, body)
10005	if err != nil {
10006		return nil, err
10007	}
10008	req.Header = reqHeaders
10009	googleapi.Expand(req.URL, map[string]string{
10010		"groupKey":  c.groupKey,
10011		"memberKey": c.memberKey,
10012	})
10013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10014}
10015
10016// Do executes the "directory.members.update" call.
10017// Exactly one of *Member or error will be non-nil. Any non-2xx status
10018// code is an error. Response headers are in either
10019// *Member.ServerResponse.Header or (if a response was returned at all)
10020// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10021// check whether the returned error was because http.StatusNotModified
10022// was returned.
10023func (c *MembersUpdateCall) Do(opts ...googleapi.CallOption) (*Member, error) {
10024	gensupport.SetOptions(c.urlParams_, opts...)
10025	res, err := c.doRequest("json")
10026	if res != nil && res.StatusCode == http.StatusNotModified {
10027		if res.Body != nil {
10028			res.Body.Close()
10029		}
10030		return nil, &googleapi.Error{
10031			Code:   res.StatusCode,
10032			Header: res.Header,
10033		}
10034	}
10035	if err != nil {
10036		return nil, err
10037	}
10038	defer googleapi.CloseBody(res)
10039	if err := googleapi.CheckResponse(res); err != nil {
10040		return nil, err
10041	}
10042	ret := &Member{
10043		ServerResponse: googleapi.ServerResponse{
10044			Header:         res.Header,
10045			HTTPStatusCode: res.StatusCode,
10046		},
10047	}
10048	target := &ret
10049	if err := gensupport.DecodeResponse(target, res); err != nil {
10050		return nil, err
10051	}
10052	return ret, nil
10053	// {
10054	//   "description": "Update membership of a user in the specified group.",
10055	//   "httpMethod": "PUT",
10056	//   "id": "directory.members.update",
10057	//   "parameterOrder": [
10058	//     "groupKey",
10059	//     "memberKey"
10060	//   ],
10061	//   "parameters": {
10062	//     "groupKey": {
10063	//       "description": "Email or immutable ID of the group. If ID, it should match with id of group object",
10064	//       "location": "path",
10065	//       "required": true,
10066	//       "type": "string"
10067	//     },
10068	//     "memberKey": {
10069	//       "description": "Email or immutable ID of the user. If ID, it should match with id of member object",
10070	//       "location": "path",
10071	//       "required": true,
10072	//       "type": "string"
10073	//     }
10074	//   },
10075	//   "path": "groups/{groupKey}/members/{memberKey}",
10076	//   "request": {
10077	//     "$ref": "Member"
10078	//   },
10079	//   "response": {
10080	//     "$ref": "Member"
10081	//   },
10082	//   "scopes": [
10083	//     "https://www.googleapis.com/auth/admin.directory.group",
10084	//     "https://www.googleapis.com/auth/admin.directory.group.member"
10085	//   ]
10086	// }
10087
10088}
10089
10090// method id "directory.mobiledevices.action":
10091
10092type MobiledevicesActionCall struct {
10093	s                  *Service
10094	customerId         string
10095	resourceId         string
10096	mobiledeviceaction *MobileDeviceAction
10097	urlParams_         gensupport.URLParams
10098	ctx_               context.Context
10099	header_            http.Header
10100}
10101
10102// Action: Take action on Mobile Device
10103func (r *MobiledevicesService) Action(customerId string, resourceId string, mobiledeviceaction *MobileDeviceAction) *MobiledevicesActionCall {
10104	c := &MobiledevicesActionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10105	c.customerId = customerId
10106	c.resourceId = resourceId
10107	c.mobiledeviceaction = mobiledeviceaction
10108	return c
10109}
10110
10111// Fields allows partial responses to be retrieved. See
10112// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10113// for more information.
10114func (c *MobiledevicesActionCall) Fields(s ...googleapi.Field) *MobiledevicesActionCall {
10115	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10116	return c
10117}
10118
10119// Context sets the context to be used in this call's Do method. Any
10120// pending HTTP request will be aborted if the provided context is
10121// canceled.
10122func (c *MobiledevicesActionCall) Context(ctx context.Context) *MobiledevicesActionCall {
10123	c.ctx_ = ctx
10124	return c
10125}
10126
10127// Header returns an http.Header that can be modified by the caller to
10128// add HTTP headers to the request.
10129func (c *MobiledevicesActionCall) Header() http.Header {
10130	if c.header_ == nil {
10131		c.header_ = make(http.Header)
10132	}
10133	return c.header_
10134}
10135
10136func (c *MobiledevicesActionCall) doRequest(alt string) (*http.Response, error) {
10137	reqHeaders := make(http.Header)
10138	for k, v := range c.header_ {
10139		reqHeaders[k] = v
10140	}
10141	reqHeaders.Set("User-Agent", c.s.userAgent())
10142	var body io.Reader = nil
10143	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mobiledeviceaction)
10144	if err != nil {
10145		return nil, err
10146	}
10147	reqHeaders.Set("Content-Type", "application/json")
10148	c.urlParams_.Set("alt", alt)
10149	c.urlParams_.Set("prettyPrint", "false")
10150	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}/action")
10151	urls += "?" + c.urlParams_.Encode()
10152	req, err := http.NewRequest("POST", urls, body)
10153	if err != nil {
10154		return nil, err
10155	}
10156	req.Header = reqHeaders
10157	googleapi.Expand(req.URL, map[string]string{
10158		"customerId": c.customerId,
10159		"resourceId": c.resourceId,
10160	})
10161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10162}
10163
10164// Do executes the "directory.mobiledevices.action" call.
10165func (c *MobiledevicesActionCall) Do(opts ...googleapi.CallOption) error {
10166	gensupport.SetOptions(c.urlParams_, opts...)
10167	res, err := c.doRequest("json")
10168	if err != nil {
10169		return err
10170	}
10171	defer googleapi.CloseBody(res)
10172	if err := googleapi.CheckResponse(res); err != nil {
10173		return err
10174	}
10175	return nil
10176	// {
10177	//   "description": "Take action on Mobile Device",
10178	//   "httpMethod": "POST",
10179	//   "id": "directory.mobiledevices.action",
10180	//   "parameterOrder": [
10181	//     "customerId",
10182	//     "resourceId"
10183	//   ],
10184	//   "parameters": {
10185	//     "customerId": {
10186	//       "description": "Immutable ID of the G Suite account",
10187	//       "location": "path",
10188	//       "required": true,
10189	//       "type": "string"
10190	//     },
10191	//     "resourceId": {
10192	//       "description": "Immutable ID of Mobile Device",
10193	//       "location": "path",
10194	//       "required": true,
10195	//       "type": "string"
10196	//     }
10197	//   },
10198	//   "path": "customer/{customerId}/devices/mobile/{resourceId}/action",
10199	//   "request": {
10200	//     "$ref": "MobileDeviceAction"
10201	//   },
10202	//   "scopes": [
10203	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
10204	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action"
10205	//   ]
10206	// }
10207
10208}
10209
10210// method id "directory.mobiledevices.delete":
10211
10212type MobiledevicesDeleteCall struct {
10213	s          *Service
10214	customerId string
10215	resourceId string
10216	urlParams_ gensupport.URLParams
10217	ctx_       context.Context
10218	header_    http.Header
10219}
10220
10221// Delete: Delete Mobile Device
10222func (r *MobiledevicesService) Delete(customerId string, resourceId string) *MobiledevicesDeleteCall {
10223	c := &MobiledevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10224	c.customerId = customerId
10225	c.resourceId = resourceId
10226	return c
10227}
10228
10229// Fields allows partial responses to be retrieved. See
10230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10231// for more information.
10232func (c *MobiledevicesDeleteCall) Fields(s ...googleapi.Field) *MobiledevicesDeleteCall {
10233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10234	return c
10235}
10236
10237// Context sets the context to be used in this call's Do method. Any
10238// pending HTTP request will be aborted if the provided context is
10239// canceled.
10240func (c *MobiledevicesDeleteCall) Context(ctx context.Context) *MobiledevicesDeleteCall {
10241	c.ctx_ = ctx
10242	return c
10243}
10244
10245// Header returns an http.Header that can be modified by the caller to
10246// add HTTP headers to the request.
10247func (c *MobiledevicesDeleteCall) Header() http.Header {
10248	if c.header_ == nil {
10249		c.header_ = make(http.Header)
10250	}
10251	return c.header_
10252}
10253
10254func (c *MobiledevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
10255	reqHeaders := make(http.Header)
10256	for k, v := range c.header_ {
10257		reqHeaders[k] = v
10258	}
10259	reqHeaders.Set("User-Agent", c.s.userAgent())
10260	var body io.Reader = nil
10261	c.urlParams_.Set("alt", alt)
10262	c.urlParams_.Set("prettyPrint", "false")
10263	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}")
10264	urls += "?" + c.urlParams_.Encode()
10265	req, err := http.NewRequest("DELETE", urls, body)
10266	if err != nil {
10267		return nil, err
10268	}
10269	req.Header = reqHeaders
10270	googleapi.Expand(req.URL, map[string]string{
10271		"customerId": c.customerId,
10272		"resourceId": c.resourceId,
10273	})
10274	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10275}
10276
10277// Do executes the "directory.mobiledevices.delete" call.
10278func (c *MobiledevicesDeleteCall) Do(opts ...googleapi.CallOption) error {
10279	gensupport.SetOptions(c.urlParams_, opts...)
10280	res, err := c.doRequest("json")
10281	if err != nil {
10282		return err
10283	}
10284	defer googleapi.CloseBody(res)
10285	if err := googleapi.CheckResponse(res); err != nil {
10286		return err
10287	}
10288	return nil
10289	// {
10290	//   "description": "Delete Mobile Device",
10291	//   "httpMethod": "DELETE",
10292	//   "id": "directory.mobiledevices.delete",
10293	//   "parameterOrder": [
10294	//     "customerId",
10295	//     "resourceId"
10296	//   ],
10297	//   "parameters": {
10298	//     "customerId": {
10299	//       "description": "Immutable ID of the G Suite account",
10300	//       "location": "path",
10301	//       "required": true,
10302	//       "type": "string"
10303	//     },
10304	//     "resourceId": {
10305	//       "description": "Immutable ID of Mobile Device",
10306	//       "location": "path",
10307	//       "required": true,
10308	//       "type": "string"
10309	//     }
10310	//   },
10311	//   "path": "customer/{customerId}/devices/mobile/{resourceId}",
10312	//   "scopes": [
10313	//     "https://www.googleapis.com/auth/admin.directory.device.mobile"
10314	//   ]
10315	// }
10316
10317}
10318
10319// method id "directory.mobiledevices.get":
10320
10321type MobiledevicesGetCall struct {
10322	s            *Service
10323	customerId   string
10324	resourceId   string
10325	urlParams_   gensupport.URLParams
10326	ifNoneMatch_ string
10327	ctx_         context.Context
10328	header_      http.Header
10329}
10330
10331// Get: Retrieve Mobile Device
10332func (r *MobiledevicesService) Get(customerId string, resourceId string) *MobiledevicesGetCall {
10333	c := &MobiledevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10334	c.customerId = customerId
10335	c.resourceId = resourceId
10336	return c
10337}
10338
10339// Projection sets the optional parameter "projection": Restrict
10340// information returned to a set of selected fields.
10341//
10342// Possible values:
10343//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
10344// model, status, type, and status)
10345//   "FULL" - Includes all metadata fields
10346func (c *MobiledevicesGetCall) Projection(projection string) *MobiledevicesGetCall {
10347	c.urlParams_.Set("projection", projection)
10348	return c
10349}
10350
10351// Fields allows partial responses to be retrieved. See
10352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10353// for more information.
10354func (c *MobiledevicesGetCall) Fields(s ...googleapi.Field) *MobiledevicesGetCall {
10355	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10356	return c
10357}
10358
10359// IfNoneMatch sets the optional parameter which makes the operation
10360// fail if the object's ETag matches the given value. This is useful for
10361// getting updates only after the object has changed since the last
10362// request. Use googleapi.IsNotModified to check whether the response
10363// error from Do is the result of In-None-Match.
10364func (c *MobiledevicesGetCall) IfNoneMatch(entityTag string) *MobiledevicesGetCall {
10365	c.ifNoneMatch_ = entityTag
10366	return c
10367}
10368
10369// Context sets the context to be used in this call's Do method. Any
10370// pending HTTP request will be aborted if the provided context is
10371// canceled.
10372func (c *MobiledevicesGetCall) Context(ctx context.Context) *MobiledevicesGetCall {
10373	c.ctx_ = ctx
10374	return c
10375}
10376
10377// Header returns an http.Header that can be modified by the caller to
10378// add HTTP headers to the request.
10379func (c *MobiledevicesGetCall) Header() http.Header {
10380	if c.header_ == nil {
10381		c.header_ = make(http.Header)
10382	}
10383	return c.header_
10384}
10385
10386func (c *MobiledevicesGetCall) doRequest(alt string) (*http.Response, error) {
10387	reqHeaders := make(http.Header)
10388	for k, v := range c.header_ {
10389		reqHeaders[k] = v
10390	}
10391	reqHeaders.Set("User-Agent", c.s.userAgent())
10392	if c.ifNoneMatch_ != "" {
10393		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10394	}
10395	var body io.Reader = nil
10396	c.urlParams_.Set("alt", alt)
10397	c.urlParams_.Set("prettyPrint", "false")
10398	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile/{resourceId}")
10399	urls += "?" + c.urlParams_.Encode()
10400	req, err := http.NewRequest("GET", urls, body)
10401	if err != nil {
10402		return nil, err
10403	}
10404	req.Header = reqHeaders
10405	googleapi.Expand(req.URL, map[string]string{
10406		"customerId": c.customerId,
10407		"resourceId": c.resourceId,
10408	})
10409	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10410}
10411
10412// Do executes the "directory.mobiledevices.get" call.
10413// Exactly one of *MobileDevice or error will be non-nil. Any non-2xx
10414// status code is an error. Response headers are in either
10415// *MobileDevice.ServerResponse.Header or (if a response was returned at
10416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10417// to check whether the returned error was because
10418// http.StatusNotModified was returned.
10419func (c *MobiledevicesGetCall) Do(opts ...googleapi.CallOption) (*MobileDevice, error) {
10420	gensupport.SetOptions(c.urlParams_, opts...)
10421	res, err := c.doRequest("json")
10422	if res != nil && res.StatusCode == http.StatusNotModified {
10423		if res.Body != nil {
10424			res.Body.Close()
10425		}
10426		return nil, &googleapi.Error{
10427			Code:   res.StatusCode,
10428			Header: res.Header,
10429		}
10430	}
10431	if err != nil {
10432		return nil, err
10433	}
10434	defer googleapi.CloseBody(res)
10435	if err := googleapi.CheckResponse(res); err != nil {
10436		return nil, err
10437	}
10438	ret := &MobileDevice{
10439		ServerResponse: googleapi.ServerResponse{
10440			Header:         res.Header,
10441			HTTPStatusCode: res.StatusCode,
10442		},
10443	}
10444	target := &ret
10445	if err := gensupport.DecodeResponse(target, res); err != nil {
10446		return nil, err
10447	}
10448	return ret, nil
10449	// {
10450	//   "description": "Retrieve Mobile Device",
10451	//   "httpMethod": "GET",
10452	//   "id": "directory.mobiledevices.get",
10453	//   "parameterOrder": [
10454	//     "customerId",
10455	//     "resourceId"
10456	//   ],
10457	//   "parameters": {
10458	//     "customerId": {
10459	//       "description": "Immutable ID of the G Suite account",
10460	//       "location": "path",
10461	//       "required": true,
10462	//       "type": "string"
10463	//     },
10464	//     "projection": {
10465	//       "description": "Restrict information returned to a set of selected fields.",
10466	//       "enum": [
10467	//         "BASIC",
10468	//         "FULL"
10469	//       ],
10470	//       "enumDescriptions": [
10471	//         "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)",
10472	//         "Includes all metadata fields"
10473	//       ],
10474	//       "location": "query",
10475	//       "type": "string"
10476	//     },
10477	//     "resourceId": {
10478	//       "description": "Immutable ID of Mobile Device",
10479	//       "location": "path",
10480	//       "required": true,
10481	//       "type": "string"
10482	//     }
10483	//   },
10484	//   "path": "customer/{customerId}/devices/mobile/{resourceId}",
10485	//   "response": {
10486	//     "$ref": "MobileDevice"
10487	//   },
10488	//   "scopes": [
10489	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
10490	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action",
10491	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
10492	//   ]
10493	// }
10494
10495}
10496
10497// method id "directory.mobiledevices.list":
10498
10499type MobiledevicesListCall struct {
10500	s            *Service
10501	customerId   string
10502	urlParams_   gensupport.URLParams
10503	ifNoneMatch_ string
10504	ctx_         context.Context
10505	header_      http.Header
10506}
10507
10508// List: Retrieve all Mobile Devices of a customer (paginated)
10509func (r *MobiledevicesService) List(customerId string) *MobiledevicesListCall {
10510	c := &MobiledevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10511	c.customerId = customerId
10512	return c
10513}
10514
10515// MaxResults sets the optional parameter "maxResults": Maximum number
10516// of results to return. Default is 100
10517func (c *MobiledevicesListCall) MaxResults(maxResults int64) *MobiledevicesListCall {
10518	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10519	return c
10520}
10521
10522// OrderBy sets the optional parameter "orderBy": Column to use for
10523// sorting results
10524//
10525// Possible values:
10526//   "deviceId" - Mobile Device serial number.
10527//   "email" - Owner user email.
10528//   "lastSync" - Last policy settings sync date time of the device.
10529//   "model" - Mobile Device model.
10530//   "name" - Owner user name.
10531//   "os" - Mobile operating system.
10532//   "status" - Status of the device.
10533//   "type" - Type of the device.
10534func (c *MobiledevicesListCall) OrderBy(orderBy string) *MobiledevicesListCall {
10535	c.urlParams_.Set("orderBy", orderBy)
10536	return c
10537}
10538
10539// PageToken sets the optional parameter "pageToken": Token to specify
10540// next page in the list
10541func (c *MobiledevicesListCall) PageToken(pageToken string) *MobiledevicesListCall {
10542	c.urlParams_.Set("pageToken", pageToken)
10543	return c
10544}
10545
10546// Projection sets the optional parameter "projection": Restrict
10547// information returned to a set of selected fields.
10548//
10549// Possible values:
10550//   "BASIC" - Includes only the basic metadata fields (e.g., deviceId,
10551// model, status, type, and status)
10552//   "FULL" - Includes all metadata fields
10553func (c *MobiledevicesListCall) Projection(projection string) *MobiledevicesListCall {
10554	c.urlParams_.Set("projection", projection)
10555	return c
10556}
10557
10558// Query sets the optional parameter "query": Search string in the
10559// format given at
10560// http://support.google.com/a/bin/answer.py?answer=1408863#search
10561func (c *MobiledevicesListCall) Query(query string) *MobiledevicesListCall {
10562	c.urlParams_.Set("query", query)
10563	return c
10564}
10565
10566// SortOrder sets the optional parameter "sortOrder": Whether to return
10567// results in ascending or descending order. Only of use when orderBy is
10568// also used
10569//
10570// Possible values:
10571//   "ASCENDING" - Ascending order.
10572//   "DESCENDING" - Descending order.
10573func (c *MobiledevicesListCall) SortOrder(sortOrder string) *MobiledevicesListCall {
10574	c.urlParams_.Set("sortOrder", sortOrder)
10575	return c
10576}
10577
10578// Fields allows partial responses to be retrieved. See
10579// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10580// for more information.
10581func (c *MobiledevicesListCall) Fields(s ...googleapi.Field) *MobiledevicesListCall {
10582	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10583	return c
10584}
10585
10586// IfNoneMatch sets the optional parameter which makes the operation
10587// fail if the object's ETag matches the given value. This is useful for
10588// getting updates only after the object has changed since the last
10589// request. Use googleapi.IsNotModified to check whether the response
10590// error from Do is the result of In-None-Match.
10591func (c *MobiledevicesListCall) IfNoneMatch(entityTag string) *MobiledevicesListCall {
10592	c.ifNoneMatch_ = entityTag
10593	return c
10594}
10595
10596// Context sets the context to be used in this call's Do method. Any
10597// pending HTTP request will be aborted if the provided context is
10598// canceled.
10599func (c *MobiledevicesListCall) Context(ctx context.Context) *MobiledevicesListCall {
10600	c.ctx_ = ctx
10601	return c
10602}
10603
10604// Header returns an http.Header that can be modified by the caller to
10605// add HTTP headers to the request.
10606func (c *MobiledevicesListCall) Header() http.Header {
10607	if c.header_ == nil {
10608		c.header_ = make(http.Header)
10609	}
10610	return c.header_
10611}
10612
10613func (c *MobiledevicesListCall) doRequest(alt string) (*http.Response, error) {
10614	reqHeaders := make(http.Header)
10615	for k, v := range c.header_ {
10616		reqHeaders[k] = v
10617	}
10618	reqHeaders.Set("User-Agent", c.s.userAgent())
10619	if c.ifNoneMatch_ != "" {
10620		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10621	}
10622	var body io.Reader = nil
10623	c.urlParams_.Set("alt", alt)
10624	c.urlParams_.Set("prettyPrint", "false")
10625	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/devices/mobile")
10626	urls += "?" + c.urlParams_.Encode()
10627	req, err := http.NewRequest("GET", urls, body)
10628	if err != nil {
10629		return nil, err
10630	}
10631	req.Header = reqHeaders
10632	googleapi.Expand(req.URL, map[string]string{
10633		"customerId": c.customerId,
10634	})
10635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10636}
10637
10638// Do executes the "directory.mobiledevices.list" call.
10639// Exactly one of *MobileDevices or error will be non-nil. Any non-2xx
10640// status code is an error. Response headers are in either
10641// *MobileDevices.ServerResponse.Header or (if a response was returned
10642// at all) in error.(*googleapi.Error).Header. Use
10643// googleapi.IsNotModified to check whether the returned error was
10644// because http.StatusNotModified was returned.
10645func (c *MobiledevicesListCall) Do(opts ...googleapi.CallOption) (*MobileDevices, error) {
10646	gensupport.SetOptions(c.urlParams_, opts...)
10647	res, err := c.doRequest("json")
10648	if res != nil && res.StatusCode == http.StatusNotModified {
10649		if res.Body != nil {
10650			res.Body.Close()
10651		}
10652		return nil, &googleapi.Error{
10653			Code:   res.StatusCode,
10654			Header: res.Header,
10655		}
10656	}
10657	if err != nil {
10658		return nil, err
10659	}
10660	defer googleapi.CloseBody(res)
10661	if err := googleapi.CheckResponse(res); err != nil {
10662		return nil, err
10663	}
10664	ret := &MobileDevices{
10665		ServerResponse: googleapi.ServerResponse{
10666			Header:         res.Header,
10667			HTTPStatusCode: res.StatusCode,
10668		},
10669	}
10670	target := &ret
10671	if err := gensupport.DecodeResponse(target, res); err != nil {
10672		return nil, err
10673	}
10674	return ret, nil
10675	// {
10676	//   "description": "Retrieve all Mobile Devices of a customer (paginated)",
10677	//   "httpMethod": "GET",
10678	//   "id": "directory.mobiledevices.list",
10679	//   "parameterOrder": [
10680	//     "customerId"
10681	//   ],
10682	//   "parameters": {
10683	//     "customerId": {
10684	//       "description": "Immutable ID of the G Suite account",
10685	//       "location": "path",
10686	//       "required": true,
10687	//       "type": "string"
10688	//     },
10689	//     "maxResults": {
10690	//       "description": "Maximum number of results to return. Default is 100",
10691	//       "format": "int32",
10692	//       "location": "query",
10693	//       "minimum": "1",
10694	//       "type": "integer"
10695	//     },
10696	//     "orderBy": {
10697	//       "description": "Column to use for sorting results",
10698	//       "enum": [
10699	//         "deviceId",
10700	//         "email",
10701	//         "lastSync",
10702	//         "model",
10703	//         "name",
10704	//         "os",
10705	//         "status",
10706	//         "type"
10707	//       ],
10708	//       "enumDescriptions": [
10709	//         "Mobile Device serial number.",
10710	//         "Owner user email.",
10711	//         "Last policy settings sync date time of the device.",
10712	//         "Mobile Device model.",
10713	//         "Owner user name.",
10714	//         "Mobile operating system.",
10715	//         "Status of the device.",
10716	//         "Type of the device."
10717	//       ],
10718	//       "location": "query",
10719	//       "type": "string"
10720	//     },
10721	//     "pageToken": {
10722	//       "description": "Token to specify next page in the list",
10723	//       "location": "query",
10724	//       "type": "string"
10725	//     },
10726	//     "projection": {
10727	//       "description": "Restrict information returned to a set of selected fields.",
10728	//       "enum": [
10729	//         "BASIC",
10730	//         "FULL"
10731	//       ],
10732	//       "enumDescriptions": [
10733	//         "Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status)",
10734	//         "Includes all metadata fields"
10735	//       ],
10736	//       "location": "query",
10737	//       "type": "string"
10738	//     },
10739	//     "query": {
10740	//       "description": "Search string in the format given at http://support.google.com/a/bin/answer.py?answer=1408863#search",
10741	//       "location": "query",
10742	//       "type": "string"
10743	//     },
10744	//     "sortOrder": {
10745	//       "description": "Whether to return results in ascending or descending order. Only of use when orderBy is also used",
10746	//       "enum": [
10747	//         "ASCENDING",
10748	//         "DESCENDING"
10749	//       ],
10750	//       "enumDescriptions": [
10751	//         "Ascending order.",
10752	//         "Descending order."
10753	//       ],
10754	//       "location": "query",
10755	//       "type": "string"
10756	//     }
10757	//   },
10758	//   "path": "customer/{customerId}/devices/mobile",
10759	//   "response": {
10760	//     "$ref": "MobileDevices"
10761	//   },
10762	//   "scopes": [
10763	//     "https://www.googleapis.com/auth/admin.directory.device.mobile",
10764	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.action",
10765	//     "https://www.googleapis.com/auth/admin.directory.device.mobile.readonly"
10766	//   ]
10767	// }
10768
10769}
10770
10771// Pages invokes f for each page of results.
10772// A non-nil error returned from f will halt the iteration.
10773// The provided context supersedes any context provided to the Context method.
10774func (c *MobiledevicesListCall) Pages(ctx context.Context, f func(*MobileDevices) error) error {
10775	c.ctx_ = ctx
10776	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10777	for {
10778		x, err := c.Do()
10779		if err != nil {
10780			return err
10781		}
10782		if err := f(x); err != nil {
10783			return err
10784		}
10785		if x.NextPageToken == "" {
10786			return nil
10787		}
10788		c.PageToken(x.NextPageToken)
10789	}
10790}
10791
10792// method id "directory.notifications.delete":
10793
10794type NotificationsDeleteCall struct {
10795	s              *Service
10796	customer       string
10797	notificationId string
10798	urlParams_     gensupport.URLParams
10799	ctx_           context.Context
10800	header_        http.Header
10801}
10802
10803// Delete: Deletes a notification
10804func (r *NotificationsService) Delete(customer string, notificationId string) *NotificationsDeleteCall {
10805	c := &NotificationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10806	c.customer = customer
10807	c.notificationId = notificationId
10808	return c
10809}
10810
10811// Fields allows partial responses to be retrieved. See
10812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10813// for more information.
10814func (c *NotificationsDeleteCall) Fields(s ...googleapi.Field) *NotificationsDeleteCall {
10815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10816	return c
10817}
10818
10819// Context sets the context to be used in this call's Do method. Any
10820// pending HTTP request will be aborted if the provided context is
10821// canceled.
10822func (c *NotificationsDeleteCall) Context(ctx context.Context) *NotificationsDeleteCall {
10823	c.ctx_ = ctx
10824	return c
10825}
10826
10827// Header returns an http.Header that can be modified by the caller to
10828// add HTTP headers to the request.
10829func (c *NotificationsDeleteCall) Header() http.Header {
10830	if c.header_ == nil {
10831		c.header_ = make(http.Header)
10832	}
10833	return c.header_
10834}
10835
10836func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) {
10837	reqHeaders := make(http.Header)
10838	for k, v := range c.header_ {
10839		reqHeaders[k] = v
10840	}
10841	reqHeaders.Set("User-Agent", c.s.userAgent())
10842	var body io.Reader = nil
10843	c.urlParams_.Set("alt", alt)
10844	c.urlParams_.Set("prettyPrint", "false")
10845	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}")
10846	urls += "?" + c.urlParams_.Encode()
10847	req, err := http.NewRequest("DELETE", urls, body)
10848	if err != nil {
10849		return nil, err
10850	}
10851	req.Header = reqHeaders
10852	googleapi.Expand(req.URL, map[string]string{
10853		"customer":       c.customer,
10854		"notificationId": c.notificationId,
10855	})
10856	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10857}
10858
10859// Do executes the "directory.notifications.delete" call.
10860func (c *NotificationsDeleteCall) Do(opts ...googleapi.CallOption) error {
10861	gensupport.SetOptions(c.urlParams_, opts...)
10862	res, err := c.doRequest("json")
10863	if err != nil {
10864		return err
10865	}
10866	defer googleapi.CloseBody(res)
10867	if err := googleapi.CheckResponse(res); err != nil {
10868		return err
10869	}
10870	return nil
10871	// {
10872	//   "description": "Deletes a notification",
10873	//   "httpMethod": "DELETE",
10874	//   "id": "directory.notifications.delete",
10875	//   "parameterOrder": [
10876	//     "customer",
10877	//     "notificationId"
10878	//   ],
10879	//   "parameters": {
10880	//     "customer": {
10881	//       "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.",
10882	//       "location": "path",
10883	//       "required": true,
10884	//       "type": "string"
10885	//     },
10886	//     "notificationId": {
10887	//       "description": "The unique ID of the notification.",
10888	//       "location": "path",
10889	//       "required": true,
10890	//       "type": "string"
10891	//     }
10892	//   },
10893	//   "path": "customer/{customer}/notifications/{notificationId}",
10894	//   "scopes": [
10895	//     "https://www.googleapis.com/auth/admin.directory.notifications"
10896	//   ]
10897	// }
10898
10899}
10900
10901// method id "directory.notifications.get":
10902
10903type NotificationsGetCall struct {
10904	s              *Service
10905	customer       string
10906	notificationId string
10907	urlParams_     gensupport.URLParams
10908	ifNoneMatch_   string
10909	ctx_           context.Context
10910	header_        http.Header
10911}
10912
10913// Get: Retrieves a notification.
10914func (r *NotificationsService) Get(customer string, notificationId string) *NotificationsGetCall {
10915	c := &NotificationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10916	c.customer = customer
10917	c.notificationId = notificationId
10918	return c
10919}
10920
10921// Fields allows partial responses to be retrieved. See
10922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10923// for more information.
10924func (c *NotificationsGetCall) Fields(s ...googleapi.Field) *NotificationsGetCall {
10925	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10926	return c
10927}
10928
10929// IfNoneMatch sets the optional parameter which makes the operation
10930// fail if the object's ETag matches the given value. This is useful for
10931// getting updates only after the object has changed since the last
10932// request. Use googleapi.IsNotModified to check whether the response
10933// error from Do is the result of In-None-Match.
10934func (c *NotificationsGetCall) IfNoneMatch(entityTag string) *NotificationsGetCall {
10935	c.ifNoneMatch_ = entityTag
10936	return c
10937}
10938
10939// Context sets the context to be used in this call's Do method. Any
10940// pending HTTP request will be aborted if the provided context is
10941// canceled.
10942func (c *NotificationsGetCall) Context(ctx context.Context) *NotificationsGetCall {
10943	c.ctx_ = ctx
10944	return c
10945}
10946
10947// Header returns an http.Header that can be modified by the caller to
10948// add HTTP headers to the request.
10949func (c *NotificationsGetCall) Header() http.Header {
10950	if c.header_ == nil {
10951		c.header_ = make(http.Header)
10952	}
10953	return c.header_
10954}
10955
10956func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) {
10957	reqHeaders := make(http.Header)
10958	for k, v := range c.header_ {
10959		reqHeaders[k] = v
10960	}
10961	reqHeaders.Set("User-Agent", c.s.userAgent())
10962	if c.ifNoneMatch_ != "" {
10963		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10964	}
10965	var body io.Reader = nil
10966	c.urlParams_.Set("alt", alt)
10967	c.urlParams_.Set("prettyPrint", "false")
10968	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}")
10969	urls += "?" + c.urlParams_.Encode()
10970	req, err := http.NewRequest("GET", urls, body)
10971	if err != nil {
10972		return nil, err
10973	}
10974	req.Header = reqHeaders
10975	googleapi.Expand(req.URL, map[string]string{
10976		"customer":       c.customer,
10977		"notificationId": c.notificationId,
10978	})
10979	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10980}
10981
10982// Do executes the "directory.notifications.get" call.
10983// Exactly one of *Notification or error will be non-nil. Any non-2xx
10984// status code is an error. Response headers are in either
10985// *Notification.ServerResponse.Header or (if a response was returned at
10986// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10987// to check whether the returned error was because
10988// http.StatusNotModified was returned.
10989func (c *NotificationsGetCall) Do(opts ...googleapi.CallOption) (*Notification, error) {
10990	gensupport.SetOptions(c.urlParams_, opts...)
10991	res, err := c.doRequest("json")
10992	if res != nil && res.StatusCode == http.StatusNotModified {
10993		if res.Body != nil {
10994			res.Body.Close()
10995		}
10996		return nil, &googleapi.Error{
10997			Code:   res.StatusCode,
10998			Header: res.Header,
10999		}
11000	}
11001	if err != nil {
11002		return nil, err
11003	}
11004	defer googleapi.CloseBody(res)
11005	if err := googleapi.CheckResponse(res); err != nil {
11006		return nil, err
11007	}
11008	ret := &Notification{
11009		ServerResponse: googleapi.ServerResponse{
11010			Header:         res.Header,
11011			HTTPStatusCode: res.StatusCode,
11012		},
11013	}
11014	target := &ret
11015	if err := gensupport.DecodeResponse(target, res); err != nil {
11016		return nil, err
11017	}
11018	return ret, nil
11019	// {
11020	//   "description": "Retrieves a notification.",
11021	//   "httpMethod": "GET",
11022	//   "id": "directory.notifications.get",
11023	//   "parameterOrder": [
11024	//     "customer",
11025	//     "notificationId"
11026	//   ],
11027	//   "parameters": {
11028	//     "customer": {
11029	//       "description": "The unique ID for the customer's G Suite account. The customerId is also returned as part of the Users resource.",
11030	//       "location": "path",
11031	//       "required": true,
11032	//       "type": "string"
11033	//     },
11034	//     "notificationId": {
11035	//       "description": "The unique ID of the notification.",
11036	//       "location": "path",
11037	//       "required": true,
11038	//       "type": "string"
11039	//     }
11040	//   },
11041	//   "path": "customer/{customer}/notifications/{notificationId}",
11042	//   "response": {
11043	//     "$ref": "Notification"
11044	//   },
11045	//   "scopes": [
11046	//     "https://www.googleapis.com/auth/admin.directory.notifications"
11047	//   ]
11048	// }
11049
11050}
11051
11052// method id "directory.notifications.list":
11053
11054type NotificationsListCall struct {
11055	s            *Service
11056	customer     string
11057	urlParams_   gensupport.URLParams
11058	ifNoneMatch_ string
11059	ctx_         context.Context
11060	header_      http.Header
11061}
11062
11063// List: Retrieves a list of notifications.
11064func (r *NotificationsService) List(customer string) *NotificationsListCall {
11065	c := &NotificationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11066	c.customer = customer
11067	return c
11068}
11069
11070// Language sets the optional parameter "language": The ISO 639-1 code
11071// of the language notifications are returned in. The default is English
11072// (en).
11073func (c *NotificationsListCall) Language(language string) *NotificationsListCall {
11074	c.urlParams_.Set("language", language)
11075	return c
11076}
11077
11078// MaxResults sets the optional parameter "maxResults": Maximum number
11079// of notifications to return per page. The default is 100.
11080func (c *NotificationsListCall) MaxResults(maxResults int64) *NotificationsListCall {
11081	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11082	return c
11083}
11084
11085// PageToken sets the optional parameter "pageToken": The token to
11086// specify the page of results to retrieve.
11087func (c *NotificationsListCall) PageToken(pageToken string) *NotificationsListCall {
11088	c.urlParams_.Set("pageToken", pageToken)
11089	return c
11090}
11091
11092// Fields allows partial responses to be retrieved. See
11093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11094// for more information.
11095func (c *NotificationsListCall) Fields(s ...googleapi.Field) *NotificationsListCall {
11096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11097	return c
11098}
11099
11100// IfNoneMatch sets the optional parameter which makes the operation
11101// fail if the object's ETag matches the given value. This is useful for
11102// getting updates only after the object has changed since the last
11103// request. Use googleapi.IsNotModified to check whether the response
11104// error from Do is the result of In-None-Match.
11105func (c *NotificationsListCall) IfNoneMatch(entityTag string) *NotificationsListCall {
11106	c.ifNoneMatch_ = entityTag
11107	return c
11108}
11109
11110// Context sets the context to be used in this call's Do method. Any
11111// pending HTTP request will be aborted if the provided context is
11112// canceled.
11113func (c *NotificationsListCall) Context(ctx context.Context) *NotificationsListCall {
11114	c.ctx_ = ctx
11115	return c
11116}
11117
11118// Header returns an http.Header that can be modified by the caller to
11119// add HTTP headers to the request.
11120func (c *NotificationsListCall) Header() http.Header {
11121	if c.header_ == nil {
11122		c.header_ = make(http.Header)
11123	}
11124	return c.header_
11125}
11126
11127func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) {
11128	reqHeaders := make(http.Header)
11129	for k, v := range c.header_ {
11130		reqHeaders[k] = v
11131	}
11132	reqHeaders.Set("User-Agent", c.s.userAgent())
11133	if c.ifNoneMatch_ != "" {
11134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11135	}
11136	var body io.Reader = nil
11137	c.urlParams_.Set("alt", alt)
11138	c.urlParams_.Set("prettyPrint", "false")
11139	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications")
11140	urls += "?" + c.urlParams_.Encode()
11141	req, err := http.NewRequest("GET", urls, body)
11142	if err != nil {
11143		return nil, err
11144	}
11145	req.Header = reqHeaders
11146	googleapi.Expand(req.URL, map[string]string{
11147		"customer": c.customer,
11148	})
11149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11150}
11151
11152// Do executes the "directory.notifications.list" call.
11153// Exactly one of *Notifications or error will be non-nil. Any non-2xx
11154// status code is an error. Response headers are in either
11155// *Notifications.ServerResponse.Header or (if a response was returned
11156// at all) in error.(*googleapi.Error).Header. Use
11157// googleapi.IsNotModified to check whether the returned error was
11158// because http.StatusNotModified was returned.
11159func (c *NotificationsListCall) Do(opts ...googleapi.CallOption) (*Notifications, error) {
11160	gensupport.SetOptions(c.urlParams_, opts...)
11161	res, err := c.doRequest("json")
11162	if res != nil && res.StatusCode == http.StatusNotModified {
11163		if res.Body != nil {
11164			res.Body.Close()
11165		}
11166		return nil, &googleapi.Error{
11167			Code:   res.StatusCode,
11168			Header: res.Header,
11169		}
11170	}
11171	if err != nil {
11172		return nil, err
11173	}
11174	defer googleapi.CloseBody(res)
11175	if err := googleapi.CheckResponse(res); err != nil {
11176		return nil, err
11177	}
11178	ret := &Notifications{
11179		ServerResponse: googleapi.ServerResponse{
11180			Header:         res.Header,
11181			HTTPStatusCode: res.StatusCode,
11182		},
11183	}
11184	target := &ret
11185	if err := gensupport.DecodeResponse(target, res); err != nil {
11186		return nil, err
11187	}
11188	return ret, nil
11189	// {
11190	//   "description": "Retrieves a list of notifications.",
11191	//   "httpMethod": "GET",
11192	//   "id": "directory.notifications.list",
11193	//   "parameterOrder": [
11194	//     "customer"
11195	//   ],
11196	//   "parameters": {
11197	//     "customer": {
11198	//       "description": "The unique ID for the customer's G Suite account.",
11199	//       "location": "path",
11200	//       "required": true,
11201	//       "type": "string"
11202	//     },
11203	//     "language": {
11204	//       "description": "The ISO 639-1 code of the language notifications are returned in. The default is English (en).",
11205	//       "location": "query",
11206	//       "type": "string"
11207	//     },
11208	//     "maxResults": {
11209	//       "description": "Maximum number of notifications to return per page. The default is 100.",
11210	//       "format": "uint32",
11211	//       "location": "query",
11212	//       "type": "integer"
11213	//     },
11214	//     "pageToken": {
11215	//       "description": "The token to specify the page of results to retrieve.",
11216	//       "location": "query",
11217	//       "type": "string"
11218	//     }
11219	//   },
11220	//   "path": "customer/{customer}/notifications",
11221	//   "response": {
11222	//     "$ref": "Notifications"
11223	//   },
11224	//   "scopes": [
11225	//     "https://www.googleapis.com/auth/admin.directory.notifications"
11226	//   ]
11227	// }
11228
11229}
11230
11231// Pages invokes f for each page of results.
11232// A non-nil error returned from f will halt the iteration.
11233// The provided context supersedes any context provided to the Context method.
11234func (c *NotificationsListCall) Pages(ctx context.Context, f func(*Notifications) error) error {
11235	c.ctx_ = ctx
11236	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11237	for {
11238		x, err := c.Do()
11239		if err != nil {
11240			return err
11241		}
11242		if err := f(x); err != nil {
11243			return err
11244		}
11245		if x.NextPageToken == "" {
11246			return nil
11247		}
11248		c.PageToken(x.NextPageToken)
11249	}
11250}
11251
11252// method id "directory.notifications.patch":
11253
11254type NotificationsPatchCall struct {
11255	s              *Service
11256	customer       string
11257	notificationId string
11258	notification   *Notification
11259	urlParams_     gensupport.URLParams
11260	ctx_           context.Context
11261	header_        http.Header
11262}
11263
11264// Patch: Updates a notification. This method supports patch semantics.
11265func (r *NotificationsService) Patch(customer string, notificationId string, notification *Notification) *NotificationsPatchCall {
11266	c := &NotificationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11267	c.customer = customer
11268	c.notificationId = notificationId
11269	c.notification = notification
11270	return c
11271}
11272
11273// Fields allows partial responses to be retrieved. See
11274// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11275// for more information.
11276func (c *NotificationsPatchCall) Fields(s ...googleapi.Field) *NotificationsPatchCall {
11277	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11278	return c
11279}
11280
11281// Context sets the context to be used in this call's Do method. Any
11282// pending HTTP request will be aborted if the provided context is
11283// canceled.
11284func (c *NotificationsPatchCall) Context(ctx context.Context) *NotificationsPatchCall {
11285	c.ctx_ = ctx
11286	return c
11287}
11288
11289// Header returns an http.Header that can be modified by the caller to
11290// add HTTP headers to the request.
11291func (c *NotificationsPatchCall) Header() http.Header {
11292	if c.header_ == nil {
11293		c.header_ = make(http.Header)
11294	}
11295	return c.header_
11296}
11297
11298func (c *NotificationsPatchCall) doRequest(alt string) (*http.Response, error) {
11299	reqHeaders := make(http.Header)
11300	for k, v := range c.header_ {
11301		reqHeaders[k] = v
11302	}
11303	reqHeaders.Set("User-Agent", c.s.userAgent())
11304	var body io.Reader = nil
11305	body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification)
11306	if err != nil {
11307		return nil, err
11308	}
11309	reqHeaders.Set("Content-Type", "application/json")
11310	c.urlParams_.Set("alt", alt)
11311	c.urlParams_.Set("prettyPrint", "false")
11312	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}")
11313	urls += "?" + c.urlParams_.Encode()
11314	req, err := http.NewRequest("PATCH", urls, body)
11315	if err != nil {
11316		return nil, err
11317	}
11318	req.Header = reqHeaders
11319	googleapi.Expand(req.URL, map[string]string{
11320		"customer":       c.customer,
11321		"notificationId": c.notificationId,
11322	})
11323	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11324}
11325
11326// Do executes the "directory.notifications.patch" call.
11327// Exactly one of *Notification or error will be non-nil. Any non-2xx
11328// status code is an error. Response headers are in either
11329// *Notification.ServerResponse.Header or (if a response was returned at
11330// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11331// to check whether the returned error was because
11332// http.StatusNotModified was returned.
11333func (c *NotificationsPatchCall) Do(opts ...googleapi.CallOption) (*Notification, error) {
11334	gensupport.SetOptions(c.urlParams_, opts...)
11335	res, err := c.doRequest("json")
11336	if res != nil && res.StatusCode == http.StatusNotModified {
11337		if res.Body != nil {
11338			res.Body.Close()
11339		}
11340		return nil, &googleapi.Error{
11341			Code:   res.StatusCode,
11342			Header: res.Header,
11343		}
11344	}
11345	if err != nil {
11346		return nil, err
11347	}
11348	defer googleapi.CloseBody(res)
11349	if err := googleapi.CheckResponse(res); err != nil {
11350		return nil, err
11351	}
11352	ret := &Notification{
11353		ServerResponse: googleapi.ServerResponse{
11354			Header:         res.Header,
11355			HTTPStatusCode: res.StatusCode,
11356		},
11357	}
11358	target := &ret
11359	if err := gensupport.DecodeResponse(target, res); err != nil {
11360		return nil, err
11361	}
11362	return ret, nil
11363	// {
11364	//   "description": "Updates a notification. This method supports patch semantics.",
11365	//   "httpMethod": "PATCH",
11366	//   "id": "directory.notifications.patch",
11367	//   "parameterOrder": [
11368	//     "customer",
11369	//     "notificationId"
11370	//   ],
11371	//   "parameters": {
11372	//     "customer": {
11373	//       "description": "The unique ID for the customer's G Suite account.",
11374	//       "location": "path",
11375	//       "required": true,
11376	//       "type": "string"
11377	//     },
11378	//     "notificationId": {
11379	//       "description": "The unique ID of the notification.",
11380	//       "location": "path",
11381	//       "required": true,
11382	//       "type": "string"
11383	//     }
11384	//   },
11385	//   "path": "customer/{customer}/notifications/{notificationId}",
11386	//   "request": {
11387	//     "$ref": "Notification"
11388	//   },
11389	//   "response": {
11390	//     "$ref": "Notification"
11391	//   },
11392	//   "scopes": [
11393	//     "https://www.googleapis.com/auth/admin.directory.notifications"
11394	//   ]
11395	// }
11396
11397}
11398
11399// method id "directory.notifications.update":
11400
11401type NotificationsUpdateCall struct {
11402	s              *Service
11403	customer       string
11404	notificationId string
11405	notification   *Notification
11406	urlParams_     gensupport.URLParams
11407	ctx_           context.Context
11408	header_        http.Header
11409}
11410
11411// Update: Updates a notification.
11412func (r *NotificationsService) Update(customer string, notificationId string, notification *Notification) *NotificationsUpdateCall {
11413	c := &NotificationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11414	c.customer = customer
11415	c.notificationId = notificationId
11416	c.notification = notification
11417	return c
11418}
11419
11420// Fields allows partial responses to be retrieved. See
11421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11422// for more information.
11423func (c *NotificationsUpdateCall) Fields(s ...googleapi.Field) *NotificationsUpdateCall {
11424	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11425	return c
11426}
11427
11428// Context sets the context to be used in this call's Do method. Any
11429// pending HTTP request will be aborted if the provided context is
11430// canceled.
11431func (c *NotificationsUpdateCall) Context(ctx context.Context) *NotificationsUpdateCall {
11432	c.ctx_ = ctx
11433	return c
11434}
11435
11436// Header returns an http.Header that can be modified by the caller to
11437// add HTTP headers to the request.
11438func (c *NotificationsUpdateCall) Header() http.Header {
11439	if c.header_ == nil {
11440		c.header_ = make(http.Header)
11441	}
11442	return c.header_
11443}
11444
11445func (c *NotificationsUpdateCall) doRequest(alt string) (*http.Response, error) {
11446	reqHeaders := make(http.Header)
11447	for k, v := range c.header_ {
11448		reqHeaders[k] = v
11449	}
11450	reqHeaders.Set("User-Agent", c.s.userAgent())
11451	var body io.Reader = nil
11452	body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification)
11453	if err != nil {
11454		return nil, err
11455	}
11456	reqHeaders.Set("Content-Type", "application/json")
11457	c.urlParams_.Set("alt", alt)
11458	c.urlParams_.Set("prettyPrint", "false")
11459	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/notifications/{notificationId}")
11460	urls += "?" + c.urlParams_.Encode()
11461	req, err := http.NewRequest("PUT", urls, body)
11462	if err != nil {
11463		return nil, err
11464	}
11465	req.Header = reqHeaders
11466	googleapi.Expand(req.URL, map[string]string{
11467		"customer":       c.customer,
11468		"notificationId": c.notificationId,
11469	})
11470	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11471}
11472
11473// Do executes the "directory.notifications.update" call.
11474// Exactly one of *Notification or error will be non-nil. Any non-2xx
11475// status code is an error. Response headers are in either
11476// *Notification.ServerResponse.Header or (if a response was returned at
11477// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11478// to check whether the returned error was because
11479// http.StatusNotModified was returned.
11480func (c *NotificationsUpdateCall) Do(opts ...googleapi.CallOption) (*Notification, error) {
11481	gensupport.SetOptions(c.urlParams_, opts...)
11482	res, err := c.doRequest("json")
11483	if res != nil && res.StatusCode == http.StatusNotModified {
11484		if res.Body != nil {
11485			res.Body.Close()
11486		}
11487		return nil, &googleapi.Error{
11488			Code:   res.StatusCode,
11489			Header: res.Header,
11490		}
11491	}
11492	if err != nil {
11493		return nil, err
11494	}
11495	defer googleapi.CloseBody(res)
11496	if err := googleapi.CheckResponse(res); err != nil {
11497		return nil, err
11498	}
11499	ret := &Notification{
11500		ServerResponse: googleapi.ServerResponse{
11501			Header:         res.Header,
11502			HTTPStatusCode: res.StatusCode,
11503		},
11504	}
11505	target := &ret
11506	if err := gensupport.DecodeResponse(target, res); err != nil {
11507		return nil, err
11508	}
11509	return ret, nil
11510	// {
11511	//   "description": "Updates a notification.",
11512	//   "httpMethod": "PUT",
11513	//   "id": "directory.notifications.update",
11514	//   "parameterOrder": [
11515	//     "customer",
11516	//     "notificationId"
11517	//   ],
11518	//   "parameters": {
11519	//     "customer": {
11520	//       "description": "The unique ID for the customer's G Suite account.",
11521	//       "location": "path",
11522	//       "required": true,
11523	//       "type": "string"
11524	//     },
11525	//     "notificationId": {
11526	//       "description": "The unique ID of the notification.",
11527	//       "location": "path",
11528	//       "required": true,
11529	//       "type": "string"
11530	//     }
11531	//   },
11532	//   "path": "customer/{customer}/notifications/{notificationId}",
11533	//   "request": {
11534	//     "$ref": "Notification"
11535	//   },
11536	//   "response": {
11537	//     "$ref": "Notification"
11538	//   },
11539	//   "scopes": [
11540	//     "https://www.googleapis.com/auth/admin.directory.notifications"
11541	//   ]
11542	// }
11543
11544}
11545
11546// method id "directory.orgunits.delete":
11547
11548type OrgunitsDeleteCall struct {
11549	s           *Service
11550	customerId  string
11551	orgUnitPath []string
11552	urlParams_  gensupport.URLParams
11553	ctx_        context.Context
11554	header_     http.Header
11555}
11556
11557// Delete: Remove organizational unit
11558func (r *OrgunitsService) Delete(customerId string, orgUnitPath []string) *OrgunitsDeleteCall {
11559	c := &OrgunitsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11560	c.customerId = customerId
11561	c.orgUnitPath = append([]string{}, orgUnitPath...)
11562	return c
11563}
11564
11565// Fields allows partial responses to be retrieved. See
11566// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11567// for more information.
11568func (c *OrgunitsDeleteCall) Fields(s ...googleapi.Field) *OrgunitsDeleteCall {
11569	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11570	return c
11571}
11572
11573// Context sets the context to be used in this call's Do method. Any
11574// pending HTTP request will be aborted if the provided context is
11575// canceled.
11576func (c *OrgunitsDeleteCall) Context(ctx context.Context) *OrgunitsDeleteCall {
11577	c.ctx_ = ctx
11578	return c
11579}
11580
11581// Header returns an http.Header that can be modified by the caller to
11582// add HTTP headers to the request.
11583func (c *OrgunitsDeleteCall) Header() http.Header {
11584	if c.header_ == nil {
11585		c.header_ = make(http.Header)
11586	}
11587	return c.header_
11588}
11589
11590func (c *OrgunitsDeleteCall) doRequest(alt string) (*http.Response, error) {
11591	reqHeaders := make(http.Header)
11592	for k, v := range c.header_ {
11593		reqHeaders[k] = v
11594	}
11595	reqHeaders.Set("User-Agent", c.s.userAgent())
11596	var body io.Reader = nil
11597	c.urlParams_.Set("alt", alt)
11598	c.urlParams_.Set("prettyPrint", "false")
11599	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}")
11600	urls += "?" + c.urlParams_.Encode()
11601	req, err := http.NewRequest("DELETE", urls, body)
11602	if err != nil {
11603		return nil, err
11604	}
11605	req.Header = reqHeaders
11606	googleapi.Expand(req.URL, map[string]string{
11607		"customerId":  c.customerId,
11608		"orgUnitPath": c.orgUnitPath[0],
11609	})
11610	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11611}
11612
11613// Do executes the "directory.orgunits.delete" call.
11614func (c *OrgunitsDeleteCall) Do(opts ...googleapi.CallOption) error {
11615	gensupport.SetOptions(c.urlParams_, opts...)
11616	res, err := c.doRequest("json")
11617	if err != nil {
11618		return err
11619	}
11620	defer googleapi.CloseBody(res)
11621	if err := googleapi.CheckResponse(res); err != nil {
11622		return err
11623	}
11624	return nil
11625	// {
11626	//   "description": "Remove organizational unit",
11627	//   "httpMethod": "DELETE",
11628	//   "id": "directory.orgunits.delete",
11629	//   "parameterOrder": [
11630	//     "customerId",
11631	//     "orgUnitPath"
11632	//   ],
11633	//   "parameters": {
11634	//     "customerId": {
11635	//       "description": "Immutable ID of the G Suite account",
11636	//       "location": "path",
11637	//       "required": true,
11638	//       "type": "string"
11639	//     },
11640	//     "orgUnitPath": {
11641	//       "description": "Full path of the organizational unit or its ID",
11642	//       "location": "path",
11643	//       "repeated": true,
11644	//       "required": true,
11645	//       "type": "string"
11646	//     }
11647	//   },
11648	//   "path": "customer/{customerId}/orgunits{/orgUnitPath*}",
11649	//   "scopes": [
11650	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
11651	//   ]
11652	// }
11653
11654}
11655
11656// method id "directory.orgunits.get":
11657
11658type OrgunitsGetCall struct {
11659	s            *Service
11660	customerId   string
11661	orgUnitPath  []string
11662	urlParams_   gensupport.URLParams
11663	ifNoneMatch_ string
11664	ctx_         context.Context
11665	header_      http.Header
11666}
11667
11668// Get: Retrieve organizational unit
11669func (r *OrgunitsService) Get(customerId string, orgUnitPath []string) *OrgunitsGetCall {
11670	c := &OrgunitsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11671	c.customerId = customerId
11672	c.orgUnitPath = append([]string{}, orgUnitPath...)
11673	return c
11674}
11675
11676// Fields allows partial responses to be retrieved. See
11677// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11678// for more information.
11679func (c *OrgunitsGetCall) Fields(s ...googleapi.Field) *OrgunitsGetCall {
11680	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11681	return c
11682}
11683
11684// IfNoneMatch sets the optional parameter which makes the operation
11685// fail if the object's ETag matches the given value. This is useful for
11686// getting updates only after the object has changed since the last
11687// request. Use googleapi.IsNotModified to check whether the response
11688// error from Do is the result of In-None-Match.
11689func (c *OrgunitsGetCall) IfNoneMatch(entityTag string) *OrgunitsGetCall {
11690	c.ifNoneMatch_ = entityTag
11691	return c
11692}
11693
11694// Context sets the context to be used in this call's Do method. Any
11695// pending HTTP request will be aborted if the provided context is
11696// canceled.
11697func (c *OrgunitsGetCall) Context(ctx context.Context) *OrgunitsGetCall {
11698	c.ctx_ = ctx
11699	return c
11700}
11701
11702// Header returns an http.Header that can be modified by the caller to
11703// add HTTP headers to the request.
11704func (c *OrgunitsGetCall) Header() http.Header {
11705	if c.header_ == nil {
11706		c.header_ = make(http.Header)
11707	}
11708	return c.header_
11709}
11710
11711func (c *OrgunitsGetCall) doRequest(alt string) (*http.Response, error) {
11712	reqHeaders := make(http.Header)
11713	for k, v := range c.header_ {
11714		reqHeaders[k] = v
11715	}
11716	reqHeaders.Set("User-Agent", c.s.userAgent())
11717	if c.ifNoneMatch_ != "" {
11718		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11719	}
11720	var body io.Reader = nil
11721	c.urlParams_.Set("alt", alt)
11722	c.urlParams_.Set("prettyPrint", "false")
11723	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}")
11724	urls += "?" + c.urlParams_.Encode()
11725	req, err := http.NewRequest("GET", urls, body)
11726	if err != nil {
11727		return nil, err
11728	}
11729	req.Header = reqHeaders
11730	googleapi.Expand(req.URL, map[string]string{
11731		"customerId":  c.customerId,
11732		"orgUnitPath": c.orgUnitPath[0],
11733	})
11734	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11735}
11736
11737// Do executes the "directory.orgunits.get" call.
11738// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
11739// code is an error. Response headers are in either
11740// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
11741// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11742// check whether the returned error was because http.StatusNotModified
11743// was returned.
11744func (c *OrgunitsGetCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
11745	gensupport.SetOptions(c.urlParams_, opts...)
11746	res, err := c.doRequest("json")
11747	if res != nil && res.StatusCode == http.StatusNotModified {
11748		if res.Body != nil {
11749			res.Body.Close()
11750		}
11751		return nil, &googleapi.Error{
11752			Code:   res.StatusCode,
11753			Header: res.Header,
11754		}
11755	}
11756	if err != nil {
11757		return nil, err
11758	}
11759	defer googleapi.CloseBody(res)
11760	if err := googleapi.CheckResponse(res); err != nil {
11761		return nil, err
11762	}
11763	ret := &OrgUnit{
11764		ServerResponse: googleapi.ServerResponse{
11765			Header:         res.Header,
11766			HTTPStatusCode: res.StatusCode,
11767		},
11768	}
11769	target := &ret
11770	if err := gensupport.DecodeResponse(target, res); err != nil {
11771		return nil, err
11772	}
11773	return ret, nil
11774	// {
11775	//   "description": "Retrieve organizational unit",
11776	//   "httpMethod": "GET",
11777	//   "id": "directory.orgunits.get",
11778	//   "parameterOrder": [
11779	//     "customerId",
11780	//     "orgUnitPath"
11781	//   ],
11782	//   "parameters": {
11783	//     "customerId": {
11784	//       "description": "Immutable ID of the G Suite account",
11785	//       "location": "path",
11786	//       "required": true,
11787	//       "type": "string"
11788	//     },
11789	//     "orgUnitPath": {
11790	//       "description": "Full path of the organizational unit or its ID",
11791	//       "location": "path",
11792	//       "repeated": true,
11793	//       "required": true,
11794	//       "type": "string"
11795	//     }
11796	//   },
11797	//   "path": "customer/{customerId}/orgunits{/orgUnitPath*}",
11798	//   "response": {
11799	//     "$ref": "OrgUnit"
11800	//   },
11801	//   "scopes": [
11802	//     "https://www.googleapis.com/auth/admin.directory.orgunit",
11803	//     "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
11804	//   ]
11805	// }
11806
11807}
11808
11809// method id "directory.orgunits.insert":
11810
11811type OrgunitsInsertCall struct {
11812	s          *Service
11813	customerId string
11814	orgunit    *OrgUnit
11815	urlParams_ gensupport.URLParams
11816	ctx_       context.Context
11817	header_    http.Header
11818}
11819
11820// Insert: Add organizational unit
11821func (r *OrgunitsService) Insert(customerId string, orgunit *OrgUnit) *OrgunitsInsertCall {
11822	c := &OrgunitsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11823	c.customerId = customerId
11824	c.orgunit = orgunit
11825	return c
11826}
11827
11828// Fields allows partial responses to be retrieved. See
11829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11830// for more information.
11831func (c *OrgunitsInsertCall) Fields(s ...googleapi.Field) *OrgunitsInsertCall {
11832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11833	return c
11834}
11835
11836// Context sets the context to be used in this call's Do method. Any
11837// pending HTTP request will be aborted if the provided context is
11838// canceled.
11839func (c *OrgunitsInsertCall) Context(ctx context.Context) *OrgunitsInsertCall {
11840	c.ctx_ = ctx
11841	return c
11842}
11843
11844// Header returns an http.Header that can be modified by the caller to
11845// add HTTP headers to the request.
11846func (c *OrgunitsInsertCall) Header() http.Header {
11847	if c.header_ == nil {
11848		c.header_ = make(http.Header)
11849	}
11850	return c.header_
11851}
11852
11853func (c *OrgunitsInsertCall) doRequest(alt string) (*http.Response, error) {
11854	reqHeaders := make(http.Header)
11855	for k, v := range c.header_ {
11856		reqHeaders[k] = v
11857	}
11858	reqHeaders.Set("User-Agent", c.s.userAgent())
11859	var body io.Reader = nil
11860	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
11861	if err != nil {
11862		return nil, err
11863	}
11864	reqHeaders.Set("Content-Type", "application/json")
11865	c.urlParams_.Set("alt", alt)
11866	c.urlParams_.Set("prettyPrint", "false")
11867	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits")
11868	urls += "?" + c.urlParams_.Encode()
11869	req, err := http.NewRequest("POST", urls, body)
11870	if err != nil {
11871		return nil, err
11872	}
11873	req.Header = reqHeaders
11874	googleapi.Expand(req.URL, map[string]string{
11875		"customerId": c.customerId,
11876	})
11877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11878}
11879
11880// Do executes the "directory.orgunits.insert" call.
11881// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
11882// code is an error. Response headers are in either
11883// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
11884// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11885// check whether the returned error was because http.StatusNotModified
11886// was returned.
11887func (c *OrgunitsInsertCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
11888	gensupport.SetOptions(c.urlParams_, opts...)
11889	res, err := c.doRequest("json")
11890	if res != nil && res.StatusCode == http.StatusNotModified {
11891		if res.Body != nil {
11892			res.Body.Close()
11893		}
11894		return nil, &googleapi.Error{
11895			Code:   res.StatusCode,
11896			Header: res.Header,
11897		}
11898	}
11899	if err != nil {
11900		return nil, err
11901	}
11902	defer googleapi.CloseBody(res)
11903	if err := googleapi.CheckResponse(res); err != nil {
11904		return nil, err
11905	}
11906	ret := &OrgUnit{
11907		ServerResponse: googleapi.ServerResponse{
11908			Header:         res.Header,
11909			HTTPStatusCode: res.StatusCode,
11910		},
11911	}
11912	target := &ret
11913	if err := gensupport.DecodeResponse(target, res); err != nil {
11914		return nil, err
11915	}
11916	return ret, nil
11917	// {
11918	//   "description": "Add organizational unit",
11919	//   "httpMethod": "POST",
11920	//   "id": "directory.orgunits.insert",
11921	//   "parameterOrder": [
11922	//     "customerId"
11923	//   ],
11924	//   "parameters": {
11925	//     "customerId": {
11926	//       "description": "Immutable ID of the G Suite account",
11927	//       "location": "path",
11928	//       "required": true,
11929	//       "type": "string"
11930	//     }
11931	//   },
11932	//   "path": "customer/{customerId}/orgunits",
11933	//   "request": {
11934	//     "$ref": "OrgUnit"
11935	//   },
11936	//   "response": {
11937	//     "$ref": "OrgUnit"
11938	//   },
11939	//   "scopes": [
11940	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
11941	//   ]
11942	// }
11943
11944}
11945
11946// method id "directory.orgunits.list":
11947
11948type OrgunitsListCall struct {
11949	s            *Service
11950	customerId   string
11951	urlParams_   gensupport.URLParams
11952	ifNoneMatch_ string
11953	ctx_         context.Context
11954	header_      http.Header
11955}
11956
11957// List: Retrieve all organizational units
11958func (r *OrgunitsService) List(customerId string) *OrgunitsListCall {
11959	c := &OrgunitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11960	c.customerId = customerId
11961	return c
11962}
11963
11964// OrgUnitPath sets the optional parameter "orgUnitPath": the
11965// URL-encoded organizational unit's path or its ID
11966func (c *OrgunitsListCall) OrgUnitPath(orgUnitPath string) *OrgunitsListCall {
11967	c.urlParams_.Set("orgUnitPath", orgUnitPath)
11968	return c
11969}
11970
11971// Type sets the optional parameter "type": Whether to return all
11972// sub-organizations or just immediate children
11973//
11974// Possible values:
11975//   "all" - All sub-organizational units.
11976//   "children" - Immediate children only (default).
11977func (c *OrgunitsListCall) Type(type_ string) *OrgunitsListCall {
11978	c.urlParams_.Set("type", type_)
11979	return c
11980}
11981
11982// Fields allows partial responses to be retrieved. See
11983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11984// for more information.
11985func (c *OrgunitsListCall) Fields(s ...googleapi.Field) *OrgunitsListCall {
11986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11987	return c
11988}
11989
11990// IfNoneMatch sets the optional parameter which makes the operation
11991// fail if the object's ETag matches the given value. This is useful for
11992// getting updates only after the object has changed since the last
11993// request. Use googleapi.IsNotModified to check whether the response
11994// error from Do is the result of In-None-Match.
11995func (c *OrgunitsListCall) IfNoneMatch(entityTag string) *OrgunitsListCall {
11996	c.ifNoneMatch_ = entityTag
11997	return c
11998}
11999
12000// Context sets the context to be used in this call's Do method. Any
12001// pending HTTP request will be aborted if the provided context is
12002// canceled.
12003func (c *OrgunitsListCall) Context(ctx context.Context) *OrgunitsListCall {
12004	c.ctx_ = ctx
12005	return c
12006}
12007
12008// Header returns an http.Header that can be modified by the caller to
12009// add HTTP headers to the request.
12010func (c *OrgunitsListCall) Header() http.Header {
12011	if c.header_ == nil {
12012		c.header_ = make(http.Header)
12013	}
12014	return c.header_
12015}
12016
12017func (c *OrgunitsListCall) doRequest(alt string) (*http.Response, error) {
12018	reqHeaders := make(http.Header)
12019	for k, v := range c.header_ {
12020		reqHeaders[k] = v
12021	}
12022	reqHeaders.Set("User-Agent", c.s.userAgent())
12023	if c.ifNoneMatch_ != "" {
12024		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12025	}
12026	var body io.Reader = nil
12027	c.urlParams_.Set("alt", alt)
12028	c.urlParams_.Set("prettyPrint", "false")
12029	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits")
12030	urls += "?" + c.urlParams_.Encode()
12031	req, err := http.NewRequest("GET", urls, body)
12032	if err != nil {
12033		return nil, err
12034	}
12035	req.Header = reqHeaders
12036	googleapi.Expand(req.URL, map[string]string{
12037		"customerId": c.customerId,
12038	})
12039	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12040}
12041
12042// Do executes the "directory.orgunits.list" call.
12043// Exactly one of *OrgUnits or error will be non-nil. Any non-2xx status
12044// code is an error. Response headers are in either
12045// *OrgUnits.ServerResponse.Header or (if a response was returned at
12046// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12047// to check whether the returned error was because
12048// http.StatusNotModified was returned.
12049func (c *OrgunitsListCall) Do(opts ...googleapi.CallOption) (*OrgUnits, error) {
12050	gensupport.SetOptions(c.urlParams_, opts...)
12051	res, err := c.doRequest("json")
12052	if res != nil && res.StatusCode == http.StatusNotModified {
12053		if res.Body != nil {
12054			res.Body.Close()
12055		}
12056		return nil, &googleapi.Error{
12057			Code:   res.StatusCode,
12058			Header: res.Header,
12059		}
12060	}
12061	if err != nil {
12062		return nil, err
12063	}
12064	defer googleapi.CloseBody(res)
12065	if err := googleapi.CheckResponse(res); err != nil {
12066		return nil, err
12067	}
12068	ret := &OrgUnits{
12069		ServerResponse: googleapi.ServerResponse{
12070			Header:         res.Header,
12071			HTTPStatusCode: res.StatusCode,
12072		},
12073	}
12074	target := &ret
12075	if err := gensupport.DecodeResponse(target, res); err != nil {
12076		return nil, err
12077	}
12078	return ret, nil
12079	// {
12080	//   "description": "Retrieve all organizational units",
12081	//   "httpMethod": "GET",
12082	//   "id": "directory.orgunits.list",
12083	//   "parameterOrder": [
12084	//     "customerId"
12085	//   ],
12086	//   "parameters": {
12087	//     "customerId": {
12088	//       "description": "Immutable ID of the G Suite account",
12089	//       "location": "path",
12090	//       "required": true,
12091	//       "type": "string"
12092	//     },
12093	//     "orgUnitPath": {
12094	//       "default": "",
12095	//       "description": "the URL-encoded organizational unit's path or its ID",
12096	//       "location": "query",
12097	//       "type": "string"
12098	//     },
12099	//     "type": {
12100	//       "description": "Whether to return all sub-organizations or just immediate children",
12101	//       "enum": [
12102	//         "all",
12103	//         "children"
12104	//       ],
12105	//       "enumDescriptions": [
12106	//         "All sub-organizational units.",
12107	//         "Immediate children only (default)."
12108	//       ],
12109	//       "location": "query",
12110	//       "type": "string"
12111	//     }
12112	//   },
12113	//   "path": "customer/{customerId}/orgunits",
12114	//   "response": {
12115	//     "$ref": "OrgUnits"
12116	//   },
12117	//   "scopes": [
12118	//     "https://www.googleapis.com/auth/admin.directory.orgunit",
12119	//     "https://www.googleapis.com/auth/admin.directory.orgunit.readonly"
12120	//   ]
12121	// }
12122
12123}
12124
12125// method id "directory.orgunits.patch":
12126
12127type OrgunitsPatchCall struct {
12128	s           *Service
12129	customerId  string
12130	orgUnitPath []string
12131	orgunit     *OrgUnit
12132	urlParams_  gensupport.URLParams
12133	ctx_        context.Context
12134	header_     http.Header
12135}
12136
12137// Patch: Update organizational unit. This method supports patch
12138// semantics.
12139func (r *OrgunitsService) Patch(customerId string, orgUnitPath []string, orgunit *OrgUnit) *OrgunitsPatchCall {
12140	c := &OrgunitsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12141	c.customerId = customerId
12142	c.orgUnitPath = append([]string{}, orgUnitPath...)
12143	c.orgunit = orgunit
12144	return c
12145}
12146
12147// Fields allows partial responses to be retrieved. See
12148// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12149// for more information.
12150func (c *OrgunitsPatchCall) Fields(s ...googleapi.Field) *OrgunitsPatchCall {
12151	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12152	return c
12153}
12154
12155// Context sets the context to be used in this call's Do method. Any
12156// pending HTTP request will be aborted if the provided context is
12157// canceled.
12158func (c *OrgunitsPatchCall) Context(ctx context.Context) *OrgunitsPatchCall {
12159	c.ctx_ = ctx
12160	return c
12161}
12162
12163// Header returns an http.Header that can be modified by the caller to
12164// add HTTP headers to the request.
12165func (c *OrgunitsPatchCall) Header() http.Header {
12166	if c.header_ == nil {
12167		c.header_ = make(http.Header)
12168	}
12169	return c.header_
12170}
12171
12172func (c *OrgunitsPatchCall) doRequest(alt string) (*http.Response, error) {
12173	reqHeaders := make(http.Header)
12174	for k, v := range c.header_ {
12175		reqHeaders[k] = v
12176	}
12177	reqHeaders.Set("User-Agent", c.s.userAgent())
12178	var body io.Reader = nil
12179	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
12180	if err != nil {
12181		return nil, err
12182	}
12183	reqHeaders.Set("Content-Type", "application/json")
12184	c.urlParams_.Set("alt", alt)
12185	c.urlParams_.Set("prettyPrint", "false")
12186	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}")
12187	urls += "?" + c.urlParams_.Encode()
12188	req, err := http.NewRequest("PATCH", urls, body)
12189	if err != nil {
12190		return nil, err
12191	}
12192	req.Header = reqHeaders
12193	googleapi.Expand(req.URL, map[string]string{
12194		"customerId":  c.customerId,
12195		"orgUnitPath": c.orgUnitPath[0],
12196	})
12197	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12198}
12199
12200// Do executes the "directory.orgunits.patch" call.
12201// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
12202// code is an error. Response headers are in either
12203// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
12204// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12205// check whether the returned error was because http.StatusNotModified
12206// was returned.
12207func (c *OrgunitsPatchCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12208	gensupport.SetOptions(c.urlParams_, opts...)
12209	res, err := c.doRequest("json")
12210	if res != nil && res.StatusCode == http.StatusNotModified {
12211		if res.Body != nil {
12212			res.Body.Close()
12213		}
12214		return nil, &googleapi.Error{
12215			Code:   res.StatusCode,
12216			Header: res.Header,
12217		}
12218	}
12219	if err != nil {
12220		return nil, err
12221	}
12222	defer googleapi.CloseBody(res)
12223	if err := googleapi.CheckResponse(res); err != nil {
12224		return nil, err
12225	}
12226	ret := &OrgUnit{
12227		ServerResponse: googleapi.ServerResponse{
12228			Header:         res.Header,
12229			HTTPStatusCode: res.StatusCode,
12230		},
12231	}
12232	target := &ret
12233	if err := gensupport.DecodeResponse(target, res); err != nil {
12234		return nil, err
12235	}
12236	return ret, nil
12237	// {
12238	//   "description": "Update organizational unit. This method supports patch semantics.",
12239	//   "httpMethod": "PATCH",
12240	//   "id": "directory.orgunits.patch",
12241	//   "parameterOrder": [
12242	//     "customerId",
12243	//     "orgUnitPath"
12244	//   ],
12245	//   "parameters": {
12246	//     "customerId": {
12247	//       "description": "Immutable ID of the G Suite account",
12248	//       "location": "path",
12249	//       "required": true,
12250	//       "type": "string"
12251	//     },
12252	//     "orgUnitPath": {
12253	//       "description": "Full path of the organizational unit or its ID",
12254	//       "location": "path",
12255	//       "repeated": true,
12256	//       "required": true,
12257	//       "type": "string"
12258	//     }
12259	//   },
12260	//   "path": "customer/{customerId}/orgunits{/orgUnitPath*}",
12261	//   "request": {
12262	//     "$ref": "OrgUnit"
12263	//   },
12264	//   "response": {
12265	//     "$ref": "OrgUnit"
12266	//   },
12267	//   "scopes": [
12268	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
12269	//   ]
12270	// }
12271
12272}
12273
12274// method id "directory.orgunits.update":
12275
12276type OrgunitsUpdateCall struct {
12277	s           *Service
12278	customerId  string
12279	orgUnitPath []string
12280	orgunit     *OrgUnit
12281	urlParams_  gensupport.URLParams
12282	ctx_        context.Context
12283	header_     http.Header
12284}
12285
12286// Update: Update organizational unit
12287func (r *OrgunitsService) Update(customerId string, orgUnitPath []string, orgunit *OrgUnit) *OrgunitsUpdateCall {
12288	c := &OrgunitsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12289	c.customerId = customerId
12290	c.orgUnitPath = append([]string{}, orgUnitPath...)
12291	c.orgunit = orgunit
12292	return c
12293}
12294
12295// Fields allows partial responses to be retrieved. See
12296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12297// for more information.
12298func (c *OrgunitsUpdateCall) Fields(s ...googleapi.Field) *OrgunitsUpdateCall {
12299	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12300	return c
12301}
12302
12303// Context sets the context to be used in this call's Do method. Any
12304// pending HTTP request will be aborted if the provided context is
12305// canceled.
12306func (c *OrgunitsUpdateCall) Context(ctx context.Context) *OrgunitsUpdateCall {
12307	c.ctx_ = ctx
12308	return c
12309}
12310
12311// Header returns an http.Header that can be modified by the caller to
12312// add HTTP headers to the request.
12313func (c *OrgunitsUpdateCall) Header() http.Header {
12314	if c.header_ == nil {
12315		c.header_ = make(http.Header)
12316	}
12317	return c.header_
12318}
12319
12320func (c *OrgunitsUpdateCall) doRequest(alt string) (*http.Response, error) {
12321	reqHeaders := make(http.Header)
12322	for k, v := range c.header_ {
12323		reqHeaders[k] = v
12324	}
12325	reqHeaders.Set("User-Agent", c.s.userAgent())
12326	var body io.Reader = nil
12327	body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
12328	if err != nil {
12329		return nil, err
12330	}
12331	reqHeaders.Set("Content-Type", "application/json")
12332	c.urlParams_.Set("alt", alt)
12333	c.urlParams_.Set("prettyPrint", "false")
12334	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/orgunits{/orgUnitPath*}")
12335	urls += "?" + c.urlParams_.Encode()
12336	req, err := http.NewRequest("PUT", urls, body)
12337	if err != nil {
12338		return nil, err
12339	}
12340	req.Header = reqHeaders
12341	googleapi.Expand(req.URL, map[string]string{
12342		"customerId":  c.customerId,
12343		"orgUnitPath": c.orgUnitPath[0],
12344	})
12345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12346}
12347
12348// Do executes the "directory.orgunits.update" call.
12349// Exactly one of *OrgUnit or error will be non-nil. Any non-2xx status
12350// code is an error. Response headers are in either
12351// *OrgUnit.ServerResponse.Header or (if a response was returned at all)
12352// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12353// check whether the returned error was because http.StatusNotModified
12354// was returned.
12355func (c *OrgunitsUpdateCall) Do(opts ...googleapi.CallOption) (*OrgUnit, error) {
12356	gensupport.SetOptions(c.urlParams_, opts...)
12357	res, err := c.doRequest("json")
12358	if res != nil && res.StatusCode == http.StatusNotModified {
12359		if res.Body != nil {
12360			res.Body.Close()
12361		}
12362		return nil, &googleapi.Error{
12363			Code:   res.StatusCode,
12364			Header: res.Header,
12365		}
12366	}
12367	if err != nil {
12368		return nil, err
12369	}
12370	defer googleapi.CloseBody(res)
12371	if err := googleapi.CheckResponse(res); err != nil {
12372		return nil, err
12373	}
12374	ret := &OrgUnit{
12375		ServerResponse: googleapi.ServerResponse{
12376			Header:         res.Header,
12377			HTTPStatusCode: res.StatusCode,
12378		},
12379	}
12380	target := &ret
12381	if err := gensupport.DecodeResponse(target, res); err != nil {
12382		return nil, err
12383	}
12384	return ret, nil
12385	// {
12386	//   "description": "Update organizational unit",
12387	//   "httpMethod": "PUT",
12388	//   "id": "directory.orgunits.update",
12389	//   "parameterOrder": [
12390	//     "customerId",
12391	//     "orgUnitPath"
12392	//   ],
12393	//   "parameters": {
12394	//     "customerId": {
12395	//       "description": "Immutable ID of the G Suite account",
12396	//       "location": "path",
12397	//       "required": true,
12398	//       "type": "string"
12399	//     },
12400	//     "orgUnitPath": {
12401	//       "description": "Full path of the organizational unit or its ID",
12402	//       "location": "path",
12403	//       "repeated": true,
12404	//       "required": true,
12405	//       "type": "string"
12406	//     }
12407	//   },
12408	//   "path": "customer/{customerId}/orgunits{/orgUnitPath*}",
12409	//   "request": {
12410	//     "$ref": "OrgUnit"
12411	//   },
12412	//   "response": {
12413	//     "$ref": "OrgUnit"
12414	//   },
12415	//   "scopes": [
12416	//     "https://www.googleapis.com/auth/admin.directory.orgunit"
12417	//   ]
12418	// }
12419
12420}
12421
12422// method id "directory.privileges.list":
12423
12424type PrivilegesListCall struct {
12425	s            *Service
12426	customer     string
12427	urlParams_   gensupport.URLParams
12428	ifNoneMatch_ string
12429	ctx_         context.Context
12430	header_      http.Header
12431}
12432
12433// List: Retrieves a paginated list of all privileges for a customer.
12434func (r *PrivilegesService) List(customer string) *PrivilegesListCall {
12435	c := &PrivilegesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12436	c.customer = customer
12437	return c
12438}
12439
12440// Fields allows partial responses to be retrieved. See
12441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12442// for more information.
12443func (c *PrivilegesListCall) Fields(s ...googleapi.Field) *PrivilegesListCall {
12444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12445	return c
12446}
12447
12448// IfNoneMatch sets the optional parameter which makes the operation
12449// fail if the object's ETag matches the given value. This is useful for
12450// getting updates only after the object has changed since the last
12451// request. Use googleapi.IsNotModified to check whether the response
12452// error from Do is the result of In-None-Match.
12453func (c *PrivilegesListCall) IfNoneMatch(entityTag string) *PrivilegesListCall {
12454	c.ifNoneMatch_ = entityTag
12455	return c
12456}
12457
12458// Context sets the context to be used in this call's Do method. Any
12459// pending HTTP request will be aborted if the provided context is
12460// canceled.
12461func (c *PrivilegesListCall) Context(ctx context.Context) *PrivilegesListCall {
12462	c.ctx_ = ctx
12463	return c
12464}
12465
12466// Header returns an http.Header that can be modified by the caller to
12467// add HTTP headers to the request.
12468func (c *PrivilegesListCall) Header() http.Header {
12469	if c.header_ == nil {
12470		c.header_ = make(http.Header)
12471	}
12472	return c.header_
12473}
12474
12475func (c *PrivilegesListCall) doRequest(alt string) (*http.Response, error) {
12476	reqHeaders := make(http.Header)
12477	for k, v := range c.header_ {
12478		reqHeaders[k] = v
12479	}
12480	reqHeaders.Set("User-Agent", c.s.userAgent())
12481	if c.ifNoneMatch_ != "" {
12482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12483	}
12484	var body io.Reader = nil
12485	c.urlParams_.Set("alt", alt)
12486	c.urlParams_.Set("prettyPrint", "false")
12487	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/ALL/privileges")
12488	urls += "?" + c.urlParams_.Encode()
12489	req, err := http.NewRequest("GET", urls, body)
12490	if err != nil {
12491		return nil, err
12492	}
12493	req.Header = reqHeaders
12494	googleapi.Expand(req.URL, map[string]string{
12495		"customer": c.customer,
12496	})
12497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12498}
12499
12500// Do executes the "directory.privileges.list" call.
12501// Exactly one of *Privileges or error will be non-nil. Any non-2xx
12502// status code is an error. Response headers are in either
12503// *Privileges.ServerResponse.Header or (if a response was returned at
12504// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12505// to check whether the returned error was because
12506// http.StatusNotModified was returned.
12507func (c *PrivilegesListCall) Do(opts ...googleapi.CallOption) (*Privileges, error) {
12508	gensupport.SetOptions(c.urlParams_, opts...)
12509	res, err := c.doRequest("json")
12510	if res != nil && res.StatusCode == http.StatusNotModified {
12511		if res.Body != nil {
12512			res.Body.Close()
12513		}
12514		return nil, &googleapi.Error{
12515			Code:   res.StatusCode,
12516			Header: res.Header,
12517		}
12518	}
12519	if err != nil {
12520		return nil, err
12521	}
12522	defer googleapi.CloseBody(res)
12523	if err := googleapi.CheckResponse(res); err != nil {
12524		return nil, err
12525	}
12526	ret := &Privileges{
12527		ServerResponse: googleapi.ServerResponse{
12528			Header:         res.Header,
12529			HTTPStatusCode: res.StatusCode,
12530		},
12531	}
12532	target := &ret
12533	if err := gensupport.DecodeResponse(target, res); err != nil {
12534		return nil, err
12535	}
12536	return ret, nil
12537	// {
12538	//   "description": "Retrieves a paginated list of all privileges for a customer.",
12539	//   "httpMethod": "GET",
12540	//   "id": "directory.privileges.list",
12541	//   "parameterOrder": [
12542	//     "customer"
12543	//   ],
12544	//   "parameters": {
12545	//     "customer": {
12546	//       "description": "Immutable ID of the G Suite account.",
12547	//       "location": "path",
12548	//       "required": true,
12549	//       "type": "string"
12550	//     }
12551	//   },
12552	//   "path": "customer/{customer}/roles/ALL/privileges",
12553	//   "response": {
12554	//     "$ref": "Privileges"
12555	//   },
12556	//   "scopes": [
12557	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
12558	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
12559	//   ]
12560	// }
12561
12562}
12563
12564// method id "directory.resolvedAppAccessSettings.GetSettings":
12565
12566type ResolvedAppAccessSettingsGetSettingsCall struct {
12567	s            *Service
12568	urlParams_   gensupport.URLParams
12569	ifNoneMatch_ string
12570	ctx_         context.Context
12571	header_      http.Header
12572}
12573
12574// GetSettings: Retrieves resolved app access settings of the logged in
12575// user.
12576func (r *ResolvedAppAccessSettingsService) GetSettings() *ResolvedAppAccessSettingsGetSettingsCall {
12577	c := &ResolvedAppAccessSettingsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12578	return c
12579}
12580
12581// Fields allows partial responses to be retrieved. See
12582// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12583// for more information.
12584func (c *ResolvedAppAccessSettingsGetSettingsCall) Fields(s ...googleapi.Field) *ResolvedAppAccessSettingsGetSettingsCall {
12585	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12586	return c
12587}
12588
12589// IfNoneMatch sets the optional parameter which makes the operation
12590// fail if the object's ETag matches the given value. This is useful for
12591// getting updates only after the object has changed since the last
12592// request. Use googleapi.IsNotModified to check whether the response
12593// error from Do is the result of In-None-Match.
12594func (c *ResolvedAppAccessSettingsGetSettingsCall) IfNoneMatch(entityTag string) *ResolvedAppAccessSettingsGetSettingsCall {
12595	c.ifNoneMatch_ = entityTag
12596	return c
12597}
12598
12599// Context sets the context to be used in this call's Do method. Any
12600// pending HTTP request will be aborted if the provided context is
12601// canceled.
12602func (c *ResolvedAppAccessSettingsGetSettingsCall) Context(ctx context.Context) *ResolvedAppAccessSettingsGetSettingsCall {
12603	c.ctx_ = ctx
12604	return c
12605}
12606
12607// Header returns an http.Header that can be modified by the caller to
12608// add HTTP headers to the request.
12609func (c *ResolvedAppAccessSettingsGetSettingsCall) Header() http.Header {
12610	if c.header_ == nil {
12611		c.header_ = make(http.Header)
12612	}
12613	return c.header_
12614}
12615
12616func (c *ResolvedAppAccessSettingsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
12617	reqHeaders := make(http.Header)
12618	for k, v := range c.header_ {
12619		reqHeaders[k] = v
12620	}
12621	reqHeaders.Set("User-Agent", c.s.userAgent())
12622	if c.ifNoneMatch_ != "" {
12623		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12624	}
12625	var body io.Reader = nil
12626	c.urlParams_.Set("alt", alt)
12627	c.urlParams_.Set("prettyPrint", "false")
12628	urls := googleapi.ResolveRelative(c.s.BasePath, "resolvedappaccesssettings")
12629	urls += "?" + c.urlParams_.Encode()
12630	req, err := http.NewRequest("GET", urls, body)
12631	if err != nil {
12632		return nil, err
12633	}
12634	req.Header = reqHeaders
12635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12636}
12637
12638// Do executes the "directory.resolvedAppAccessSettings.GetSettings" call.
12639// Exactly one of *AppAccessCollections or error will be non-nil. Any
12640// non-2xx status code is an error. Response headers are in either
12641// *AppAccessCollections.ServerResponse.Header or (if a response was
12642// returned at all) in error.(*googleapi.Error).Header. Use
12643// googleapi.IsNotModified to check whether the returned error was
12644// because http.StatusNotModified was returned.
12645func (c *ResolvedAppAccessSettingsGetSettingsCall) Do(opts ...googleapi.CallOption) (*AppAccessCollections, error) {
12646	gensupport.SetOptions(c.urlParams_, opts...)
12647	res, err := c.doRequest("json")
12648	if res != nil && res.StatusCode == http.StatusNotModified {
12649		if res.Body != nil {
12650			res.Body.Close()
12651		}
12652		return nil, &googleapi.Error{
12653			Code:   res.StatusCode,
12654			Header: res.Header,
12655		}
12656	}
12657	if err != nil {
12658		return nil, err
12659	}
12660	defer googleapi.CloseBody(res)
12661	if err := googleapi.CheckResponse(res); err != nil {
12662		return nil, err
12663	}
12664	ret := &AppAccessCollections{
12665		ServerResponse: googleapi.ServerResponse{
12666			Header:         res.Header,
12667			HTTPStatusCode: res.StatusCode,
12668		},
12669	}
12670	target := &ret
12671	if err := gensupport.DecodeResponse(target, res); err != nil {
12672		return nil, err
12673	}
12674	return ret, nil
12675	// {
12676	//   "description": "Retrieves resolved app access settings of the logged in user.",
12677	//   "httpMethod": "GET",
12678	//   "id": "directory.resolvedAppAccessSettings.GetSettings",
12679	//   "path": "resolvedappaccesssettings",
12680	//   "response": {
12681	//     "$ref": "AppAccessCollections"
12682	//   }
12683	// }
12684
12685}
12686
12687// method id "directory.resolvedAppAccessSettings.ListTrustedApps":
12688
12689type ResolvedAppAccessSettingsListTrustedAppsCall struct {
12690	s            *Service
12691	urlParams_   gensupport.URLParams
12692	ifNoneMatch_ string
12693	ctx_         context.Context
12694	header_      http.Header
12695}
12696
12697// ListTrustedApps: Retrieves the list of apps trusted by the admin of
12698// the logged in user.
12699func (r *ResolvedAppAccessSettingsService) ListTrustedApps() *ResolvedAppAccessSettingsListTrustedAppsCall {
12700	c := &ResolvedAppAccessSettingsListTrustedAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12701	return c
12702}
12703
12704// Fields allows partial responses to be retrieved. See
12705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12706// for more information.
12707func (c *ResolvedAppAccessSettingsListTrustedAppsCall) Fields(s ...googleapi.Field) *ResolvedAppAccessSettingsListTrustedAppsCall {
12708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12709	return c
12710}
12711
12712// IfNoneMatch sets the optional parameter which makes the operation
12713// fail if the object's ETag matches the given value. This is useful for
12714// getting updates only after the object has changed since the last
12715// request. Use googleapi.IsNotModified to check whether the response
12716// error from Do is the result of In-None-Match.
12717func (c *ResolvedAppAccessSettingsListTrustedAppsCall) IfNoneMatch(entityTag string) *ResolvedAppAccessSettingsListTrustedAppsCall {
12718	c.ifNoneMatch_ = entityTag
12719	return c
12720}
12721
12722// Context sets the context to be used in this call's Do method. Any
12723// pending HTTP request will be aborted if the provided context is
12724// canceled.
12725func (c *ResolvedAppAccessSettingsListTrustedAppsCall) Context(ctx context.Context) *ResolvedAppAccessSettingsListTrustedAppsCall {
12726	c.ctx_ = ctx
12727	return c
12728}
12729
12730// Header returns an http.Header that can be modified by the caller to
12731// add HTTP headers to the request.
12732func (c *ResolvedAppAccessSettingsListTrustedAppsCall) Header() http.Header {
12733	if c.header_ == nil {
12734		c.header_ = make(http.Header)
12735	}
12736	return c.header_
12737}
12738
12739func (c *ResolvedAppAccessSettingsListTrustedAppsCall) doRequest(alt string) (*http.Response, error) {
12740	reqHeaders := make(http.Header)
12741	for k, v := range c.header_ {
12742		reqHeaders[k] = v
12743	}
12744	reqHeaders.Set("User-Agent", c.s.userAgent())
12745	if c.ifNoneMatch_ != "" {
12746		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12747	}
12748	var body io.Reader = nil
12749	c.urlParams_.Set("alt", alt)
12750	c.urlParams_.Set("prettyPrint", "false")
12751	urls := googleapi.ResolveRelative(c.s.BasePath, "trustedapps")
12752	urls += "?" + c.urlParams_.Encode()
12753	req, err := http.NewRequest("GET", urls, body)
12754	if err != nil {
12755		return nil, err
12756	}
12757	req.Header = reqHeaders
12758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12759}
12760
12761// Do executes the "directory.resolvedAppAccessSettings.ListTrustedApps" call.
12762// Exactly one of *TrustedApps or error will be non-nil. Any non-2xx
12763// status code is an error. Response headers are in either
12764// *TrustedApps.ServerResponse.Header or (if a response was returned at
12765// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12766// to check whether the returned error was because
12767// http.StatusNotModified was returned.
12768func (c *ResolvedAppAccessSettingsListTrustedAppsCall) Do(opts ...googleapi.CallOption) (*TrustedApps, error) {
12769	gensupport.SetOptions(c.urlParams_, opts...)
12770	res, err := c.doRequest("json")
12771	if res != nil && res.StatusCode == http.StatusNotModified {
12772		if res.Body != nil {
12773			res.Body.Close()
12774		}
12775		return nil, &googleapi.Error{
12776			Code:   res.StatusCode,
12777			Header: res.Header,
12778		}
12779	}
12780	if err != nil {
12781		return nil, err
12782	}
12783	defer googleapi.CloseBody(res)
12784	if err := googleapi.CheckResponse(res); err != nil {
12785		return nil, err
12786	}
12787	ret := &TrustedApps{
12788		ServerResponse: googleapi.ServerResponse{
12789			Header:         res.Header,
12790			HTTPStatusCode: res.StatusCode,
12791		},
12792	}
12793	target := &ret
12794	if err := gensupport.DecodeResponse(target, res); err != nil {
12795		return nil, err
12796	}
12797	return ret, nil
12798	// {
12799	//   "description": "Retrieves the list of apps trusted by the admin of the logged in user.",
12800	//   "httpMethod": "GET",
12801	//   "id": "directory.resolvedAppAccessSettings.ListTrustedApps",
12802	//   "path": "trustedapps",
12803	//   "response": {
12804	//     "$ref": "TrustedApps"
12805	//   }
12806	// }
12807
12808}
12809
12810// method id "directory.resources.buildings.delete":
12811
12812type ResourcesBuildingsDeleteCall struct {
12813	s          *Service
12814	customer   string
12815	buildingId string
12816	urlParams_ gensupport.URLParams
12817	ctx_       context.Context
12818	header_    http.Header
12819}
12820
12821// Delete: Deletes a building.
12822func (r *ResourcesBuildingsService) Delete(customer string, buildingId string) *ResourcesBuildingsDeleteCall {
12823	c := &ResourcesBuildingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12824	c.customer = customer
12825	c.buildingId = buildingId
12826	return c
12827}
12828
12829// Fields allows partial responses to be retrieved. See
12830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12831// for more information.
12832func (c *ResourcesBuildingsDeleteCall) Fields(s ...googleapi.Field) *ResourcesBuildingsDeleteCall {
12833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12834	return c
12835}
12836
12837// Context sets the context to be used in this call's Do method. Any
12838// pending HTTP request will be aborted if the provided context is
12839// canceled.
12840func (c *ResourcesBuildingsDeleteCall) Context(ctx context.Context) *ResourcesBuildingsDeleteCall {
12841	c.ctx_ = ctx
12842	return c
12843}
12844
12845// Header returns an http.Header that can be modified by the caller to
12846// add HTTP headers to the request.
12847func (c *ResourcesBuildingsDeleteCall) Header() http.Header {
12848	if c.header_ == nil {
12849		c.header_ = make(http.Header)
12850	}
12851	return c.header_
12852}
12853
12854func (c *ResourcesBuildingsDeleteCall) doRequest(alt string) (*http.Response, error) {
12855	reqHeaders := make(http.Header)
12856	for k, v := range c.header_ {
12857		reqHeaders[k] = v
12858	}
12859	reqHeaders.Set("User-Agent", c.s.userAgent())
12860	var body io.Reader = nil
12861	c.urlParams_.Set("alt", alt)
12862	c.urlParams_.Set("prettyPrint", "false")
12863	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}")
12864	urls += "?" + c.urlParams_.Encode()
12865	req, err := http.NewRequest("DELETE", urls, body)
12866	if err != nil {
12867		return nil, err
12868	}
12869	req.Header = reqHeaders
12870	googleapi.Expand(req.URL, map[string]string{
12871		"customer":   c.customer,
12872		"buildingId": c.buildingId,
12873	})
12874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12875}
12876
12877// Do executes the "directory.resources.buildings.delete" call.
12878func (c *ResourcesBuildingsDeleteCall) Do(opts ...googleapi.CallOption) error {
12879	gensupport.SetOptions(c.urlParams_, opts...)
12880	res, err := c.doRequest("json")
12881	if err != nil {
12882		return err
12883	}
12884	defer googleapi.CloseBody(res)
12885	if err := googleapi.CheckResponse(res); err != nil {
12886		return err
12887	}
12888	return nil
12889	// {
12890	//   "description": "Deletes a building.",
12891	//   "httpMethod": "DELETE",
12892	//   "id": "directory.resources.buildings.delete",
12893	//   "parameterOrder": [
12894	//     "customer",
12895	//     "buildingId"
12896	//   ],
12897	//   "parameters": {
12898	//     "buildingId": {
12899	//       "description": "The ID of the building to delete.",
12900	//       "location": "path",
12901	//       "required": true,
12902	//       "type": "string"
12903	//     },
12904	//     "customer": {
12905	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
12906	//       "location": "path",
12907	//       "required": true,
12908	//       "type": "string"
12909	//     }
12910	//   },
12911	//   "path": "customer/{customer}/resources/buildings/{buildingId}",
12912	//   "scopes": [
12913	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
12914	//   ]
12915	// }
12916
12917}
12918
12919// method id "directory.resources.buildings.get":
12920
12921type ResourcesBuildingsGetCall struct {
12922	s            *Service
12923	customer     string
12924	buildingId   string
12925	urlParams_   gensupport.URLParams
12926	ifNoneMatch_ string
12927	ctx_         context.Context
12928	header_      http.Header
12929}
12930
12931// Get: Retrieves a building.
12932func (r *ResourcesBuildingsService) Get(customer string, buildingId string) *ResourcesBuildingsGetCall {
12933	c := &ResourcesBuildingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12934	c.customer = customer
12935	c.buildingId = buildingId
12936	return c
12937}
12938
12939// Fields allows partial responses to be retrieved. See
12940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12941// for more information.
12942func (c *ResourcesBuildingsGetCall) Fields(s ...googleapi.Field) *ResourcesBuildingsGetCall {
12943	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12944	return c
12945}
12946
12947// IfNoneMatch sets the optional parameter which makes the operation
12948// fail if the object's ETag matches the given value. This is useful for
12949// getting updates only after the object has changed since the last
12950// request. Use googleapi.IsNotModified to check whether the response
12951// error from Do is the result of In-None-Match.
12952func (c *ResourcesBuildingsGetCall) IfNoneMatch(entityTag string) *ResourcesBuildingsGetCall {
12953	c.ifNoneMatch_ = entityTag
12954	return c
12955}
12956
12957// Context sets the context to be used in this call's Do method. Any
12958// pending HTTP request will be aborted if the provided context is
12959// canceled.
12960func (c *ResourcesBuildingsGetCall) Context(ctx context.Context) *ResourcesBuildingsGetCall {
12961	c.ctx_ = ctx
12962	return c
12963}
12964
12965// Header returns an http.Header that can be modified by the caller to
12966// add HTTP headers to the request.
12967func (c *ResourcesBuildingsGetCall) Header() http.Header {
12968	if c.header_ == nil {
12969		c.header_ = make(http.Header)
12970	}
12971	return c.header_
12972}
12973
12974func (c *ResourcesBuildingsGetCall) doRequest(alt string) (*http.Response, error) {
12975	reqHeaders := make(http.Header)
12976	for k, v := range c.header_ {
12977		reqHeaders[k] = v
12978	}
12979	reqHeaders.Set("User-Agent", c.s.userAgent())
12980	if c.ifNoneMatch_ != "" {
12981		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12982	}
12983	var body io.Reader = nil
12984	c.urlParams_.Set("alt", alt)
12985	c.urlParams_.Set("prettyPrint", "false")
12986	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}")
12987	urls += "?" + c.urlParams_.Encode()
12988	req, err := http.NewRequest("GET", urls, body)
12989	if err != nil {
12990		return nil, err
12991	}
12992	req.Header = reqHeaders
12993	googleapi.Expand(req.URL, map[string]string{
12994		"customer":   c.customer,
12995		"buildingId": c.buildingId,
12996	})
12997	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12998}
12999
13000// Do executes the "directory.resources.buildings.get" call.
13001// Exactly one of *Building or error will be non-nil. Any non-2xx status
13002// code is an error. Response headers are in either
13003// *Building.ServerResponse.Header or (if a response was returned at
13004// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13005// to check whether the returned error was because
13006// http.StatusNotModified was returned.
13007func (c *ResourcesBuildingsGetCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13008	gensupport.SetOptions(c.urlParams_, opts...)
13009	res, err := c.doRequest("json")
13010	if res != nil && res.StatusCode == http.StatusNotModified {
13011		if res.Body != nil {
13012			res.Body.Close()
13013		}
13014		return nil, &googleapi.Error{
13015			Code:   res.StatusCode,
13016			Header: res.Header,
13017		}
13018	}
13019	if err != nil {
13020		return nil, err
13021	}
13022	defer googleapi.CloseBody(res)
13023	if err := googleapi.CheckResponse(res); err != nil {
13024		return nil, err
13025	}
13026	ret := &Building{
13027		ServerResponse: googleapi.ServerResponse{
13028			Header:         res.Header,
13029			HTTPStatusCode: res.StatusCode,
13030		},
13031	}
13032	target := &ret
13033	if err := gensupport.DecodeResponse(target, res); err != nil {
13034		return nil, err
13035	}
13036	return ret, nil
13037	// {
13038	//   "description": "Retrieves a building.",
13039	//   "httpMethod": "GET",
13040	//   "id": "directory.resources.buildings.get",
13041	//   "parameterOrder": [
13042	//     "customer",
13043	//     "buildingId"
13044	//   ],
13045	//   "parameters": {
13046	//     "buildingId": {
13047	//       "description": "The unique ID of the building to retrieve.",
13048	//       "location": "path",
13049	//       "required": true,
13050	//       "type": "string"
13051	//     },
13052	//     "customer": {
13053	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13054	//       "location": "path",
13055	//       "required": true,
13056	//       "type": "string"
13057	//     }
13058	//   },
13059	//   "path": "customer/{customer}/resources/buildings/{buildingId}",
13060	//   "response": {
13061	//     "$ref": "Building"
13062	//   },
13063	//   "scopes": [
13064	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
13065	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
13066	//   ]
13067	// }
13068
13069}
13070
13071// method id "directory.resources.buildings.insert":
13072
13073type ResourcesBuildingsInsertCall struct {
13074	s          *Service
13075	customer   string
13076	building   *Building
13077	urlParams_ gensupport.URLParams
13078	ctx_       context.Context
13079	header_    http.Header
13080}
13081
13082// Insert: Inserts a building.
13083func (r *ResourcesBuildingsService) Insert(customer string, building *Building) *ResourcesBuildingsInsertCall {
13084	c := &ResourcesBuildingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13085	c.customer = customer
13086	c.building = building
13087	return c
13088}
13089
13090// CoordinatesSource sets the optional parameter "coordinatesSource":
13091// Source from which Building.coordinates are derived.
13092//
13093// Possible values:
13094//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
13095// coordinates included in the request.
13096//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
13097// populated based on the postal address.
13098//   "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS
13099// if postal address is provided. Otherwise, defaults to
13100// CLIENT_SPECIFIED if coordinates are provided.
13101func (c *ResourcesBuildingsInsertCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsInsertCall {
13102	c.urlParams_.Set("coordinatesSource", coordinatesSource)
13103	return c
13104}
13105
13106// Fields allows partial responses to be retrieved. See
13107// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13108// for more information.
13109func (c *ResourcesBuildingsInsertCall) Fields(s ...googleapi.Field) *ResourcesBuildingsInsertCall {
13110	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13111	return c
13112}
13113
13114// Context sets the context to be used in this call's Do method. Any
13115// pending HTTP request will be aborted if the provided context is
13116// canceled.
13117func (c *ResourcesBuildingsInsertCall) Context(ctx context.Context) *ResourcesBuildingsInsertCall {
13118	c.ctx_ = ctx
13119	return c
13120}
13121
13122// Header returns an http.Header that can be modified by the caller to
13123// add HTTP headers to the request.
13124func (c *ResourcesBuildingsInsertCall) Header() http.Header {
13125	if c.header_ == nil {
13126		c.header_ = make(http.Header)
13127	}
13128	return c.header_
13129}
13130
13131func (c *ResourcesBuildingsInsertCall) doRequest(alt string) (*http.Response, error) {
13132	reqHeaders := make(http.Header)
13133	for k, v := range c.header_ {
13134		reqHeaders[k] = v
13135	}
13136	reqHeaders.Set("User-Agent", c.s.userAgent())
13137	var body io.Reader = nil
13138	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
13139	if err != nil {
13140		return nil, err
13141	}
13142	reqHeaders.Set("Content-Type", "application/json")
13143	c.urlParams_.Set("alt", alt)
13144	c.urlParams_.Set("prettyPrint", "false")
13145	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings")
13146	urls += "?" + c.urlParams_.Encode()
13147	req, err := http.NewRequest("POST", urls, body)
13148	if err != nil {
13149		return nil, err
13150	}
13151	req.Header = reqHeaders
13152	googleapi.Expand(req.URL, map[string]string{
13153		"customer": c.customer,
13154	})
13155	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13156}
13157
13158// Do executes the "directory.resources.buildings.insert" call.
13159// Exactly one of *Building or error will be non-nil. Any non-2xx status
13160// code is an error. Response headers are in either
13161// *Building.ServerResponse.Header or (if a response was returned at
13162// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13163// to check whether the returned error was because
13164// http.StatusNotModified was returned.
13165func (c *ResourcesBuildingsInsertCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13166	gensupport.SetOptions(c.urlParams_, opts...)
13167	res, err := c.doRequest("json")
13168	if res != nil && res.StatusCode == http.StatusNotModified {
13169		if res.Body != nil {
13170			res.Body.Close()
13171		}
13172		return nil, &googleapi.Error{
13173			Code:   res.StatusCode,
13174			Header: res.Header,
13175		}
13176	}
13177	if err != nil {
13178		return nil, err
13179	}
13180	defer googleapi.CloseBody(res)
13181	if err := googleapi.CheckResponse(res); err != nil {
13182		return nil, err
13183	}
13184	ret := &Building{
13185		ServerResponse: googleapi.ServerResponse{
13186			Header:         res.Header,
13187			HTTPStatusCode: res.StatusCode,
13188		},
13189	}
13190	target := &ret
13191	if err := gensupport.DecodeResponse(target, res); err != nil {
13192		return nil, err
13193	}
13194	return ret, nil
13195	// {
13196	//   "description": "Inserts a building.",
13197	//   "httpMethod": "POST",
13198	//   "id": "directory.resources.buildings.insert",
13199	//   "parameterOrder": [
13200	//     "customer"
13201	//   ],
13202	//   "parameters": {
13203	//     "coordinatesSource": {
13204	//       "default": "SOURCE_UNSPECIFIED",
13205	//       "description": "Source from which Building.coordinates are derived.",
13206	//       "enum": [
13207	//         "CLIENT_SPECIFIED",
13208	//         "RESOLVED_FROM_ADDRESS",
13209	//         "SOURCE_UNSPECIFIED"
13210	//       ],
13211	//       "enumDescriptions": [
13212	//         "Building.coordinates are set to the coordinates included in the request.",
13213	//         "Building.coordinates are automatically populated based on the postal address.",
13214	//         "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided."
13215	//       ],
13216	//       "location": "query",
13217	//       "type": "string"
13218	//     },
13219	//     "customer": {
13220	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13221	//       "location": "path",
13222	//       "required": true,
13223	//       "type": "string"
13224	//     }
13225	//   },
13226	//   "path": "customer/{customer}/resources/buildings",
13227	//   "request": {
13228	//     "$ref": "Building"
13229	//   },
13230	//   "response": {
13231	//     "$ref": "Building"
13232	//   },
13233	//   "scopes": [
13234	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
13235	//   ]
13236	// }
13237
13238}
13239
13240// method id "directory.resources.buildings.list":
13241
13242type ResourcesBuildingsListCall struct {
13243	s            *Service
13244	customer     string
13245	urlParams_   gensupport.URLParams
13246	ifNoneMatch_ string
13247	ctx_         context.Context
13248	header_      http.Header
13249}
13250
13251// List: Retrieves a list of buildings for an account.
13252func (r *ResourcesBuildingsService) List(customer string) *ResourcesBuildingsListCall {
13253	c := &ResourcesBuildingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13254	c.customer = customer
13255	return c
13256}
13257
13258// MaxResults sets the optional parameter "maxResults": Maximum number
13259// of results to return.
13260func (c *ResourcesBuildingsListCall) MaxResults(maxResults int64) *ResourcesBuildingsListCall {
13261	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13262	return c
13263}
13264
13265// PageToken sets the optional parameter "pageToken": Token to specify
13266// the next page in the list.
13267func (c *ResourcesBuildingsListCall) PageToken(pageToken string) *ResourcesBuildingsListCall {
13268	c.urlParams_.Set("pageToken", pageToken)
13269	return c
13270}
13271
13272// Fields allows partial responses to be retrieved. See
13273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13274// for more information.
13275func (c *ResourcesBuildingsListCall) Fields(s ...googleapi.Field) *ResourcesBuildingsListCall {
13276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13277	return c
13278}
13279
13280// IfNoneMatch sets the optional parameter which makes the operation
13281// fail if the object's ETag matches the given value. This is useful for
13282// getting updates only after the object has changed since the last
13283// request. Use googleapi.IsNotModified to check whether the response
13284// error from Do is the result of In-None-Match.
13285func (c *ResourcesBuildingsListCall) IfNoneMatch(entityTag string) *ResourcesBuildingsListCall {
13286	c.ifNoneMatch_ = entityTag
13287	return c
13288}
13289
13290// Context sets the context to be used in this call's Do method. Any
13291// pending HTTP request will be aborted if the provided context is
13292// canceled.
13293func (c *ResourcesBuildingsListCall) Context(ctx context.Context) *ResourcesBuildingsListCall {
13294	c.ctx_ = ctx
13295	return c
13296}
13297
13298// Header returns an http.Header that can be modified by the caller to
13299// add HTTP headers to the request.
13300func (c *ResourcesBuildingsListCall) Header() http.Header {
13301	if c.header_ == nil {
13302		c.header_ = make(http.Header)
13303	}
13304	return c.header_
13305}
13306
13307func (c *ResourcesBuildingsListCall) doRequest(alt string) (*http.Response, error) {
13308	reqHeaders := make(http.Header)
13309	for k, v := range c.header_ {
13310		reqHeaders[k] = v
13311	}
13312	reqHeaders.Set("User-Agent", c.s.userAgent())
13313	if c.ifNoneMatch_ != "" {
13314		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13315	}
13316	var body io.Reader = nil
13317	c.urlParams_.Set("alt", alt)
13318	c.urlParams_.Set("prettyPrint", "false")
13319	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings")
13320	urls += "?" + c.urlParams_.Encode()
13321	req, err := http.NewRequest("GET", urls, body)
13322	if err != nil {
13323		return nil, err
13324	}
13325	req.Header = reqHeaders
13326	googleapi.Expand(req.URL, map[string]string{
13327		"customer": c.customer,
13328	})
13329	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13330}
13331
13332// Do executes the "directory.resources.buildings.list" call.
13333// Exactly one of *Buildings or error will be non-nil. Any non-2xx
13334// status code is an error. Response headers are in either
13335// *Buildings.ServerResponse.Header or (if a response was returned at
13336// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13337// to check whether the returned error was because
13338// http.StatusNotModified was returned.
13339func (c *ResourcesBuildingsListCall) Do(opts ...googleapi.CallOption) (*Buildings, error) {
13340	gensupport.SetOptions(c.urlParams_, opts...)
13341	res, err := c.doRequest("json")
13342	if res != nil && res.StatusCode == http.StatusNotModified {
13343		if res.Body != nil {
13344			res.Body.Close()
13345		}
13346		return nil, &googleapi.Error{
13347			Code:   res.StatusCode,
13348			Header: res.Header,
13349		}
13350	}
13351	if err != nil {
13352		return nil, err
13353	}
13354	defer googleapi.CloseBody(res)
13355	if err := googleapi.CheckResponse(res); err != nil {
13356		return nil, err
13357	}
13358	ret := &Buildings{
13359		ServerResponse: googleapi.ServerResponse{
13360			Header:         res.Header,
13361			HTTPStatusCode: res.StatusCode,
13362		},
13363	}
13364	target := &ret
13365	if err := gensupport.DecodeResponse(target, res); err != nil {
13366		return nil, err
13367	}
13368	return ret, nil
13369	// {
13370	//   "description": "Retrieves a list of buildings for an account.",
13371	//   "httpMethod": "GET",
13372	//   "id": "directory.resources.buildings.list",
13373	//   "parameterOrder": [
13374	//     "customer"
13375	//   ],
13376	//   "parameters": {
13377	//     "customer": {
13378	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13379	//       "location": "path",
13380	//       "required": true,
13381	//       "type": "string"
13382	//     },
13383	//     "maxResults": {
13384	//       "description": "Maximum number of results to return.",
13385	//       "format": "int32",
13386	//       "location": "query",
13387	//       "maximum": "500",
13388	//       "minimum": "1",
13389	//       "type": "integer"
13390	//     },
13391	//     "pageToken": {
13392	//       "description": "Token to specify the next page in the list.",
13393	//       "location": "query",
13394	//       "type": "string"
13395	//     }
13396	//   },
13397	//   "path": "customer/{customer}/resources/buildings",
13398	//   "response": {
13399	//     "$ref": "Buildings"
13400	//   },
13401	//   "scopes": [
13402	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
13403	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
13404	//   ]
13405	// }
13406
13407}
13408
13409// Pages invokes f for each page of results.
13410// A non-nil error returned from f will halt the iteration.
13411// The provided context supersedes any context provided to the Context method.
13412func (c *ResourcesBuildingsListCall) Pages(ctx context.Context, f func(*Buildings) error) error {
13413	c.ctx_ = ctx
13414	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13415	for {
13416		x, err := c.Do()
13417		if err != nil {
13418			return err
13419		}
13420		if err := f(x); err != nil {
13421			return err
13422		}
13423		if x.NextPageToken == "" {
13424			return nil
13425		}
13426		c.PageToken(x.NextPageToken)
13427	}
13428}
13429
13430// method id "directory.resources.buildings.patch":
13431
13432type ResourcesBuildingsPatchCall struct {
13433	s          *Service
13434	customer   string
13435	buildingId string
13436	building   *Building
13437	urlParams_ gensupport.URLParams
13438	ctx_       context.Context
13439	header_    http.Header
13440}
13441
13442// Patch: Updates a building. This method supports patch semantics.
13443func (r *ResourcesBuildingsService) Patch(customer string, buildingId string, building *Building) *ResourcesBuildingsPatchCall {
13444	c := &ResourcesBuildingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13445	c.customer = customer
13446	c.buildingId = buildingId
13447	c.building = building
13448	return c
13449}
13450
13451// CoordinatesSource sets the optional parameter "coordinatesSource":
13452// Source from which Building.coordinates are derived.
13453//
13454// Possible values:
13455//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
13456// coordinates included in the request.
13457//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
13458// populated based on the postal address.
13459//   "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS
13460// if postal address is provided. Otherwise, defaults to
13461// CLIENT_SPECIFIED if coordinates are provided.
13462func (c *ResourcesBuildingsPatchCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsPatchCall {
13463	c.urlParams_.Set("coordinatesSource", coordinatesSource)
13464	return c
13465}
13466
13467// Fields allows partial responses to be retrieved. See
13468// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13469// for more information.
13470func (c *ResourcesBuildingsPatchCall) Fields(s ...googleapi.Field) *ResourcesBuildingsPatchCall {
13471	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13472	return c
13473}
13474
13475// Context sets the context to be used in this call's Do method. Any
13476// pending HTTP request will be aborted if the provided context is
13477// canceled.
13478func (c *ResourcesBuildingsPatchCall) Context(ctx context.Context) *ResourcesBuildingsPatchCall {
13479	c.ctx_ = ctx
13480	return c
13481}
13482
13483// Header returns an http.Header that can be modified by the caller to
13484// add HTTP headers to the request.
13485func (c *ResourcesBuildingsPatchCall) Header() http.Header {
13486	if c.header_ == nil {
13487		c.header_ = make(http.Header)
13488	}
13489	return c.header_
13490}
13491
13492func (c *ResourcesBuildingsPatchCall) doRequest(alt string) (*http.Response, error) {
13493	reqHeaders := make(http.Header)
13494	for k, v := range c.header_ {
13495		reqHeaders[k] = v
13496	}
13497	reqHeaders.Set("User-Agent", c.s.userAgent())
13498	var body io.Reader = nil
13499	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
13500	if err != nil {
13501		return nil, err
13502	}
13503	reqHeaders.Set("Content-Type", "application/json")
13504	c.urlParams_.Set("alt", alt)
13505	c.urlParams_.Set("prettyPrint", "false")
13506	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}")
13507	urls += "?" + c.urlParams_.Encode()
13508	req, err := http.NewRequest("PATCH", urls, body)
13509	if err != nil {
13510		return nil, err
13511	}
13512	req.Header = reqHeaders
13513	googleapi.Expand(req.URL, map[string]string{
13514		"customer":   c.customer,
13515		"buildingId": c.buildingId,
13516	})
13517	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13518}
13519
13520// Do executes the "directory.resources.buildings.patch" call.
13521// Exactly one of *Building or error will be non-nil. Any non-2xx status
13522// code is an error. Response headers are in either
13523// *Building.ServerResponse.Header or (if a response was returned at
13524// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13525// to check whether the returned error was because
13526// http.StatusNotModified was returned.
13527func (c *ResourcesBuildingsPatchCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13528	gensupport.SetOptions(c.urlParams_, opts...)
13529	res, err := c.doRequest("json")
13530	if res != nil && res.StatusCode == http.StatusNotModified {
13531		if res.Body != nil {
13532			res.Body.Close()
13533		}
13534		return nil, &googleapi.Error{
13535			Code:   res.StatusCode,
13536			Header: res.Header,
13537		}
13538	}
13539	if err != nil {
13540		return nil, err
13541	}
13542	defer googleapi.CloseBody(res)
13543	if err := googleapi.CheckResponse(res); err != nil {
13544		return nil, err
13545	}
13546	ret := &Building{
13547		ServerResponse: googleapi.ServerResponse{
13548			Header:         res.Header,
13549			HTTPStatusCode: res.StatusCode,
13550		},
13551	}
13552	target := &ret
13553	if err := gensupport.DecodeResponse(target, res); err != nil {
13554		return nil, err
13555	}
13556	return ret, nil
13557	// {
13558	//   "description": "Updates a building. This method supports patch semantics.",
13559	//   "httpMethod": "PATCH",
13560	//   "id": "directory.resources.buildings.patch",
13561	//   "parameterOrder": [
13562	//     "customer",
13563	//     "buildingId"
13564	//   ],
13565	//   "parameters": {
13566	//     "buildingId": {
13567	//       "description": "The ID of the building to update.",
13568	//       "location": "path",
13569	//       "required": true,
13570	//       "type": "string"
13571	//     },
13572	//     "coordinatesSource": {
13573	//       "default": "SOURCE_UNSPECIFIED",
13574	//       "description": "Source from which Building.coordinates are derived.",
13575	//       "enum": [
13576	//         "CLIENT_SPECIFIED",
13577	//         "RESOLVED_FROM_ADDRESS",
13578	//         "SOURCE_UNSPECIFIED"
13579	//       ],
13580	//       "enumDescriptions": [
13581	//         "Building.coordinates are set to the coordinates included in the request.",
13582	//         "Building.coordinates are automatically populated based on the postal address.",
13583	//         "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided."
13584	//       ],
13585	//       "location": "query",
13586	//       "type": "string"
13587	//     },
13588	//     "customer": {
13589	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13590	//       "location": "path",
13591	//       "required": true,
13592	//       "type": "string"
13593	//     }
13594	//   },
13595	//   "path": "customer/{customer}/resources/buildings/{buildingId}",
13596	//   "request": {
13597	//     "$ref": "Building"
13598	//   },
13599	//   "response": {
13600	//     "$ref": "Building"
13601	//   },
13602	//   "scopes": [
13603	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
13604	//   ]
13605	// }
13606
13607}
13608
13609// method id "directory.resources.buildings.update":
13610
13611type ResourcesBuildingsUpdateCall struct {
13612	s          *Service
13613	customer   string
13614	buildingId string
13615	building   *Building
13616	urlParams_ gensupport.URLParams
13617	ctx_       context.Context
13618	header_    http.Header
13619}
13620
13621// Update: Updates a building.
13622func (r *ResourcesBuildingsService) Update(customer string, buildingId string, building *Building) *ResourcesBuildingsUpdateCall {
13623	c := &ResourcesBuildingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13624	c.customer = customer
13625	c.buildingId = buildingId
13626	c.building = building
13627	return c
13628}
13629
13630// CoordinatesSource sets the optional parameter "coordinatesSource":
13631// Source from which Building.coordinates are derived.
13632//
13633// Possible values:
13634//   "CLIENT_SPECIFIED" - Building.coordinates are set to the
13635// coordinates included in the request.
13636//   "RESOLVED_FROM_ADDRESS" - Building.coordinates are automatically
13637// populated based on the postal address.
13638//   "SOURCE_UNSPECIFIED" (default) - Defaults to RESOLVED_FROM_ADDRESS
13639// if postal address is provided. Otherwise, defaults to
13640// CLIENT_SPECIFIED if coordinates are provided.
13641func (c *ResourcesBuildingsUpdateCall) CoordinatesSource(coordinatesSource string) *ResourcesBuildingsUpdateCall {
13642	c.urlParams_.Set("coordinatesSource", coordinatesSource)
13643	return c
13644}
13645
13646// Fields allows partial responses to be retrieved. See
13647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13648// for more information.
13649func (c *ResourcesBuildingsUpdateCall) Fields(s ...googleapi.Field) *ResourcesBuildingsUpdateCall {
13650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13651	return c
13652}
13653
13654// Context sets the context to be used in this call's Do method. Any
13655// pending HTTP request will be aborted if the provided context is
13656// canceled.
13657func (c *ResourcesBuildingsUpdateCall) Context(ctx context.Context) *ResourcesBuildingsUpdateCall {
13658	c.ctx_ = ctx
13659	return c
13660}
13661
13662// Header returns an http.Header that can be modified by the caller to
13663// add HTTP headers to the request.
13664func (c *ResourcesBuildingsUpdateCall) Header() http.Header {
13665	if c.header_ == nil {
13666		c.header_ = make(http.Header)
13667	}
13668	return c.header_
13669}
13670
13671func (c *ResourcesBuildingsUpdateCall) doRequest(alt string) (*http.Response, error) {
13672	reqHeaders := make(http.Header)
13673	for k, v := range c.header_ {
13674		reqHeaders[k] = v
13675	}
13676	reqHeaders.Set("User-Agent", c.s.userAgent())
13677	var body io.Reader = nil
13678	body, err := googleapi.WithoutDataWrapper.JSONReader(c.building)
13679	if err != nil {
13680		return nil, err
13681	}
13682	reqHeaders.Set("Content-Type", "application/json")
13683	c.urlParams_.Set("alt", alt)
13684	c.urlParams_.Set("prettyPrint", "false")
13685	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/buildings/{buildingId}")
13686	urls += "?" + c.urlParams_.Encode()
13687	req, err := http.NewRequest("PUT", urls, body)
13688	if err != nil {
13689		return nil, err
13690	}
13691	req.Header = reqHeaders
13692	googleapi.Expand(req.URL, map[string]string{
13693		"customer":   c.customer,
13694		"buildingId": c.buildingId,
13695	})
13696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13697}
13698
13699// Do executes the "directory.resources.buildings.update" call.
13700// Exactly one of *Building or error will be non-nil. Any non-2xx status
13701// code is an error. Response headers are in either
13702// *Building.ServerResponse.Header or (if a response was returned at
13703// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13704// to check whether the returned error was because
13705// http.StatusNotModified was returned.
13706func (c *ResourcesBuildingsUpdateCall) Do(opts ...googleapi.CallOption) (*Building, error) {
13707	gensupport.SetOptions(c.urlParams_, opts...)
13708	res, err := c.doRequest("json")
13709	if res != nil && res.StatusCode == http.StatusNotModified {
13710		if res.Body != nil {
13711			res.Body.Close()
13712		}
13713		return nil, &googleapi.Error{
13714			Code:   res.StatusCode,
13715			Header: res.Header,
13716		}
13717	}
13718	if err != nil {
13719		return nil, err
13720	}
13721	defer googleapi.CloseBody(res)
13722	if err := googleapi.CheckResponse(res); err != nil {
13723		return nil, err
13724	}
13725	ret := &Building{
13726		ServerResponse: googleapi.ServerResponse{
13727			Header:         res.Header,
13728			HTTPStatusCode: res.StatusCode,
13729		},
13730	}
13731	target := &ret
13732	if err := gensupport.DecodeResponse(target, res); err != nil {
13733		return nil, err
13734	}
13735	return ret, nil
13736	// {
13737	//   "description": "Updates a building.",
13738	//   "httpMethod": "PUT",
13739	//   "id": "directory.resources.buildings.update",
13740	//   "parameterOrder": [
13741	//     "customer",
13742	//     "buildingId"
13743	//   ],
13744	//   "parameters": {
13745	//     "buildingId": {
13746	//       "description": "The ID of the building to update.",
13747	//       "location": "path",
13748	//       "required": true,
13749	//       "type": "string"
13750	//     },
13751	//     "coordinatesSource": {
13752	//       "default": "SOURCE_UNSPECIFIED",
13753	//       "description": "Source from which Building.coordinates are derived.",
13754	//       "enum": [
13755	//         "CLIENT_SPECIFIED",
13756	//         "RESOLVED_FROM_ADDRESS",
13757	//         "SOURCE_UNSPECIFIED"
13758	//       ],
13759	//       "enumDescriptions": [
13760	//         "Building.coordinates are set to the coordinates included in the request.",
13761	//         "Building.coordinates are automatically populated based on the postal address.",
13762	//         "Defaults to RESOLVED_FROM_ADDRESS if postal address is provided. Otherwise, defaults to CLIENT_SPECIFIED if coordinates are provided."
13763	//       ],
13764	//       "location": "query",
13765	//       "type": "string"
13766	//     },
13767	//     "customer": {
13768	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13769	//       "location": "path",
13770	//       "required": true,
13771	//       "type": "string"
13772	//     }
13773	//   },
13774	//   "path": "customer/{customer}/resources/buildings/{buildingId}",
13775	//   "request": {
13776	//     "$ref": "Building"
13777	//   },
13778	//   "response": {
13779	//     "$ref": "Building"
13780	//   },
13781	//   "scopes": [
13782	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
13783	//   ]
13784	// }
13785
13786}
13787
13788// method id "directory.resources.calendars.delete":
13789
13790type ResourcesCalendarsDeleteCall struct {
13791	s                  *Service
13792	customer           string
13793	calendarResourceId string
13794	urlParams_         gensupport.URLParams
13795	ctx_               context.Context
13796	header_            http.Header
13797}
13798
13799// Delete: Deletes a calendar resource.
13800func (r *ResourcesCalendarsService) Delete(customer string, calendarResourceId string) *ResourcesCalendarsDeleteCall {
13801	c := &ResourcesCalendarsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13802	c.customer = customer
13803	c.calendarResourceId = calendarResourceId
13804	return c
13805}
13806
13807// Fields allows partial responses to be retrieved. See
13808// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13809// for more information.
13810func (c *ResourcesCalendarsDeleteCall) Fields(s ...googleapi.Field) *ResourcesCalendarsDeleteCall {
13811	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13812	return c
13813}
13814
13815// Context sets the context to be used in this call's Do method. Any
13816// pending HTTP request will be aborted if the provided context is
13817// canceled.
13818func (c *ResourcesCalendarsDeleteCall) Context(ctx context.Context) *ResourcesCalendarsDeleteCall {
13819	c.ctx_ = ctx
13820	return c
13821}
13822
13823// Header returns an http.Header that can be modified by the caller to
13824// add HTTP headers to the request.
13825func (c *ResourcesCalendarsDeleteCall) Header() http.Header {
13826	if c.header_ == nil {
13827		c.header_ = make(http.Header)
13828	}
13829	return c.header_
13830}
13831
13832func (c *ResourcesCalendarsDeleteCall) doRequest(alt string) (*http.Response, error) {
13833	reqHeaders := make(http.Header)
13834	for k, v := range c.header_ {
13835		reqHeaders[k] = v
13836	}
13837	reqHeaders.Set("User-Agent", c.s.userAgent())
13838	var body io.Reader = nil
13839	c.urlParams_.Set("alt", alt)
13840	c.urlParams_.Set("prettyPrint", "false")
13841	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}")
13842	urls += "?" + c.urlParams_.Encode()
13843	req, err := http.NewRequest("DELETE", urls, body)
13844	if err != nil {
13845		return nil, err
13846	}
13847	req.Header = reqHeaders
13848	googleapi.Expand(req.URL, map[string]string{
13849		"customer":           c.customer,
13850		"calendarResourceId": c.calendarResourceId,
13851	})
13852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13853}
13854
13855// Do executes the "directory.resources.calendars.delete" call.
13856func (c *ResourcesCalendarsDeleteCall) Do(opts ...googleapi.CallOption) error {
13857	gensupport.SetOptions(c.urlParams_, opts...)
13858	res, err := c.doRequest("json")
13859	if err != nil {
13860		return err
13861	}
13862	defer googleapi.CloseBody(res)
13863	if err := googleapi.CheckResponse(res); err != nil {
13864		return err
13865	}
13866	return nil
13867	// {
13868	//   "description": "Deletes a calendar resource.",
13869	//   "httpMethod": "DELETE",
13870	//   "id": "directory.resources.calendars.delete",
13871	//   "parameterOrder": [
13872	//     "customer",
13873	//     "calendarResourceId"
13874	//   ],
13875	//   "parameters": {
13876	//     "calendarResourceId": {
13877	//       "description": "The unique ID of the calendar resource to delete.",
13878	//       "location": "path",
13879	//       "required": true,
13880	//       "type": "string"
13881	//     },
13882	//     "customer": {
13883	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
13884	//       "location": "path",
13885	//       "required": true,
13886	//       "type": "string"
13887	//     }
13888	//   },
13889	//   "path": "customer/{customer}/resources/calendars/{calendarResourceId}",
13890	//   "scopes": [
13891	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
13892	//   ]
13893	// }
13894
13895}
13896
13897// method id "directory.resources.calendars.get":
13898
13899type ResourcesCalendarsGetCall struct {
13900	s                  *Service
13901	customer           string
13902	calendarResourceId string
13903	urlParams_         gensupport.URLParams
13904	ifNoneMatch_       string
13905	ctx_               context.Context
13906	header_            http.Header
13907}
13908
13909// Get: Retrieves a calendar resource.
13910func (r *ResourcesCalendarsService) Get(customer string, calendarResourceId string) *ResourcesCalendarsGetCall {
13911	c := &ResourcesCalendarsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13912	c.customer = customer
13913	c.calendarResourceId = calendarResourceId
13914	return c
13915}
13916
13917// Fields allows partial responses to be retrieved. See
13918// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13919// for more information.
13920func (c *ResourcesCalendarsGetCall) Fields(s ...googleapi.Field) *ResourcesCalendarsGetCall {
13921	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13922	return c
13923}
13924
13925// IfNoneMatch sets the optional parameter which makes the operation
13926// fail if the object's ETag matches the given value. This is useful for
13927// getting updates only after the object has changed since the last
13928// request. Use googleapi.IsNotModified to check whether the response
13929// error from Do is the result of In-None-Match.
13930func (c *ResourcesCalendarsGetCall) IfNoneMatch(entityTag string) *ResourcesCalendarsGetCall {
13931	c.ifNoneMatch_ = entityTag
13932	return c
13933}
13934
13935// Context sets the context to be used in this call's Do method. Any
13936// pending HTTP request will be aborted if the provided context is
13937// canceled.
13938func (c *ResourcesCalendarsGetCall) Context(ctx context.Context) *ResourcesCalendarsGetCall {
13939	c.ctx_ = ctx
13940	return c
13941}
13942
13943// Header returns an http.Header that can be modified by the caller to
13944// add HTTP headers to the request.
13945func (c *ResourcesCalendarsGetCall) Header() http.Header {
13946	if c.header_ == nil {
13947		c.header_ = make(http.Header)
13948	}
13949	return c.header_
13950}
13951
13952func (c *ResourcesCalendarsGetCall) doRequest(alt string) (*http.Response, error) {
13953	reqHeaders := make(http.Header)
13954	for k, v := range c.header_ {
13955		reqHeaders[k] = v
13956	}
13957	reqHeaders.Set("User-Agent", c.s.userAgent())
13958	if c.ifNoneMatch_ != "" {
13959		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13960	}
13961	var body io.Reader = nil
13962	c.urlParams_.Set("alt", alt)
13963	c.urlParams_.Set("prettyPrint", "false")
13964	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}")
13965	urls += "?" + c.urlParams_.Encode()
13966	req, err := http.NewRequest("GET", urls, body)
13967	if err != nil {
13968		return nil, err
13969	}
13970	req.Header = reqHeaders
13971	googleapi.Expand(req.URL, map[string]string{
13972		"customer":           c.customer,
13973		"calendarResourceId": c.calendarResourceId,
13974	})
13975	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13976}
13977
13978// Do executes the "directory.resources.calendars.get" call.
13979// Exactly one of *CalendarResource or error will be non-nil. Any
13980// non-2xx status code is an error. Response headers are in either
13981// *CalendarResource.ServerResponse.Header or (if a response was
13982// returned at all) in error.(*googleapi.Error).Header. Use
13983// googleapi.IsNotModified to check whether the returned error was
13984// because http.StatusNotModified was returned.
13985func (c *ResourcesCalendarsGetCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
13986	gensupport.SetOptions(c.urlParams_, opts...)
13987	res, err := c.doRequest("json")
13988	if res != nil && res.StatusCode == http.StatusNotModified {
13989		if res.Body != nil {
13990			res.Body.Close()
13991		}
13992		return nil, &googleapi.Error{
13993			Code:   res.StatusCode,
13994			Header: res.Header,
13995		}
13996	}
13997	if err != nil {
13998		return nil, err
13999	}
14000	defer googleapi.CloseBody(res)
14001	if err := googleapi.CheckResponse(res); err != nil {
14002		return nil, err
14003	}
14004	ret := &CalendarResource{
14005		ServerResponse: googleapi.ServerResponse{
14006			Header:         res.Header,
14007			HTTPStatusCode: res.StatusCode,
14008		},
14009	}
14010	target := &ret
14011	if err := gensupport.DecodeResponse(target, res); err != nil {
14012		return nil, err
14013	}
14014	return ret, nil
14015	// {
14016	//   "description": "Retrieves a calendar resource.",
14017	//   "httpMethod": "GET",
14018	//   "id": "directory.resources.calendars.get",
14019	//   "parameterOrder": [
14020	//     "customer",
14021	//     "calendarResourceId"
14022	//   ],
14023	//   "parameters": {
14024	//     "calendarResourceId": {
14025	//       "description": "The unique ID of the calendar resource to retrieve.",
14026	//       "location": "path",
14027	//       "required": true,
14028	//       "type": "string"
14029	//     },
14030	//     "customer": {
14031	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14032	//       "location": "path",
14033	//       "required": true,
14034	//       "type": "string"
14035	//     }
14036	//   },
14037	//   "path": "customer/{customer}/resources/calendars/{calendarResourceId}",
14038	//   "response": {
14039	//     "$ref": "CalendarResource"
14040	//   },
14041	//   "scopes": [
14042	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
14043	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
14044	//   ]
14045	// }
14046
14047}
14048
14049// method id "directory.resources.calendars.insert":
14050
14051type ResourcesCalendarsInsertCall struct {
14052	s                *Service
14053	customer         string
14054	calendarresource *CalendarResource
14055	urlParams_       gensupport.URLParams
14056	ctx_             context.Context
14057	header_          http.Header
14058}
14059
14060// Insert: Inserts a calendar resource.
14061func (r *ResourcesCalendarsService) Insert(customer string, calendarresource *CalendarResource) *ResourcesCalendarsInsertCall {
14062	c := &ResourcesCalendarsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14063	c.customer = customer
14064	c.calendarresource = calendarresource
14065	return c
14066}
14067
14068// Fields allows partial responses to be retrieved. See
14069// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14070// for more information.
14071func (c *ResourcesCalendarsInsertCall) Fields(s ...googleapi.Field) *ResourcesCalendarsInsertCall {
14072	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14073	return c
14074}
14075
14076// Context sets the context to be used in this call's Do method. Any
14077// pending HTTP request will be aborted if the provided context is
14078// canceled.
14079func (c *ResourcesCalendarsInsertCall) Context(ctx context.Context) *ResourcesCalendarsInsertCall {
14080	c.ctx_ = ctx
14081	return c
14082}
14083
14084// Header returns an http.Header that can be modified by the caller to
14085// add HTTP headers to the request.
14086func (c *ResourcesCalendarsInsertCall) Header() http.Header {
14087	if c.header_ == nil {
14088		c.header_ = make(http.Header)
14089	}
14090	return c.header_
14091}
14092
14093func (c *ResourcesCalendarsInsertCall) doRequest(alt string) (*http.Response, error) {
14094	reqHeaders := make(http.Header)
14095	for k, v := range c.header_ {
14096		reqHeaders[k] = v
14097	}
14098	reqHeaders.Set("User-Agent", c.s.userAgent())
14099	var body io.Reader = nil
14100	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
14101	if err != nil {
14102		return nil, err
14103	}
14104	reqHeaders.Set("Content-Type", "application/json")
14105	c.urlParams_.Set("alt", alt)
14106	c.urlParams_.Set("prettyPrint", "false")
14107	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars")
14108	urls += "?" + c.urlParams_.Encode()
14109	req, err := http.NewRequest("POST", urls, body)
14110	if err != nil {
14111		return nil, err
14112	}
14113	req.Header = reqHeaders
14114	googleapi.Expand(req.URL, map[string]string{
14115		"customer": c.customer,
14116	})
14117	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14118}
14119
14120// Do executes the "directory.resources.calendars.insert" call.
14121// Exactly one of *CalendarResource or error will be non-nil. Any
14122// non-2xx status code is an error. Response headers are in either
14123// *CalendarResource.ServerResponse.Header or (if a response was
14124// returned at all) in error.(*googleapi.Error).Header. Use
14125// googleapi.IsNotModified to check whether the returned error was
14126// because http.StatusNotModified was returned.
14127func (c *ResourcesCalendarsInsertCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
14128	gensupport.SetOptions(c.urlParams_, opts...)
14129	res, err := c.doRequest("json")
14130	if res != nil && res.StatusCode == http.StatusNotModified {
14131		if res.Body != nil {
14132			res.Body.Close()
14133		}
14134		return nil, &googleapi.Error{
14135			Code:   res.StatusCode,
14136			Header: res.Header,
14137		}
14138	}
14139	if err != nil {
14140		return nil, err
14141	}
14142	defer googleapi.CloseBody(res)
14143	if err := googleapi.CheckResponse(res); err != nil {
14144		return nil, err
14145	}
14146	ret := &CalendarResource{
14147		ServerResponse: googleapi.ServerResponse{
14148			Header:         res.Header,
14149			HTTPStatusCode: res.StatusCode,
14150		},
14151	}
14152	target := &ret
14153	if err := gensupport.DecodeResponse(target, res); err != nil {
14154		return nil, err
14155	}
14156	return ret, nil
14157	// {
14158	//   "description": "Inserts a calendar resource.",
14159	//   "httpMethod": "POST",
14160	//   "id": "directory.resources.calendars.insert",
14161	//   "parameterOrder": [
14162	//     "customer"
14163	//   ],
14164	//   "parameters": {
14165	//     "customer": {
14166	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14167	//       "location": "path",
14168	//       "required": true,
14169	//       "type": "string"
14170	//     }
14171	//   },
14172	//   "path": "customer/{customer}/resources/calendars",
14173	//   "request": {
14174	//     "$ref": "CalendarResource"
14175	//   },
14176	//   "response": {
14177	//     "$ref": "CalendarResource"
14178	//   },
14179	//   "scopes": [
14180	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
14181	//   ]
14182	// }
14183
14184}
14185
14186// method id "directory.resources.calendars.list":
14187
14188type ResourcesCalendarsListCall struct {
14189	s            *Service
14190	customer     string
14191	urlParams_   gensupport.URLParams
14192	ifNoneMatch_ string
14193	ctx_         context.Context
14194	header_      http.Header
14195}
14196
14197// List: Retrieves a list of calendar resources for an account.
14198func (r *ResourcesCalendarsService) List(customer string) *ResourcesCalendarsListCall {
14199	c := &ResourcesCalendarsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14200	c.customer = customer
14201	return c
14202}
14203
14204// MaxResults sets the optional parameter "maxResults": Maximum number
14205// of results to return.
14206func (c *ResourcesCalendarsListCall) MaxResults(maxResults int64) *ResourcesCalendarsListCall {
14207	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14208	return c
14209}
14210
14211// OrderBy sets the optional parameter "orderBy": Field(s) to sort
14212// results by in either ascending or descending order. Supported fields
14213// include resourceId, resourceName, capacity, buildingId, and
14214// floorName. If no order is specified, defaults to ascending. Should be
14215// of the form "field [asc|desc], field [asc|desc], ...". For example
14216// buildingId, capacity desc would return results sorted first by
14217// buildingId in ascending order then by capacity in descending order.
14218func (c *ResourcesCalendarsListCall) OrderBy(orderBy string) *ResourcesCalendarsListCall {
14219	c.urlParams_.Set("orderBy", orderBy)
14220	return c
14221}
14222
14223// PageToken sets the optional parameter "pageToken": Token to specify
14224// the next page in the list.
14225func (c *ResourcesCalendarsListCall) PageToken(pageToken string) *ResourcesCalendarsListCall {
14226	c.urlParams_.Set("pageToken", pageToken)
14227	return c
14228}
14229
14230// Query sets the optional parameter "query": String query used to
14231// filter results. Should be of the form "field operator value" where
14232// field can be any of supported fields and operators can be any of
14233// supported operations. Operators include '=' for exact match and ':'
14234// for prefix match or HAS match where applicable. For prefix match, the
14235// value should always be followed by a *. Supported fields include
14236// generatedResourceName, name, buildingId,
14237// featureInstances.feature.name. For example buildingId=US-NYC-9TH AND
14238// featureInstances.feature.name:Phone.
14239func (c *ResourcesCalendarsListCall) Query(query string) *ResourcesCalendarsListCall {
14240	c.urlParams_.Set("query", query)
14241	return c
14242}
14243
14244// Fields allows partial responses to be retrieved. See
14245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14246// for more information.
14247func (c *ResourcesCalendarsListCall) Fields(s ...googleapi.Field) *ResourcesCalendarsListCall {
14248	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14249	return c
14250}
14251
14252// IfNoneMatch sets the optional parameter which makes the operation
14253// fail if the object's ETag matches the given value. This is useful for
14254// getting updates only after the object has changed since the last
14255// request. Use googleapi.IsNotModified to check whether the response
14256// error from Do is the result of In-None-Match.
14257func (c *ResourcesCalendarsListCall) IfNoneMatch(entityTag string) *ResourcesCalendarsListCall {
14258	c.ifNoneMatch_ = entityTag
14259	return c
14260}
14261
14262// Context sets the context to be used in this call's Do method. Any
14263// pending HTTP request will be aborted if the provided context is
14264// canceled.
14265func (c *ResourcesCalendarsListCall) Context(ctx context.Context) *ResourcesCalendarsListCall {
14266	c.ctx_ = ctx
14267	return c
14268}
14269
14270// Header returns an http.Header that can be modified by the caller to
14271// add HTTP headers to the request.
14272func (c *ResourcesCalendarsListCall) Header() http.Header {
14273	if c.header_ == nil {
14274		c.header_ = make(http.Header)
14275	}
14276	return c.header_
14277}
14278
14279func (c *ResourcesCalendarsListCall) doRequest(alt string) (*http.Response, error) {
14280	reqHeaders := make(http.Header)
14281	for k, v := range c.header_ {
14282		reqHeaders[k] = v
14283	}
14284	reqHeaders.Set("User-Agent", c.s.userAgent())
14285	if c.ifNoneMatch_ != "" {
14286		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14287	}
14288	var body io.Reader = nil
14289	c.urlParams_.Set("alt", alt)
14290	c.urlParams_.Set("prettyPrint", "false")
14291	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars")
14292	urls += "?" + c.urlParams_.Encode()
14293	req, err := http.NewRequest("GET", urls, body)
14294	if err != nil {
14295		return nil, err
14296	}
14297	req.Header = reqHeaders
14298	googleapi.Expand(req.URL, map[string]string{
14299		"customer": c.customer,
14300	})
14301	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14302}
14303
14304// Do executes the "directory.resources.calendars.list" call.
14305// Exactly one of *CalendarResources or error will be non-nil. Any
14306// non-2xx status code is an error. Response headers are in either
14307// *CalendarResources.ServerResponse.Header or (if a response was
14308// returned at all) in error.(*googleapi.Error).Header. Use
14309// googleapi.IsNotModified to check whether the returned error was
14310// because http.StatusNotModified was returned.
14311func (c *ResourcesCalendarsListCall) Do(opts ...googleapi.CallOption) (*CalendarResources, error) {
14312	gensupport.SetOptions(c.urlParams_, opts...)
14313	res, err := c.doRequest("json")
14314	if res != nil && res.StatusCode == http.StatusNotModified {
14315		if res.Body != nil {
14316			res.Body.Close()
14317		}
14318		return nil, &googleapi.Error{
14319			Code:   res.StatusCode,
14320			Header: res.Header,
14321		}
14322	}
14323	if err != nil {
14324		return nil, err
14325	}
14326	defer googleapi.CloseBody(res)
14327	if err := googleapi.CheckResponse(res); err != nil {
14328		return nil, err
14329	}
14330	ret := &CalendarResources{
14331		ServerResponse: googleapi.ServerResponse{
14332			Header:         res.Header,
14333			HTTPStatusCode: res.StatusCode,
14334		},
14335	}
14336	target := &ret
14337	if err := gensupport.DecodeResponse(target, res); err != nil {
14338		return nil, err
14339	}
14340	return ret, nil
14341	// {
14342	//   "description": "Retrieves a list of calendar resources for an account.",
14343	//   "httpMethod": "GET",
14344	//   "id": "directory.resources.calendars.list",
14345	//   "parameterOrder": [
14346	//     "customer"
14347	//   ],
14348	//   "parameters": {
14349	//     "customer": {
14350	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14351	//       "location": "path",
14352	//       "required": true,
14353	//       "type": "string"
14354	//     },
14355	//     "maxResults": {
14356	//       "description": "Maximum number of results to return.",
14357	//       "format": "int32",
14358	//       "location": "query",
14359	//       "maximum": "500",
14360	//       "minimum": "1",
14361	//       "type": "integer"
14362	//     },
14363	//     "orderBy": {
14364	//       "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.",
14365	//       "location": "query",
14366	//       "type": "string"
14367	//     },
14368	//     "pageToken": {
14369	//       "description": "Token to specify the next page in the list.",
14370	//       "location": "query",
14371	//       "type": "string"
14372	//     },
14373	//     "query": {
14374	//       "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 and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Supported fields include generatedResourceName, name, buildingId, featureInstances.feature.name. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.",
14375	//       "location": "query",
14376	//       "type": "string"
14377	//     }
14378	//   },
14379	//   "path": "customer/{customer}/resources/calendars",
14380	//   "response": {
14381	//     "$ref": "CalendarResources"
14382	//   },
14383	//   "scopes": [
14384	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
14385	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
14386	//   ]
14387	// }
14388
14389}
14390
14391// Pages invokes f for each page of results.
14392// A non-nil error returned from f will halt the iteration.
14393// The provided context supersedes any context provided to the Context method.
14394func (c *ResourcesCalendarsListCall) Pages(ctx context.Context, f func(*CalendarResources) error) error {
14395	c.ctx_ = ctx
14396	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14397	for {
14398		x, err := c.Do()
14399		if err != nil {
14400			return err
14401		}
14402		if err := f(x); err != nil {
14403			return err
14404		}
14405		if x.NextPageToken == "" {
14406			return nil
14407		}
14408		c.PageToken(x.NextPageToken)
14409	}
14410}
14411
14412// method id "directory.resources.calendars.patch":
14413
14414type ResourcesCalendarsPatchCall struct {
14415	s                  *Service
14416	customer           string
14417	calendarResourceId string
14418	calendarresource   *CalendarResource
14419	urlParams_         gensupport.URLParams
14420	ctx_               context.Context
14421	header_            http.Header
14422}
14423
14424// Patch: Updates a calendar resource.
14425//
14426// This method supports patch semantics, meaning you only need to
14427// include the fields you wish to update. Fields that are not present in
14428// the request will be preserved. This method supports patch semantics.
14429func (r *ResourcesCalendarsService) Patch(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsPatchCall {
14430	c := &ResourcesCalendarsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14431	c.customer = customer
14432	c.calendarResourceId = calendarResourceId
14433	c.calendarresource = calendarresource
14434	return c
14435}
14436
14437// Fields allows partial responses to be retrieved. See
14438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14439// for more information.
14440func (c *ResourcesCalendarsPatchCall) Fields(s ...googleapi.Field) *ResourcesCalendarsPatchCall {
14441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14442	return c
14443}
14444
14445// Context sets the context to be used in this call's Do method. Any
14446// pending HTTP request will be aborted if the provided context is
14447// canceled.
14448func (c *ResourcesCalendarsPatchCall) Context(ctx context.Context) *ResourcesCalendarsPatchCall {
14449	c.ctx_ = ctx
14450	return c
14451}
14452
14453// Header returns an http.Header that can be modified by the caller to
14454// add HTTP headers to the request.
14455func (c *ResourcesCalendarsPatchCall) Header() http.Header {
14456	if c.header_ == nil {
14457		c.header_ = make(http.Header)
14458	}
14459	return c.header_
14460}
14461
14462func (c *ResourcesCalendarsPatchCall) doRequest(alt string) (*http.Response, error) {
14463	reqHeaders := make(http.Header)
14464	for k, v := range c.header_ {
14465		reqHeaders[k] = v
14466	}
14467	reqHeaders.Set("User-Agent", c.s.userAgent())
14468	var body io.Reader = nil
14469	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
14470	if err != nil {
14471		return nil, err
14472	}
14473	reqHeaders.Set("Content-Type", "application/json")
14474	c.urlParams_.Set("alt", alt)
14475	c.urlParams_.Set("prettyPrint", "false")
14476	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}")
14477	urls += "?" + c.urlParams_.Encode()
14478	req, err := http.NewRequest("PATCH", urls, body)
14479	if err != nil {
14480		return nil, err
14481	}
14482	req.Header = reqHeaders
14483	googleapi.Expand(req.URL, map[string]string{
14484		"customer":           c.customer,
14485		"calendarResourceId": c.calendarResourceId,
14486	})
14487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14488}
14489
14490// Do executes the "directory.resources.calendars.patch" call.
14491// Exactly one of *CalendarResource or error will be non-nil. Any
14492// non-2xx status code is an error. Response headers are in either
14493// *CalendarResource.ServerResponse.Header or (if a response was
14494// returned at all) in error.(*googleapi.Error).Header. Use
14495// googleapi.IsNotModified to check whether the returned error was
14496// because http.StatusNotModified was returned.
14497func (c *ResourcesCalendarsPatchCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
14498	gensupport.SetOptions(c.urlParams_, opts...)
14499	res, err := c.doRequest("json")
14500	if res != nil && res.StatusCode == http.StatusNotModified {
14501		if res.Body != nil {
14502			res.Body.Close()
14503		}
14504		return nil, &googleapi.Error{
14505			Code:   res.StatusCode,
14506			Header: res.Header,
14507		}
14508	}
14509	if err != nil {
14510		return nil, err
14511	}
14512	defer googleapi.CloseBody(res)
14513	if err := googleapi.CheckResponse(res); err != nil {
14514		return nil, err
14515	}
14516	ret := &CalendarResource{
14517		ServerResponse: googleapi.ServerResponse{
14518			Header:         res.Header,
14519			HTTPStatusCode: res.StatusCode,
14520		},
14521	}
14522	target := &ret
14523	if err := gensupport.DecodeResponse(target, res); err != nil {
14524		return nil, err
14525	}
14526	return ret, nil
14527	// {
14528	//   "description": "Updates a calendar resource.\n\nThis 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. This method supports patch semantics.",
14529	//   "httpMethod": "PATCH",
14530	//   "id": "directory.resources.calendars.patch",
14531	//   "parameterOrder": [
14532	//     "customer",
14533	//     "calendarResourceId"
14534	//   ],
14535	//   "parameters": {
14536	//     "calendarResourceId": {
14537	//       "description": "The unique ID of the calendar resource to update.",
14538	//       "location": "path",
14539	//       "required": true,
14540	//       "type": "string"
14541	//     },
14542	//     "customer": {
14543	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14544	//       "location": "path",
14545	//       "required": true,
14546	//       "type": "string"
14547	//     }
14548	//   },
14549	//   "path": "customer/{customer}/resources/calendars/{calendarResourceId}",
14550	//   "request": {
14551	//     "$ref": "CalendarResource"
14552	//   },
14553	//   "response": {
14554	//     "$ref": "CalendarResource"
14555	//   },
14556	//   "scopes": [
14557	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
14558	//   ]
14559	// }
14560
14561}
14562
14563// method id "directory.resources.calendars.update":
14564
14565type ResourcesCalendarsUpdateCall struct {
14566	s                  *Service
14567	customer           string
14568	calendarResourceId string
14569	calendarresource   *CalendarResource
14570	urlParams_         gensupport.URLParams
14571	ctx_               context.Context
14572	header_            http.Header
14573}
14574
14575// Update: Updates a calendar resource.
14576//
14577// This method supports patch semantics, meaning you only need to
14578// include the fields you wish to update. Fields that are not present in
14579// the request will be preserved.
14580func (r *ResourcesCalendarsService) Update(customer string, calendarResourceId string, calendarresource *CalendarResource) *ResourcesCalendarsUpdateCall {
14581	c := &ResourcesCalendarsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14582	c.customer = customer
14583	c.calendarResourceId = calendarResourceId
14584	c.calendarresource = calendarresource
14585	return c
14586}
14587
14588// Fields allows partial responses to be retrieved. See
14589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14590// for more information.
14591func (c *ResourcesCalendarsUpdateCall) Fields(s ...googleapi.Field) *ResourcesCalendarsUpdateCall {
14592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14593	return c
14594}
14595
14596// Context sets the context to be used in this call's Do method. Any
14597// pending HTTP request will be aborted if the provided context is
14598// canceled.
14599func (c *ResourcesCalendarsUpdateCall) Context(ctx context.Context) *ResourcesCalendarsUpdateCall {
14600	c.ctx_ = ctx
14601	return c
14602}
14603
14604// Header returns an http.Header that can be modified by the caller to
14605// add HTTP headers to the request.
14606func (c *ResourcesCalendarsUpdateCall) Header() http.Header {
14607	if c.header_ == nil {
14608		c.header_ = make(http.Header)
14609	}
14610	return c.header_
14611}
14612
14613func (c *ResourcesCalendarsUpdateCall) doRequest(alt string) (*http.Response, error) {
14614	reqHeaders := make(http.Header)
14615	for k, v := range c.header_ {
14616		reqHeaders[k] = v
14617	}
14618	reqHeaders.Set("User-Agent", c.s.userAgent())
14619	var body io.Reader = nil
14620	body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarresource)
14621	if err != nil {
14622		return nil, err
14623	}
14624	reqHeaders.Set("Content-Type", "application/json")
14625	c.urlParams_.Set("alt", alt)
14626	c.urlParams_.Set("prettyPrint", "false")
14627	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/calendars/{calendarResourceId}")
14628	urls += "?" + c.urlParams_.Encode()
14629	req, err := http.NewRequest("PUT", urls, body)
14630	if err != nil {
14631		return nil, err
14632	}
14633	req.Header = reqHeaders
14634	googleapi.Expand(req.URL, map[string]string{
14635		"customer":           c.customer,
14636		"calendarResourceId": c.calendarResourceId,
14637	})
14638	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14639}
14640
14641// Do executes the "directory.resources.calendars.update" call.
14642// Exactly one of *CalendarResource or error will be non-nil. Any
14643// non-2xx status code is an error. Response headers are in either
14644// *CalendarResource.ServerResponse.Header or (if a response was
14645// returned at all) in error.(*googleapi.Error).Header. Use
14646// googleapi.IsNotModified to check whether the returned error was
14647// because http.StatusNotModified was returned.
14648func (c *ResourcesCalendarsUpdateCall) Do(opts ...googleapi.CallOption) (*CalendarResource, error) {
14649	gensupport.SetOptions(c.urlParams_, opts...)
14650	res, err := c.doRequest("json")
14651	if res != nil && res.StatusCode == http.StatusNotModified {
14652		if res.Body != nil {
14653			res.Body.Close()
14654		}
14655		return nil, &googleapi.Error{
14656			Code:   res.StatusCode,
14657			Header: res.Header,
14658		}
14659	}
14660	if err != nil {
14661		return nil, err
14662	}
14663	defer googleapi.CloseBody(res)
14664	if err := googleapi.CheckResponse(res); err != nil {
14665		return nil, err
14666	}
14667	ret := &CalendarResource{
14668		ServerResponse: googleapi.ServerResponse{
14669			Header:         res.Header,
14670			HTTPStatusCode: res.StatusCode,
14671		},
14672	}
14673	target := &ret
14674	if err := gensupport.DecodeResponse(target, res); err != nil {
14675		return nil, err
14676	}
14677	return ret, nil
14678	// {
14679	//   "description": "Updates a calendar resource.\n\nThis 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.",
14680	//   "httpMethod": "PUT",
14681	//   "id": "directory.resources.calendars.update",
14682	//   "parameterOrder": [
14683	//     "customer",
14684	//     "calendarResourceId"
14685	//   ],
14686	//   "parameters": {
14687	//     "calendarResourceId": {
14688	//       "description": "The unique ID of the calendar resource to update.",
14689	//       "location": "path",
14690	//       "required": true,
14691	//       "type": "string"
14692	//     },
14693	//     "customer": {
14694	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14695	//       "location": "path",
14696	//       "required": true,
14697	//       "type": "string"
14698	//     }
14699	//   },
14700	//   "path": "customer/{customer}/resources/calendars/{calendarResourceId}",
14701	//   "request": {
14702	//     "$ref": "CalendarResource"
14703	//   },
14704	//   "response": {
14705	//     "$ref": "CalendarResource"
14706	//   },
14707	//   "scopes": [
14708	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
14709	//   ]
14710	// }
14711
14712}
14713
14714// method id "directory.resources.features.delete":
14715
14716type ResourcesFeaturesDeleteCall struct {
14717	s          *Service
14718	customer   string
14719	featureKey string
14720	urlParams_ gensupport.URLParams
14721	ctx_       context.Context
14722	header_    http.Header
14723}
14724
14725// Delete: Deletes a feature.
14726func (r *ResourcesFeaturesService) Delete(customer string, featureKey string) *ResourcesFeaturesDeleteCall {
14727	c := &ResourcesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14728	c.customer = customer
14729	c.featureKey = featureKey
14730	return c
14731}
14732
14733// Fields allows partial responses to be retrieved. See
14734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14735// for more information.
14736func (c *ResourcesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ResourcesFeaturesDeleteCall {
14737	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14738	return c
14739}
14740
14741// Context sets the context to be used in this call's Do method. Any
14742// pending HTTP request will be aborted if the provided context is
14743// canceled.
14744func (c *ResourcesFeaturesDeleteCall) Context(ctx context.Context) *ResourcesFeaturesDeleteCall {
14745	c.ctx_ = ctx
14746	return c
14747}
14748
14749// Header returns an http.Header that can be modified by the caller to
14750// add HTTP headers to the request.
14751func (c *ResourcesFeaturesDeleteCall) Header() http.Header {
14752	if c.header_ == nil {
14753		c.header_ = make(http.Header)
14754	}
14755	return c.header_
14756}
14757
14758func (c *ResourcesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) {
14759	reqHeaders := make(http.Header)
14760	for k, v := range c.header_ {
14761		reqHeaders[k] = v
14762	}
14763	reqHeaders.Set("User-Agent", c.s.userAgent())
14764	var body io.Reader = nil
14765	c.urlParams_.Set("alt", alt)
14766	c.urlParams_.Set("prettyPrint", "false")
14767	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}")
14768	urls += "?" + c.urlParams_.Encode()
14769	req, err := http.NewRequest("DELETE", urls, body)
14770	if err != nil {
14771		return nil, err
14772	}
14773	req.Header = reqHeaders
14774	googleapi.Expand(req.URL, map[string]string{
14775		"customer":   c.customer,
14776		"featureKey": c.featureKey,
14777	})
14778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14779}
14780
14781// Do executes the "directory.resources.features.delete" call.
14782func (c *ResourcesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) error {
14783	gensupport.SetOptions(c.urlParams_, opts...)
14784	res, err := c.doRequest("json")
14785	if err != nil {
14786		return err
14787	}
14788	defer googleapi.CloseBody(res)
14789	if err := googleapi.CheckResponse(res); err != nil {
14790		return err
14791	}
14792	return nil
14793	// {
14794	//   "description": "Deletes a feature.",
14795	//   "httpMethod": "DELETE",
14796	//   "id": "directory.resources.features.delete",
14797	//   "parameterOrder": [
14798	//     "customer",
14799	//     "featureKey"
14800	//   ],
14801	//   "parameters": {
14802	//     "customer": {
14803	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14804	//       "location": "path",
14805	//       "required": true,
14806	//       "type": "string"
14807	//     },
14808	//     "featureKey": {
14809	//       "description": "The unique ID of the feature to delete.",
14810	//       "location": "path",
14811	//       "required": true,
14812	//       "type": "string"
14813	//     }
14814	//   },
14815	//   "path": "customer/{customer}/resources/features/{featureKey}",
14816	//   "scopes": [
14817	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
14818	//   ]
14819	// }
14820
14821}
14822
14823// method id "directory.resources.features.get":
14824
14825type ResourcesFeaturesGetCall struct {
14826	s            *Service
14827	customer     string
14828	featureKey   string
14829	urlParams_   gensupport.URLParams
14830	ifNoneMatch_ string
14831	ctx_         context.Context
14832	header_      http.Header
14833}
14834
14835// Get: Retrieves a feature.
14836func (r *ResourcesFeaturesService) Get(customer string, featureKey string) *ResourcesFeaturesGetCall {
14837	c := &ResourcesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14838	c.customer = customer
14839	c.featureKey = featureKey
14840	return c
14841}
14842
14843// Fields allows partial responses to be retrieved. See
14844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14845// for more information.
14846func (c *ResourcesFeaturesGetCall) Fields(s ...googleapi.Field) *ResourcesFeaturesGetCall {
14847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14848	return c
14849}
14850
14851// IfNoneMatch sets the optional parameter which makes the operation
14852// fail if the object's ETag matches the given value. This is useful for
14853// getting updates only after the object has changed since the last
14854// request. Use googleapi.IsNotModified to check whether the response
14855// error from Do is the result of In-None-Match.
14856func (c *ResourcesFeaturesGetCall) IfNoneMatch(entityTag string) *ResourcesFeaturesGetCall {
14857	c.ifNoneMatch_ = entityTag
14858	return c
14859}
14860
14861// Context sets the context to be used in this call's Do method. Any
14862// pending HTTP request will be aborted if the provided context is
14863// canceled.
14864func (c *ResourcesFeaturesGetCall) Context(ctx context.Context) *ResourcesFeaturesGetCall {
14865	c.ctx_ = ctx
14866	return c
14867}
14868
14869// Header returns an http.Header that can be modified by the caller to
14870// add HTTP headers to the request.
14871func (c *ResourcesFeaturesGetCall) Header() http.Header {
14872	if c.header_ == nil {
14873		c.header_ = make(http.Header)
14874	}
14875	return c.header_
14876}
14877
14878func (c *ResourcesFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
14879	reqHeaders := make(http.Header)
14880	for k, v := range c.header_ {
14881		reqHeaders[k] = v
14882	}
14883	reqHeaders.Set("User-Agent", c.s.userAgent())
14884	if c.ifNoneMatch_ != "" {
14885		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14886	}
14887	var body io.Reader = nil
14888	c.urlParams_.Set("alt", alt)
14889	c.urlParams_.Set("prettyPrint", "false")
14890	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}")
14891	urls += "?" + c.urlParams_.Encode()
14892	req, err := http.NewRequest("GET", urls, body)
14893	if err != nil {
14894		return nil, err
14895	}
14896	req.Header = reqHeaders
14897	googleapi.Expand(req.URL, map[string]string{
14898		"customer":   c.customer,
14899		"featureKey": c.featureKey,
14900	})
14901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14902}
14903
14904// Do executes the "directory.resources.features.get" call.
14905// Exactly one of *Feature or error will be non-nil. Any non-2xx status
14906// code is an error. Response headers are in either
14907// *Feature.ServerResponse.Header or (if a response was returned at all)
14908// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14909// check whether the returned error was because http.StatusNotModified
14910// was returned.
14911func (c *ResourcesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
14912	gensupport.SetOptions(c.urlParams_, opts...)
14913	res, err := c.doRequest("json")
14914	if res != nil && res.StatusCode == http.StatusNotModified {
14915		if res.Body != nil {
14916			res.Body.Close()
14917		}
14918		return nil, &googleapi.Error{
14919			Code:   res.StatusCode,
14920			Header: res.Header,
14921		}
14922	}
14923	if err != nil {
14924		return nil, err
14925	}
14926	defer googleapi.CloseBody(res)
14927	if err := googleapi.CheckResponse(res); err != nil {
14928		return nil, err
14929	}
14930	ret := &Feature{
14931		ServerResponse: googleapi.ServerResponse{
14932			Header:         res.Header,
14933			HTTPStatusCode: res.StatusCode,
14934		},
14935	}
14936	target := &ret
14937	if err := gensupport.DecodeResponse(target, res); err != nil {
14938		return nil, err
14939	}
14940	return ret, nil
14941	// {
14942	//   "description": "Retrieves a feature.",
14943	//   "httpMethod": "GET",
14944	//   "id": "directory.resources.features.get",
14945	//   "parameterOrder": [
14946	//     "customer",
14947	//     "featureKey"
14948	//   ],
14949	//   "parameters": {
14950	//     "customer": {
14951	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
14952	//       "location": "path",
14953	//       "required": true,
14954	//       "type": "string"
14955	//     },
14956	//     "featureKey": {
14957	//       "description": "The unique ID of the feature to retrieve.",
14958	//       "location": "path",
14959	//       "required": true,
14960	//       "type": "string"
14961	//     }
14962	//   },
14963	//   "path": "customer/{customer}/resources/features/{featureKey}",
14964	//   "response": {
14965	//     "$ref": "Feature"
14966	//   },
14967	//   "scopes": [
14968	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
14969	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
14970	//   ]
14971	// }
14972
14973}
14974
14975// method id "directory.resources.features.insert":
14976
14977type ResourcesFeaturesInsertCall struct {
14978	s          *Service
14979	customer   string
14980	feature    *Feature
14981	urlParams_ gensupport.URLParams
14982	ctx_       context.Context
14983	header_    http.Header
14984}
14985
14986// Insert: Inserts a feature.
14987func (r *ResourcesFeaturesService) Insert(customer string, feature *Feature) *ResourcesFeaturesInsertCall {
14988	c := &ResourcesFeaturesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14989	c.customer = customer
14990	c.feature = feature
14991	return c
14992}
14993
14994// Fields allows partial responses to be retrieved. See
14995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14996// for more information.
14997func (c *ResourcesFeaturesInsertCall) Fields(s ...googleapi.Field) *ResourcesFeaturesInsertCall {
14998	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14999	return c
15000}
15001
15002// Context sets the context to be used in this call's Do method. Any
15003// pending HTTP request will be aborted if the provided context is
15004// canceled.
15005func (c *ResourcesFeaturesInsertCall) Context(ctx context.Context) *ResourcesFeaturesInsertCall {
15006	c.ctx_ = ctx
15007	return c
15008}
15009
15010// Header returns an http.Header that can be modified by the caller to
15011// add HTTP headers to the request.
15012func (c *ResourcesFeaturesInsertCall) Header() http.Header {
15013	if c.header_ == nil {
15014		c.header_ = make(http.Header)
15015	}
15016	return c.header_
15017}
15018
15019func (c *ResourcesFeaturesInsertCall) doRequest(alt string) (*http.Response, error) {
15020	reqHeaders := make(http.Header)
15021	for k, v := range c.header_ {
15022		reqHeaders[k] = v
15023	}
15024	reqHeaders.Set("User-Agent", c.s.userAgent())
15025	var body io.Reader = nil
15026	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
15027	if err != nil {
15028		return nil, err
15029	}
15030	reqHeaders.Set("Content-Type", "application/json")
15031	c.urlParams_.Set("alt", alt)
15032	c.urlParams_.Set("prettyPrint", "false")
15033	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features")
15034	urls += "?" + c.urlParams_.Encode()
15035	req, err := http.NewRequest("POST", urls, body)
15036	if err != nil {
15037		return nil, err
15038	}
15039	req.Header = reqHeaders
15040	googleapi.Expand(req.URL, map[string]string{
15041		"customer": c.customer,
15042	})
15043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15044}
15045
15046// Do executes the "directory.resources.features.insert" call.
15047// Exactly one of *Feature or error will be non-nil. Any non-2xx status
15048// code is an error. Response headers are in either
15049// *Feature.ServerResponse.Header or (if a response was returned at all)
15050// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15051// check whether the returned error was because http.StatusNotModified
15052// was returned.
15053func (c *ResourcesFeaturesInsertCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
15054	gensupport.SetOptions(c.urlParams_, opts...)
15055	res, err := c.doRequest("json")
15056	if res != nil && res.StatusCode == http.StatusNotModified {
15057		if res.Body != nil {
15058			res.Body.Close()
15059		}
15060		return nil, &googleapi.Error{
15061			Code:   res.StatusCode,
15062			Header: res.Header,
15063		}
15064	}
15065	if err != nil {
15066		return nil, err
15067	}
15068	defer googleapi.CloseBody(res)
15069	if err := googleapi.CheckResponse(res); err != nil {
15070		return nil, err
15071	}
15072	ret := &Feature{
15073		ServerResponse: googleapi.ServerResponse{
15074			Header:         res.Header,
15075			HTTPStatusCode: res.StatusCode,
15076		},
15077	}
15078	target := &ret
15079	if err := gensupport.DecodeResponse(target, res); err != nil {
15080		return nil, err
15081	}
15082	return ret, nil
15083	// {
15084	//   "description": "Inserts a feature.",
15085	//   "httpMethod": "POST",
15086	//   "id": "directory.resources.features.insert",
15087	//   "parameterOrder": [
15088	//     "customer"
15089	//   ],
15090	//   "parameters": {
15091	//     "customer": {
15092	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
15093	//       "location": "path",
15094	//       "required": true,
15095	//       "type": "string"
15096	//     }
15097	//   },
15098	//   "path": "customer/{customer}/resources/features",
15099	//   "request": {
15100	//     "$ref": "Feature"
15101	//   },
15102	//   "response": {
15103	//     "$ref": "Feature"
15104	//   },
15105	//   "scopes": [
15106	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15107	//   ]
15108	// }
15109
15110}
15111
15112// method id "directory.resources.features.list":
15113
15114type ResourcesFeaturesListCall struct {
15115	s            *Service
15116	customer     string
15117	urlParams_   gensupport.URLParams
15118	ifNoneMatch_ string
15119	ctx_         context.Context
15120	header_      http.Header
15121}
15122
15123// List: Retrieves a list of features for an account.
15124func (r *ResourcesFeaturesService) List(customer string) *ResourcesFeaturesListCall {
15125	c := &ResourcesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15126	c.customer = customer
15127	return c
15128}
15129
15130// MaxResults sets the optional parameter "maxResults": Maximum number
15131// of results to return.
15132func (c *ResourcesFeaturesListCall) MaxResults(maxResults int64) *ResourcesFeaturesListCall {
15133	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15134	return c
15135}
15136
15137// PageToken sets the optional parameter "pageToken": Token to specify
15138// the next page in the list.
15139func (c *ResourcesFeaturesListCall) PageToken(pageToken string) *ResourcesFeaturesListCall {
15140	c.urlParams_.Set("pageToken", pageToken)
15141	return c
15142}
15143
15144// Fields allows partial responses to be retrieved. See
15145// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15146// for more information.
15147func (c *ResourcesFeaturesListCall) Fields(s ...googleapi.Field) *ResourcesFeaturesListCall {
15148	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15149	return c
15150}
15151
15152// IfNoneMatch sets the optional parameter which makes the operation
15153// fail if the object's ETag matches the given value. This is useful for
15154// getting updates only after the object has changed since the last
15155// request. Use googleapi.IsNotModified to check whether the response
15156// error from Do is the result of In-None-Match.
15157func (c *ResourcesFeaturesListCall) IfNoneMatch(entityTag string) *ResourcesFeaturesListCall {
15158	c.ifNoneMatch_ = entityTag
15159	return c
15160}
15161
15162// Context sets the context to be used in this call's Do method. Any
15163// pending HTTP request will be aborted if the provided context is
15164// canceled.
15165func (c *ResourcesFeaturesListCall) Context(ctx context.Context) *ResourcesFeaturesListCall {
15166	c.ctx_ = ctx
15167	return c
15168}
15169
15170// Header returns an http.Header that can be modified by the caller to
15171// add HTTP headers to the request.
15172func (c *ResourcesFeaturesListCall) Header() http.Header {
15173	if c.header_ == nil {
15174		c.header_ = make(http.Header)
15175	}
15176	return c.header_
15177}
15178
15179func (c *ResourcesFeaturesListCall) doRequest(alt string) (*http.Response, error) {
15180	reqHeaders := make(http.Header)
15181	for k, v := range c.header_ {
15182		reqHeaders[k] = v
15183	}
15184	reqHeaders.Set("User-Agent", c.s.userAgent())
15185	if c.ifNoneMatch_ != "" {
15186		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15187	}
15188	var body io.Reader = nil
15189	c.urlParams_.Set("alt", alt)
15190	c.urlParams_.Set("prettyPrint", "false")
15191	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features")
15192	urls += "?" + c.urlParams_.Encode()
15193	req, err := http.NewRequest("GET", urls, body)
15194	if err != nil {
15195		return nil, err
15196	}
15197	req.Header = reqHeaders
15198	googleapi.Expand(req.URL, map[string]string{
15199		"customer": c.customer,
15200	})
15201	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15202}
15203
15204// Do executes the "directory.resources.features.list" call.
15205// Exactly one of *Features or error will be non-nil. Any non-2xx status
15206// code is an error. Response headers are in either
15207// *Features.ServerResponse.Header or (if a response was returned at
15208// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15209// to check whether the returned error was because
15210// http.StatusNotModified was returned.
15211func (c *ResourcesFeaturesListCall) Do(opts ...googleapi.CallOption) (*Features, error) {
15212	gensupport.SetOptions(c.urlParams_, opts...)
15213	res, err := c.doRequest("json")
15214	if res != nil && res.StatusCode == http.StatusNotModified {
15215		if res.Body != nil {
15216			res.Body.Close()
15217		}
15218		return nil, &googleapi.Error{
15219			Code:   res.StatusCode,
15220			Header: res.Header,
15221		}
15222	}
15223	if err != nil {
15224		return nil, err
15225	}
15226	defer googleapi.CloseBody(res)
15227	if err := googleapi.CheckResponse(res); err != nil {
15228		return nil, err
15229	}
15230	ret := &Features{
15231		ServerResponse: googleapi.ServerResponse{
15232			Header:         res.Header,
15233			HTTPStatusCode: res.StatusCode,
15234		},
15235	}
15236	target := &ret
15237	if err := gensupport.DecodeResponse(target, res); err != nil {
15238		return nil, err
15239	}
15240	return ret, nil
15241	// {
15242	//   "description": "Retrieves a list of features for an account.",
15243	//   "httpMethod": "GET",
15244	//   "id": "directory.resources.features.list",
15245	//   "parameterOrder": [
15246	//     "customer"
15247	//   ],
15248	//   "parameters": {
15249	//     "customer": {
15250	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
15251	//       "location": "path",
15252	//       "required": true,
15253	//       "type": "string"
15254	//     },
15255	//     "maxResults": {
15256	//       "description": "Maximum number of results to return.",
15257	//       "format": "int32",
15258	//       "location": "query",
15259	//       "maximum": "500",
15260	//       "minimum": "1",
15261	//       "type": "integer"
15262	//     },
15263	//     "pageToken": {
15264	//       "description": "Token to specify the next page in the list.",
15265	//       "location": "query",
15266	//       "type": "string"
15267	//     }
15268	//   },
15269	//   "path": "customer/{customer}/resources/features",
15270	//   "response": {
15271	//     "$ref": "Features"
15272	//   },
15273	//   "scopes": [
15274	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar",
15275	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"
15276	//   ]
15277	// }
15278
15279}
15280
15281// Pages invokes f for each page of results.
15282// A non-nil error returned from f will halt the iteration.
15283// The provided context supersedes any context provided to the Context method.
15284func (c *ResourcesFeaturesListCall) Pages(ctx context.Context, f func(*Features) error) error {
15285	c.ctx_ = ctx
15286	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15287	for {
15288		x, err := c.Do()
15289		if err != nil {
15290			return err
15291		}
15292		if err := f(x); err != nil {
15293			return err
15294		}
15295		if x.NextPageToken == "" {
15296			return nil
15297		}
15298		c.PageToken(x.NextPageToken)
15299	}
15300}
15301
15302// method id "directory.resources.features.patch":
15303
15304type ResourcesFeaturesPatchCall struct {
15305	s          *Service
15306	customer   string
15307	featureKey string
15308	feature    *Feature
15309	urlParams_ gensupport.URLParams
15310	ctx_       context.Context
15311	header_    http.Header
15312}
15313
15314// Patch: Updates a feature. This method supports patch semantics.
15315func (r *ResourcesFeaturesService) Patch(customer string, featureKey string, feature *Feature) *ResourcesFeaturesPatchCall {
15316	c := &ResourcesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15317	c.customer = customer
15318	c.featureKey = featureKey
15319	c.feature = feature
15320	return c
15321}
15322
15323// Fields allows partial responses to be retrieved. See
15324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15325// for more information.
15326func (c *ResourcesFeaturesPatchCall) Fields(s ...googleapi.Field) *ResourcesFeaturesPatchCall {
15327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15328	return c
15329}
15330
15331// Context sets the context to be used in this call's Do method. Any
15332// pending HTTP request will be aborted if the provided context is
15333// canceled.
15334func (c *ResourcesFeaturesPatchCall) Context(ctx context.Context) *ResourcesFeaturesPatchCall {
15335	c.ctx_ = ctx
15336	return c
15337}
15338
15339// Header returns an http.Header that can be modified by the caller to
15340// add HTTP headers to the request.
15341func (c *ResourcesFeaturesPatchCall) Header() http.Header {
15342	if c.header_ == nil {
15343		c.header_ = make(http.Header)
15344	}
15345	return c.header_
15346}
15347
15348func (c *ResourcesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) {
15349	reqHeaders := make(http.Header)
15350	for k, v := range c.header_ {
15351		reqHeaders[k] = v
15352	}
15353	reqHeaders.Set("User-Agent", c.s.userAgent())
15354	var body io.Reader = nil
15355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
15356	if err != nil {
15357		return nil, err
15358	}
15359	reqHeaders.Set("Content-Type", "application/json")
15360	c.urlParams_.Set("alt", alt)
15361	c.urlParams_.Set("prettyPrint", "false")
15362	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}")
15363	urls += "?" + c.urlParams_.Encode()
15364	req, err := http.NewRequest("PATCH", urls, body)
15365	if err != nil {
15366		return nil, err
15367	}
15368	req.Header = reqHeaders
15369	googleapi.Expand(req.URL, map[string]string{
15370		"customer":   c.customer,
15371		"featureKey": c.featureKey,
15372	})
15373	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15374}
15375
15376// Do executes the "directory.resources.features.patch" call.
15377// Exactly one of *Feature or error will be non-nil. Any non-2xx status
15378// code is an error. Response headers are in either
15379// *Feature.ServerResponse.Header or (if a response was returned at all)
15380// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15381// check whether the returned error was because http.StatusNotModified
15382// was returned.
15383func (c *ResourcesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
15384	gensupport.SetOptions(c.urlParams_, opts...)
15385	res, err := c.doRequest("json")
15386	if res != nil && res.StatusCode == http.StatusNotModified {
15387		if res.Body != nil {
15388			res.Body.Close()
15389		}
15390		return nil, &googleapi.Error{
15391			Code:   res.StatusCode,
15392			Header: res.Header,
15393		}
15394	}
15395	if err != nil {
15396		return nil, err
15397	}
15398	defer googleapi.CloseBody(res)
15399	if err := googleapi.CheckResponse(res); err != nil {
15400		return nil, err
15401	}
15402	ret := &Feature{
15403		ServerResponse: googleapi.ServerResponse{
15404			Header:         res.Header,
15405			HTTPStatusCode: res.StatusCode,
15406		},
15407	}
15408	target := &ret
15409	if err := gensupport.DecodeResponse(target, res); err != nil {
15410		return nil, err
15411	}
15412	return ret, nil
15413	// {
15414	//   "description": "Updates a feature. This method supports patch semantics.",
15415	//   "httpMethod": "PATCH",
15416	//   "id": "directory.resources.features.patch",
15417	//   "parameterOrder": [
15418	//     "customer",
15419	//     "featureKey"
15420	//   ],
15421	//   "parameters": {
15422	//     "customer": {
15423	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
15424	//       "location": "path",
15425	//       "required": true,
15426	//       "type": "string"
15427	//     },
15428	//     "featureKey": {
15429	//       "description": "The unique ID of the feature to update.",
15430	//       "location": "path",
15431	//       "required": true,
15432	//       "type": "string"
15433	//     }
15434	//   },
15435	//   "path": "customer/{customer}/resources/features/{featureKey}",
15436	//   "request": {
15437	//     "$ref": "Feature"
15438	//   },
15439	//   "response": {
15440	//     "$ref": "Feature"
15441	//   },
15442	//   "scopes": [
15443	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15444	//   ]
15445	// }
15446
15447}
15448
15449// method id "directory.resources.features.rename":
15450
15451type ResourcesFeaturesRenameCall struct {
15452	s             *Service
15453	customer      string
15454	oldName       string
15455	featurerename *FeatureRename
15456	urlParams_    gensupport.URLParams
15457	ctx_          context.Context
15458	header_       http.Header
15459}
15460
15461// Rename: Renames a feature.
15462func (r *ResourcesFeaturesService) Rename(customer string, oldName string, featurerename *FeatureRename) *ResourcesFeaturesRenameCall {
15463	c := &ResourcesFeaturesRenameCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15464	c.customer = customer
15465	c.oldName = oldName
15466	c.featurerename = featurerename
15467	return c
15468}
15469
15470// Fields allows partial responses to be retrieved. See
15471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15472// for more information.
15473func (c *ResourcesFeaturesRenameCall) Fields(s ...googleapi.Field) *ResourcesFeaturesRenameCall {
15474	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15475	return c
15476}
15477
15478// Context sets the context to be used in this call's Do method. Any
15479// pending HTTP request will be aborted if the provided context is
15480// canceled.
15481func (c *ResourcesFeaturesRenameCall) Context(ctx context.Context) *ResourcesFeaturesRenameCall {
15482	c.ctx_ = ctx
15483	return c
15484}
15485
15486// Header returns an http.Header that can be modified by the caller to
15487// add HTTP headers to the request.
15488func (c *ResourcesFeaturesRenameCall) Header() http.Header {
15489	if c.header_ == nil {
15490		c.header_ = make(http.Header)
15491	}
15492	return c.header_
15493}
15494
15495func (c *ResourcesFeaturesRenameCall) doRequest(alt string) (*http.Response, error) {
15496	reqHeaders := make(http.Header)
15497	for k, v := range c.header_ {
15498		reqHeaders[k] = v
15499	}
15500	reqHeaders.Set("User-Agent", c.s.userAgent())
15501	var body io.Reader = nil
15502	body, err := googleapi.WithoutDataWrapper.JSONReader(c.featurerename)
15503	if err != nil {
15504		return nil, err
15505	}
15506	reqHeaders.Set("Content-Type", "application/json")
15507	c.urlParams_.Set("alt", alt)
15508	c.urlParams_.Set("prettyPrint", "false")
15509	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{oldName}/rename")
15510	urls += "?" + c.urlParams_.Encode()
15511	req, err := http.NewRequest("POST", urls, body)
15512	if err != nil {
15513		return nil, err
15514	}
15515	req.Header = reqHeaders
15516	googleapi.Expand(req.URL, map[string]string{
15517		"customer": c.customer,
15518		"oldName":  c.oldName,
15519	})
15520	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15521}
15522
15523// Do executes the "directory.resources.features.rename" call.
15524func (c *ResourcesFeaturesRenameCall) Do(opts ...googleapi.CallOption) error {
15525	gensupport.SetOptions(c.urlParams_, opts...)
15526	res, err := c.doRequest("json")
15527	if err != nil {
15528		return err
15529	}
15530	defer googleapi.CloseBody(res)
15531	if err := googleapi.CheckResponse(res); err != nil {
15532		return err
15533	}
15534	return nil
15535	// {
15536	//   "description": "Renames a feature.",
15537	//   "httpMethod": "POST",
15538	//   "id": "directory.resources.features.rename",
15539	//   "parameterOrder": [
15540	//     "customer",
15541	//     "oldName"
15542	//   ],
15543	//   "parameters": {
15544	//     "customer": {
15545	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
15546	//       "location": "path",
15547	//       "required": true,
15548	//       "type": "string"
15549	//     },
15550	//     "oldName": {
15551	//       "description": "The unique ID of the feature to rename.",
15552	//       "location": "path",
15553	//       "required": true,
15554	//       "type": "string"
15555	//     }
15556	//   },
15557	//   "path": "customer/{customer}/resources/features/{oldName}/rename",
15558	//   "request": {
15559	//     "$ref": "FeatureRename"
15560	//   },
15561	//   "scopes": [
15562	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15563	//   ]
15564	// }
15565
15566}
15567
15568// method id "directory.resources.features.update":
15569
15570type ResourcesFeaturesUpdateCall struct {
15571	s          *Service
15572	customer   string
15573	featureKey string
15574	feature    *Feature
15575	urlParams_ gensupport.URLParams
15576	ctx_       context.Context
15577	header_    http.Header
15578}
15579
15580// Update: Updates a feature.
15581func (r *ResourcesFeaturesService) Update(customer string, featureKey string, feature *Feature) *ResourcesFeaturesUpdateCall {
15582	c := &ResourcesFeaturesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15583	c.customer = customer
15584	c.featureKey = featureKey
15585	c.feature = feature
15586	return c
15587}
15588
15589// Fields allows partial responses to be retrieved. See
15590// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15591// for more information.
15592func (c *ResourcesFeaturesUpdateCall) Fields(s ...googleapi.Field) *ResourcesFeaturesUpdateCall {
15593	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15594	return c
15595}
15596
15597// Context sets the context to be used in this call's Do method. Any
15598// pending HTTP request will be aborted if the provided context is
15599// canceled.
15600func (c *ResourcesFeaturesUpdateCall) Context(ctx context.Context) *ResourcesFeaturesUpdateCall {
15601	c.ctx_ = ctx
15602	return c
15603}
15604
15605// Header returns an http.Header that can be modified by the caller to
15606// add HTTP headers to the request.
15607func (c *ResourcesFeaturesUpdateCall) Header() http.Header {
15608	if c.header_ == nil {
15609		c.header_ = make(http.Header)
15610	}
15611	return c.header_
15612}
15613
15614func (c *ResourcesFeaturesUpdateCall) doRequest(alt string) (*http.Response, error) {
15615	reqHeaders := make(http.Header)
15616	for k, v := range c.header_ {
15617		reqHeaders[k] = v
15618	}
15619	reqHeaders.Set("User-Agent", c.s.userAgent())
15620	var body io.Reader = nil
15621	body, err := googleapi.WithoutDataWrapper.JSONReader(c.feature)
15622	if err != nil {
15623		return nil, err
15624	}
15625	reqHeaders.Set("Content-Type", "application/json")
15626	c.urlParams_.Set("alt", alt)
15627	c.urlParams_.Set("prettyPrint", "false")
15628	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/resources/features/{featureKey}")
15629	urls += "?" + c.urlParams_.Encode()
15630	req, err := http.NewRequest("PUT", urls, body)
15631	if err != nil {
15632		return nil, err
15633	}
15634	req.Header = reqHeaders
15635	googleapi.Expand(req.URL, map[string]string{
15636		"customer":   c.customer,
15637		"featureKey": c.featureKey,
15638	})
15639	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15640}
15641
15642// Do executes the "directory.resources.features.update" call.
15643// Exactly one of *Feature or error will be non-nil. Any non-2xx status
15644// code is an error. Response headers are in either
15645// *Feature.ServerResponse.Header or (if a response was returned at all)
15646// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15647// check whether the returned error was because http.StatusNotModified
15648// was returned.
15649func (c *ResourcesFeaturesUpdateCall) Do(opts ...googleapi.CallOption) (*Feature, error) {
15650	gensupport.SetOptions(c.urlParams_, opts...)
15651	res, err := c.doRequest("json")
15652	if res != nil && res.StatusCode == http.StatusNotModified {
15653		if res.Body != nil {
15654			res.Body.Close()
15655		}
15656		return nil, &googleapi.Error{
15657			Code:   res.StatusCode,
15658			Header: res.Header,
15659		}
15660	}
15661	if err != nil {
15662		return nil, err
15663	}
15664	defer googleapi.CloseBody(res)
15665	if err := googleapi.CheckResponse(res); err != nil {
15666		return nil, err
15667	}
15668	ret := &Feature{
15669		ServerResponse: googleapi.ServerResponse{
15670			Header:         res.Header,
15671			HTTPStatusCode: res.StatusCode,
15672		},
15673	}
15674	target := &ret
15675	if err := gensupport.DecodeResponse(target, res); err != nil {
15676		return nil, err
15677	}
15678	return ret, nil
15679	// {
15680	//   "description": "Updates a feature.",
15681	//   "httpMethod": "PUT",
15682	//   "id": "directory.resources.features.update",
15683	//   "parameterOrder": [
15684	//     "customer",
15685	//     "featureKey"
15686	//   ],
15687	//   "parameters": {
15688	//     "customer": {
15689	//       "description": "The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.",
15690	//       "location": "path",
15691	//       "required": true,
15692	//       "type": "string"
15693	//     },
15694	//     "featureKey": {
15695	//       "description": "The unique ID of the feature to update.",
15696	//       "location": "path",
15697	//       "required": true,
15698	//       "type": "string"
15699	//     }
15700	//   },
15701	//   "path": "customer/{customer}/resources/features/{featureKey}",
15702	//   "request": {
15703	//     "$ref": "Feature"
15704	//   },
15705	//   "response": {
15706	//     "$ref": "Feature"
15707	//   },
15708	//   "scopes": [
15709	//     "https://www.googleapis.com/auth/admin.directory.resource.calendar"
15710	//   ]
15711	// }
15712
15713}
15714
15715// method id "directory.roleAssignments.delete":
15716
15717type RoleAssignmentsDeleteCall struct {
15718	s                *Service
15719	customer         string
15720	roleAssignmentId string
15721	urlParams_       gensupport.URLParams
15722	ctx_             context.Context
15723	header_          http.Header
15724}
15725
15726// Delete: Deletes a role assignment.
15727func (r *RoleAssignmentsService) Delete(customer string, roleAssignmentId string) *RoleAssignmentsDeleteCall {
15728	c := &RoleAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15729	c.customer = customer
15730	c.roleAssignmentId = roleAssignmentId
15731	return c
15732}
15733
15734// Fields allows partial responses to be retrieved. See
15735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15736// for more information.
15737func (c *RoleAssignmentsDeleteCall) Fields(s ...googleapi.Field) *RoleAssignmentsDeleteCall {
15738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15739	return c
15740}
15741
15742// Context sets the context to be used in this call's Do method. Any
15743// pending HTTP request will be aborted if the provided context is
15744// canceled.
15745func (c *RoleAssignmentsDeleteCall) Context(ctx context.Context) *RoleAssignmentsDeleteCall {
15746	c.ctx_ = ctx
15747	return c
15748}
15749
15750// Header returns an http.Header that can be modified by the caller to
15751// add HTTP headers to the request.
15752func (c *RoleAssignmentsDeleteCall) Header() http.Header {
15753	if c.header_ == nil {
15754		c.header_ = make(http.Header)
15755	}
15756	return c.header_
15757}
15758
15759func (c *RoleAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
15760	reqHeaders := make(http.Header)
15761	for k, v := range c.header_ {
15762		reqHeaders[k] = v
15763	}
15764	reqHeaders.Set("User-Agent", c.s.userAgent())
15765	var body io.Reader = nil
15766	c.urlParams_.Set("alt", alt)
15767	c.urlParams_.Set("prettyPrint", "false")
15768	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments/{roleAssignmentId}")
15769	urls += "?" + c.urlParams_.Encode()
15770	req, err := http.NewRequest("DELETE", urls, body)
15771	if err != nil {
15772		return nil, err
15773	}
15774	req.Header = reqHeaders
15775	googleapi.Expand(req.URL, map[string]string{
15776		"customer":         c.customer,
15777		"roleAssignmentId": c.roleAssignmentId,
15778	})
15779	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15780}
15781
15782// Do executes the "directory.roleAssignments.delete" call.
15783func (c *RoleAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) error {
15784	gensupport.SetOptions(c.urlParams_, opts...)
15785	res, err := c.doRequest("json")
15786	if err != nil {
15787		return err
15788	}
15789	defer googleapi.CloseBody(res)
15790	if err := googleapi.CheckResponse(res); err != nil {
15791		return err
15792	}
15793	return nil
15794	// {
15795	//   "description": "Deletes a role assignment.",
15796	//   "httpMethod": "DELETE",
15797	//   "id": "directory.roleAssignments.delete",
15798	//   "parameterOrder": [
15799	//     "customer",
15800	//     "roleAssignmentId"
15801	//   ],
15802	//   "parameters": {
15803	//     "customer": {
15804	//       "description": "Immutable ID of the G Suite account.",
15805	//       "location": "path",
15806	//       "required": true,
15807	//       "type": "string"
15808	//     },
15809	//     "roleAssignmentId": {
15810	//       "description": "Immutable ID of the role assignment.",
15811	//       "location": "path",
15812	//       "required": true,
15813	//       "type": "string"
15814	//     }
15815	//   },
15816	//   "path": "customer/{customer}/roleassignments/{roleAssignmentId}",
15817	//   "scopes": [
15818	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
15819	//   ]
15820	// }
15821
15822}
15823
15824// method id "directory.roleAssignments.get":
15825
15826type RoleAssignmentsGetCall struct {
15827	s                *Service
15828	customer         string
15829	roleAssignmentId string
15830	urlParams_       gensupport.URLParams
15831	ifNoneMatch_     string
15832	ctx_             context.Context
15833	header_          http.Header
15834}
15835
15836// Get: Retrieve a role assignment.
15837func (r *RoleAssignmentsService) Get(customer string, roleAssignmentId string) *RoleAssignmentsGetCall {
15838	c := &RoleAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15839	c.customer = customer
15840	c.roleAssignmentId = roleAssignmentId
15841	return c
15842}
15843
15844// Fields allows partial responses to be retrieved. See
15845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15846// for more information.
15847func (c *RoleAssignmentsGetCall) Fields(s ...googleapi.Field) *RoleAssignmentsGetCall {
15848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15849	return c
15850}
15851
15852// IfNoneMatch sets the optional parameter which makes the operation
15853// fail if the object's ETag matches the given value. This is useful for
15854// getting updates only after the object has changed since the last
15855// request. Use googleapi.IsNotModified to check whether the response
15856// error from Do is the result of In-None-Match.
15857func (c *RoleAssignmentsGetCall) IfNoneMatch(entityTag string) *RoleAssignmentsGetCall {
15858	c.ifNoneMatch_ = entityTag
15859	return c
15860}
15861
15862// Context sets the context to be used in this call's Do method. Any
15863// pending HTTP request will be aborted if the provided context is
15864// canceled.
15865func (c *RoleAssignmentsGetCall) Context(ctx context.Context) *RoleAssignmentsGetCall {
15866	c.ctx_ = ctx
15867	return c
15868}
15869
15870// Header returns an http.Header that can be modified by the caller to
15871// add HTTP headers to the request.
15872func (c *RoleAssignmentsGetCall) Header() http.Header {
15873	if c.header_ == nil {
15874		c.header_ = make(http.Header)
15875	}
15876	return c.header_
15877}
15878
15879func (c *RoleAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
15880	reqHeaders := make(http.Header)
15881	for k, v := range c.header_ {
15882		reqHeaders[k] = v
15883	}
15884	reqHeaders.Set("User-Agent", c.s.userAgent())
15885	if c.ifNoneMatch_ != "" {
15886		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15887	}
15888	var body io.Reader = nil
15889	c.urlParams_.Set("alt", alt)
15890	c.urlParams_.Set("prettyPrint", "false")
15891	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments/{roleAssignmentId}")
15892	urls += "?" + c.urlParams_.Encode()
15893	req, err := http.NewRequest("GET", urls, body)
15894	if err != nil {
15895		return nil, err
15896	}
15897	req.Header = reqHeaders
15898	googleapi.Expand(req.URL, map[string]string{
15899		"customer":         c.customer,
15900		"roleAssignmentId": c.roleAssignmentId,
15901	})
15902	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15903}
15904
15905// Do executes the "directory.roleAssignments.get" call.
15906// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx
15907// status code is an error. Response headers are in either
15908// *RoleAssignment.ServerResponse.Header or (if a response was returned
15909// at all) in error.(*googleapi.Error).Header. Use
15910// googleapi.IsNotModified to check whether the returned error was
15911// because http.StatusNotModified was returned.
15912func (c *RoleAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
15913	gensupport.SetOptions(c.urlParams_, opts...)
15914	res, err := c.doRequest("json")
15915	if res != nil && res.StatusCode == http.StatusNotModified {
15916		if res.Body != nil {
15917			res.Body.Close()
15918		}
15919		return nil, &googleapi.Error{
15920			Code:   res.StatusCode,
15921			Header: res.Header,
15922		}
15923	}
15924	if err != nil {
15925		return nil, err
15926	}
15927	defer googleapi.CloseBody(res)
15928	if err := googleapi.CheckResponse(res); err != nil {
15929		return nil, err
15930	}
15931	ret := &RoleAssignment{
15932		ServerResponse: googleapi.ServerResponse{
15933			Header:         res.Header,
15934			HTTPStatusCode: res.StatusCode,
15935		},
15936	}
15937	target := &ret
15938	if err := gensupport.DecodeResponse(target, res); err != nil {
15939		return nil, err
15940	}
15941	return ret, nil
15942	// {
15943	//   "description": "Retrieve a role assignment.",
15944	//   "httpMethod": "GET",
15945	//   "id": "directory.roleAssignments.get",
15946	//   "parameterOrder": [
15947	//     "customer",
15948	//     "roleAssignmentId"
15949	//   ],
15950	//   "parameters": {
15951	//     "customer": {
15952	//       "description": "Immutable ID of the G Suite account.",
15953	//       "location": "path",
15954	//       "required": true,
15955	//       "type": "string"
15956	//     },
15957	//     "roleAssignmentId": {
15958	//       "description": "Immutable ID of the role assignment.",
15959	//       "location": "path",
15960	//       "required": true,
15961	//       "type": "string"
15962	//     }
15963	//   },
15964	//   "path": "customer/{customer}/roleassignments/{roleAssignmentId}",
15965	//   "response": {
15966	//     "$ref": "RoleAssignment"
15967	//   },
15968	//   "scopes": [
15969	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
15970	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
15971	//   ]
15972	// }
15973
15974}
15975
15976// method id "directory.roleAssignments.insert":
15977
15978type RoleAssignmentsInsertCall struct {
15979	s              *Service
15980	customer       string
15981	roleassignment *RoleAssignment
15982	urlParams_     gensupport.URLParams
15983	ctx_           context.Context
15984	header_        http.Header
15985}
15986
15987// Insert: Creates a role assignment.
15988func (r *RoleAssignmentsService) Insert(customer string, roleassignment *RoleAssignment) *RoleAssignmentsInsertCall {
15989	c := &RoleAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15990	c.customer = customer
15991	c.roleassignment = roleassignment
15992	return c
15993}
15994
15995// Fields allows partial responses to be retrieved. See
15996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15997// for more information.
15998func (c *RoleAssignmentsInsertCall) Fields(s ...googleapi.Field) *RoleAssignmentsInsertCall {
15999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16000	return c
16001}
16002
16003// Context sets the context to be used in this call's Do method. Any
16004// pending HTTP request will be aborted if the provided context is
16005// canceled.
16006func (c *RoleAssignmentsInsertCall) Context(ctx context.Context) *RoleAssignmentsInsertCall {
16007	c.ctx_ = ctx
16008	return c
16009}
16010
16011// Header returns an http.Header that can be modified by the caller to
16012// add HTTP headers to the request.
16013func (c *RoleAssignmentsInsertCall) Header() http.Header {
16014	if c.header_ == nil {
16015		c.header_ = make(http.Header)
16016	}
16017	return c.header_
16018}
16019
16020func (c *RoleAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
16021	reqHeaders := make(http.Header)
16022	for k, v := range c.header_ {
16023		reqHeaders[k] = v
16024	}
16025	reqHeaders.Set("User-Agent", c.s.userAgent())
16026	var body io.Reader = nil
16027	body, err := googleapi.WithoutDataWrapper.JSONReader(c.roleassignment)
16028	if err != nil {
16029		return nil, err
16030	}
16031	reqHeaders.Set("Content-Type", "application/json")
16032	c.urlParams_.Set("alt", alt)
16033	c.urlParams_.Set("prettyPrint", "false")
16034	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments")
16035	urls += "?" + c.urlParams_.Encode()
16036	req, err := http.NewRequest("POST", urls, body)
16037	if err != nil {
16038		return nil, err
16039	}
16040	req.Header = reqHeaders
16041	googleapi.Expand(req.URL, map[string]string{
16042		"customer": c.customer,
16043	})
16044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16045}
16046
16047// Do executes the "directory.roleAssignments.insert" call.
16048// Exactly one of *RoleAssignment or error will be non-nil. Any non-2xx
16049// status code is an error. Response headers are in either
16050// *RoleAssignment.ServerResponse.Header or (if a response was returned
16051// at all) in error.(*googleapi.Error).Header. Use
16052// googleapi.IsNotModified to check whether the returned error was
16053// because http.StatusNotModified was returned.
16054func (c *RoleAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*RoleAssignment, error) {
16055	gensupport.SetOptions(c.urlParams_, opts...)
16056	res, err := c.doRequest("json")
16057	if res != nil && res.StatusCode == http.StatusNotModified {
16058		if res.Body != nil {
16059			res.Body.Close()
16060		}
16061		return nil, &googleapi.Error{
16062			Code:   res.StatusCode,
16063			Header: res.Header,
16064		}
16065	}
16066	if err != nil {
16067		return nil, err
16068	}
16069	defer googleapi.CloseBody(res)
16070	if err := googleapi.CheckResponse(res); err != nil {
16071		return nil, err
16072	}
16073	ret := &RoleAssignment{
16074		ServerResponse: googleapi.ServerResponse{
16075			Header:         res.Header,
16076			HTTPStatusCode: res.StatusCode,
16077		},
16078	}
16079	target := &ret
16080	if err := gensupport.DecodeResponse(target, res); err != nil {
16081		return nil, err
16082	}
16083	return ret, nil
16084	// {
16085	//   "description": "Creates a role assignment.",
16086	//   "httpMethod": "POST",
16087	//   "id": "directory.roleAssignments.insert",
16088	//   "parameterOrder": [
16089	//     "customer"
16090	//   ],
16091	//   "parameters": {
16092	//     "customer": {
16093	//       "description": "Immutable ID of the G Suite account.",
16094	//       "location": "path",
16095	//       "required": true,
16096	//       "type": "string"
16097	//     }
16098	//   },
16099	//   "path": "customer/{customer}/roleassignments",
16100	//   "request": {
16101	//     "$ref": "RoleAssignment"
16102	//   },
16103	//   "response": {
16104	//     "$ref": "RoleAssignment"
16105	//   },
16106	//   "scopes": [
16107	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
16108	//   ]
16109	// }
16110
16111}
16112
16113// method id "directory.roleAssignments.list":
16114
16115type RoleAssignmentsListCall struct {
16116	s            *Service
16117	customer     string
16118	urlParams_   gensupport.URLParams
16119	ifNoneMatch_ string
16120	ctx_         context.Context
16121	header_      http.Header
16122}
16123
16124// List: Retrieves a paginated list of all roleAssignments.
16125func (r *RoleAssignmentsService) List(customer string) *RoleAssignmentsListCall {
16126	c := &RoleAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16127	c.customer = customer
16128	return c
16129}
16130
16131// MaxResults sets the optional parameter "maxResults": Maximum number
16132// of results to return.
16133func (c *RoleAssignmentsListCall) MaxResults(maxResults int64) *RoleAssignmentsListCall {
16134	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16135	return c
16136}
16137
16138// PageToken sets the optional parameter "pageToken": Token to specify
16139// the next page in the list.
16140func (c *RoleAssignmentsListCall) PageToken(pageToken string) *RoleAssignmentsListCall {
16141	c.urlParams_.Set("pageToken", pageToken)
16142	return c
16143}
16144
16145// RoleId sets the optional parameter "roleId": Immutable ID of a role.
16146// If included in the request, returns only role assignments containing
16147// this role ID.
16148func (c *RoleAssignmentsListCall) RoleId(roleId string) *RoleAssignmentsListCall {
16149	c.urlParams_.Set("roleId", roleId)
16150	return c
16151}
16152
16153// UserKey sets the optional parameter "userKey": The user's primary
16154// email address, alias email address, or unique user ID. If included in
16155// the request, returns role assignments only for this user.
16156func (c *RoleAssignmentsListCall) UserKey(userKey string) *RoleAssignmentsListCall {
16157	c.urlParams_.Set("userKey", userKey)
16158	return c
16159}
16160
16161// Fields allows partial responses to be retrieved. See
16162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16163// for more information.
16164func (c *RoleAssignmentsListCall) Fields(s ...googleapi.Field) *RoleAssignmentsListCall {
16165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16166	return c
16167}
16168
16169// IfNoneMatch sets the optional parameter which makes the operation
16170// fail if the object's ETag matches the given value. This is useful for
16171// getting updates only after the object has changed since the last
16172// request. Use googleapi.IsNotModified to check whether the response
16173// error from Do is the result of In-None-Match.
16174func (c *RoleAssignmentsListCall) IfNoneMatch(entityTag string) *RoleAssignmentsListCall {
16175	c.ifNoneMatch_ = entityTag
16176	return c
16177}
16178
16179// Context sets the context to be used in this call's Do method. Any
16180// pending HTTP request will be aborted if the provided context is
16181// canceled.
16182func (c *RoleAssignmentsListCall) Context(ctx context.Context) *RoleAssignmentsListCall {
16183	c.ctx_ = ctx
16184	return c
16185}
16186
16187// Header returns an http.Header that can be modified by the caller to
16188// add HTTP headers to the request.
16189func (c *RoleAssignmentsListCall) Header() http.Header {
16190	if c.header_ == nil {
16191		c.header_ = make(http.Header)
16192	}
16193	return c.header_
16194}
16195
16196func (c *RoleAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
16197	reqHeaders := make(http.Header)
16198	for k, v := range c.header_ {
16199		reqHeaders[k] = v
16200	}
16201	reqHeaders.Set("User-Agent", c.s.userAgent())
16202	if c.ifNoneMatch_ != "" {
16203		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16204	}
16205	var body io.Reader = nil
16206	c.urlParams_.Set("alt", alt)
16207	c.urlParams_.Set("prettyPrint", "false")
16208	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roleassignments")
16209	urls += "?" + c.urlParams_.Encode()
16210	req, err := http.NewRequest("GET", urls, body)
16211	if err != nil {
16212		return nil, err
16213	}
16214	req.Header = reqHeaders
16215	googleapi.Expand(req.URL, map[string]string{
16216		"customer": c.customer,
16217	})
16218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16219}
16220
16221// Do executes the "directory.roleAssignments.list" call.
16222// Exactly one of *RoleAssignments or error will be non-nil. Any non-2xx
16223// status code is an error. Response headers are in either
16224// *RoleAssignments.ServerResponse.Header or (if a response was returned
16225// at all) in error.(*googleapi.Error).Header. Use
16226// googleapi.IsNotModified to check whether the returned error was
16227// because http.StatusNotModified was returned.
16228func (c *RoleAssignmentsListCall) Do(opts ...googleapi.CallOption) (*RoleAssignments, error) {
16229	gensupport.SetOptions(c.urlParams_, opts...)
16230	res, err := c.doRequest("json")
16231	if res != nil && res.StatusCode == http.StatusNotModified {
16232		if res.Body != nil {
16233			res.Body.Close()
16234		}
16235		return nil, &googleapi.Error{
16236			Code:   res.StatusCode,
16237			Header: res.Header,
16238		}
16239	}
16240	if err != nil {
16241		return nil, err
16242	}
16243	defer googleapi.CloseBody(res)
16244	if err := googleapi.CheckResponse(res); err != nil {
16245		return nil, err
16246	}
16247	ret := &RoleAssignments{
16248		ServerResponse: googleapi.ServerResponse{
16249			Header:         res.Header,
16250			HTTPStatusCode: res.StatusCode,
16251		},
16252	}
16253	target := &ret
16254	if err := gensupport.DecodeResponse(target, res); err != nil {
16255		return nil, err
16256	}
16257	return ret, nil
16258	// {
16259	//   "description": "Retrieves a paginated list of all roleAssignments.",
16260	//   "httpMethod": "GET",
16261	//   "id": "directory.roleAssignments.list",
16262	//   "parameterOrder": [
16263	//     "customer"
16264	//   ],
16265	//   "parameters": {
16266	//     "customer": {
16267	//       "description": "Immutable ID of the G Suite account.",
16268	//       "location": "path",
16269	//       "required": true,
16270	//       "type": "string"
16271	//     },
16272	//     "maxResults": {
16273	//       "description": "Maximum number of results to return.",
16274	//       "format": "int32",
16275	//       "location": "query",
16276	//       "maximum": "200",
16277	//       "minimum": "1",
16278	//       "type": "integer"
16279	//     },
16280	//     "pageToken": {
16281	//       "description": "Token to specify the next page in the list.",
16282	//       "location": "query",
16283	//       "type": "string"
16284	//     },
16285	//     "roleId": {
16286	//       "description": "Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.",
16287	//       "location": "query",
16288	//       "type": "string"
16289	//     },
16290	//     "userKey": {
16291	//       "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.",
16292	//       "location": "query",
16293	//       "type": "string"
16294	//     }
16295	//   },
16296	//   "path": "customer/{customer}/roleassignments",
16297	//   "response": {
16298	//     "$ref": "RoleAssignments"
16299	//   },
16300	//   "scopes": [
16301	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
16302	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
16303	//   ]
16304	// }
16305
16306}
16307
16308// Pages invokes f for each page of results.
16309// A non-nil error returned from f will halt the iteration.
16310// The provided context supersedes any context provided to the Context method.
16311func (c *RoleAssignmentsListCall) Pages(ctx context.Context, f func(*RoleAssignments) error) error {
16312	c.ctx_ = ctx
16313	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16314	for {
16315		x, err := c.Do()
16316		if err != nil {
16317			return err
16318		}
16319		if err := f(x); err != nil {
16320			return err
16321		}
16322		if x.NextPageToken == "" {
16323			return nil
16324		}
16325		c.PageToken(x.NextPageToken)
16326	}
16327}
16328
16329// method id "directory.roles.delete":
16330
16331type RolesDeleteCall struct {
16332	s          *Service
16333	customer   string
16334	roleId     string
16335	urlParams_ gensupport.URLParams
16336	ctx_       context.Context
16337	header_    http.Header
16338}
16339
16340// Delete: Deletes a role.
16341func (r *RolesService) Delete(customer string, roleId string) *RolesDeleteCall {
16342	c := &RolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16343	c.customer = customer
16344	c.roleId = roleId
16345	return c
16346}
16347
16348// Fields allows partial responses to be retrieved. See
16349// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16350// for more information.
16351func (c *RolesDeleteCall) Fields(s ...googleapi.Field) *RolesDeleteCall {
16352	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16353	return c
16354}
16355
16356// Context sets the context to be used in this call's Do method. Any
16357// pending HTTP request will be aborted if the provided context is
16358// canceled.
16359func (c *RolesDeleteCall) Context(ctx context.Context) *RolesDeleteCall {
16360	c.ctx_ = ctx
16361	return c
16362}
16363
16364// Header returns an http.Header that can be modified by the caller to
16365// add HTTP headers to the request.
16366func (c *RolesDeleteCall) Header() http.Header {
16367	if c.header_ == nil {
16368		c.header_ = make(http.Header)
16369	}
16370	return c.header_
16371}
16372
16373func (c *RolesDeleteCall) doRequest(alt string) (*http.Response, error) {
16374	reqHeaders := make(http.Header)
16375	for k, v := range c.header_ {
16376		reqHeaders[k] = v
16377	}
16378	reqHeaders.Set("User-Agent", c.s.userAgent())
16379	var body io.Reader = nil
16380	c.urlParams_.Set("alt", alt)
16381	c.urlParams_.Set("prettyPrint", "false")
16382	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}")
16383	urls += "?" + c.urlParams_.Encode()
16384	req, err := http.NewRequest("DELETE", urls, body)
16385	if err != nil {
16386		return nil, err
16387	}
16388	req.Header = reqHeaders
16389	googleapi.Expand(req.URL, map[string]string{
16390		"customer": c.customer,
16391		"roleId":   c.roleId,
16392	})
16393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16394}
16395
16396// Do executes the "directory.roles.delete" call.
16397func (c *RolesDeleteCall) Do(opts ...googleapi.CallOption) error {
16398	gensupport.SetOptions(c.urlParams_, opts...)
16399	res, err := c.doRequest("json")
16400	if err != nil {
16401		return err
16402	}
16403	defer googleapi.CloseBody(res)
16404	if err := googleapi.CheckResponse(res); err != nil {
16405		return err
16406	}
16407	return nil
16408	// {
16409	//   "description": "Deletes a role.",
16410	//   "httpMethod": "DELETE",
16411	//   "id": "directory.roles.delete",
16412	//   "parameterOrder": [
16413	//     "customer",
16414	//     "roleId"
16415	//   ],
16416	//   "parameters": {
16417	//     "customer": {
16418	//       "description": "Immutable ID of the G Suite account.",
16419	//       "location": "path",
16420	//       "required": true,
16421	//       "type": "string"
16422	//     },
16423	//     "roleId": {
16424	//       "description": "Immutable ID of the role.",
16425	//       "location": "path",
16426	//       "required": true,
16427	//       "type": "string"
16428	//     }
16429	//   },
16430	//   "path": "customer/{customer}/roles/{roleId}",
16431	//   "scopes": [
16432	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
16433	//   ]
16434	// }
16435
16436}
16437
16438// method id "directory.roles.get":
16439
16440type RolesGetCall struct {
16441	s            *Service
16442	customer     string
16443	roleId       string
16444	urlParams_   gensupport.URLParams
16445	ifNoneMatch_ string
16446	ctx_         context.Context
16447	header_      http.Header
16448}
16449
16450// Get: Retrieves a role.
16451func (r *RolesService) Get(customer string, roleId string) *RolesGetCall {
16452	c := &RolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16453	c.customer = customer
16454	c.roleId = roleId
16455	return c
16456}
16457
16458// Fields allows partial responses to be retrieved. See
16459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16460// for more information.
16461func (c *RolesGetCall) Fields(s ...googleapi.Field) *RolesGetCall {
16462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16463	return c
16464}
16465
16466// IfNoneMatch sets the optional parameter which makes the operation
16467// fail if the object's ETag matches the given value. This is useful for
16468// getting updates only after the object has changed since the last
16469// request. Use googleapi.IsNotModified to check whether the response
16470// error from Do is the result of In-None-Match.
16471func (c *RolesGetCall) IfNoneMatch(entityTag string) *RolesGetCall {
16472	c.ifNoneMatch_ = entityTag
16473	return c
16474}
16475
16476// Context sets the context to be used in this call's Do method. Any
16477// pending HTTP request will be aborted if the provided context is
16478// canceled.
16479func (c *RolesGetCall) Context(ctx context.Context) *RolesGetCall {
16480	c.ctx_ = ctx
16481	return c
16482}
16483
16484// Header returns an http.Header that can be modified by the caller to
16485// add HTTP headers to the request.
16486func (c *RolesGetCall) Header() http.Header {
16487	if c.header_ == nil {
16488		c.header_ = make(http.Header)
16489	}
16490	return c.header_
16491}
16492
16493func (c *RolesGetCall) doRequest(alt string) (*http.Response, error) {
16494	reqHeaders := make(http.Header)
16495	for k, v := range c.header_ {
16496		reqHeaders[k] = v
16497	}
16498	reqHeaders.Set("User-Agent", c.s.userAgent())
16499	if c.ifNoneMatch_ != "" {
16500		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16501	}
16502	var body io.Reader = nil
16503	c.urlParams_.Set("alt", alt)
16504	c.urlParams_.Set("prettyPrint", "false")
16505	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}")
16506	urls += "?" + c.urlParams_.Encode()
16507	req, err := http.NewRequest("GET", urls, body)
16508	if err != nil {
16509		return nil, err
16510	}
16511	req.Header = reqHeaders
16512	googleapi.Expand(req.URL, map[string]string{
16513		"customer": c.customer,
16514		"roleId":   c.roleId,
16515	})
16516	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16517}
16518
16519// Do executes the "directory.roles.get" call.
16520// Exactly one of *Role or error will be non-nil. Any non-2xx status
16521// code is an error. Response headers are in either
16522// *Role.ServerResponse.Header or (if a response was returned at all) in
16523// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16524// whether the returned error was because http.StatusNotModified was
16525// returned.
16526func (c *RolesGetCall) Do(opts ...googleapi.CallOption) (*Role, error) {
16527	gensupport.SetOptions(c.urlParams_, opts...)
16528	res, err := c.doRequest("json")
16529	if res != nil && res.StatusCode == http.StatusNotModified {
16530		if res.Body != nil {
16531			res.Body.Close()
16532		}
16533		return nil, &googleapi.Error{
16534			Code:   res.StatusCode,
16535			Header: res.Header,
16536		}
16537	}
16538	if err != nil {
16539		return nil, err
16540	}
16541	defer googleapi.CloseBody(res)
16542	if err := googleapi.CheckResponse(res); err != nil {
16543		return nil, err
16544	}
16545	ret := &Role{
16546		ServerResponse: googleapi.ServerResponse{
16547			Header:         res.Header,
16548			HTTPStatusCode: res.StatusCode,
16549		},
16550	}
16551	target := &ret
16552	if err := gensupport.DecodeResponse(target, res); err != nil {
16553		return nil, err
16554	}
16555	return ret, nil
16556	// {
16557	//   "description": "Retrieves a role.",
16558	//   "httpMethod": "GET",
16559	//   "id": "directory.roles.get",
16560	//   "parameterOrder": [
16561	//     "customer",
16562	//     "roleId"
16563	//   ],
16564	//   "parameters": {
16565	//     "customer": {
16566	//       "description": "Immutable ID of the G Suite account.",
16567	//       "location": "path",
16568	//       "required": true,
16569	//       "type": "string"
16570	//     },
16571	//     "roleId": {
16572	//       "description": "Immutable ID of the role.",
16573	//       "location": "path",
16574	//       "required": true,
16575	//       "type": "string"
16576	//     }
16577	//   },
16578	//   "path": "customer/{customer}/roles/{roleId}",
16579	//   "response": {
16580	//     "$ref": "Role"
16581	//   },
16582	//   "scopes": [
16583	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
16584	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
16585	//   ]
16586	// }
16587
16588}
16589
16590// method id "directory.roles.insert":
16591
16592type RolesInsertCall struct {
16593	s          *Service
16594	customer   string
16595	role       *Role
16596	urlParams_ gensupport.URLParams
16597	ctx_       context.Context
16598	header_    http.Header
16599}
16600
16601// Insert: Creates a role.
16602func (r *RolesService) Insert(customer string, role *Role) *RolesInsertCall {
16603	c := &RolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16604	c.customer = customer
16605	c.role = role
16606	return c
16607}
16608
16609// Fields allows partial responses to be retrieved. See
16610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16611// for more information.
16612func (c *RolesInsertCall) Fields(s ...googleapi.Field) *RolesInsertCall {
16613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16614	return c
16615}
16616
16617// Context sets the context to be used in this call's Do method. Any
16618// pending HTTP request will be aborted if the provided context is
16619// canceled.
16620func (c *RolesInsertCall) Context(ctx context.Context) *RolesInsertCall {
16621	c.ctx_ = ctx
16622	return c
16623}
16624
16625// Header returns an http.Header that can be modified by the caller to
16626// add HTTP headers to the request.
16627func (c *RolesInsertCall) Header() http.Header {
16628	if c.header_ == nil {
16629		c.header_ = make(http.Header)
16630	}
16631	return c.header_
16632}
16633
16634func (c *RolesInsertCall) doRequest(alt string) (*http.Response, error) {
16635	reqHeaders := make(http.Header)
16636	for k, v := range c.header_ {
16637		reqHeaders[k] = v
16638	}
16639	reqHeaders.Set("User-Agent", c.s.userAgent())
16640	var body io.Reader = nil
16641	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
16642	if err != nil {
16643		return nil, err
16644	}
16645	reqHeaders.Set("Content-Type", "application/json")
16646	c.urlParams_.Set("alt", alt)
16647	c.urlParams_.Set("prettyPrint", "false")
16648	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles")
16649	urls += "?" + c.urlParams_.Encode()
16650	req, err := http.NewRequest("POST", urls, body)
16651	if err != nil {
16652		return nil, err
16653	}
16654	req.Header = reqHeaders
16655	googleapi.Expand(req.URL, map[string]string{
16656		"customer": c.customer,
16657	})
16658	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16659}
16660
16661// Do executes the "directory.roles.insert" call.
16662// Exactly one of *Role or error will be non-nil. Any non-2xx status
16663// code is an error. Response headers are in either
16664// *Role.ServerResponse.Header or (if a response was returned at all) in
16665// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16666// whether the returned error was because http.StatusNotModified was
16667// returned.
16668func (c *RolesInsertCall) Do(opts ...googleapi.CallOption) (*Role, error) {
16669	gensupport.SetOptions(c.urlParams_, opts...)
16670	res, err := c.doRequest("json")
16671	if res != nil && res.StatusCode == http.StatusNotModified {
16672		if res.Body != nil {
16673			res.Body.Close()
16674		}
16675		return nil, &googleapi.Error{
16676			Code:   res.StatusCode,
16677			Header: res.Header,
16678		}
16679	}
16680	if err != nil {
16681		return nil, err
16682	}
16683	defer googleapi.CloseBody(res)
16684	if err := googleapi.CheckResponse(res); err != nil {
16685		return nil, err
16686	}
16687	ret := &Role{
16688		ServerResponse: googleapi.ServerResponse{
16689			Header:         res.Header,
16690			HTTPStatusCode: res.StatusCode,
16691		},
16692	}
16693	target := &ret
16694	if err := gensupport.DecodeResponse(target, res); err != nil {
16695		return nil, err
16696	}
16697	return ret, nil
16698	// {
16699	//   "description": "Creates a role.",
16700	//   "httpMethod": "POST",
16701	//   "id": "directory.roles.insert",
16702	//   "parameterOrder": [
16703	//     "customer"
16704	//   ],
16705	//   "parameters": {
16706	//     "customer": {
16707	//       "description": "Immutable ID of the G Suite account.",
16708	//       "location": "path",
16709	//       "required": true,
16710	//       "type": "string"
16711	//     }
16712	//   },
16713	//   "path": "customer/{customer}/roles",
16714	//   "request": {
16715	//     "$ref": "Role"
16716	//   },
16717	//   "response": {
16718	//     "$ref": "Role"
16719	//   },
16720	//   "scopes": [
16721	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
16722	//   ]
16723	// }
16724
16725}
16726
16727// method id "directory.roles.list":
16728
16729type RolesListCall struct {
16730	s            *Service
16731	customer     string
16732	urlParams_   gensupport.URLParams
16733	ifNoneMatch_ string
16734	ctx_         context.Context
16735	header_      http.Header
16736}
16737
16738// List: Retrieves a paginated list of all the roles in a domain.
16739func (r *RolesService) List(customer string) *RolesListCall {
16740	c := &RolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16741	c.customer = customer
16742	return c
16743}
16744
16745// MaxResults sets the optional parameter "maxResults": Maximum number
16746// of results to return.
16747func (c *RolesListCall) MaxResults(maxResults int64) *RolesListCall {
16748	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16749	return c
16750}
16751
16752// PageToken sets the optional parameter "pageToken": Token to specify
16753// the next page in the list.
16754func (c *RolesListCall) PageToken(pageToken string) *RolesListCall {
16755	c.urlParams_.Set("pageToken", pageToken)
16756	return c
16757}
16758
16759// Fields allows partial responses to be retrieved. See
16760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16761// for more information.
16762func (c *RolesListCall) Fields(s ...googleapi.Field) *RolesListCall {
16763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16764	return c
16765}
16766
16767// IfNoneMatch sets the optional parameter which makes the operation
16768// fail if the object's ETag matches the given value. This is useful for
16769// getting updates only after the object has changed since the last
16770// request. Use googleapi.IsNotModified to check whether the response
16771// error from Do is the result of In-None-Match.
16772func (c *RolesListCall) IfNoneMatch(entityTag string) *RolesListCall {
16773	c.ifNoneMatch_ = entityTag
16774	return c
16775}
16776
16777// Context sets the context to be used in this call's Do method. Any
16778// pending HTTP request will be aborted if the provided context is
16779// canceled.
16780func (c *RolesListCall) Context(ctx context.Context) *RolesListCall {
16781	c.ctx_ = ctx
16782	return c
16783}
16784
16785// Header returns an http.Header that can be modified by the caller to
16786// add HTTP headers to the request.
16787func (c *RolesListCall) Header() http.Header {
16788	if c.header_ == nil {
16789		c.header_ = make(http.Header)
16790	}
16791	return c.header_
16792}
16793
16794func (c *RolesListCall) doRequest(alt string) (*http.Response, error) {
16795	reqHeaders := make(http.Header)
16796	for k, v := range c.header_ {
16797		reqHeaders[k] = v
16798	}
16799	reqHeaders.Set("User-Agent", c.s.userAgent())
16800	if c.ifNoneMatch_ != "" {
16801		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16802	}
16803	var body io.Reader = nil
16804	c.urlParams_.Set("alt", alt)
16805	c.urlParams_.Set("prettyPrint", "false")
16806	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles")
16807	urls += "?" + c.urlParams_.Encode()
16808	req, err := http.NewRequest("GET", urls, body)
16809	if err != nil {
16810		return nil, err
16811	}
16812	req.Header = reqHeaders
16813	googleapi.Expand(req.URL, map[string]string{
16814		"customer": c.customer,
16815	})
16816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16817}
16818
16819// Do executes the "directory.roles.list" call.
16820// Exactly one of *Roles or error will be non-nil. Any non-2xx status
16821// code is an error. Response headers are in either
16822// *Roles.ServerResponse.Header or (if a response was returned at all)
16823// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16824// check whether the returned error was because http.StatusNotModified
16825// was returned.
16826func (c *RolesListCall) Do(opts ...googleapi.CallOption) (*Roles, error) {
16827	gensupport.SetOptions(c.urlParams_, opts...)
16828	res, err := c.doRequest("json")
16829	if res != nil && res.StatusCode == http.StatusNotModified {
16830		if res.Body != nil {
16831			res.Body.Close()
16832		}
16833		return nil, &googleapi.Error{
16834			Code:   res.StatusCode,
16835			Header: res.Header,
16836		}
16837	}
16838	if err != nil {
16839		return nil, err
16840	}
16841	defer googleapi.CloseBody(res)
16842	if err := googleapi.CheckResponse(res); err != nil {
16843		return nil, err
16844	}
16845	ret := &Roles{
16846		ServerResponse: googleapi.ServerResponse{
16847			Header:         res.Header,
16848			HTTPStatusCode: res.StatusCode,
16849		},
16850	}
16851	target := &ret
16852	if err := gensupport.DecodeResponse(target, res); err != nil {
16853		return nil, err
16854	}
16855	return ret, nil
16856	// {
16857	//   "description": "Retrieves a paginated list of all the roles in a domain.",
16858	//   "httpMethod": "GET",
16859	//   "id": "directory.roles.list",
16860	//   "parameterOrder": [
16861	//     "customer"
16862	//   ],
16863	//   "parameters": {
16864	//     "customer": {
16865	//       "description": "Immutable ID of the G Suite account.",
16866	//       "location": "path",
16867	//       "required": true,
16868	//       "type": "string"
16869	//     },
16870	//     "maxResults": {
16871	//       "description": "Maximum number of results to return.",
16872	//       "format": "int32",
16873	//       "location": "query",
16874	//       "maximum": "100",
16875	//       "minimum": "1",
16876	//       "type": "integer"
16877	//     },
16878	//     "pageToken": {
16879	//       "description": "Token to specify the next page in the list.",
16880	//       "location": "query",
16881	//       "type": "string"
16882	//     }
16883	//   },
16884	//   "path": "customer/{customer}/roles",
16885	//   "response": {
16886	//     "$ref": "Roles"
16887	//   },
16888	//   "scopes": [
16889	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement",
16890	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly"
16891	//   ]
16892	// }
16893
16894}
16895
16896// Pages invokes f for each page of results.
16897// A non-nil error returned from f will halt the iteration.
16898// The provided context supersedes any context provided to the Context method.
16899func (c *RolesListCall) Pages(ctx context.Context, f func(*Roles) error) error {
16900	c.ctx_ = ctx
16901	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16902	for {
16903		x, err := c.Do()
16904		if err != nil {
16905			return err
16906		}
16907		if err := f(x); err != nil {
16908			return err
16909		}
16910		if x.NextPageToken == "" {
16911			return nil
16912		}
16913		c.PageToken(x.NextPageToken)
16914	}
16915}
16916
16917// method id "directory.roles.patch":
16918
16919type RolesPatchCall struct {
16920	s          *Service
16921	customer   string
16922	roleId     string
16923	role       *Role
16924	urlParams_ gensupport.URLParams
16925	ctx_       context.Context
16926	header_    http.Header
16927}
16928
16929// Patch: Updates a role. This method supports patch semantics.
16930func (r *RolesService) Patch(customer string, roleId string, role *Role) *RolesPatchCall {
16931	c := &RolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16932	c.customer = customer
16933	c.roleId = roleId
16934	c.role = role
16935	return c
16936}
16937
16938// Fields allows partial responses to be retrieved. See
16939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16940// for more information.
16941func (c *RolesPatchCall) Fields(s ...googleapi.Field) *RolesPatchCall {
16942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16943	return c
16944}
16945
16946// Context sets the context to be used in this call's Do method. Any
16947// pending HTTP request will be aborted if the provided context is
16948// canceled.
16949func (c *RolesPatchCall) Context(ctx context.Context) *RolesPatchCall {
16950	c.ctx_ = ctx
16951	return c
16952}
16953
16954// Header returns an http.Header that can be modified by the caller to
16955// add HTTP headers to the request.
16956func (c *RolesPatchCall) Header() http.Header {
16957	if c.header_ == nil {
16958		c.header_ = make(http.Header)
16959	}
16960	return c.header_
16961}
16962
16963func (c *RolesPatchCall) doRequest(alt string) (*http.Response, error) {
16964	reqHeaders := make(http.Header)
16965	for k, v := range c.header_ {
16966		reqHeaders[k] = v
16967	}
16968	reqHeaders.Set("User-Agent", c.s.userAgent())
16969	var body io.Reader = nil
16970	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
16971	if err != nil {
16972		return nil, err
16973	}
16974	reqHeaders.Set("Content-Type", "application/json")
16975	c.urlParams_.Set("alt", alt)
16976	c.urlParams_.Set("prettyPrint", "false")
16977	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}")
16978	urls += "?" + c.urlParams_.Encode()
16979	req, err := http.NewRequest("PATCH", urls, body)
16980	if err != nil {
16981		return nil, err
16982	}
16983	req.Header = reqHeaders
16984	googleapi.Expand(req.URL, map[string]string{
16985		"customer": c.customer,
16986		"roleId":   c.roleId,
16987	})
16988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16989}
16990
16991// Do executes the "directory.roles.patch" call.
16992// Exactly one of *Role or error will be non-nil. Any non-2xx status
16993// code is an error. Response headers are in either
16994// *Role.ServerResponse.Header or (if a response was returned at all) in
16995// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16996// whether the returned error was because http.StatusNotModified was
16997// returned.
16998func (c *RolesPatchCall) Do(opts ...googleapi.CallOption) (*Role, error) {
16999	gensupport.SetOptions(c.urlParams_, opts...)
17000	res, err := c.doRequest("json")
17001	if res != nil && res.StatusCode == http.StatusNotModified {
17002		if res.Body != nil {
17003			res.Body.Close()
17004		}
17005		return nil, &googleapi.Error{
17006			Code:   res.StatusCode,
17007			Header: res.Header,
17008		}
17009	}
17010	if err != nil {
17011		return nil, err
17012	}
17013	defer googleapi.CloseBody(res)
17014	if err := googleapi.CheckResponse(res); err != nil {
17015		return nil, err
17016	}
17017	ret := &Role{
17018		ServerResponse: googleapi.ServerResponse{
17019			Header:         res.Header,
17020			HTTPStatusCode: res.StatusCode,
17021		},
17022	}
17023	target := &ret
17024	if err := gensupport.DecodeResponse(target, res); err != nil {
17025		return nil, err
17026	}
17027	return ret, nil
17028	// {
17029	//   "description": "Updates a role. This method supports patch semantics.",
17030	//   "httpMethod": "PATCH",
17031	//   "id": "directory.roles.patch",
17032	//   "parameterOrder": [
17033	//     "customer",
17034	//     "roleId"
17035	//   ],
17036	//   "parameters": {
17037	//     "customer": {
17038	//       "description": "Immutable ID of the G Suite account.",
17039	//       "location": "path",
17040	//       "required": true,
17041	//       "type": "string"
17042	//     },
17043	//     "roleId": {
17044	//       "description": "Immutable ID of the role.",
17045	//       "location": "path",
17046	//       "required": true,
17047	//       "type": "string"
17048	//     }
17049	//   },
17050	//   "path": "customer/{customer}/roles/{roleId}",
17051	//   "request": {
17052	//     "$ref": "Role"
17053	//   },
17054	//   "response": {
17055	//     "$ref": "Role"
17056	//   },
17057	//   "scopes": [
17058	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
17059	//   ]
17060	// }
17061
17062}
17063
17064// method id "directory.roles.update":
17065
17066type RolesUpdateCall struct {
17067	s          *Service
17068	customer   string
17069	roleId     string
17070	role       *Role
17071	urlParams_ gensupport.URLParams
17072	ctx_       context.Context
17073	header_    http.Header
17074}
17075
17076// Update: Updates a role.
17077func (r *RolesService) Update(customer string, roleId string, role *Role) *RolesUpdateCall {
17078	c := &RolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17079	c.customer = customer
17080	c.roleId = roleId
17081	c.role = role
17082	return c
17083}
17084
17085// Fields allows partial responses to be retrieved. See
17086// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17087// for more information.
17088func (c *RolesUpdateCall) Fields(s ...googleapi.Field) *RolesUpdateCall {
17089	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17090	return c
17091}
17092
17093// Context sets the context to be used in this call's Do method. Any
17094// pending HTTP request will be aborted if the provided context is
17095// canceled.
17096func (c *RolesUpdateCall) Context(ctx context.Context) *RolesUpdateCall {
17097	c.ctx_ = ctx
17098	return c
17099}
17100
17101// Header returns an http.Header that can be modified by the caller to
17102// add HTTP headers to the request.
17103func (c *RolesUpdateCall) Header() http.Header {
17104	if c.header_ == nil {
17105		c.header_ = make(http.Header)
17106	}
17107	return c.header_
17108}
17109
17110func (c *RolesUpdateCall) doRequest(alt string) (*http.Response, error) {
17111	reqHeaders := make(http.Header)
17112	for k, v := range c.header_ {
17113		reqHeaders[k] = v
17114	}
17115	reqHeaders.Set("User-Agent", c.s.userAgent())
17116	var body io.Reader = nil
17117	body, err := googleapi.WithoutDataWrapper.JSONReader(c.role)
17118	if err != nil {
17119		return nil, err
17120	}
17121	reqHeaders.Set("Content-Type", "application/json")
17122	c.urlParams_.Set("alt", alt)
17123	c.urlParams_.Set("prettyPrint", "false")
17124	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customer}/roles/{roleId}")
17125	urls += "?" + c.urlParams_.Encode()
17126	req, err := http.NewRequest("PUT", urls, body)
17127	if err != nil {
17128		return nil, err
17129	}
17130	req.Header = reqHeaders
17131	googleapi.Expand(req.URL, map[string]string{
17132		"customer": c.customer,
17133		"roleId":   c.roleId,
17134	})
17135	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17136}
17137
17138// Do executes the "directory.roles.update" call.
17139// Exactly one of *Role or error will be non-nil. Any non-2xx status
17140// code is an error. Response headers are in either
17141// *Role.ServerResponse.Header or (if a response was returned at all) in
17142// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17143// whether the returned error was because http.StatusNotModified was
17144// returned.
17145func (c *RolesUpdateCall) Do(opts ...googleapi.CallOption) (*Role, error) {
17146	gensupport.SetOptions(c.urlParams_, opts...)
17147	res, err := c.doRequest("json")
17148	if res != nil && res.StatusCode == http.StatusNotModified {
17149		if res.Body != nil {
17150			res.Body.Close()
17151		}
17152		return nil, &googleapi.Error{
17153			Code:   res.StatusCode,
17154			Header: res.Header,
17155		}
17156	}
17157	if err != nil {
17158		return nil, err
17159	}
17160	defer googleapi.CloseBody(res)
17161	if err := googleapi.CheckResponse(res); err != nil {
17162		return nil, err
17163	}
17164	ret := &Role{
17165		ServerResponse: googleapi.ServerResponse{
17166			Header:         res.Header,
17167			HTTPStatusCode: res.StatusCode,
17168		},
17169	}
17170	target := &ret
17171	if err := gensupport.DecodeResponse(target, res); err != nil {
17172		return nil, err
17173	}
17174	return ret, nil
17175	// {
17176	//   "description": "Updates a role.",
17177	//   "httpMethod": "PUT",
17178	//   "id": "directory.roles.update",
17179	//   "parameterOrder": [
17180	//     "customer",
17181	//     "roleId"
17182	//   ],
17183	//   "parameters": {
17184	//     "customer": {
17185	//       "description": "Immutable ID of the G Suite account.",
17186	//       "location": "path",
17187	//       "required": true,
17188	//       "type": "string"
17189	//     },
17190	//     "roleId": {
17191	//       "description": "Immutable ID of the role.",
17192	//       "location": "path",
17193	//       "required": true,
17194	//       "type": "string"
17195	//     }
17196	//   },
17197	//   "path": "customer/{customer}/roles/{roleId}",
17198	//   "request": {
17199	//     "$ref": "Role"
17200	//   },
17201	//   "response": {
17202	//     "$ref": "Role"
17203	//   },
17204	//   "scopes": [
17205	//     "https://www.googleapis.com/auth/admin.directory.rolemanagement"
17206	//   ]
17207	// }
17208
17209}
17210
17211// method id "directory.schemas.delete":
17212
17213type SchemasDeleteCall struct {
17214	s          *Service
17215	customerId string
17216	schemaKey  string
17217	urlParams_ gensupport.URLParams
17218	ctx_       context.Context
17219	header_    http.Header
17220}
17221
17222// Delete: Delete schema
17223func (r *SchemasService) Delete(customerId string, schemaKey string) *SchemasDeleteCall {
17224	c := &SchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17225	c.customerId = customerId
17226	c.schemaKey = schemaKey
17227	return c
17228}
17229
17230// Fields allows partial responses to be retrieved. See
17231// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17232// for more information.
17233func (c *SchemasDeleteCall) Fields(s ...googleapi.Field) *SchemasDeleteCall {
17234	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17235	return c
17236}
17237
17238// Context sets the context to be used in this call's Do method. Any
17239// pending HTTP request will be aborted if the provided context is
17240// canceled.
17241func (c *SchemasDeleteCall) Context(ctx context.Context) *SchemasDeleteCall {
17242	c.ctx_ = ctx
17243	return c
17244}
17245
17246// Header returns an http.Header that can be modified by the caller to
17247// add HTTP headers to the request.
17248func (c *SchemasDeleteCall) Header() http.Header {
17249	if c.header_ == nil {
17250		c.header_ = make(http.Header)
17251	}
17252	return c.header_
17253}
17254
17255func (c *SchemasDeleteCall) doRequest(alt string) (*http.Response, error) {
17256	reqHeaders := make(http.Header)
17257	for k, v := range c.header_ {
17258		reqHeaders[k] = v
17259	}
17260	reqHeaders.Set("User-Agent", c.s.userAgent())
17261	var body io.Reader = nil
17262	c.urlParams_.Set("alt", alt)
17263	c.urlParams_.Set("prettyPrint", "false")
17264	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}")
17265	urls += "?" + c.urlParams_.Encode()
17266	req, err := http.NewRequest("DELETE", urls, body)
17267	if err != nil {
17268		return nil, err
17269	}
17270	req.Header = reqHeaders
17271	googleapi.Expand(req.URL, map[string]string{
17272		"customerId": c.customerId,
17273		"schemaKey":  c.schemaKey,
17274	})
17275	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17276}
17277
17278// Do executes the "directory.schemas.delete" call.
17279func (c *SchemasDeleteCall) Do(opts ...googleapi.CallOption) error {
17280	gensupport.SetOptions(c.urlParams_, opts...)
17281	res, err := c.doRequest("json")
17282	if err != nil {
17283		return err
17284	}
17285	defer googleapi.CloseBody(res)
17286	if err := googleapi.CheckResponse(res); err != nil {
17287		return err
17288	}
17289	return nil
17290	// {
17291	//   "description": "Delete schema",
17292	//   "httpMethod": "DELETE",
17293	//   "id": "directory.schemas.delete",
17294	//   "parameterOrder": [
17295	//     "customerId",
17296	//     "schemaKey"
17297	//   ],
17298	//   "parameters": {
17299	//     "customerId": {
17300	//       "description": "Immutable ID of the G Suite account",
17301	//       "location": "path",
17302	//       "required": true,
17303	//       "type": "string"
17304	//     },
17305	//     "schemaKey": {
17306	//       "description": "Name or immutable ID of the schema",
17307	//       "location": "path",
17308	//       "required": true,
17309	//       "type": "string"
17310	//     }
17311	//   },
17312	//   "path": "customer/{customerId}/schemas/{schemaKey}",
17313	//   "scopes": [
17314	//     "https://www.googleapis.com/auth/admin.directory.userschema"
17315	//   ]
17316	// }
17317
17318}
17319
17320// method id "directory.schemas.get":
17321
17322type SchemasGetCall struct {
17323	s            *Service
17324	customerId   string
17325	schemaKey    string
17326	urlParams_   gensupport.URLParams
17327	ifNoneMatch_ string
17328	ctx_         context.Context
17329	header_      http.Header
17330}
17331
17332// Get: Retrieve schema
17333func (r *SchemasService) Get(customerId string, schemaKey string) *SchemasGetCall {
17334	c := &SchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17335	c.customerId = customerId
17336	c.schemaKey = schemaKey
17337	return c
17338}
17339
17340// Fields allows partial responses to be retrieved. See
17341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17342// for more information.
17343func (c *SchemasGetCall) Fields(s ...googleapi.Field) *SchemasGetCall {
17344	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17345	return c
17346}
17347
17348// IfNoneMatch sets the optional parameter which makes the operation
17349// fail if the object's ETag matches the given value. This is useful for
17350// getting updates only after the object has changed since the last
17351// request. Use googleapi.IsNotModified to check whether the response
17352// error from Do is the result of In-None-Match.
17353func (c *SchemasGetCall) IfNoneMatch(entityTag string) *SchemasGetCall {
17354	c.ifNoneMatch_ = entityTag
17355	return c
17356}
17357
17358// Context sets the context to be used in this call's Do method. Any
17359// pending HTTP request will be aborted if the provided context is
17360// canceled.
17361func (c *SchemasGetCall) Context(ctx context.Context) *SchemasGetCall {
17362	c.ctx_ = ctx
17363	return c
17364}
17365
17366// Header returns an http.Header that can be modified by the caller to
17367// add HTTP headers to the request.
17368func (c *SchemasGetCall) Header() http.Header {
17369	if c.header_ == nil {
17370		c.header_ = make(http.Header)
17371	}
17372	return c.header_
17373}
17374
17375func (c *SchemasGetCall) doRequest(alt string) (*http.Response, error) {
17376	reqHeaders := make(http.Header)
17377	for k, v := range c.header_ {
17378		reqHeaders[k] = v
17379	}
17380	reqHeaders.Set("User-Agent", c.s.userAgent())
17381	if c.ifNoneMatch_ != "" {
17382		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17383	}
17384	var body io.Reader = nil
17385	c.urlParams_.Set("alt", alt)
17386	c.urlParams_.Set("prettyPrint", "false")
17387	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}")
17388	urls += "?" + c.urlParams_.Encode()
17389	req, err := http.NewRequest("GET", urls, body)
17390	if err != nil {
17391		return nil, err
17392	}
17393	req.Header = reqHeaders
17394	googleapi.Expand(req.URL, map[string]string{
17395		"customerId": c.customerId,
17396		"schemaKey":  c.schemaKey,
17397	})
17398	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17399}
17400
17401// Do executes the "directory.schemas.get" call.
17402// Exactly one of *Schema or error will be non-nil. Any non-2xx status
17403// code is an error. Response headers are in either
17404// *Schema.ServerResponse.Header or (if a response was returned at all)
17405// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17406// check whether the returned error was because http.StatusNotModified
17407// was returned.
17408func (c *SchemasGetCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
17409	gensupport.SetOptions(c.urlParams_, opts...)
17410	res, err := c.doRequest("json")
17411	if res != nil && res.StatusCode == http.StatusNotModified {
17412		if res.Body != nil {
17413			res.Body.Close()
17414		}
17415		return nil, &googleapi.Error{
17416			Code:   res.StatusCode,
17417			Header: res.Header,
17418		}
17419	}
17420	if err != nil {
17421		return nil, err
17422	}
17423	defer googleapi.CloseBody(res)
17424	if err := googleapi.CheckResponse(res); err != nil {
17425		return nil, err
17426	}
17427	ret := &Schema{
17428		ServerResponse: googleapi.ServerResponse{
17429			Header:         res.Header,
17430			HTTPStatusCode: res.StatusCode,
17431		},
17432	}
17433	target := &ret
17434	if err := gensupport.DecodeResponse(target, res); err != nil {
17435		return nil, err
17436	}
17437	return ret, nil
17438	// {
17439	//   "description": "Retrieve schema",
17440	//   "httpMethod": "GET",
17441	//   "id": "directory.schemas.get",
17442	//   "parameterOrder": [
17443	//     "customerId",
17444	//     "schemaKey"
17445	//   ],
17446	//   "parameters": {
17447	//     "customerId": {
17448	//       "description": "Immutable ID of the G Suite account",
17449	//       "location": "path",
17450	//       "required": true,
17451	//       "type": "string"
17452	//     },
17453	//     "schemaKey": {
17454	//       "description": "Name or immutable ID of the schema",
17455	//       "location": "path",
17456	//       "required": true,
17457	//       "type": "string"
17458	//     }
17459	//   },
17460	//   "path": "customer/{customerId}/schemas/{schemaKey}",
17461	//   "response": {
17462	//     "$ref": "Schema"
17463	//   },
17464	//   "scopes": [
17465	//     "https://www.googleapis.com/auth/admin.directory.userschema",
17466	//     "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
17467	//   ]
17468	// }
17469
17470}
17471
17472// method id "directory.schemas.insert":
17473
17474type SchemasInsertCall struct {
17475	s          *Service
17476	customerId string
17477	schema     *Schema
17478	urlParams_ gensupport.URLParams
17479	ctx_       context.Context
17480	header_    http.Header
17481}
17482
17483// Insert: Create schema.
17484func (r *SchemasService) Insert(customerId string, schema *Schema) *SchemasInsertCall {
17485	c := &SchemasInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17486	c.customerId = customerId
17487	c.schema = schema
17488	return c
17489}
17490
17491// Fields allows partial responses to be retrieved. See
17492// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17493// for more information.
17494func (c *SchemasInsertCall) Fields(s ...googleapi.Field) *SchemasInsertCall {
17495	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17496	return c
17497}
17498
17499// Context sets the context to be used in this call's Do method. Any
17500// pending HTTP request will be aborted if the provided context is
17501// canceled.
17502func (c *SchemasInsertCall) Context(ctx context.Context) *SchemasInsertCall {
17503	c.ctx_ = ctx
17504	return c
17505}
17506
17507// Header returns an http.Header that can be modified by the caller to
17508// add HTTP headers to the request.
17509func (c *SchemasInsertCall) Header() http.Header {
17510	if c.header_ == nil {
17511		c.header_ = make(http.Header)
17512	}
17513	return c.header_
17514}
17515
17516func (c *SchemasInsertCall) doRequest(alt string) (*http.Response, error) {
17517	reqHeaders := make(http.Header)
17518	for k, v := range c.header_ {
17519		reqHeaders[k] = v
17520	}
17521	reqHeaders.Set("User-Agent", c.s.userAgent())
17522	var body io.Reader = nil
17523	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
17524	if err != nil {
17525		return nil, err
17526	}
17527	reqHeaders.Set("Content-Type", "application/json")
17528	c.urlParams_.Set("alt", alt)
17529	c.urlParams_.Set("prettyPrint", "false")
17530	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas")
17531	urls += "?" + c.urlParams_.Encode()
17532	req, err := http.NewRequest("POST", urls, body)
17533	if err != nil {
17534		return nil, err
17535	}
17536	req.Header = reqHeaders
17537	googleapi.Expand(req.URL, map[string]string{
17538		"customerId": c.customerId,
17539	})
17540	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17541}
17542
17543// Do executes the "directory.schemas.insert" call.
17544// Exactly one of *Schema or error will be non-nil. Any non-2xx status
17545// code is an error. Response headers are in either
17546// *Schema.ServerResponse.Header or (if a response was returned at all)
17547// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17548// check whether the returned error was because http.StatusNotModified
17549// was returned.
17550func (c *SchemasInsertCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
17551	gensupport.SetOptions(c.urlParams_, opts...)
17552	res, err := c.doRequest("json")
17553	if res != nil && res.StatusCode == http.StatusNotModified {
17554		if res.Body != nil {
17555			res.Body.Close()
17556		}
17557		return nil, &googleapi.Error{
17558			Code:   res.StatusCode,
17559			Header: res.Header,
17560		}
17561	}
17562	if err != nil {
17563		return nil, err
17564	}
17565	defer googleapi.CloseBody(res)
17566	if err := googleapi.CheckResponse(res); err != nil {
17567		return nil, err
17568	}
17569	ret := &Schema{
17570		ServerResponse: googleapi.ServerResponse{
17571			Header:         res.Header,
17572			HTTPStatusCode: res.StatusCode,
17573		},
17574	}
17575	target := &ret
17576	if err := gensupport.DecodeResponse(target, res); err != nil {
17577		return nil, err
17578	}
17579	return ret, nil
17580	// {
17581	//   "description": "Create schema.",
17582	//   "httpMethod": "POST",
17583	//   "id": "directory.schemas.insert",
17584	//   "parameterOrder": [
17585	//     "customerId"
17586	//   ],
17587	//   "parameters": {
17588	//     "customerId": {
17589	//       "description": "Immutable ID of the G Suite account",
17590	//       "location": "path",
17591	//       "required": true,
17592	//       "type": "string"
17593	//     }
17594	//   },
17595	//   "path": "customer/{customerId}/schemas",
17596	//   "request": {
17597	//     "$ref": "Schema"
17598	//   },
17599	//   "response": {
17600	//     "$ref": "Schema"
17601	//   },
17602	//   "scopes": [
17603	//     "https://www.googleapis.com/auth/admin.directory.userschema"
17604	//   ]
17605	// }
17606
17607}
17608
17609// method id "directory.schemas.list":
17610
17611type SchemasListCall struct {
17612	s            *Service
17613	customerId   string
17614	urlParams_   gensupport.URLParams
17615	ifNoneMatch_ string
17616	ctx_         context.Context
17617	header_      http.Header
17618}
17619
17620// List: Retrieve all schemas for a customer
17621func (r *SchemasService) List(customerId string) *SchemasListCall {
17622	c := &SchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17623	c.customerId = customerId
17624	return c
17625}
17626
17627// Fields allows partial responses to be retrieved. See
17628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17629// for more information.
17630func (c *SchemasListCall) Fields(s ...googleapi.Field) *SchemasListCall {
17631	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17632	return c
17633}
17634
17635// IfNoneMatch sets the optional parameter which makes the operation
17636// fail if the object's ETag matches the given value. This is useful for
17637// getting updates only after the object has changed since the last
17638// request. Use googleapi.IsNotModified to check whether the response
17639// error from Do is the result of In-None-Match.
17640func (c *SchemasListCall) IfNoneMatch(entityTag string) *SchemasListCall {
17641	c.ifNoneMatch_ = entityTag
17642	return c
17643}
17644
17645// Context sets the context to be used in this call's Do method. Any
17646// pending HTTP request will be aborted if the provided context is
17647// canceled.
17648func (c *SchemasListCall) Context(ctx context.Context) *SchemasListCall {
17649	c.ctx_ = ctx
17650	return c
17651}
17652
17653// Header returns an http.Header that can be modified by the caller to
17654// add HTTP headers to the request.
17655func (c *SchemasListCall) Header() http.Header {
17656	if c.header_ == nil {
17657		c.header_ = make(http.Header)
17658	}
17659	return c.header_
17660}
17661
17662func (c *SchemasListCall) doRequest(alt string) (*http.Response, error) {
17663	reqHeaders := make(http.Header)
17664	for k, v := range c.header_ {
17665		reqHeaders[k] = v
17666	}
17667	reqHeaders.Set("User-Agent", c.s.userAgent())
17668	if c.ifNoneMatch_ != "" {
17669		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17670	}
17671	var body io.Reader = nil
17672	c.urlParams_.Set("alt", alt)
17673	c.urlParams_.Set("prettyPrint", "false")
17674	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas")
17675	urls += "?" + c.urlParams_.Encode()
17676	req, err := http.NewRequest("GET", urls, body)
17677	if err != nil {
17678		return nil, err
17679	}
17680	req.Header = reqHeaders
17681	googleapi.Expand(req.URL, map[string]string{
17682		"customerId": c.customerId,
17683	})
17684	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17685}
17686
17687// Do executes the "directory.schemas.list" call.
17688// Exactly one of *Schemas or error will be non-nil. Any non-2xx status
17689// code is an error. Response headers are in either
17690// *Schemas.ServerResponse.Header or (if a response was returned at all)
17691// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17692// check whether the returned error was because http.StatusNotModified
17693// was returned.
17694func (c *SchemasListCall) Do(opts ...googleapi.CallOption) (*Schemas, error) {
17695	gensupport.SetOptions(c.urlParams_, opts...)
17696	res, err := c.doRequest("json")
17697	if res != nil && res.StatusCode == http.StatusNotModified {
17698		if res.Body != nil {
17699			res.Body.Close()
17700		}
17701		return nil, &googleapi.Error{
17702			Code:   res.StatusCode,
17703			Header: res.Header,
17704		}
17705	}
17706	if err != nil {
17707		return nil, err
17708	}
17709	defer googleapi.CloseBody(res)
17710	if err := googleapi.CheckResponse(res); err != nil {
17711		return nil, err
17712	}
17713	ret := &Schemas{
17714		ServerResponse: googleapi.ServerResponse{
17715			Header:         res.Header,
17716			HTTPStatusCode: res.StatusCode,
17717		},
17718	}
17719	target := &ret
17720	if err := gensupport.DecodeResponse(target, res); err != nil {
17721		return nil, err
17722	}
17723	return ret, nil
17724	// {
17725	//   "description": "Retrieve all schemas for a customer",
17726	//   "httpMethod": "GET",
17727	//   "id": "directory.schemas.list",
17728	//   "parameterOrder": [
17729	//     "customerId"
17730	//   ],
17731	//   "parameters": {
17732	//     "customerId": {
17733	//       "description": "Immutable ID of the G Suite account",
17734	//       "location": "path",
17735	//       "required": true,
17736	//       "type": "string"
17737	//     }
17738	//   },
17739	//   "path": "customer/{customerId}/schemas",
17740	//   "response": {
17741	//     "$ref": "Schemas"
17742	//   },
17743	//   "scopes": [
17744	//     "https://www.googleapis.com/auth/admin.directory.userschema",
17745	//     "https://www.googleapis.com/auth/admin.directory.userschema.readonly"
17746	//   ]
17747	// }
17748
17749}
17750
17751// method id "directory.schemas.patch":
17752
17753type SchemasPatchCall struct {
17754	s          *Service
17755	customerId string
17756	schemaKey  string
17757	schema     *Schema
17758	urlParams_ gensupport.URLParams
17759	ctx_       context.Context
17760	header_    http.Header
17761}
17762
17763// Patch: Update schema. This method supports patch semantics.
17764func (r *SchemasService) Patch(customerId string, schemaKey string, schema *Schema) *SchemasPatchCall {
17765	c := &SchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17766	c.customerId = customerId
17767	c.schemaKey = schemaKey
17768	c.schema = schema
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 *SchemasPatchCall) Fields(s ...googleapi.Field) *SchemasPatchCall {
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 *SchemasPatchCall) Context(ctx context.Context) *SchemasPatchCall {
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 *SchemasPatchCall) Header() http.Header {
17791	if c.header_ == nil {
17792		c.header_ = make(http.Header)
17793	}
17794	return c.header_
17795}
17796
17797func (c *SchemasPatchCall) doRequest(alt string) (*http.Response, error) {
17798	reqHeaders := make(http.Header)
17799	for k, v := range c.header_ {
17800		reqHeaders[k] = v
17801	}
17802	reqHeaders.Set("User-Agent", c.s.userAgent())
17803	var body io.Reader = nil
17804	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
17805	if err != nil {
17806		return nil, err
17807	}
17808	reqHeaders.Set("Content-Type", "application/json")
17809	c.urlParams_.Set("alt", alt)
17810	c.urlParams_.Set("prettyPrint", "false")
17811	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}")
17812	urls += "?" + c.urlParams_.Encode()
17813	req, err := http.NewRequest("PATCH", urls, body)
17814	if err != nil {
17815		return nil, err
17816	}
17817	req.Header = reqHeaders
17818	googleapi.Expand(req.URL, map[string]string{
17819		"customerId": c.customerId,
17820		"schemaKey":  c.schemaKey,
17821	})
17822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17823}
17824
17825// Do executes the "directory.schemas.patch" call.
17826// Exactly one of *Schema or error will be non-nil. Any non-2xx status
17827// code is an error. Response headers are in either
17828// *Schema.ServerResponse.Header or (if a response was returned at all)
17829// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17830// check whether the returned error was because http.StatusNotModified
17831// was returned.
17832func (c *SchemasPatchCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
17833	gensupport.SetOptions(c.urlParams_, opts...)
17834	res, err := c.doRequest("json")
17835	if res != nil && res.StatusCode == http.StatusNotModified {
17836		if res.Body != nil {
17837			res.Body.Close()
17838		}
17839		return nil, &googleapi.Error{
17840			Code:   res.StatusCode,
17841			Header: res.Header,
17842		}
17843	}
17844	if err != nil {
17845		return nil, err
17846	}
17847	defer googleapi.CloseBody(res)
17848	if err := googleapi.CheckResponse(res); err != nil {
17849		return nil, err
17850	}
17851	ret := &Schema{
17852		ServerResponse: googleapi.ServerResponse{
17853			Header:         res.Header,
17854			HTTPStatusCode: res.StatusCode,
17855		},
17856	}
17857	target := &ret
17858	if err := gensupport.DecodeResponse(target, res); err != nil {
17859		return nil, err
17860	}
17861	return ret, nil
17862	// {
17863	//   "description": "Update schema. This method supports patch semantics.",
17864	//   "httpMethod": "PATCH",
17865	//   "id": "directory.schemas.patch",
17866	//   "parameterOrder": [
17867	//     "customerId",
17868	//     "schemaKey"
17869	//   ],
17870	//   "parameters": {
17871	//     "customerId": {
17872	//       "description": "Immutable ID of the G Suite account",
17873	//       "location": "path",
17874	//       "required": true,
17875	//       "type": "string"
17876	//     },
17877	//     "schemaKey": {
17878	//       "description": "Name or immutable ID of the schema.",
17879	//       "location": "path",
17880	//       "required": true,
17881	//       "type": "string"
17882	//     }
17883	//   },
17884	//   "path": "customer/{customerId}/schemas/{schemaKey}",
17885	//   "request": {
17886	//     "$ref": "Schema"
17887	//   },
17888	//   "response": {
17889	//     "$ref": "Schema"
17890	//   },
17891	//   "scopes": [
17892	//     "https://www.googleapis.com/auth/admin.directory.userschema"
17893	//   ]
17894	// }
17895
17896}
17897
17898// method id "directory.schemas.update":
17899
17900type SchemasUpdateCall struct {
17901	s          *Service
17902	customerId string
17903	schemaKey  string
17904	schema     *Schema
17905	urlParams_ gensupport.URLParams
17906	ctx_       context.Context
17907	header_    http.Header
17908}
17909
17910// Update: Update schema
17911func (r *SchemasService) Update(customerId string, schemaKey string, schema *Schema) *SchemasUpdateCall {
17912	c := &SchemasUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17913	c.customerId = customerId
17914	c.schemaKey = schemaKey
17915	c.schema = schema
17916	return c
17917}
17918
17919// Fields allows partial responses to be retrieved. See
17920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17921// for more information.
17922func (c *SchemasUpdateCall) Fields(s ...googleapi.Field) *SchemasUpdateCall {
17923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17924	return c
17925}
17926
17927// Context sets the context to be used in this call's Do method. Any
17928// pending HTTP request will be aborted if the provided context is
17929// canceled.
17930func (c *SchemasUpdateCall) Context(ctx context.Context) *SchemasUpdateCall {
17931	c.ctx_ = ctx
17932	return c
17933}
17934
17935// Header returns an http.Header that can be modified by the caller to
17936// add HTTP headers to the request.
17937func (c *SchemasUpdateCall) Header() http.Header {
17938	if c.header_ == nil {
17939		c.header_ = make(http.Header)
17940	}
17941	return c.header_
17942}
17943
17944func (c *SchemasUpdateCall) doRequest(alt string) (*http.Response, error) {
17945	reqHeaders := make(http.Header)
17946	for k, v := range c.header_ {
17947		reqHeaders[k] = v
17948	}
17949	reqHeaders.Set("User-Agent", c.s.userAgent())
17950	var body io.Reader = nil
17951	body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
17952	if err != nil {
17953		return nil, err
17954	}
17955	reqHeaders.Set("Content-Type", "application/json")
17956	c.urlParams_.Set("alt", alt)
17957	c.urlParams_.Set("prettyPrint", "false")
17958	urls := googleapi.ResolveRelative(c.s.BasePath, "customer/{customerId}/schemas/{schemaKey}")
17959	urls += "?" + c.urlParams_.Encode()
17960	req, err := http.NewRequest("PUT", urls, body)
17961	if err != nil {
17962		return nil, err
17963	}
17964	req.Header = reqHeaders
17965	googleapi.Expand(req.URL, map[string]string{
17966		"customerId": c.customerId,
17967		"schemaKey":  c.schemaKey,
17968	})
17969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17970}
17971
17972// Do executes the "directory.schemas.update" call.
17973// Exactly one of *Schema or error will be non-nil. Any non-2xx status
17974// code is an error. Response headers are in either
17975// *Schema.ServerResponse.Header or (if a response was returned at all)
17976// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17977// check whether the returned error was because http.StatusNotModified
17978// was returned.
17979func (c *SchemasUpdateCall) Do(opts ...googleapi.CallOption) (*Schema, error) {
17980	gensupport.SetOptions(c.urlParams_, opts...)
17981	res, err := c.doRequest("json")
17982	if res != nil && res.StatusCode == http.StatusNotModified {
17983		if res.Body != nil {
17984			res.Body.Close()
17985		}
17986		return nil, &googleapi.Error{
17987			Code:   res.StatusCode,
17988			Header: res.Header,
17989		}
17990	}
17991	if err != nil {
17992		return nil, err
17993	}
17994	defer googleapi.CloseBody(res)
17995	if err := googleapi.CheckResponse(res); err != nil {
17996		return nil, err
17997	}
17998	ret := &Schema{
17999		ServerResponse: googleapi.ServerResponse{
18000			Header:         res.Header,
18001			HTTPStatusCode: res.StatusCode,
18002		},
18003	}
18004	target := &ret
18005	if err := gensupport.DecodeResponse(target, res); err != nil {
18006		return nil, err
18007	}
18008	return ret, nil
18009	// {
18010	//   "description": "Update schema",
18011	//   "httpMethod": "PUT",
18012	//   "id": "directory.schemas.update",
18013	//   "parameterOrder": [
18014	//     "customerId",
18015	//     "schemaKey"
18016	//   ],
18017	//   "parameters": {
18018	//     "customerId": {
18019	//       "description": "Immutable ID of the G Suite account",
18020	//       "location": "path",
18021	//       "required": true,
18022	//       "type": "string"
18023	//     },
18024	//     "schemaKey": {
18025	//       "description": "Name or immutable ID of the schema.",
18026	//       "location": "path",
18027	//       "required": true,
18028	//       "type": "string"
18029	//     }
18030	//   },
18031	//   "path": "customer/{customerId}/schemas/{schemaKey}",
18032	//   "request": {
18033	//     "$ref": "Schema"
18034	//   },
18035	//   "response": {
18036	//     "$ref": "Schema"
18037	//   },
18038	//   "scopes": [
18039	//     "https://www.googleapis.com/auth/admin.directory.userschema"
18040	//   ]
18041	// }
18042
18043}
18044
18045// method id "directory.tokens.delete":
18046
18047type TokensDeleteCall struct {
18048	s          *Service
18049	userKey    string
18050	clientId   string
18051	urlParams_ gensupport.URLParams
18052	ctx_       context.Context
18053	header_    http.Header
18054}
18055
18056// Delete: Delete all access tokens issued by a user for an application.
18057func (r *TokensService) Delete(userKey string, clientId string) *TokensDeleteCall {
18058	c := &TokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18059	c.userKey = userKey
18060	c.clientId = clientId
18061	return c
18062}
18063
18064// Fields allows partial responses to be retrieved. See
18065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18066// for more information.
18067func (c *TokensDeleteCall) Fields(s ...googleapi.Field) *TokensDeleteCall {
18068	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18069	return c
18070}
18071
18072// Context sets the context to be used in this call's Do method. Any
18073// pending HTTP request will be aborted if the provided context is
18074// canceled.
18075func (c *TokensDeleteCall) Context(ctx context.Context) *TokensDeleteCall {
18076	c.ctx_ = ctx
18077	return c
18078}
18079
18080// Header returns an http.Header that can be modified by the caller to
18081// add HTTP headers to the request.
18082func (c *TokensDeleteCall) Header() http.Header {
18083	if c.header_ == nil {
18084		c.header_ = make(http.Header)
18085	}
18086	return c.header_
18087}
18088
18089func (c *TokensDeleteCall) doRequest(alt string) (*http.Response, error) {
18090	reqHeaders := make(http.Header)
18091	for k, v := range c.header_ {
18092		reqHeaders[k] = v
18093	}
18094	reqHeaders.Set("User-Agent", c.s.userAgent())
18095	var body io.Reader = nil
18096	c.urlParams_.Set("alt", alt)
18097	c.urlParams_.Set("prettyPrint", "false")
18098	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens/{clientId}")
18099	urls += "?" + c.urlParams_.Encode()
18100	req, err := http.NewRequest("DELETE", urls, body)
18101	if err != nil {
18102		return nil, err
18103	}
18104	req.Header = reqHeaders
18105	googleapi.Expand(req.URL, map[string]string{
18106		"userKey":  c.userKey,
18107		"clientId": c.clientId,
18108	})
18109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18110}
18111
18112// Do executes the "directory.tokens.delete" call.
18113func (c *TokensDeleteCall) Do(opts ...googleapi.CallOption) error {
18114	gensupport.SetOptions(c.urlParams_, opts...)
18115	res, err := c.doRequest("json")
18116	if err != nil {
18117		return err
18118	}
18119	defer googleapi.CloseBody(res)
18120	if err := googleapi.CheckResponse(res); err != nil {
18121		return err
18122	}
18123	return nil
18124	// {
18125	//   "description": "Delete all access tokens issued by a user for an application.",
18126	//   "httpMethod": "DELETE",
18127	//   "id": "directory.tokens.delete",
18128	//   "parameterOrder": [
18129	//     "userKey",
18130	//     "clientId"
18131	//   ],
18132	//   "parameters": {
18133	//     "clientId": {
18134	//       "description": "The Client ID of the application the token is issued to.",
18135	//       "location": "path",
18136	//       "required": true,
18137	//       "type": "string"
18138	//     },
18139	//     "userKey": {
18140	//       "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.",
18141	//       "location": "path",
18142	//       "required": true,
18143	//       "type": "string"
18144	//     }
18145	//   },
18146	//   "path": "users/{userKey}/tokens/{clientId}",
18147	//   "scopes": [
18148	//     "https://www.googleapis.com/auth/admin.directory.user.security"
18149	//   ]
18150	// }
18151
18152}
18153
18154// method id "directory.tokens.get":
18155
18156type TokensGetCall struct {
18157	s            *Service
18158	userKey      string
18159	clientId     string
18160	urlParams_   gensupport.URLParams
18161	ifNoneMatch_ string
18162	ctx_         context.Context
18163	header_      http.Header
18164}
18165
18166// Get: Get information about an access token issued by a user.
18167func (r *TokensService) Get(userKey string, clientId string) *TokensGetCall {
18168	c := &TokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18169	c.userKey = userKey
18170	c.clientId = clientId
18171	return c
18172}
18173
18174// Fields allows partial responses to be retrieved. See
18175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18176// for more information.
18177func (c *TokensGetCall) Fields(s ...googleapi.Field) *TokensGetCall {
18178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18179	return c
18180}
18181
18182// IfNoneMatch sets the optional parameter which makes the operation
18183// fail if the object's ETag matches the given value. This is useful for
18184// getting updates only after the object has changed since the last
18185// request. Use googleapi.IsNotModified to check whether the response
18186// error from Do is the result of In-None-Match.
18187func (c *TokensGetCall) IfNoneMatch(entityTag string) *TokensGetCall {
18188	c.ifNoneMatch_ = entityTag
18189	return c
18190}
18191
18192// Context sets the context to be used in this call's Do method. Any
18193// pending HTTP request will be aborted if the provided context is
18194// canceled.
18195func (c *TokensGetCall) Context(ctx context.Context) *TokensGetCall {
18196	c.ctx_ = ctx
18197	return c
18198}
18199
18200// Header returns an http.Header that can be modified by the caller to
18201// add HTTP headers to the request.
18202func (c *TokensGetCall) Header() http.Header {
18203	if c.header_ == nil {
18204		c.header_ = make(http.Header)
18205	}
18206	return c.header_
18207}
18208
18209func (c *TokensGetCall) doRequest(alt string) (*http.Response, error) {
18210	reqHeaders := make(http.Header)
18211	for k, v := range c.header_ {
18212		reqHeaders[k] = v
18213	}
18214	reqHeaders.Set("User-Agent", c.s.userAgent())
18215	if c.ifNoneMatch_ != "" {
18216		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18217	}
18218	var body io.Reader = nil
18219	c.urlParams_.Set("alt", alt)
18220	c.urlParams_.Set("prettyPrint", "false")
18221	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens/{clientId}")
18222	urls += "?" + c.urlParams_.Encode()
18223	req, err := http.NewRequest("GET", urls, body)
18224	if err != nil {
18225		return nil, err
18226	}
18227	req.Header = reqHeaders
18228	googleapi.Expand(req.URL, map[string]string{
18229		"userKey":  c.userKey,
18230		"clientId": c.clientId,
18231	})
18232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18233}
18234
18235// Do executes the "directory.tokens.get" call.
18236// Exactly one of *Token or error will be non-nil. Any non-2xx status
18237// code is an error. Response headers are in either
18238// *Token.ServerResponse.Header or (if a response was returned at all)
18239// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18240// check whether the returned error was because http.StatusNotModified
18241// was returned.
18242func (c *TokensGetCall) Do(opts ...googleapi.CallOption) (*Token, error) {
18243	gensupport.SetOptions(c.urlParams_, opts...)
18244	res, err := c.doRequest("json")
18245	if res != nil && res.StatusCode == http.StatusNotModified {
18246		if res.Body != nil {
18247			res.Body.Close()
18248		}
18249		return nil, &googleapi.Error{
18250			Code:   res.StatusCode,
18251			Header: res.Header,
18252		}
18253	}
18254	if err != nil {
18255		return nil, err
18256	}
18257	defer googleapi.CloseBody(res)
18258	if err := googleapi.CheckResponse(res); err != nil {
18259		return nil, err
18260	}
18261	ret := &Token{
18262		ServerResponse: googleapi.ServerResponse{
18263			Header:         res.Header,
18264			HTTPStatusCode: res.StatusCode,
18265		},
18266	}
18267	target := &ret
18268	if err := gensupport.DecodeResponse(target, res); err != nil {
18269		return nil, err
18270	}
18271	return ret, nil
18272	// {
18273	//   "description": "Get information about an access token issued by a user.",
18274	//   "httpMethod": "GET",
18275	//   "id": "directory.tokens.get",
18276	//   "parameterOrder": [
18277	//     "userKey",
18278	//     "clientId"
18279	//   ],
18280	//   "parameters": {
18281	//     "clientId": {
18282	//       "description": "The Client ID of the application the token is issued to.",
18283	//       "location": "path",
18284	//       "required": true,
18285	//       "type": "string"
18286	//     },
18287	//     "userKey": {
18288	//       "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.",
18289	//       "location": "path",
18290	//       "required": true,
18291	//       "type": "string"
18292	//     }
18293	//   },
18294	//   "path": "users/{userKey}/tokens/{clientId}",
18295	//   "response": {
18296	//     "$ref": "Token"
18297	//   },
18298	//   "scopes": [
18299	//     "https://www.googleapis.com/auth/admin.directory.user.security"
18300	//   ]
18301	// }
18302
18303}
18304
18305// method id "directory.tokens.list":
18306
18307type TokensListCall struct {
18308	s            *Service
18309	userKey      string
18310	urlParams_   gensupport.URLParams
18311	ifNoneMatch_ string
18312	ctx_         context.Context
18313	header_      http.Header
18314}
18315
18316// List: Returns the set of tokens specified user has issued to 3rd
18317// party applications.
18318func (r *TokensService) List(userKey string) *TokensListCall {
18319	c := &TokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18320	c.userKey = userKey
18321	return c
18322}
18323
18324// Fields allows partial responses to be retrieved. See
18325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18326// for more information.
18327func (c *TokensListCall) Fields(s ...googleapi.Field) *TokensListCall {
18328	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18329	return c
18330}
18331
18332// IfNoneMatch sets the optional parameter which makes the operation
18333// fail if the object's ETag matches the given value. This is useful for
18334// getting updates only after the object has changed since the last
18335// request. Use googleapi.IsNotModified to check whether the response
18336// error from Do is the result of In-None-Match.
18337func (c *TokensListCall) IfNoneMatch(entityTag string) *TokensListCall {
18338	c.ifNoneMatch_ = entityTag
18339	return c
18340}
18341
18342// Context sets the context to be used in this call's Do method. Any
18343// pending HTTP request will be aborted if the provided context is
18344// canceled.
18345func (c *TokensListCall) Context(ctx context.Context) *TokensListCall {
18346	c.ctx_ = ctx
18347	return c
18348}
18349
18350// Header returns an http.Header that can be modified by the caller to
18351// add HTTP headers to the request.
18352func (c *TokensListCall) Header() http.Header {
18353	if c.header_ == nil {
18354		c.header_ = make(http.Header)
18355	}
18356	return c.header_
18357}
18358
18359func (c *TokensListCall) doRequest(alt string) (*http.Response, error) {
18360	reqHeaders := make(http.Header)
18361	for k, v := range c.header_ {
18362		reqHeaders[k] = v
18363	}
18364	reqHeaders.Set("User-Agent", c.s.userAgent())
18365	if c.ifNoneMatch_ != "" {
18366		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18367	}
18368	var body io.Reader = nil
18369	c.urlParams_.Set("alt", alt)
18370	c.urlParams_.Set("prettyPrint", "false")
18371	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/tokens")
18372	urls += "?" + c.urlParams_.Encode()
18373	req, err := http.NewRequest("GET", urls, body)
18374	if err != nil {
18375		return nil, err
18376	}
18377	req.Header = reqHeaders
18378	googleapi.Expand(req.URL, map[string]string{
18379		"userKey": c.userKey,
18380	})
18381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18382}
18383
18384// Do executes the "directory.tokens.list" call.
18385// Exactly one of *Tokens or error will be non-nil. Any non-2xx status
18386// code is an error. Response headers are in either
18387// *Tokens.ServerResponse.Header or (if a response was returned at all)
18388// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18389// check whether the returned error was because http.StatusNotModified
18390// was returned.
18391func (c *TokensListCall) Do(opts ...googleapi.CallOption) (*Tokens, error) {
18392	gensupport.SetOptions(c.urlParams_, opts...)
18393	res, err := c.doRequest("json")
18394	if res != nil && res.StatusCode == http.StatusNotModified {
18395		if res.Body != nil {
18396			res.Body.Close()
18397		}
18398		return nil, &googleapi.Error{
18399			Code:   res.StatusCode,
18400			Header: res.Header,
18401		}
18402	}
18403	if err != nil {
18404		return nil, err
18405	}
18406	defer googleapi.CloseBody(res)
18407	if err := googleapi.CheckResponse(res); err != nil {
18408		return nil, err
18409	}
18410	ret := &Tokens{
18411		ServerResponse: googleapi.ServerResponse{
18412			Header:         res.Header,
18413			HTTPStatusCode: res.StatusCode,
18414		},
18415	}
18416	target := &ret
18417	if err := gensupport.DecodeResponse(target, res); err != nil {
18418		return nil, err
18419	}
18420	return ret, nil
18421	// {
18422	//   "description": "Returns the set of tokens specified user has issued to 3rd party applications.",
18423	//   "httpMethod": "GET",
18424	//   "id": "directory.tokens.list",
18425	//   "parameterOrder": [
18426	//     "userKey"
18427	//   ],
18428	//   "parameters": {
18429	//     "userKey": {
18430	//       "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.",
18431	//       "location": "path",
18432	//       "required": true,
18433	//       "type": "string"
18434	//     }
18435	//   },
18436	//   "path": "users/{userKey}/tokens",
18437	//   "response": {
18438	//     "$ref": "Tokens"
18439	//   },
18440	//   "scopes": [
18441	//     "https://www.googleapis.com/auth/admin.directory.user.security"
18442	//   ]
18443	// }
18444
18445}
18446
18447// method id "directory.users.delete":
18448
18449type UsersDeleteCall struct {
18450	s          *Service
18451	userKey    string
18452	urlParams_ gensupport.URLParams
18453	ctx_       context.Context
18454	header_    http.Header
18455}
18456
18457// Delete: Delete user
18458func (r *UsersService) Delete(userKey string) *UsersDeleteCall {
18459	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18460	c.userKey = userKey
18461	return c
18462}
18463
18464// Fields allows partial responses to be retrieved. See
18465// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18466// for more information.
18467func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
18468	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18469	return c
18470}
18471
18472// Context sets the context to be used in this call's Do method. Any
18473// pending HTTP request will be aborted if the provided context is
18474// canceled.
18475func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
18476	c.ctx_ = ctx
18477	return c
18478}
18479
18480// Header returns an http.Header that can be modified by the caller to
18481// add HTTP headers to the request.
18482func (c *UsersDeleteCall) Header() http.Header {
18483	if c.header_ == nil {
18484		c.header_ = make(http.Header)
18485	}
18486	return c.header_
18487}
18488
18489func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
18490	reqHeaders := make(http.Header)
18491	for k, v := range c.header_ {
18492		reqHeaders[k] = v
18493	}
18494	reqHeaders.Set("User-Agent", c.s.userAgent())
18495	var body io.Reader = nil
18496	c.urlParams_.Set("alt", alt)
18497	c.urlParams_.Set("prettyPrint", "false")
18498	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}")
18499	urls += "?" + c.urlParams_.Encode()
18500	req, err := http.NewRequest("DELETE", urls, body)
18501	if err != nil {
18502		return nil, err
18503	}
18504	req.Header = reqHeaders
18505	googleapi.Expand(req.URL, map[string]string{
18506		"userKey": c.userKey,
18507	})
18508	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18509}
18510
18511// Do executes the "directory.users.delete" call.
18512func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) error {
18513	gensupport.SetOptions(c.urlParams_, opts...)
18514	res, err := c.doRequest("json")
18515	if err != nil {
18516		return err
18517	}
18518	defer googleapi.CloseBody(res)
18519	if err := googleapi.CheckResponse(res); err != nil {
18520		return err
18521	}
18522	return nil
18523	// {
18524	//   "description": "Delete user",
18525	//   "httpMethod": "DELETE",
18526	//   "id": "directory.users.delete",
18527	//   "parameterOrder": [
18528	//     "userKey"
18529	//   ],
18530	//   "parameters": {
18531	//     "userKey": {
18532	//       "description": "Email or immutable ID of the user",
18533	//       "location": "path",
18534	//       "required": true,
18535	//       "type": "string"
18536	//     }
18537	//   },
18538	//   "path": "users/{userKey}",
18539	//   "scopes": [
18540	//     "https://www.googleapis.com/auth/admin.directory.user"
18541	//   ]
18542	// }
18543
18544}
18545
18546// method id "directory.users.get":
18547
18548type UsersGetCall struct {
18549	s            *Service
18550	userKey      string
18551	urlParams_   gensupport.URLParams
18552	ifNoneMatch_ string
18553	ctx_         context.Context
18554	header_      http.Header
18555}
18556
18557// Get: retrieve user
18558func (r *UsersService) Get(userKey string) *UsersGetCall {
18559	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18560	c.userKey = userKey
18561	return c
18562}
18563
18564// CustomFieldMask sets the optional parameter "customFieldMask":
18565// Comma-separated list of schema names. All fields from these schemas
18566// are fetched. This should only be set when projection=custom.
18567func (c *UsersGetCall) CustomFieldMask(customFieldMask string) *UsersGetCall {
18568	c.urlParams_.Set("customFieldMask", customFieldMask)
18569	return c
18570}
18571
18572// Projection sets the optional parameter "projection": What subset of
18573// fields to fetch for this user.
18574//
18575// Possible values:
18576//   "basic" (default) - Do not include any custom fields for the user.
18577//   "custom" - Include custom fields from schemas mentioned in
18578// customFieldMask.
18579//   "full" - Include all fields associated with this user.
18580func (c *UsersGetCall) Projection(projection string) *UsersGetCall {
18581	c.urlParams_.Set("projection", projection)
18582	return c
18583}
18584
18585// ViewType sets the optional parameter "viewType": Whether to fetch the
18586// ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
18587//
18588// Possible values:
18589//   "admin_view" (default) - Fetches the ADMIN_VIEW of the user.
18590//   "domain_public" - Fetches the DOMAIN_PUBLIC view of the user.
18591func (c *UsersGetCall) ViewType(viewType string) *UsersGetCall {
18592	c.urlParams_.Set("viewType", viewType)
18593	return c
18594}
18595
18596// Fields allows partial responses to be retrieved. See
18597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18598// for more information.
18599func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
18600	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18601	return c
18602}
18603
18604// IfNoneMatch sets the optional parameter which makes the operation
18605// fail if the object's ETag matches the given value. This is useful for
18606// getting updates only after the object has changed since the last
18607// request. Use googleapi.IsNotModified to check whether the response
18608// error from Do is the result of In-None-Match.
18609func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
18610	c.ifNoneMatch_ = entityTag
18611	return c
18612}
18613
18614// Context sets the context to be used in this call's Do method. Any
18615// pending HTTP request will be aborted if the provided context is
18616// canceled.
18617func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
18618	c.ctx_ = ctx
18619	return c
18620}
18621
18622// Header returns an http.Header that can be modified by the caller to
18623// add HTTP headers to the request.
18624func (c *UsersGetCall) Header() http.Header {
18625	if c.header_ == nil {
18626		c.header_ = make(http.Header)
18627	}
18628	return c.header_
18629}
18630
18631func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
18632	reqHeaders := make(http.Header)
18633	for k, v := range c.header_ {
18634		reqHeaders[k] = v
18635	}
18636	reqHeaders.Set("User-Agent", c.s.userAgent())
18637	if c.ifNoneMatch_ != "" {
18638		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18639	}
18640	var body io.Reader = nil
18641	c.urlParams_.Set("alt", alt)
18642	c.urlParams_.Set("prettyPrint", "false")
18643	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}")
18644	urls += "?" + c.urlParams_.Encode()
18645	req, err := http.NewRequest("GET", urls, body)
18646	if err != nil {
18647		return nil, err
18648	}
18649	req.Header = reqHeaders
18650	googleapi.Expand(req.URL, map[string]string{
18651		"userKey": c.userKey,
18652	})
18653	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18654}
18655
18656// Do executes the "directory.users.get" call.
18657// Exactly one of *User or error will be non-nil. Any non-2xx status
18658// code is an error. Response headers are in either
18659// *User.ServerResponse.Header or (if a response was returned at all) in
18660// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18661// whether the returned error was because http.StatusNotModified was
18662// returned.
18663func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
18664	gensupport.SetOptions(c.urlParams_, opts...)
18665	res, err := c.doRequest("json")
18666	if res != nil && res.StatusCode == http.StatusNotModified {
18667		if res.Body != nil {
18668			res.Body.Close()
18669		}
18670		return nil, &googleapi.Error{
18671			Code:   res.StatusCode,
18672			Header: res.Header,
18673		}
18674	}
18675	if err != nil {
18676		return nil, err
18677	}
18678	defer googleapi.CloseBody(res)
18679	if err := googleapi.CheckResponse(res); err != nil {
18680		return nil, err
18681	}
18682	ret := &User{
18683		ServerResponse: googleapi.ServerResponse{
18684			Header:         res.Header,
18685			HTTPStatusCode: res.StatusCode,
18686		},
18687	}
18688	target := &ret
18689	if err := gensupport.DecodeResponse(target, res); err != nil {
18690		return nil, err
18691	}
18692	return ret, nil
18693	// {
18694	//   "description": "retrieve user",
18695	//   "httpMethod": "GET",
18696	//   "id": "directory.users.get",
18697	//   "parameterOrder": [
18698	//     "userKey"
18699	//   ],
18700	//   "parameters": {
18701	//     "customFieldMask": {
18702	//       "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.",
18703	//       "location": "query",
18704	//       "type": "string"
18705	//     },
18706	//     "projection": {
18707	//       "default": "basic",
18708	//       "description": "What subset of fields to fetch for this user.",
18709	//       "enum": [
18710	//         "basic",
18711	//         "custom",
18712	//         "full"
18713	//       ],
18714	//       "enumDescriptions": [
18715	//         "Do not include any custom fields for the user.",
18716	//         "Include custom fields from schemas mentioned in customFieldMask.",
18717	//         "Include all fields associated with this user."
18718	//       ],
18719	//       "location": "query",
18720	//       "type": "string"
18721	//     },
18722	//     "userKey": {
18723	//       "description": "Email or immutable ID of the user",
18724	//       "location": "path",
18725	//       "required": true,
18726	//       "type": "string"
18727	//     },
18728	//     "viewType": {
18729	//       "default": "admin_view",
18730	//       "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.",
18731	//       "enum": [
18732	//         "admin_view",
18733	//         "domain_public"
18734	//       ],
18735	//       "enumDescriptions": [
18736	//         "Fetches the ADMIN_VIEW of the user.",
18737	//         "Fetches the DOMAIN_PUBLIC view of the user."
18738	//       ],
18739	//       "location": "query",
18740	//       "type": "string"
18741	//     }
18742	//   },
18743	//   "path": "users/{userKey}",
18744	//   "response": {
18745	//     "$ref": "User"
18746	//   },
18747	//   "scopes": [
18748	//     "https://www.googleapis.com/auth/admin.directory.user",
18749	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
18750	//   ]
18751	// }
18752
18753}
18754
18755// method id "directory.users.insert":
18756
18757type UsersInsertCall struct {
18758	s          *Service
18759	user       *User
18760	urlParams_ gensupport.URLParams
18761	ctx_       context.Context
18762	header_    http.Header
18763}
18764
18765// Insert: create user.
18766func (r *UsersService) Insert(user *User) *UsersInsertCall {
18767	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18768	c.user = user
18769	return c
18770}
18771
18772// Fields allows partial responses to be retrieved. See
18773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18774// for more information.
18775func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
18776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18777	return c
18778}
18779
18780// Context sets the context to be used in this call's Do method. Any
18781// pending HTTP request will be aborted if the provided context is
18782// canceled.
18783func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
18784	c.ctx_ = ctx
18785	return c
18786}
18787
18788// Header returns an http.Header that can be modified by the caller to
18789// add HTTP headers to the request.
18790func (c *UsersInsertCall) Header() http.Header {
18791	if c.header_ == nil {
18792		c.header_ = make(http.Header)
18793	}
18794	return c.header_
18795}
18796
18797func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
18798	reqHeaders := make(http.Header)
18799	for k, v := range c.header_ {
18800		reqHeaders[k] = v
18801	}
18802	reqHeaders.Set("User-Agent", c.s.userAgent())
18803	var body io.Reader = nil
18804	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
18805	if err != nil {
18806		return nil, err
18807	}
18808	reqHeaders.Set("Content-Type", "application/json")
18809	c.urlParams_.Set("alt", alt)
18810	c.urlParams_.Set("prettyPrint", "false")
18811	urls := googleapi.ResolveRelative(c.s.BasePath, "users")
18812	urls += "?" + c.urlParams_.Encode()
18813	req, err := http.NewRequest("POST", urls, body)
18814	if err != nil {
18815		return nil, err
18816	}
18817	req.Header = reqHeaders
18818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18819}
18820
18821// Do executes the "directory.users.insert" call.
18822// Exactly one of *User or error will be non-nil. Any non-2xx status
18823// code is an error. Response headers are in either
18824// *User.ServerResponse.Header or (if a response was returned at all) in
18825// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
18826// whether the returned error was because http.StatusNotModified was
18827// returned.
18828func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*User, error) {
18829	gensupport.SetOptions(c.urlParams_, opts...)
18830	res, err := c.doRequest("json")
18831	if res != nil && res.StatusCode == http.StatusNotModified {
18832		if res.Body != nil {
18833			res.Body.Close()
18834		}
18835		return nil, &googleapi.Error{
18836			Code:   res.StatusCode,
18837			Header: res.Header,
18838		}
18839	}
18840	if err != nil {
18841		return nil, err
18842	}
18843	defer googleapi.CloseBody(res)
18844	if err := googleapi.CheckResponse(res); err != nil {
18845		return nil, err
18846	}
18847	ret := &User{
18848		ServerResponse: googleapi.ServerResponse{
18849			Header:         res.Header,
18850			HTTPStatusCode: res.StatusCode,
18851		},
18852	}
18853	target := &ret
18854	if err := gensupport.DecodeResponse(target, res); err != nil {
18855		return nil, err
18856	}
18857	return ret, nil
18858	// {
18859	//   "description": "create user.",
18860	//   "httpMethod": "POST",
18861	//   "id": "directory.users.insert",
18862	//   "path": "users",
18863	//   "request": {
18864	//     "$ref": "User"
18865	//   },
18866	//   "response": {
18867	//     "$ref": "User"
18868	//   },
18869	//   "scopes": [
18870	//     "https://www.googleapis.com/auth/admin.directory.user"
18871	//   ]
18872	// }
18873
18874}
18875
18876// method id "directory.users.list":
18877
18878type UsersListCall struct {
18879	s            *Service
18880	urlParams_   gensupport.URLParams
18881	ifNoneMatch_ string
18882	ctx_         context.Context
18883	header_      http.Header
18884}
18885
18886// List: Retrieve either deleted users or all users in a domain
18887// (paginated)
18888func (r *UsersService) List() *UsersListCall {
18889	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18890	return c
18891}
18892
18893// CustomFieldMask sets the optional parameter "customFieldMask":
18894// Comma-separated list of schema names. All fields from these schemas
18895// are fetched. This should only be set when projection=custom.
18896func (c *UsersListCall) CustomFieldMask(customFieldMask string) *UsersListCall {
18897	c.urlParams_.Set("customFieldMask", customFieldMask)
18898	return c
18899}
18900
18901// Customer sets the optional parameter "customer": Immutable ID of the
18902// G Suite account. In case of multi-domain, to fetch all users for a
18903// customer, fill this field instead of domain.
18904func (c *UsersListCall) Customer(customer string) *UsersListCall {
18905	c.urlParams_.Set("customer", customer)
18906	return c
18907}
18908
18909// Domain sets the optional parameter "domain": Name of the domain. Fill
18910// this field to get users from only this domain. To return all users in
18911// a multi-domain fill customer field instead.
18912func (c *UsersListCall) Domain(domain string) *UsersListCall {
18913	c.urlParams_.Set("domain", domain)
18914	return c
18915}
18916
18917// Event sets the optional parameter "event": Event on which
18918// subscription is intended (if subscribing)
18919//
18920// Possible values:
18921//   "add" - User Created Event
18922//   "delete" - User Deleted Event
18923//   "makeAdmin" - User Admin Status Change Event
18924//   "undelete" - User Undeleted Event
18925//   "update" - User Updated Event
18926func (c *UsersListCall) Event(event string) *UsersListCall {
18927	c.urlParams_.Set("event", event)
18928	return c
18929}
18930
18931// MaxResults sets the optional parameter "maxResults": Maximum number
18932// of results to return. Default is 100. Max allowed is 500
18933func (c *UsersListCall) MaxResults(maxResults int64) *UsersListCall {
18934	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18935	return c
18936}
18937
18938// OrderBy sets the optional parameter "orderBy": Column to use for
18939// sorting results
18940//
18941// Possible values:
18942//   "email" - Primary email of the user.
18943//   "familyName" - User's family name.
18944//   "givenName" - User's given name.
18945func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall {
18946	c.urlParams_.Set("orderBy", orderBy)
18947	return c
18948}
18949
18950// PageToken sets the optional parameter "pageToken": Token to specify
18951// next page in the list
18952func (c *UsersListCall) PageToken(pageToken string) *UsersListCall {
18953	c.urlParams_.Set("pageToken", pageToken)
18954	return c
18955}
18956
18957// Projection sets the optional parameter "projection": What subset of
18958// fields to fetch for this user.
18959//
18960// Possible values:
18961//   "basic" (default) - Do not include any custom fields for the user.
18962//   "custom" - Include custom fields from schemas mentioned in
18963// customFieldMask.
18964//   "full" - Include all fields associated with this user.
18965func (c *UsersListCall) Projection(projection string) *UsersListCall {
18966	c.urlParams_.Set("projection", projection)
18967	return c
18968}
18969
18970// Query sets the optional parameter "query": Query string search.
18971// Should be of the form "". Complete documentation is at
18972// https://developers.google.com/admin-sdk/directory/v1/guides/search-users
18973func (c *UsersListCall) Query(query string) *UsersListCall {
18974	c.urlParams_.Set("query", query)
18975	return c
18976}
18977
18978// ShowDeleted sets the optional parameter "showDeleted": If set to true
18979// retrieves the list of deleted users. Default is false
18980func (c *UsersListCall) ShowDeleted(showDeleted string) *UsersListCall {
18981	c.urlParams_.Set("showDeleted", showDeleted)
18982	return c
18983}
18984
18985// SortOrder sets the optional parameter "sortOrder": Whether to return
18986// results in ascending or descending order.
18987//
18988// Possible values:
18989//   "ASCENDING" - Ascending order.
18990//   "DESCENDING" - Descending order.
18991func (c *UsersListCall) SortOrder(sortOrder string) *UsersListCall {
18992	c.urlParams_.Set("sortOrder", sortOrder)
18993	return c
18994}
18995
18996// ViewType sets the optional parameter "viewType": Whether to fetch the
18997// ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
18998//
18999// Possible values:
19000//   "admin_view" (default) - Fetches the ADMIN_VIEW of the user.
19001//   "domain_public" - Fetches the DOMAIN_PUBLIC view of the user.
19002func (c *UsersListCall) ViewType(viewType string) *UsersListCall {
19003	c.urlParams_.Set("viewType", viewType)
19004	return c
19005}
19006
19007// Fields allows partial responses to be retrieved. See
19008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19009// for more information.
19010func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
19011	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19012	return c
19013}
19014
19015// IfNoneMatch sets the optional parameter which makes the operation
19016// fail if the object's ETag matches the given value. This is useful for
19017// getting updates only after the object has changed since the last
19018// request. Use googleapi.IsNotModified to check whether the response
19019// error from Do is the result of In-None-Match.
19020func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
19021	c.ifNoneMatch_ = entityTag
19022	return c
19023}
19024
19025// Context sets the context to be used in this call's Do method. Any
19026// pending HTTP request will be aborted if the provided context is
19027// canceled.
19028func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
19029	c.ctx_ = ctx
19030	return c
19031}
19032
19033// Header returns an http.Header that can be modified by the caller to
19034// add HTTP headers to the request.
19035func (c *UsersListCall) Header() http.Header {
19036	if c.header_ == nil {
19037		c.header_ = make(http.Header)
19038	}
19039	return c.header_
19040}
19041
19042func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
19043	reqHeaders := make(http.Header)
19044	for k, v := range c.header_ {
19045		reqHeaders[k] = v
19046	}
19047	reqHeaders.Set("User-Agent", c.s.userAgent())
19048	if c.ifNoneMatch_ != "" {
19049		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19050	}
19051	var body io.Reader = nil
19052	c.urlParams_.Set("alt", alt)
19053	c.urlParams_.Set("prettyPrint", "false")
19054	urls := googleapi.ResolveRelative(c.s.BasePath, "users")
19055	urls += "?" + c.urlParams_.Encode()
19056	req, err := http.NewRequest("GET", urls, body)
19057	if err != nil {
19058		return nil, err
19059	}
19060	req.Header = reqHeaders
19061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19062}
19063
19064// Do executes the "directory.users.list" call.
19065// Exactly one of *Users or error will be non-nil. Any non-2xx status
19066// code is an error. Response headers are in either
19067// *Users.ServerResponse.Header or (if a response was returned at all)
19068// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19069// check whether the returned error was because http.StatusNotModified
19070// was returned.
19071func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*Users, error) {
19072	gensupport.SetOptions(c.urlParams_, opts...)
19073	res, err := c.doRequest("json")
19074	if res != nil && res.StatusCode == http.StatusNotModified {
19075		if res.Body != nil {
19076			res.Body.Close()
19077		}
19078		return nil, &googleapi.Error{
19079			Code:   res.StatusCode,
19080			Header: res.Header,
19081		}
19082	}
19083	if err != nil {
19084		return nil, err
19085	}
19086	defer googleapi.CloseBody(res)
19087	if err := googleapi.CheckResponse(res); err != nil {
19088		return nil, err
19089	}
19090	ret := &Users{
19091		ServerResponse: googleapi.ServerResponse{
19092			Header:         res.Header,
19093			HTTPStatusCode: res.StatusCode,
19094		},
19095	}
19096	target := &ret
19097	if err := gensupport.DecodeResponse(target, res); err != nil {
19098		return nil, err
19099	}
19100	return ret, nil
19101	// {
19102	//   "description": "Retrieve either deleted users or all users in a domain (paginated)",
19103	//   "httpMethod": "GET",
19104	//   "id": "directory.users.list",
19105	//   "parameters": {
19106	//     "customFieldMask": {
19107	//       "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.",
19108	//       "location": "query",
19109	//       "type": "string"
19110	//     },
19111	//     "customer": {
19112	//       "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.",
19113	//       "location": "query",
19114	//       "type": "string"
19115	//     },
19116	//     "domain": {
19117	//       "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.",
19118	//       "location": "query",
19119	//       "type": "string"
19120	//     },
19121	//     "event": {
19122	//       "description": "Event on which subscription is intended (if subscribing)",
19123	//       "enum": [
19124	//         "add",
19125	//         "delete",
19126	//         "makeAdmin",
19127	//         "undelete",
19128	//         "update"
19129	//       ],
19130	//       "enumDescriptions": [
19131	//         "User Created Event",
19132	//         "User Deleted Event",
19133	//         "User Admin Status Change Event",
19134	//         "User Undeleted Event",
19135	//         "User Updated Event"
19136	//       ],
19137	//       "location": "query",
19138	//       "type": "string"
19139	//     },
19140	//     "maxResults": {
19141	//       "description": "Maximum number of results to return. Default is 100. Max allowed is 500",
19142	//       "format": "int32",
19143	//       "location": "query",
19144	//       "maximum": "500",
19145	//       "minimum": "1",
19146	//       "type": "integer"
19147	//     },
19148	//     "orderBy": {
19149	//       "description": "Column to use for sorting results",
19150	//       "enum": [
19151	//         "email",
19152	//         "familyName",
19153	//         "givenName"
19154	//       ],
19155	//       "enumDescriptions": [
19156	//         "Primary email of the user.",
19157	//         "User's family name.",
19158	//         "User's given name."
19159	//       ],
19160	//       "location": "query",
19161	//       "type": "string"
19162	//     },
19163	//     "pageToken": {
19164	//       "description": "Token to specify next page in the list",
19165	//       "location": "query",
19166	//       "type": "string"
19167	//     },
19168	//     "projection": {
19169	//       "default": "basic",
19170	//       "description": "What subset of fields to fetch for this user.",
19171	//       "enum": [
19172	//         "basic",
19173	//         "custom",
19174	//         "full"
19175	//       ],
19176	//       "enumDescriptions": [
19177	//         "Do not include any custom fields for the user.",
19178	//         "Include custom fields from schemas mentioned in customFieldMask.",
19179	//         "Include all fields associated with this user."
19180	//       ],
19181	//       "location": "query",
19182	//       "type": "string"
19183	//     },
19184	//     "query": {
19185	//       "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users",
19186	//       "location": "query",
19187	//       "type": "string"
19188	//     },
19189	//     "showDeleted": {
19190	//       "description": "If set to true retrieves the list of deleted users. Default is false",
19191	//       "location": "query",
19192	//       "type": "string"
19193	//     },
19194	//     "sortOrder": {
19195	//       "description": "Whether to return results in ascending or descending order.",
19196	//       "enum": [
19197	//         "ASCENDING",
19198	//         "DESCENDING"
19199	//       ],
19200	//       "enumDescriptions": [
19201	//         "Ascending order.",
19202	//         "Descending order."
19203	//       ],
19204	//       "location": "query",
19205	//       "type": "string"
19206	//     },
19207	//     "viewType": {
19208	//       "default": "admin_view",
19209	//       "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.",
19210	//       "enum": [
19211	//         "admin_view",
19212	//         "domain_public"
19213	//       ],
19214	//       "enumDescriptions": [
19215	//         "Fetches the ADMIN_VIEW of the user.",
19216	//         "Fetches the DOMAIN_PUBLIC view of the user."
19217	//       ],
19218	//       "location": "query",
19219	//       "type": "string"
19220	//     }
19221	//   },
19222	//   "path": "users",
19223	//   "response": {
19224	//     "$ref": "Users"
19225	//   },
19226	//   "scopes": [
19227	//     "https://www.googleapis.com/auth/admin.directory.user",
19228	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
19229	//   ],
19230	//   "supportsSubscription": true
19231	// }
19232
19233}
19234
19235// Pages invokes f for each page of results.
19236// A non-nil error returned from f will halt the iteration.
19237// The provided context supersedes any context provided to the Context method.
19238func (c *UsersListCall) Pages(ctx context.Context, f func(*Users) error) error {
19239	c.ctx_ = ctx
19240	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19241	for {
19242		x, err := c.Do()
19243		if err != nil {
19244			return err
19245		}
19246		if err := f(x); err != nil {
19247			return err
19248		}
19249		if x.NextPageToken == "" {
19250			return nil
19251		}
19252		c.PageToken(x.NextPageToken)
19253	}
19254}
19255
19256// method id "directory.users.makeAdmin":
19257
19258type UsersMakeAdminCall struct {
19259	s             *Service
19260	userKey       string
19261	usermakeadmin *UserMakeAdmin
19262	urlParams_    gensupport.URLParams
19263	ctx_          context.Context
19264	header_       http.Header
19265}
19266
19267// MakeAdmin: change admin status of a user
19268func (r *UsersService) MakeAdmin(userKey string, usermakeadmin *UserMakeAdmin) *UsersMakeAdminCall {
19269	c := &UsersMakeAdminCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19270	c.userKey = userKey
19271	c.usermakeadmin = usermakeadmin
19272	return c
19273}
19274
19275// Fields allows partial responses to be retrieved. See
19276// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19277// for more information.
19278func (c *UsersMakeAdminCall) Fields(s ...googleapi.Field) *UsersMakeAdminCall {
19279	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19280	return c
19281}
19282
19283// Context sets the context to be used in this call's Do method. Any
19284// pending HTTP request will be aborted if the provided context is
19285// canceled.
19286func (c *UsersMakeAdminCall) Context(ctx context.Context) *UsersMakeAdminCall {
19287	c.ctx_ = ctx
19288	return c
19289}
19290
19291// Header returns an http.Header that can be modified by the caller to
19292// add HTTP headers to the request.
19293func (c *UsersMakeAdminCall) Header() http.Header {
19294	if c.header_ == nil {
19295		c.header_ = make(http.Header)
19296	}
19297	return c.header_
19298}
19299
19300func (c *UsersMakeAdminCall) doRequest(alt string) (*http.Response, error) {
19301	reqHeaders := make(http.Header)
19302	for k, v := range c.header_ {
19303		reqHeaders[k] = v
19304	}
19305	reqHeaders.Set("User-Agent", c.s.userAgent())
19306	var body io.Reader = nil
19307	body, err := googleapi.WithoutDataWrapper.JSONReader(c.usermakeadmin)
19308	if err != nil {
19309		return nil, err
19310	}
19311	reqHeaders.Set("Content-Type", "application/json")
19312	c.urlParams_.Set("alt", alt)
19313	c.urlParams_.Set("prettyPrint", "false")
19314	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/makeAdmin")
19315	urls += "?" + c.urlParams_.Encode()
19316	req, err := http.NewRequest("POST", urls, body)
19317	if err != nil {
19318		return nil, err
19319	}
19320	req.Header = reqHeaders
19321	googleapi.Expand(req.URL, map[string]string{
19322		"userKey": c.userKey,
19323	})
19324	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19325}
19326
19327// Do executes the "directory.users.makeAdmin" call.
19328func (c *UsersMakeAdminCall) Do(opts ...googleapi.CallOption) error {
19329	gensupport.SetOptions(c.urlParams_, opts...)
19330	res, err := c.doRequest("json")
19331	if err != nil {
19332		return err
19333	}
19334	defer googleapi.CloseBody(res)
19335	if err := googleapi.CheckResponse(res); err != nil {
19336		return err
19337	}
19338	return nil
19339	// {
19340	//   "description": "change admin status of a user",
19341	//   "httpMethod": "POST",
19342	//   "id": "directory.users.makeAdmin",
19343	//   "parameterOrder": [
19344	//     "userKey"
19345	//   ],
19346	//   "parameters": {
19347	//     "userKey": {
19348	//       "description": "Email or immutable ID of the user as admin",
19349	//       "location": "path",
19350	//       "required": true,
19351	//       "type": "string"
19352	//     }
19353	//   },
19354	//   "path": "users/{userKey}/makeAdmin",
19355	//   "request": {
19356	//     "$ref": "UserMakeAdmin"
19357	//   },
19358	//   "scopes": [
19359	//     "https://www.googleapis.com/auth/admin.directory.user"
19360	//   ]
19361	// }
19362
19363}
19364
19365// method id "directory.users.patch":
19366
19367type UsersPatchCall struct {
19368	s          *Service
19369	userKey    string
19370	user       *User
19371	urlParams_ gensupport.URLParams
19372	ctx_       context.Context
19373	header_    http.Header
19374}
19375
19376// Patch: update user. This method supports patch semantics.
19377func (r *UsersService) Patch(userKey string, user *User) *UsersPatchCall {
19378	c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19379	c.userKey = userKey
19380	c.user = user
19381	return c
19382}
19383
19384// Fields allows partial responses to be retrieved. See
19385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19386// for more information.
19387func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall {
19388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19389	return c
19390}
19391
19392// Context sets the context to be used in this call's Do method. Any
19393// pending HTTP request will be aborted if the provided context is
19394// canceled.
19395func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
19396	c.ctx_ = ctx
19397	return c
19398}
19399
19400// Header returns an http.Header that can be modified by the caller to
19401// add HTTP headers to the request.
19402func (c *UsersPatchCall) Header() http.Header {
19403	if c.header_ == nil {
19404		c.header_ = make(http.Header)
19405	}
19406	return c.header_
19407}
19408
19409func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
19410	reqHeaders := make(http.Header)
19411	for k, v := range c.header_ {
19412		reqHeaders[k] = v
19413	}
19414	reqHeaders.Set("User-Agent", c.s.userAgent())
19415	var body io.Reader = nil
19416	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
19417	if err != nil {
19418		return nil, err
19419	}
19420	reqHeaders.Set("Content-Type", "application/json")
19421	c.urlParams_.Set("alt", alt)
19422	c.urlParams_.Set("prettyPrint", "false")
19423	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}")
19424	urls += "?" + c.urlParams_.Encode()
19425	req, err := http.NewRequest("PATCH", urls, body)
19426	if err != nil {
19427		return nil, err
19428	}
19429	req.Header = reqHeaders
19430	googleapi.Expand(req.URL, map[string]string{
19431		"userKey": c.userKey,
19432	})
19433	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19434}
19435
19436// Do executes the "directory.users.patch" call.
19437// Exactly one of *User or error will be non-nil. Any non-2xx status
19438// code is an error. Response headers are in either
19439// *User.ServerResponse.Header or (if a response was returned at all) in
19440// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19441// whether the returned error was because http.StatusNotModified was
19442// returned.
19443func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) {
19444	gensupport.SetOptions(c.urlParams_, opts...)
19445	res, err := c.doRequest("json")
19446	if res != nil && res.StatusCode == http.StatusNotModified {
19447		if res.Body != nil {
19448			res.Body.Close()
19449		}
19450		return nil, &googleapi.Error{
19451			Code:   res.StatusCode,
19452			Header: res.Header,
19453		}
19454	}
19455	if err != nil {
19456		return nil, err
19457	}
19458	defer googleapi.CloseBody(res)
19459	if err := googleapi.CheckResponse(res); err != nil {
19460		return nil, err
19461	}
19462	ret := &User{
19463		ServerResponse: googleapi.ServerResponse{
19464			Header:         res.Header,
19465			HTTPStatusCode: res.StatusCode,
19466		},
19467	}
19468	target := &ret
19469	if err := gensupport.DecodeResponse(target, res); err != nil {
19470		return nil, err
19471	}
19472	return ret, nil
19473	// {
19474	//   "description": "update user. This method supports patch semantics.",
19475	//   "httpMethod": "PATCH",
19476	//   "id": "directory.users.patch",
19477	//   "parameterOrder": [
19478	//     "userKey"
19479	//   ],
19480	//   "parameters": {
19481	//     "userKey": {
19482	//       "description": "Email or immutable ID of the user. If ID, it should match with id of user object",
19483	//       "location": "path",
19484	//       "required": true,
19485	//       "type": "string"
19486	//     }
19487	//   },
19488	//   "path": "users/{userKey}",
19489	//   "request": {
19490	//     "$ref": "User"
19491	//   },
19492	//   "response": {
19493	//     "$ref": "User"
19494	//   },
19495	//   "scopes": [
19496	//     "https://www.googleapis.com/auth/admin.directory.user"
19497	//   ]
19498	// }
19499
19500}
19501
19502// method id "directory.users.undelete":
19503
19504type UsersUndeleteCall struct {
19505	s            *Service
19506	userKey      string
19507	userundelete *UserUndelete
19508	urlParams_   gensupport.URLParams
19509	ctx_         context.Context
19510	header_      http.Header
19511}
19512
19513// Undelete: Undelete a deleted user
19514func (r *UsersService) Undelete(userKey string, userundelete *UserUndelete) *UsersUndeleteCall {
19515	c := &UsersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19516	c.userKey = userKey
19517	c.userundelete = userundelete
19518	return c
19519}
19520
19521// Fields allows partial responses to be retrieved. See
19522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19523// for more information.
19524func (c *UsersUndeleteCall) Fields(s ...googleapi.Field) *UsersUndeleteCall {
19525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19526	return c
19527}
19528
19529// Context sets the context to be used in this call's Do method. Any
19530// pending HTTP request will be aborted if the provided context is
19531// canceled.
19532func (c *UsersUndeleteCall) Context(ctx context.Context) *UsersUndeleteCall {
19533	c.ctx_ = ctx
19534	return c
19535}
19536
19537// Header returns an http.Header that can be modified by the caller to
19538// add HTTP headers to the request.
19539func (c *UsersUndeleteCall) Header() http.Header {
19540	if c.header_ == nil {
19541		c.header_ = make(http.Header)
19542	}
19543	return c.header_
19544}
19545
19546func (c *UsersUndeleteCall) doRequest(alt string) (*http.Response, error) {
19547	reqHeaders := make(http.Header)
19548	for k, v := range c.header_ {
19549		reqHeaders[k] = v
19550	}
19551	reqHeaders.Set("User-Agent", c.s.userAgent())
19552	var body io.Reader = nil
19553	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userundelete)
19554	if err != nil {
19555		return nil, err
19556	}
19557	reqHeaders.Set("Content-Type", "application/json")
19558	c.urlParams_.Set("alt", alt)
19559	c.urlParams_.Set("prettyPrint", "false")
19560	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/undelete")
19561	urls += "?" + c.urlParams_.Encode()
19562	req, err := http.NewRequest("POST", urls, body)
19563	if err != nil {
19564		return nil, err
19565	}
19566	req.Header = reqHeaders
19567	googleapi.Expand(req.URL, map[string]string{
19568		"userKey": c.userKey,
19569	})
19570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19571}
19572
19573// Do executes the "directory.users.undelete" call.
19574func (c *UsersUndeleteCall) Do(opts ...googleapi.CallOption) error {
19575	gensupport.SetOptions(c.urlParams_, opts...)
19576	res, err := c.doRequest("json")
19577	if err != nil {
19578		return err
19579	}
19580	defer googleapi.CloseBody(res)
19581	if err := googleapi.CheckResponse(res); err != nil {
19582		return err
19583	}
19584	return nil
19585	// {
19586	//   "description": "Undelete a deleted user",
19587	//   "httpMethod": "POST",
19588	//   "id": "directory.users.undelete",
19589	//   "parameterOrder": [
19590	//     "userKey"
19591	//   ],
19592	//   "parameters": {
19593	//     "userKey": {
19594	//       "description": "The immutable id of the user",
19595	//       "location": "path",
19596	//       "required": true,
19597	//       "type": "string"
19598	//     }
19599	//   },
19600	//   "path": "users/{userKey}/undelete",
19601	//   "request": {
19602	//     "$ref": "UserUndelete"
19603	//   },
19604	//   "scopes": [
19605	//     "https://www.googleapis.com/auth/admin.directory.user"
19606	//   ]
19607	// }
19608
19609}
19610
19611// method id "directory.users.update":
19612
19613type UsersUpdateCall struct {
19614	s          *Service
19615	userKey    string
19616	user       *User
19617	urlParams_ gensupport.URLParams
19618	ctx_       context.Context
19619	header_    http.Header
19620}
19621
19622// Update: update user
19623func (r *UsersService) Update(userKey string, user *User) *UsersUpdateCall {
19624	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19625	c.userKey = userKey
19626	c.user = user
19627	return c
19628}
19629
19630// Fields allows partial responses to be retrieved. See
19631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19632// for more information.
19633func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
19634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19635	return c
19636}
19637
19638// Context sets the context to be used in this call's Do method. Any
19639// pending HTTP request will be aborted if the provided context is
19640// canceled.
19641func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
19642	c.ctx_ = ctx
19643	return c
19644}
19645
19646// Header returns an http.Header that can be modified by the caller to
19647// add HTTP headers to the request.
19648func (c *UsersUpdateCall) Header() http.Header {
19649	if c.header_ == nil {
19650		c.header_ = make(http.Header)
19651	}
19652	return c.header_
19653}
19654
19655func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
19656	reqHeaders := make(http.Header)
19657	for k, v := range c.header_ {
19658		reqHeaders[k] = v
19659	}
19660	reqHeaders.Set("User-Agent", c.s.userAgent())
19661	var body io.Reader = nil
19662	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
19663	if err != nil {
19664		return nil, err
19665	}
19666	reqHeaders.Set("Content-Type", "application/json")
19667	c.urlParams_.Set("alt", alt)
19668	c.urlParams_.Set("prettyPrint", "false")
19669	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}")
19670	urls += "?" + c.urlParams_.Encode()
19671	req, err := http.NewRequest("PUT", urls, body)
19672	if err != nil {
19673		return nil, err
19674	}
19675	req.Header = reqHeaders
19676	googleapi.Expand(req.URL, map[string]string{
19677		"userKey": c.userKey,
19678	})
19679	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19680}
19681
19682// Do executes the "directory.users.update" call.
19683// Exactly one of *User or error will be non-nil. Any non-2xx status
19684// code is an error. Response headers are in either
19685// *User.ServerResponse.Header or (if a response was returned at all) in
19686// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
19687// whether the returned error was because http.StatusNotModified was
19688// returned.
19689func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*User, error) {
19690	gensupport.SetOptions(c.urlParams_, opts...)
19691	res, err := c.doRequest("json")
19692	if res != nil && res.StatusCode == http.StatusNotModified {
19693		if res.Body != nil {
19694			res.Body.Close()
19695		}
19696		return nil, &googleapi.Error{
19697			Code:   res.StatusCode,
19698			Header: res.Header,
19699		}
19700	}
19701	if err != nil {
19702		return nil, err
19703	}
19704	defer googleapi.CloseBody(res)
19705	if err := googleapi.CheckResponse(res); err != nil {
19706		return nil, err
19707	}
19708	ret := &User{
19709		ServerResponse: googleapi.ServerResponse{
19710			Header:         res.Header,
19711			HTTPStatusCode: res.StatusCode,
19712		},
19713	}
19714	target := &ret
19715	if err := gensupport.DecodeResponse(target, res); err != nil {
19716		return nil, err
19717	}
19718	return ret, nil
19719	// {
19720	//   "description": "update user",
19721	//   "httpMethod": "PUT",
19722	//   "id": "directory.users.update",
19723	//   "parameterOrder": [
19724	//     "userKey"
19725	//   ],
19726	//   "parameters": {
19727	//     "userKey": {
19728	//       "description": "Email or immutable ID of the user. If ID, it should match with id of user object",
19729	//       "location": "path",
19730	//       "required": true,
19731	//       "type": "string"
19732	//     }
19733	//   },
19734	//   "path": "users/{userKey}",
19735	//   "request": {
19736	//     "$ref": "User"
19737	//   },
19738	//   "response": {
19739	//     "$ref": "User"
19740	//   },
19741	//   "scopes": [
19742	//     "https://www.googleapis.com/auth/admin.directory.user"
19743	//   ]
19744	// }
19745
19746}
19747
19748// method id "directory.users.watch":
19749
19750type UsersWatchCall struct {
19751	s          *Service
19752	channel    *Channel
19753	urlParams_ gensupport.URLParams
19754	ctx_       context.Context
19755	header_    http.Header
19756}
19757
19758// Watch: Watch for changes in users list
19759func (r *UsersService) Watch(channel *Channel) *UsersWatchCall {
19760	c := &UsersWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19761	c.channel = channel
19762	return c
19763}
19764
19765// CustomFieldMask sets the optional parameter "customFieldMask":
19766// Comma-separated list of schema names. All fields from these schemas
19767// are fetched. This should only be set when projection=custom.
19768func (c *UsersWatchCall) CustomFieldMask(customFieldMask string) *UsersWatchCall {
19769	c.urlParams_.Set("customFieldMask", customFieldMask)
19770	return c
19771}
19772
19773// Customer sets the optional parameter "customer": Immutable ID of the
19774// G Suite account. In case of multi-domain, to fetch all users for a
19775// customer, fill this field instead of domain.
19776func (c *UsersWatchCall) Customer(customer string) *UsersWatchCall {
19777	c.urlParams_.Set("customer", customer)
19778	return c
19779}
19780
19781// Domain sets the optional parameter "domain": Name of the domain. Fill
19782// this field to get users from only this domain. To return all users in
19783// a multi-domain fill customer field instead.
19784func (c *UsersWatchCall) Domain(domain string) *UsersWatchCall {
19785	c.urlParams_.Set("domain", domain)
19786	return c
19787}
19788
19789// Event sets the optional parameter "event": Event on which
19790// subscription is intended (if subscribing)
19791//
19792// Possible values:
19793//   "add" - User Created Event
19794//   "delete" - User Deleted Event
19795//   "makeAdmin" - User Admin Status Change Event
19796//   "undelete" - User Undeleted Event
19797//   "update" - User Updated Event
19798func (c *UsersWatchCall) Event(event string) *UsersWatchCall {
19799	c.urlParams_.Set("event", event)
19800	return c
19801}
19802
19803// MaxResults sets the optional parameter "maxResults": Maximum number
19804// of results to return. Default is 100. Max allowed is 500
19805func (c *UsersWatchCall) MaxResults(maxResults int64) *UsersWatchCall {
19806	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19807	return c
19808}
19809
19810// OrderBy sets the optional parameter "orderBy": Column to use for
19811// sorting results
19812//
19813// Possible values:
19814//   "email" - Primary email of the user.
19815//   "familyName" - User's family name.
19816//   "givenName" - User's given name.
19817func (c *UsersWatchCall) OrderBy(orderBy string) *UsersWatchCall {
19818	c.urlParams_.Set("orderBy", orderBy)
19819	return c
19820}
19821
19822// PageToken sets the optional parameter "pageToken": Token to specify
19823// next page in the list
19824func (c *UsersWatchCall) PageToken(pageToken string) *UsersWatchCall {
19825	c.urlParams_.Set("pageToken", pageToken)
19826	return c
19827}
19828
19829// Projection sets the optional parameter "projection": What subset of
19830// fields to fetch for this user.
19831//
19832// Possible values:
19833//   "basic" (default) - Do not include any custom fields for the user.
19834//   "custom" - Include custom fields from schemas mentioned in
19835// customFieldMask.
19836//   "full" - Include all fields associated with this user.
19837func (c *UsersWatchCall) Projection(projection string) *UsersWatchCall {
19838	c.urlParams_.Set("projection", projection)
19839	return c
19840}
19841
19842// Query sets the optional parameter "query": Query string search.
19843// Should be of the form "". Complete documentation is at
19844// https://developers.google.com/admin-sdk/directory/v1/guides/search-users
19845func (c *UsersWatchCall) Query(query string) *UsersWatchCall {
19846	c.urlParams_.Set("query", query)
19847	return c
19848}
19849
19850// ShowDeleted sets the optional parameter "showDeleted": If set to true
19851// retrieves the list of deleted users. Default is false
19852func (c *UsersWatchCall) ShowDeleted(showDeleted string) *UsersWatchCall {
19853	c.urlParams_.Set("showDeleted", showDeleted)
19854	return c
19855}
19856
19857// SortOrder sets the optional parameter "sortOrder": Whether to return
19858// results in ascending or descending order.
19859//
19860// Possible values:
19861//   "ASCENDING" - Ascending order.
19862//   "DESCENDING" - Descending order.
19863func (c *UsersWatchCall) SortOrder(sortOrder string) *UsersWatchCall {
19864	c.urlParams_.Set("sortOrder", sortOrder)
19865	return c
19866}
19867
19868// ViewType sets the optional parameter "viewType": Whether to fetch the
19869// ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
19870//
19871// Possible values:
19872//   "admin_view" (default) - Fetches the ADMIN_VIEW of the user.
19873//   "domain_public" - Fetches the DOMAIN_PUBLIC view of the user.
19874func (c *UsersWatchCall) ViewType(viewType string) *UsersWatchCall {
19875	c.urlParams_.Set("viewType", viewType)
19876	return c
19877}
19878
19879// Fields allows partial responses to be retrieved. See
19880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19881// for more information.
19882func (c *UsersWatchCall) Fields(s ...googleapi.Field) *UsersWatchCall {
19883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19884	return c
19885}
19886
19887// Context sets the context to be used in this call's Do method. Any
19888// pending HTTP request will be aborted if the provided context is
19889// canceled.
19890func (c *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall {
19891	c.ctx_ = ctx
19892	return c
19893}
19894
19895// Header returns an http.Header that can be modified by the caller to
19896// add HTTP headers to the request.
19897func (c *UsersWatchCall) Header() http.Header {
19898	if c.header_ == nil {
19899		c.header_ = make(http.Header)
19900	}
19901	return c.header_
19902}
19903
19904func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) {
19905	reqHeaders := make(http.Header)
19906	for k, v := range c.header_ {
19907		reqHeaders[k] = v
19908	}
19909	reqHeaders.Set("User-Agent", c.s.userAgent())
19910	var body io.Reader = nil
19911	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
19912	if err != nil {
19913		return nil, err
19914	}
19915	reqHeaders.Set("Content-Type", "application/json")
19916	c.urlParams_.Set("alt", alt)
19917	c.urlParams_.Set("prettyPrint", "false")
19918	urls := googleapi.ResolveRelative(c.s.BasePath, "users/watch")
19919	urls += "?" + c.urlParams_.Encode()
19920	req, err := http.NewRequest("POST", urls, body)
19921	if err != nil {
19922		return nil, err
19923	}
19924	req.Header = reqHeaders
19925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19926}
19927
19928// Do executes the "directory.users.watch" call.
19929// Exactly one of *Channel or error will be non-nil. Any non-2xx status
19930// code is an error. Response headers are in either
19931// *Channel.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 *UsersWatchCall) Do(opts ...googleapi.CallOption) (*Channel, 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 := &Channel{
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": "Watch for changes in users list",
19967	//   "httpMethod": "POST",
19968	//   "id": "directory.users.watch",
19969	//   "parameters": {
19970	//     "customFieldMask": {
19971	//       "description": "Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.",
19972	//       "location": "query",
19973	//       "type": "string"
19974	//     },
19975	//     "customer": {
19976	//       "description": "Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.",
19977	//       "location": "query",
19978	//       "type": "string"
19979	//     },
19980	//     "domain": {
19981	//       "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.",
19982	//       "location": "query",
19983	//       "type": "string"
19984	//     },
19985	//     "event": {
19986	//       "description": "Event on which subscription is intended (if subscribing)",
19987	//       "enum": [
19988	//         "add",
19989	//         "delete",
19990	//         "makeAdmin",
19991	//         "undelete",
19992	//         "update"
19993	//       ],
19994	//       "enumDescriptions": [
19995	//         "User Created Event",
19996	//         "User Deleted Event",
19997	//         "User Admin Status Change Event",
19998	//         "User Undeleted Event",
19999	//         "User Updated Event"
20000	//       ],
20001	//       "location": "query",
20002	//       "type": "string"
20003	//     },
20004	//     "maxResults": {
20005	//       "description": "Maximum number of results to return. Default is 100. Max allowed is 500",
20006	//       "format": "int32",
20007	//       "location": "query",
20008	//       "maximum": "500",
20009	//       "minimum": "1",
20010	//       "type": "integer"
20011	//     },
20012	//     "orderBy": {
20013	//       "description": "Column to use for sorting results",
20014	//       "enum": [
20015	//         "email",
20016	//         "familyName",
20017	//         "givenName"
20018	//       ],
20019	//       "enumDescriptions": [
20020	//         "Primary email of the user.",
20021	//         "User's family name.",
20022	//         "User's given name."
20023	//       ],
20024	//       "location": "query",
20025	//       "type": "string"
20026	//     },
20027	//     "pageToken": {
20028	//       "description": "Token to specify next page in the list",
20029	//       "location": "query",
20030	//       "type": "string"
20031	//     },
20032	//     "projection": {
20033	//       "default": "basic",
20034	//       "description": "What subset of fields to fetch for this user.",
20035	//       "enum": [
20036	//         "basic",
20037	//         "custom",
20038	//         "full"
20039	//       ],
20040	//       "enumDescriptions": [
20041	//         "Do not include any custom fields for the user.",
20042	//         "Include custom fields from schemas mentioned in customFieldMask.",
20043	//         "Include all fields associated with this user."
20044	//       ],
20045	//       "location": "query",
20046	//       "type": "string"
20047	//     },
20048	//     "query": {
20049	//       "description": "Query string search. Should be of the form \"\". Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-users",
20050	//       "location": "query",
20051	//       "type": "string"
20052	//     },
20053	//     "showDeleted": {
20054	//       "description": "If set to true retrieves the list of deleted users. Default is false",
20055	//       "location": "query",
20056	//       "type": "string"
20057	//     },
20058	//     "sortOrder": {
20059	//       "description": "Whether to return results in ascending or descending order.",
20060	//       "enum": [
20061	//         "ASCENDING",
20062	//         "DESCENDING"
20063	//       ],
20064	//       "enumDescriptions": [
20065	//         "Ascending order.",
20066	//         "Descending order."
20067	//       ],
20068	//       "location": "query",
20069	//       "type": "string"
20070	//     },
20071	//     "viewType": {
20072	//       "default": "admin_view",
20073	//       "description": "Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.",
20074	//       "enum": [
20075	//         "admin_view",
20076	//         "domain_public"
20077	//       ],
20078	//       "enumDescriptions": [
20079	//         "Fetches the ADMIN_VIEW of the user.",
20080	//         "Fetches the DOMAIN_PUBLIC view of the user."
20081	//       ],
20082	//       "location": "query",
20083	//       "type": "string"
20084	//     }
20085	//   },
20086	//   "path": "users/watch",
20087	//   "request": {
20088	//     "$ref": "Channel",
20089	//     "parameterName": "resource"
20090	//   },
20091	//   "response": {
20092	//     "$ref": "Channel"
20093	//   },
20094	//   "scopes": [
20095	//     "https://www.googleapis.com/auth/admin.directory.user",
20096	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
20097	//   ],
20098	//   "supportsSubscription": true
20099	// }
20100
20101}
20102
20103// method id "directory.users.aliases.delete":
20104
20105type UsersAliasesDeleteCall struct {
20106	s          *Service
20107	userKey    string
20108	alias      string
20109	urlParams_ gensupport.URLParams
20110	ctx_       context.Context
20111	header_    http.Header
20112}
20113
20114// Delete: Remove a alias for the user
20115func (r *UsersAliasesService) Delete(userKey string, alias string) *UsersAliasesDeleteCall {
20116	c := &UsersAliasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20117	c.userKey = userKey
20118	c.alias = alias
20119	return c
20120}
20121
20122// Fields allows partial responses to be retrieved. See
20123// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20124// for more information.
20125func (c *UsersAliasesDeleteCall) Fields(s ...googleapi.Field) *UsersAliasesDeleteCall {
20126	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20127	return c
20128}
20129
20130// Context sets the context to be used in this call's Do method. Any
20131// pending HTTP request will be aborted if the provided context is
20132// canceled.
20133func (c *UsersAliasesDeleteCall) Context(ctx context.Context) *UsersAliasesDeleteCall {
20134	c.ctx_ = ctx
20135	return c
20136}
20137
20138// Header returns an http.Header that can be modified by the caller to
20139// add HTTP headers to the request.
20140func (c *UsersAliasesDeleteCall) Header() http.Header {
20141	if c.header_ == nil {
20142		c.header_ = make(http.Header)
20143	}
20144	return c.header_
20145}
20146
20147func (c *UsersAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
20148	reqHeaders := make(http.Header)
20149	for k, v := range c.header_ {
20150		reqHeaders[k] = v
20151	}
20152	reqHeaders.Set("User-Agent", c.s.userAgent())
20153	var body io.Reader = nil
20154	c.urlParams_.Set("alt", alt)
20155	c.urlParams_.Set("prettyPrint", "false")
20156	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases/{alias}")
20157	urls += "?" + c.urlParams_.Encode()
20158	req, err := http.NewRequest("DELETE", urls, body)
20159	if err != nil {
20160		return nil, err
20161	}
20162	req.Header = reqHeaders
20163	googleapi.Expand(req.URL, map[string]string{
20164		"userKey": c.userKey,
20165		"alias":   c.alias,
20166	})
20167	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20168}
20169
20170// Do executes the "directory.users.aliases.delete" call.
20171func (c *UsersAliasesDeleteCall) Do(opts ...googleapi.CallOption) error {
20172	gensupport.SetOptions(c.urlParams_, opts...)
20173	res, err := c.doRequest("json")
20174	if err != nil {
20175		return err
20176	}
20177	defer googleapi.CloseBody(res)
20178	if err := googleapi.CheckResponse(res); err != nil {
20179		return err
20180	}
20181	return nil
20182	// {
20183	//   "description": "Remove a alias for the user",
20184	//   "httpMethod": "DELETE",
20185	//   "id": "directory.users.aliases.delete",
20186	//   "parameterOrder": [
20187	//     "userKey",
20188	//     "alias"
20189	//   ],
20190	//   "parameters": {
20191	//     "alias": {
20192	//       "description": "The alias to be removed",
20193	//       "location": "path",
20194	//       "required": true,
20195	//       "type": "string"
20196	//     },
20197	//     "userKey": {
20198	//       "description": "Email or immutable ID of the user",
20199	//       "location": "path",
20200	//       "required": true,
20201	//       "type": "string"
20202	//     }
20203	//   },
20204	//   "path": "users/{userKey}/aliases/{alias}",
20205	//   "scopes": [
20206	//     "https://www.googleapis.com/auth/admin.directory.user",
20207	//     "https://www.googleapis.com/auth/admin.directory.user.alias"
20208	//   ]
20209	// }
20210
20211}
20212
20213// method id "directory.users.aliases.insert":
20214
20215type UsersAliasesInsertCall struct {
20216	s          *Service
20217	userKey    string
20218	alias      *Alias
20219	urlParams_ gensupport.URLParams
20220	ctx_       context.Context
20221	header_    http.Header
20222}
20223
20224// Insert: Add a alias for the user
20225func (r *UsersAliasesService) Insert(userKey string, alias *Alias) *UsersAliasesInsertCall {
20226	c := &UsersAliasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20227	c.userKey = userKey
20228	c.alias = alias
20229	return c
20230}
20231
20232// Fields allows partial responses to be retrieved. See
20233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20234// for more information.
20235func (c *UsersAliasesInsertCall) Fields(s ...googleapi.Field) *UsersAliasesInsertCall {
20236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20237	return c
20238}
20239
20240// Context sets the context to be used in this call's Do method. Any
20241// pending HTTP request will be aborted if the provided context is
20242// canceled.
20243func (c *UsersAliasesInsertCall) Context(ctx context.Context) *UsersAliasesInsertCall {
20244	c.ctx_ = ctx
20245	return c
20246}
20247
20248// Header returns an http.Header that can be modified by the caller to
20249// add HTTP headers to the request.
20250func (c *UsersAliasesInsertCall) Header() http.Header {
20251	if c.header_ == nil {
20252		c.header_ = make(http.Header)
20253	}
20254	return c.header_
20255}
20256
20257func (c *UsersAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
20258	reqHeaders := make(http.Header)
20259	for k, v := range c.header_ {
20260		reqHeaders[k] = v
20261	}
20262	reqHeaders.Set("User-Agent", c.s.userAgent())
20263	var body io.Reader = nil
20264	body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
20265	if err != nil {
20266		return nil, err
20267	}
20268	reqHeaders.Set("Content-Type", "application/json")
20269	c.urlParams_.Set("alt", alt)
20270	c.urlParams_.Set("prettyPrint", "false")
20271	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases")
20272	urls += "?" + c.urlParams_.Encode()
20273	req, err := http.NewRequest("POST", urls, body)
20274	if err != nil {
20275		return nil, err
20276	}
20277	req.Header = reqHeaders
20278	googleapi.Expand(req.URL, map[string]string{
20279		"userKey": c.userKey,
20280	})
20281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20282}
20283
20284// Do executes the "directory.users.aliases.insert" call.
20285// Exactly one of *Alias or error will be non-nil. Any non-2xx status
20286// code is an error. Response headers are in either
20287// *Alias.ServerResponse.Header or (if a response was returned at all)
20288// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20289// check whether the returned error was because http.StatusNotModified
20290// was returned.
20291func (c *UsersAliasesInsertCall) Do(opts ...googleapi.CallOption) (*Alias, error) {
20292	gensupport.SetOptions(c.urlParams_, opts...)
20293	res, err := c.doRequest("json")
20294	if res != nil && res.StatusCode == http.StatusNotModified {
20295		if res.Body != nil {
20296			res.Body.Close()
20297		}
20298		return nil, &googleapi.Error{
20299			Code:   res.StatusCode,
20300			Header: res.Header,
20301		}
20302	}
20303	if err != nil {
20304		return nil, err
20305	}
20306	defer googleapi.CloseBody(res)
20307	if err := googleapi.CheckResponse(res); err != nil {
20308		return nil, err
20309	}
20310	ret := &Alias{
20311		ServerResponse: googleapi.ServerResponse{
20312			Header:         res.Header,
20313			HTTPStatusCode: res.StatusCode,
20314		},
20315	}
20316	target := &ret
20317	if err := gensupport.DecodeResponse(target, res); err != nil {
20318		return nil, err
20319	}
20320	return ret, nil
20321	// {
20322	//   "description": "Add a alias for the user",
20323	//   "httpMethod": "POST",
20324	//   "id": "directory.users.aliases.insert",
20325	//   "parameterOrder": [
20326	//     "userKey"
20327	//   ],
20328	//   "parameters": {
20329	//     "userKey": {
20330	//       "description": "Email or immutable ID of the user",
20331	//       "location": "path",
20332	//       "required": true,
20333	//       "type": "string"
20334	//     }
20335	//   },
20336	//   "path": "users/{userKey}/aliases",
20337	//   "request": {
20338	//     "$ref": "Alias"
20339	//   },
20340	//   "response": {
20341	//     "$ref": "Alias"
20342	//   },
20343	//   "scopes": [
20344	//     "https://www.googleapis.com/auth/admin.directory.user",
20345	//     "https://www.googleapis.com/auth/admin.directory.user.alias"
20346	//   ]
20347	// }
20348
20349}
20350
20351// method id "directory.users.aliases.list":
20352
20353type UsersAliasesListCall struct {
20354	s            *Service
20355	userKey      string
20356	urlParams_   gensupport.URLParams
20357	ifNoneMatch_ string
20358	ctx_         context.Context
20359	header_      http.Header
20360}
20361
20362// List: List all aliases for a user
20363func (r *UsersAliasesService) List(userKey string) *UsersAliasesListCall {
20364	c := &UsersAliasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20365	c.userKey = userKey
20366	return c
20367}
20368
20369// Event sets the optional parameter "event": Event on which
20370// subscription is intended (if subscribing)
20371//
20372// Possible values:
20373//   "add" - Alias Created Event
20374//   "delete" - Alias Deleted Event
20375func (c *UsersAliasesListCall) Event(event string) *UsersAliasesListCall {
20376	c.urlParams_.Set("event", event)
20377	return c
20378}
20379
20380// Fields allows partial responses to be retrieved. See
20381// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20382// for more information.
20383func (c *UsersAliasesListCall) Fields(s ...googleapi.Field) *UsersAliasesListCall {
20384	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20385	return c
20386}
20387
20388// IfNoneMatch sets the optional parameter which makes the operation
20389// fail if the object's ETag matches the given value. This is useful for
20390// getting updates only after the object has changed since the last
20391// request. Use googleapi.IsNotModified to check whether the response
20392// error from Do is the result of In-None-Match.
20393func (c *UsersAliasesListCall) IfNoneMatch(entityTag string) *UsersAliasesListCall {
20394	c.ifNoneMatch_ = entityTag
20395	return c
20396}
20397
20398// Context sets the context to be used in this call's Do method. Any
20399// pending HTTP request will be aborted if the provided context is
20400// canceled.
20401func (c *UsersAliasesListCall) Context(ctx context.Context) *UsersAliasesListCall {
20402	c.ctx_ = ctx
20403	return c
20404}
20405
20406// Header returns an http.Header that can be modified by the caller to
20407// add HTTP headers to the request.
20408func (c *UsersAliasesListCall) Header() http.Header {
20409	if c.header_ == nil {
20410		c.header_ = make(http.Header)
20411	}
20412	return c.header_
20413}
20414
20415func (c *UsersAliasesListCall) doRequest(alt string) (*http.Response, error) {
20416	reqHeaders := make(http.Header)
20417	for k, v := range c.header_ {
20418		reqHeaders[k] = v
20419	}
20420	reqHeaders.Set("User-Agent", c.s.userAgent())
20421	if c.ifNoneMatch_ != "" {
20422		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20423	}
20424	var body io.Reader = nil
20425	c.urlParams_.Set("alt", alt)
20426	c.urlParams_.Set("prettyPrint", "false")
20427	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases")
20428	urls += "?" + c.urlParams_.Encode()
20429	req, err := http.NewRequest("GET", urls, body)
20430	if err != nil {
20431		return nil, err
20432	}
20433	req.Header = reqHeaders
20434	googleapi.Expand(req.URL, map[string]string{
20435		"userKey": c.userKey,
20436	})
20437	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20438}
20439
20440// Do executes the "directory.users.aliases.list" call.
20441// Exactly one of *Aliases or error will be non-nil. Any non-2xx status
20442// code is an error. Response headers are in either
20443// *Aliases.ServerResponse.Header or (if a response was returned at all)
20444// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20445// check whether the returned error was because http.StatusNotModified
20446// was returned.
20447func (c *UsersAliasesListCall) Do(opts ...googleapi.CallOption) (*Aliases, error) {
20448	gensupport.SetOptions(c.urlParams_, opts...)
20449	res, err := c.doRequest("json")
20450	if res != nil && res.StatusCode == http.StatusNotModified {
20451		if res.Body != nil {
20452			res.Body.Close()
20453		}
20454		return nil, &googleapi.Error{
20455			Code:   res.StatusCode,
20456			Header: res.Header,
20457		}
20458	}
20459	if err != nil {
20460		return nil, err
20461	}
20462	defer googleapi.CloseBody(res)
20463	if err := googleapi.CheckResponse(res); err != nil {
20464		return nil, err
20465	}
20466	ret := &Aliases{
20467		ServerResponse: googleapi.ServerResponse{
20468			Header:         res.Header,
20469			HTTPStatusCode: res.StatusCode,
20470		},
20471	}
20472	target := &ret
20473	if err := gensupport.DecodeResponse(target, res); err != nil {
20474		return nil, err
20475	}
20476	return ret, nil
20477	// {
20478	//   "description": "List all aliases for a user",
20479	//   "httpMethod": "GET",
20480	//   "id": "directory.users.aliases.list",
20481	//   "parameterOrder": [
20482	//     "userKey"
20483	//   ],
20484	//   "parameters": {
20485	//     "event": {
20486	//       "description": "Event on which subscription is intended (if subscribing)",
20487	//       "enum": [
20488	//         "add",
20489	//         "delete"
20490	//       ],
20491	//       "enumDescriptions": [
20492	//         "Alias Created Event",
20493	//         "Alias Deleted Event"
20494	//       ],
20495	//       "location": "query",
20496	//       "type": "string"
20497	//     },
20498	//     "userKey": {
20499	//       "description": "Email or immutable ID of the user",
20500	//       "location": "path",
20501	//       "required": true,
20502	//       "type": "string"
20503	//     }
20504	//   },
20505	//   "path": "users/{userKey}/aliases",
20506	//   "response": {
20507	//     "$ref": "Aliases"
20508	//   },
20509	//   "scopes": [
20510	//     "https://www.googleapis.com/auth/admin.directory.user",
20511	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
20512	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
20513	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
20514	//   ],
20515	//   "supportsSubscription": true
20516	// }
20517
20518}
20519
20520// method id "directory.users.aliases.watch":
20521
20522type UsersAliasesWatchCall struct {
20523	s          *Service
20524	userKey    string
20525	channel    *Channel
20526	urlParams_ gensupport.URLParams
20527	ctx_       context.Context
20528	header_    http.Header
20529}
20530
20531// Watch: Watch for changes in user aliases list
20532func (r *UsersAliasesService) Watch(userKey string, channel *Channel) *UsersAliasesWatchCall {
20533	c := &UsersAliasesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20534	c.userKey = userKey
20535	c.channel = channel
20536	return c
20537}
20538
20539// Event sets the optional parameter "event": Event on which
20540// subscription is intended (if subscribing)
20541//
20542// Possible values:
20543//   "add" - Alias Created Event
20544//   "delete" - Alias Deleted Event
20545func (c *UsersAliasesWatchCall) Event(event string) *UsersAliasesWatchCall {
20546	c.urlParams_.Set("event", event)
20547	return c
20548}
20549
20550// Fields allows partial responses to be retrieved. See
20551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20552// for more information.
20553func (c *UsersAliasesWatchCall) Fields(s ...googleapi.Field) *UsersAliasesWatchCall {
20554	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20555	return c
20556}
20557
20558// Context sets the context to be used in this call's Do method. Any
20559// pending HTTP request will be aborted if the provided context is
20560// canceled.
20561func (c *UsersAliasesWatchCall) Context(ctx context.Context) *UsersAliasesWatchCall {
20562	c.ctx_ = ctx
20563	return c
20564}
20565
20566// Header returns an http.Header that can be modified by the caller to
20567// add HTTP headers to the request.
20568func (c *UsersAliasesWatchCall) Header() http.Header {
20569	if c.header_ == nil {
20570		c.header_ = make(http.Header)
20571	}
20572	return c.header_
20573}
20574
20575func (c *UsersAliasesWatchCall) doRequest(alt string) (*http.Response, error) {
20576	reqHeaders := make(http.Header)
20577	for k, v := range c.header_ {
20578		reqHeaders[k] = v
20579	}
20580	reqHeaders.Set("User-Agent", c.s.userAgent())
20581	var body io.Reader = nil
20582	body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
20583	if err != nil {
20584		return nil, err
20585	}
20586	reqHeaders.Set("Content-Type", "application/json")
20587	c.urlParams_.Set("alt", alt)
20588	c.urlParams_.Set("prettyPrint", "false")
20589	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/aliases/watch")
20590	urls += "?" + c.urlParams_.Encode()
20591	req, err := http.NewRequest("POST", urls, body)
20592	if err != nil {
20593		return nil, err
20594	}
20595	req.Header = reqHeaders
20596	googleapi.Expand(req.URL, map[string]string{
20597		"userKey": c.userKey,
20598	})
20599	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20600}
20601
20602// Do executes the "directory.users.aliases.watch" call.
20603// Exactly one of *Channel or error will be non-nil. Any non-2xx status
20604// code is an error. Response headers are in either
20605// *Channel.ServerResponse.Header or (if a response was returned at all)
20606// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
20607// check whether the returned error was because http.StatusNotModified
20608// was returned.
20609func (c *UsersAliasesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
20610	gensupport.SetOptions(c.urlParams_, opts...)
20611	res, err := c.doRequest("json")
20612	if res != nil && res.StatusCode == http.StatusNotModified {
20613		if res.Body != nil {
20614			res.Body.Close()
20615		}
20616		return nil, &googleapi.Error{
20617			Code:   res.StatusCode,
20618			Header: res.Header,
20619		}
20620	}
20621	if err != nil {
20622		return nil, err
20623	}
20624	defer googleapi.CloseBody(res)
20625	if err := googleapi.CheckResponse(res); err != nil {
20626		return nil, err
20627	}
20628	ret := &Channel{
20629		ServerResponse: googleapi.ServerResponse{
20630			Header:         res.Header,
20631			HTTPStatusCode: res.StatusCode,
20632		},
20633	}
20634	target := &ret
20635	if err := gensupport.DecodeResponse(target, res); err != nil {
20636		return nil, err
20637	}
20638	return ret, nil
20639	// {
20640	//   "description": "Watch for changes in user aliases list",
20641	//   "httpMethod": "POST",
20642	//   "id": "directory.users.aliases.watch",
20643	//   "parameterOrder": [
20644	//     "userKey"
20645	//   ],
20646	//   "parameters": {
20647	//     "event": {
20648	//       "description": "Event on which subscription is intended (if subscribing)",
20649	//       "enum": [
20650	//         "add",
20651	//         "delete"
20652	//       ],
20653	//       "enumDescriptions": [
20654	//         "Alias Created Event",
20655	//         "Alias Deleted Event"
20656	//       ],
20657	//       "location": "query",
20658	//       "type": "string"
20659	//     },
20660	//     "userKey": {
20661	//       "description": "Email or immutable ID of the user",
20662	//       "location": "path",
20663	//       "required": true,
20664	//       "type": "string"
20665	//     }
20666	//   },
20667	//   "path": "users/{userKey}/aliases/watch",
20668	//   "request": {
20669	//     "$ref": "Channel",
20670	//     "parameterName": "resource"
20671	//   },
20672	//   "response": {
20673	//     "$ref": "Channel"
20674	//   },
20675	//   "scopes": [
20676	//     "https://www.googleapis.com/auth/admin.directory.user",
20677	//     "https://www.googleapis.com/auth/admin.directory.user.alias",
20678	//     "https://www.googleapis.com/auth/admin.directory.user.alias.readonly",
20679	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
20680	//   ],
20681	//   "supportsSubscription": true
20682	// }
20683
20684}
20685
20686// method id "directory.users.photos.delete":
20687
20688type UsersPhotosDeleteCall struct {
20689	s          *Service
20690	userKey    string
20691	urlParams_ gensupport.URLParams
20692	ctx_       context.Context
20693	header_    http.Header
20694}
20695
20696// Delete: Remove photos for the user
20697func (r *UsersPhotosService) Delete(userKey string) *UsersPhotosDeleteCall {
20698	c := &UsersPhotosDeleteCall{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 *UsersPhotosDeleteCall) Fields(s ...googleapi.Field) *UsersPhotosDeleteCall {
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 *UsersPhotosDeleteCall) Context(ctx context.Context) *UsersPhotosDeleteCall {
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 *UsersPhotosDeleteCall) Header() http.Header {
20722	if c.header_ == nil {
20723		c.header_ = make(http.Header)
20724	}
20725	return c.header_
20726}
20727
20728func (c *UsersPhotosDeleteCall) doRequest(alt string) (*http.Response, error) {
20729	reqHeaders := make(http.Header)
20730	for k, v := range c.header_ {
20731		reqHeaders[k] = v
20732	}
20733	reqHeaders.Set("User-Agent", c.s.userAgent())
20734	var body io.Reader = nil
20735	c.urlParams_.Set("alt", alt)
20736	c.urlParams_.Set("prettyPrint", "false")
20737	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail")
20738	urls += "?" + c.urlParams_.Encode()
20739	req, err := http.NewRequest("DELETE", urls, body)
20740	if err != nil {
20741		return nil, err
20742	}
20743	req.Header = reqHeaders
20744	googleapi.Expand(req.URL, map[string]string{
20745		"userKey": c.userKey,
20746	})
20747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20748}
20749
20750// Do executes the "directory.users.photos.delete" call.
20751func (c *UsersPhotosDeleteCall) Do(opts ...googleapi.CallOption) error {
20752	gensupport.SetOptions(c.urlParams_, opts...)
20753	res, err := c.doRequest("json")
20754	if err != nil {
20755		return err
20756	}
20757	defer googleapi.CloseBody(res)
20758	if err := googleapi.CheckResponse(res); err != nil {
20759		return err
20760	}
20761	return nil
20762	// {
20763	//   "description": "Remove photos for the user",
20764	//   "httpMethod": "DELETE",
20765	//   "id": "directory.users.photos.delete",
20766	//   "parameterOrder": [
20767	//     "userKey"
20768	//   ],
20769	//   "parameters": {
20770	//     "userKey": {
20771	//       "description": "Email or immutable ID of the user",
20772	//       "location": "path",
20773	//       "required": true,
20774	//       "type": "string"
20775	//     }
20776	//   },
20777	//   "path": "users/{userKey}/photos/thumbnail",
20778	//   "scopes": [
20779	//     "https://www.googleapis.com/auth/admin.directory.user"
20780	//   ]
20781	// }
20782
20783}
20784
20785// method id "directory.users.photos.get":
20786
20787type UsersPhotosGetCall struct {
20788	s            *Service
20789	userKey      string
20790	urlParams_   gensupport.URLParams
20791	ifNoneMatch_ string
20792	ctx_         context.Context
20793	header_      http.Header
20794}
20795
20796// Get: Retrieve photo of a user
20797func (r *UsersPhotosService) Get(userKey string) *UsersPhotosGetCall {
20798	c := &UsersPhotosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20799	c.userKey = userKey
20800	return c
20801}
20802
20803// Fields allows partial responses to be retrieved. See
20804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20805// for more information.
20806func (c *UsersPhotosGetCall) Fields(s ...googleapi.Field) *UsersPhotosGetCall {
20807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20808	return c
20809}
20810
20811// IfNoneMatch sets the optional parameter which makes the operation
20812// fail if the object's ETag matches the given value. This is useful for
20813// getting updates only after the object has changed since the last
20814// request. Use googleapi.IsNotModified to check whether the response
20815// error from Do is the result of In-None-Match.
20816func (c *UsersPhotosGetCall) IfNoneMatch(entityTag string) *UsersPhotosGetCall {
20817	c.ifNoneMatch_ = entityTag
20818	return c
20819}
20820
20821// Context sets the context to be used in this call's Do method. Any
20822// pending HTTP request will be aborted if the provided context is
20823// canceled.
20824func (c *UsersPhotosGetCall) Context(ctx context.Context) *UsersPhotosGetCall {
20825	c.ctx_ = ctx
20826	return c
20827}
20828
20829// Header returns an http.Header that can be modified by the caller to
20830// add HTTP headers to the request.
20831func (c *UsersPhotosGetCall) Header() http.Header {
20832	if c.header_ == nil {
20833		c.header_ = make(http.Header)
20834	}
20835	return c.header_
20836}
20837
20838func (c *UsersPhotosGetCall) doRequest(alt string) (*http.Response, error) {
20839	reqHeaders := make(http.Header)
20840	for k, v := range c.header_ {
20841		reqHeaders[k] = v
20842	}
20843	reqHeaders.Set("User-Agent", c.s.userAgent())
20844	if c.ifNoneMatch_ != "" {
20845		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20846	}
20847	var body io.Reader = nil
20848	c.urlParams_.Set("alt", alt)
20849	c.urlParams_.Set("prettyPrint", "false")
20850	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail")
20851	urls += "?" + c.urlParams_.Encode()
20852	req, err := http.NewRequest("GET", urls, body)
20853	if err != nil {
20854		return nil, err
20855	}
20856	req.Header = reqHeaders
20857	googleapi.Expand(req.URL, map[string]string{
20858		"userKey": c.userKey,
20859	})
20860	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20861}
20862
20863// Do executes the "directory.users.photos.get" call.
20864// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
20865// status code is an error. Response headers are in either
20866// *UserPhoto.ServerResponse.Header or (if a response was returned at
20867// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20868// to check whether the returned error was because
20869// http.StatusNotModified was returned.
20870func (c *UsersPhotosGetCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
20871	gensupport.SetOptions(c.urlParams_, opts...)
20872	res, err := c.doRequest("json")
20873	if res != nil && res.StatusCode == http.StatusNotModified {
20874		if res.Body != nil {
20875			res.Body.Close()
20876		}
20877		return nil, &googleapi.Error{
20878			Code:   res.StatusCode,
20879			Header: res.Header,
20880		}
20881	}
20882	if err != nil {
20883		return nil, err
20884	}
20885	defer googleapi.CloseBody(res)
20886	if err := googleapi.CheckResponse(res); err != nil {
20887		return nil, err
20888	}
20889	ret := &UserPhoto{
20890		ServerResponse: googleapi.ServerResponse{
20891			Header:         res.Header,
20892			HTTPStatusCode: res.StatusCode,
20893		},
20894	}
20895	target := &ret
20896	if err := gensupport.DecodeResponse(target, res); err != nil {
20897		return nil, err
20898	}
20899	return ret, nil
20900	// {
20901	//   "description": "Retrieve photo of a user",
20902	//   "httpMethod": "GET",
20903	//   "id": "directory.users.photos.get",
20904	//   "parameterOrder": [
20905	//     "userKey"
20906	//   ],
20907	//   "parameters": {
20908	//     "userKey": {
20909	//       "description": "Email or immutable ID of the user",
20910	//       "location": "path",
20911	//       "required": true,
20912	//       "type": "string"
20913	//     }
20914	//   },
20915	//   "path": "users/{userKey}/photos/thumbnail",
20916	//   "response": {
20917	//     "$ref": "UserPhoto"
20918	//   },
20919	//   "scopes": [
20920	//     "https://www.googleapis.com/auth/admin.directory.user",
20921	//     "https://www.googleapis.com/auth/admin.directory.user.readonly"
20922	//   ]
20923	// }
20924
20925}
20926
20927// method id "directory.users.photos.patch":
20928
20929type UsersPhotosPatchCall struct {
20930	s          *Service
20931	userKey    string
20932	userphoto  *UserPhoto
20933	urlParams_ gensupport.URLParams
20934	ctx_       context.Context
20935	header_    http.Header
20936}
20937
20938// Patch: Add a photo for the user. This method supports patch
20939// semantics.
20940func (r *UsersPhotosService) Patch(userKey string, userphoto *UserPhoto) *UsersPhotosPatchCall {
20941	c := &UsersPhotosPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20942	c.userKey = userKey
20943	c.userphoto = userphoto
20944	return c
20945}
20946
20947// Fields allows partial responses to be retrieved. See
20948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20949// for more information.
20950func (c *UsersPhotosPatchCall) Fields(s ...googleapi.Field) *UsersPhotosPatchCall {
20951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20952	return c
20953}
20954
20955// Context sets the context to be used in this call's Do method. Any
20956// pending HTTP request will be aborted if the provided context is
20957// canceled.
20958func (c *UsersPhotosPatchCall) Context(ctx context.Context) *UsersPhotosPatchCall {
20959	c.ctx_ = ctx
20960	return c
20961}
20962
20963// Header returns an http.Header that can be modified by the caller to
20964// add HTTP headers to the request.
20965func (c *UsersPhotosPatchCall) Header() http.Header {
20966	if c.header_ == nil {
20967		c.header_ = make(http.Header)
20968	}
20969	return c.header_
20970}
20971
20972func (c *UsersPhotosPatchCall) doRequest(alt string) (*http.Response, error) {
20973	reqHeaders := make(http.Header)
20974	for k, v := range c.header_ {
20975		reqHeaders[k] = v
20976	}
20977	reqHeaders.Set("User-Agent", c.s.userAgent())
20978	var body io.Reader = nil
20979	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
20980	if err != nil {
20981		return nil, err
20982	}
20983	reqHeaders.Set("Content-Type", "application/json")
20984	c.urlParams_.Set("alt", alt)
20985	c.urlParams_.Set("prettyPrint", "false")
20986	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail")
20987	urls += "?" + c.urlParams_.Encode()
20988	req, err := http.NewRequest("PATCH", urls, body)
20989	if err != nil {
20990		return nil, err
20991	}
20992	req.Header = reqHeaders
20993	googleapi.Expand(req.URL, map[string]string{
20994		"userKey": c.userKey,
20995	})
20996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20997}
20998
20999// Do executes the "directory.users.photos.patch" call.
21000// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
21001// status code is an error. Response headers are in either
21002// *UserPhoto.ServerResponse.Header or (if a response was returned at
21003// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21004// to check whether the returned error was because
21005// http.StatusNotModified was returned.
21006func (c *UsersPhotosPatchCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
21007	gensupport.SetOptions(c.urlParams_, opts...)
21008	res, err := c.doRequest("json")
21009	if res != nil && res.StatusCode == http.StatusNotModified {
21010		if res.Body != nil {
21011			res.Body.Close()
21012		}
21013		return nil, &googleapi.Error{
21014			Code:   res.StatusCode,
21015			Header: res.Header,
21016		}
21017	}
21018	if err != nil {
21019		return nil, err
21020	}
21021	defer googleapi.CloseBody(res)
21022	if err := googleapi.CheckResponse(res); err != nil {
21023		return nil, err
21024	}
21025	ret := &UserPhoto{
21026		ServerResponse: googleapi.ServerResponse{
21027			Header:         res.Header,
21028			HTTPStatusCode: res.StatusCode,
21029		},
21030	}
21031	target := &ret
21032	if err := gensupport.DecodeResponse(target, res); err != nil {
21033		return nil, err
21034	}
21035	return ret, nil
21036	// {
21037	//   "description": "Add a photo for the user. This method supports patch semantics.",
21038	//   "httpMethod": "PATCH",
21039	//   "id": "directory.users.photos.patch",
21040	//   "parameterOrder": [
21041	//     "userKey"
21042	//   ],
21043	//   "parameters": {
21044	//     "userKey": {
21045	//       "description": "Email or immutable ID of the user",
21046	//       "location": "path",
21047	//       "required": true,
21048	//       "type": "string"
21049	//     }
21050	//   },
21051	//   "path": "users/{userKey}/photos/thumbnail",
21052	//   "request": {
21053	//     "$ref": "UserPhoto"
21054	//   },
21055	//   "response": {
21056	//     "$ref": "UserPhoto"
21057	//   },
21058	//   "scopes": [
21059	//     "https://www.googleapis.com/auth/admin.directory.user"
21060	//   ]
21061	// }
21062
21063}
21064
21065// method id "directory.users.photos.update":
21066
21067type UsersPhotosUpdateCall struct {
21068	s          *Service
21069	userKey    string
21070	userphoto  *UserPhoto
21071	urlParams_ gensupport.URLParams
21072	ctx_       context.Context
21073	header_    http.Header
21074}
21075
21076// Update: Add a photo for the user
21077func (r *UsersPhotosService) Update(userKey string, userphoto *UserPhoto) *UsersPhotosUpdateCall {
21078	c := &UsersPhotosUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21079	c.userKey = userKey
21080	c.userphoto = userphoto
21081	return c
21082}
21083
21084// Fields allows partial responses to be retrieved. See
21085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21086// for more information.
21087func (c *UsersPhotosUpdateCall) Fields(s ...googleapi.Field) *UsersPhotosUpdateCall {
21088	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21089	return c
21090}
21091
21092// Context sets the context to be used in this call's Do method. Any
21093// pending HTTP request will be aborted if the provided context is
21094// canceled.
21095func (c *UsersPhotosUpdateCall) Context(ctx context.Context) *UsersPhotosUpdateCall {
21096	c.ctx_ = ctx
21097	return c
21098}
21099
21100// Header returns an http.Header that can be modified by the caller to
21101// add HTTP headers to the request.
21102func (c *UsersPhotosUpdateCall) Header() http.Header {
21103	if c.header_ == nil {
21104		c.header_ = make(http.Header)
21105	}
21106	return c.header_
21107}
21108
21109func (c *UsersPhotosUpdateCall) doRequest(alt string) (*http.Response, error) {
21110	reqHeaders := make(http.Header)
21111	for k, v := range c.header_ {
21112		reqHeaders[k] = v
21113	}
21114	reqHeaders.Set("User-Agent", c.s.userAgent())
21115	var body io.Reader = nil
21116	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
21117	if err != nil {
21118		return nil, err
21119	}
21120	reqHeaders.Set("Content-Type", "application/json")
21121	c.urlParams_.Set("alt", alt)
21122	c.urlParams_.Set("prettyPrint", "false")
21123	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/photos/thumbnail")
21124	urls += "?" + c.urlParams_.Encode()
21125	req, err := http.NewRequest("PUT", urls, body)
21126	if err != nil {
21127		return nil, err
21128	}
21129	req.Header = reqHeaders
21130	googleapi.Expand(req.URL, map[string]string{
21131		"userKey": c.userKey,
21132	})
21133	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21134}
21135
21136// Do executes the "directory.users.photos.update" call.
21137// Exactly one of *UserPhoto or error will be non-nil. Any non-2xx
21138// status code is an error. Response headers are in either
21139// *UserPhoto.ServerResponse.Header or (if a response was returned at
21140// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21141// to check whether the returned error was because
21142// http.StatusNotModified was returned.
21143func (c *UsersPhotosUpdateCall) Do(opts ...googleapi.CallOption) (*UserPhoto, error) {
21144	gensupport.SetOptions(c.urlParams_, opts...)
21145	res, err := c.doRequest("json")
21146	if res != nil && res.StatusCode == http.StatusNotModified {
21147		if res.Body != nil {
21148			res.Body.Close()
21149		}
21150		return nil, &googleapi.Error{
21151			Code:   res.StatusCode,
21152			Header: res.Header,
21153		}
21154	}
21155	if err != nil {
21156		return nil, err
21157	}
21158	defer googleapi.CloseBody(res)
21159	if err := googleapi.CheckResponse(res); err != nil {
21160		return nil, err
21161	}
21162	ret := &UserPhoto{
21163		ServerResponse: googleapi.ServerResponse{
21164			Header:         res.Header,
21165			HTTPStatusCode: res.StatusCode,
21166		},
21167	}
21168	target := &ret
21169	if err := gensupport.DecodeResponse(target, res); err != nil {
21170		return nil, err
21171	}
21172	return ret, nil
21173	// {
21174	//   "description": "Add a photo for the user",
21175	//   "httpMethod": "PUT",
21176	//   "id": "directory.users.photos.update",
21177	//   "parameterOrder": [
21178	//     "userKey"
21179	//   ],
21180	//   "parameters": {
21181	//     "userKey": {
21182	//       "description": "Email or immutable ID of the user",
21183	//       "location": "path",
21184	//       "required": true,
21185	//       "type": "string"
21186	//     }
21187	//   },
21188	//   "path": "users/{userKey}/photos/thumbnail",
21189	//   "request": {
21190	//     "$ref": "UserPhoto"
21191	//   },
21192	//   "response": {
21193	//     "$ref": "UserPhoto"
21194	//   },
21195	//   "scopes": [
21196	//     "https://www.googleapis.com/auth/admin.directory.user"
21197	//   ]
21198	// }
21199
21200}
21201
21202// method id "directory.verificationCodes.generate":
21203
21204type VerificationCodesGenerateCall struct {
21205	s          *Service
21206	userKey    string
21207	urlParams_ gensupport.URLParams
21208	ctx_       context.Context
21209	header_    http.Header
21210}
21211
21212// Generate: Generate new backup verification codes for the user.
21213func (r *VerificationCodesService) Generate(userKey string) *VerificationCodesGenerateCall {
21214	c := &VerificationCodesGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21215	c.userKey = userKey
21216	return c
21217}
21218
21219// Fields allows partial responses to be retrieved. See
21220// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21221// for more information.
21222func (c *VerificationCodesGenerateCall) Fields(s ...googleapi.Field) *VerificationCodesGenerateCall {
21223	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21224	return c
21225}
21226
21227// Context sets the context to be used in this call's Do method. Any
21228// pending HTTP request will be aborted if the provided context is
21229// canceled.
21230func (c *VerificationCodesGenerateCall) Context(ctx context.Context) *VerificationCodesGenerateCall {
21231	c.ctx_ = ctx
21232	return c
21233}
21234
21235// Header returns an http.Header that can be modified by the caller to
21236// add HTTP headers to the request.
21237func (c *VerificationCodesGenerateCall) Header() http.Header {
21238	if c.header_ == nil {
21239		c.header_ = make(http.Header)
21240	}
21241	return c.header_
21242}
21243
21244func (c *VerificationCodesGenerateCall) doRequest(alt string) (*http.Response, error) {
21245	reqHeaders := make(http.Header)
21246	for k, v := range c.header_ {
21247		reqHeaders[k] = v
21248	}
21249	reqHeaders.Set("User-Agent", c.s.userAgent())
21250	var body io.Reader = nil
21251	c.urlParams_.Set("alt", alt)
21252	c.urlParams_.Set("prettyPrint", "false")
21253	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes/generate")
21254	urls += "?" + c.urlParams_.Encode()
21255	req, err := http.NewRequest("POST", urls, body)
21256	if err != nil {
21257		return nil, err
21258	}
21259	req.Header = reqHeaders
21260	googleapi.Expand(req.URL, map[string]string{
21261		"userKey": c.userKey,
21262	})
21263	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21264}
21265
21266// Do executes the "directory.verificationCodes.generate" call.
21267func (c *VerificationCodesGenerateCall) Do(opts ...googleapi.CallOption) error {
21268	gensupport.SetOptions(c.urlParams_, opts...)
21269	res, err := c.doRequest("json")
21270	if err != nil {
21271		return err
21272	}
21273	defer googleapi.CloseBody(res)
21274	if err := googleapi.CheckResponse(res); err != nil {
21275		return err
21276	}
21277	return nil
21278	// {
21279	//   "description": "Generate new backup verification codes for the user.",
21280	//   "httpMethod": "POST",
21281	//   "id": "directory.verificationCodes.generate",
21282	//   "parameterOrder": [
21283	//     "userKey"
21284	//   ],
21285	//   "parameters": {
21286	//     "userKey": {
21287	//       "description": "Email or immutable ID of the user",
21288	//       "location": "path",
21289	//       "required": true,
21290	//       "type": "string"
21291	//     }
21292	//   },
21293	//   "path": "users/{userKey}/verificationCodes/generate",
21294	//   "scopes": [
21295	//     "https://www.googleapis.com/auth/admin.directory.user.security"
21296	//   ]
21297	// }
21298
21299}
21300
21301// method id "directory.verificationCodes.invalidate":
21302
21303type VerificationCodesInvalidateCall struct {
21304	s          *Service
21305	userKey    string
21306	urlParams_ gensupport.URLParams
21307	ctx_       context.Context
21308	header_    http.Header
21309}
21310
21311// Invalidate: Invalidate the current backup verification codes for the
21312// user.
21313func (r *VerificationCodesService) Invalidate(userKey string) *VerificationCodesInvalidateCall {
21314	c := &VerificationCodesInvalidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21315	c.userKey = userKey
21316	return c
21317}
21318
21319// Fields allows partial responses to be retrieved. See
21320// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21321// for more information.
21322func (c *VerificationCodesInvalidateCall) Fields(s ...googleapi.Field) *VerificationCodesInvalidateCall {
21323	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21324	return c
21325}
21326
21327// Context sets the context to be used in this call's Do method. Any
21328// pending HTTP request will be aborted if the provided context is
21329// canceled.
21330func (c *VerificationCodesInvalidateCall) Context(ctx context.Context) *VerificationCodesInvalidateCall {
21331	c.ctx_ = ctx
21332	return c
21333}
21334
21335// Header returns an http.Header that can be modified by the caller to
21336// add HTTP headers to the request.
21337func (c *VerificationCodesInvalidateCall) Header() http.Header {
21338	if c.header_ == nil {
21339		c.header_ = make(http.Header)
21340	}
21341	return c.header_
21342}
21343
21344func (c *VerificationCodesInvalidateCall) doRequest(alt string) (*http.Response, error) {
21345	reqHeaders := make(http.Header)
21346	for k, v := range c.header_ {
21347		reqHeaders[k] = v
21348	}
21349	reqHeaders.Set("User-Agent", c.s.userAgent())
21350	var body io.Reader = nil
21351	c.urlParams_.Set("alt", alt)
21352	c.urlParams_.Set("prettyPrint", "false")
21353	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes/invalidate")
21354	urls += "?" + c.urlParams_.Encode()
21355	req, err := http.NewRequest("POST", urls, body)
21356	if err != nil {
21357		return nil, err
21358	}
21359	req.Header = reqHeaders
21360	googleapi.Expand(req.URL, map[string]string{
21361		"userKey": c.userKey,
21362	})
21363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21364}
21365
21366// Do executes the "directory.verificationCodes.invalidate" call.
21367func (c *VerificationCodesInvalidateCall) Do(opts ...googleapi.CallOption) error {
21368	gensupport.SetOptions(c.urlParams_, opts...)
21369	res, err := c.doRequest("json")
21370	if err != nil {
21371		return err
21372	}
21373	defer googleapi.CloseBody(res)
21374	if err := googleapi.CheckResponse(res); err != nil {
21375		return err
21376	}
21377	return nil
21378	// {
21379	//   "description": "Invalidate the current backup verification codes for the user.",
21380	//   "httpMethod": "POST",
21381	//   "id": "directory.verificationCodes.invalidate",
21382	//   "parameterOrder": [
21383	//     "userKey"
21384	//   ],
21385	//   "parameters": {
21386	//     "userKey": {
21387	//       "description": "Email or immutable ID of the user",
21388	//       "location": "path",
21389	//       "required": true,
21390	//       "type": "string"
21391	//     }
21392	//   },
21393	//   "path": "users/{userKey}/verificationCodes/invalidate",
21394	//   "scopes": [
21395	//     "https://www.googleapis.com/auth/admin.directory.user.security"
21396	//   ]
21397	// }
21398
21399}
21400
21401// method id "directory.verificationCodes.list":
21402
21403type VerificationCodesListCall struct {
21404	s            *Service
21405	userKey      string
21406	urlParams_   gensupport.URLParams
21407	ifNoneMatch_ string
21408	ctx_         context.Context
21409	header_      http.Header
21410}
21411
21412// List: Returns the current set of valid backup verification codes for
21413// the specified user.
21414func (r *VerificationCodesService) List(userKey string) *VerificationCodesListCall {
21415	c := &VerificationCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21416	c.userKey = userKey
21417	return c
21418}
21419
21420// Fields allows partial responses to be retrieved. See
21421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21422// for more information.
21423func (c *VerificationCodesListCall) Fields(s ...googleapi.Field) *VerificationCodesListCall {
21424	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21425	return c
21426}
21427
21428// IfNoneMatch sets the optional parameter which makes the operation
21429// fail if the object's ETag matches the given value. This is useful for
21430// getting updates only after the object has changed since the last
21431// request. Use googleapi.IsNotModified to check whether the response
21432// error from Do is the result of In-None-Match.
21433func (c *VerificationCodesListCall) IfNoneMatch(entityTag string) *VerificationCodesListCall {
21434	c.ifNoneMatch_ = entityTag
21435	return c
21436}
21437
21438// Context sets the context to be used in this call's Do method. Any
21439// pending HTTP request will be aborted if the provided context is
21440// canceled.
21441func (c *VerificationCodesListCall) Context(ctx context.Context) *VerificationCodesListCall {
21442	c.ctx_ = ctx
21443	return c
21444}
21445
21446// Header returns an http.Header that can be modified by the caller to
21447// add HTTP headers to the request.
21448func (c *VerificationCodesListCall) Header() http.Header {
21449	if c.header_ == nil {
21450		c.header_ = make(http.Header)
21451	}
21452	return c.header_
21453}
21454
21455func (c *VerificationCodesListCall) doRequest(alt string) (*http.Response, error) {
21456	reqHeaders := make(http.Header)
21457	for k, v := range c.header_ {
21458		reqHeaders[k] = v
21459	}
21460	reqHeaders.Set("User-Agent", c.s.userAgent())
21461	if c.ifNoneMatch_ != "" {
21462		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21463	}
21464	var body io.Reader = nil
21465	c.urlParams_.Set("alt", alt)
21466	c.urlParams_.Set("prettyPrint", "false")
21467	urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userKey}/verificationCodes")
21468	urls += "?" + c.urlParams_.Encode()
21469	req, err := http.NewRequest("GET", urls, body)
21470	if err != nil {
21471		return nil, err
21472	}
21473	req.Header = reqHeaders
21474	googleapi.Expand(req.URL, map[string]string{
21475		"userKey": c.userKey,
21476	})
21477	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21478}
21479
21480// Do executes the "directory.verificationCodes.list" call.
21481// Exactly one of *VerificationCodes or error will be non-nil. Any
21482// non-2xx status code is an error. Response headers are in either
21483// *VerificationCodes.ServerResponse.Header or (if a response was
21484// returned at all) in error.(*googleapi.Error).Header. Use
21485// googleapi.IsNotModified to check whether the returned error was
21486// because http.StatusNotModified was returned.
21487func (c *VerificationCodesListCall) Do(opts ...googleapi.CallOption) (*VerificationCodes, error) {
21488	gensupport.SetOptions(c.urlParams_, opts...)
21489	res, err := c.doRequest("json")
21490	if res != nil && res.StatusCode == http.StatusNotModified {
21491		if res.Body != nil {
21492			res.Body.Close()
21493		}
21494		return nil, &googleapi.Error{
21495			Code:   res.StatusCode,
21496			Header: res.Header,
21497		}
21498	}
21499	if err != nil {
21500		return nil, err
21501	}
21502	defer googleapi.CloseBody(res)
21503	if err := googleapi.CheckResponse(res); err != nil {
21504		return nil, err
21505	}
21506	ret := &VerificationCodes{
21507		ServerResponse: googleapi.ServerResponse{
21508			Header:         res.Header,
21509			HTTPStatusCode: res.StatusCode,
21510		},
21511	}
21512	target := &ret
21513	if err := gensupport.DecodeResponse(target, res); err != nil {
21514		return nil, err
21515	}
21516	return ret, nil
21517	// {
21518	//   "description": "Returns the current set of valid backup verification codes for the specified user.",
21519	//   "httpMethod": "GET",
21520	//   "id": "directory.verificationCodes.list",
21521	//   "parameterOrder": [
21522	//     "userKey"
21523	//   ],
21524	//   "parameters": {
21525	//     "userKey": {
21526	//       "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.",
21527	//       "location": "path",
21528	//       "required": true,
21529	//       "type": "string"
21530	//     }
21531	//   },
21532	//   "path": "users/{userKey}/verificationCodes",
21533	//   "response": {
21534	//     "$ref": "VerificationCodes"
21535	//   },
21536	//   "scopes": [
21537	//     "https://www.googleapis.com/auth/admin.directory.user.security"
21538	//   ]
21539	// }
21540
21541}
21542