1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package cloudidentity provides access to the Cloud Identity API.
8//
9// For product documentation, see: https://cloud.google.com/identity/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/cloudidentity/v1beta1"
16//   ...
17//   ctx := context.Background()
18//   cloudidentityService, err := cloudidentity.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//   cloudidentityService, err := cloudidentity.NewService(ctx, option.WithScopes(cloudidentity.CloudPlatformScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   cloudidentityService, err := cloudidentity.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//   cloudidentityService, err := cloudidentity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package cloudidentity // import "google.golang.org/api/cloudidentity/v1beta1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "cloudidentity:v1beta1"
79const apiName = "cloudidentity"
80const apiVersion = "v1beta1"
81const basePath = "https://cloudidentity.googleapis.com/"
82const mtlsBasePath = "https://cloudidentity.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See your device details
87	CloudIdentityDevicesLookupScope = "https://www.googleapis.com/auth/cloud-identity.devices.lookup"
88
89	// See, change, create, and delete any of the Cloud Identity Groups that
90	// you can access, including the members of each group
91	CloudIdentityGroupsScope = "https://www.googleapis.com/auth/cloud-identity.groups"
92
93	// See any Cloud Identity Groups that you can access, including group
94	// members and their emails
95	CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly"
96
97	// See, edit, configure, and delete your Google Cloud data and see the
98	// email address for your Google Account.
99	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
100)
101
102// NewService creates a new Service.
103func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
104	scopesOption := option.WithScopes(
105		"https://www.googleapis.com/auth/cloud-identity.devices.lookup",
106		"https://www.googleapis.com/auth/cloud-identity.groups",
107		"https://www.googleapis.com/auth/cloud-identity.groups.readonly",
108		"https://www.googleapis.com/auth/cloud-platform",
109	)
110	// NOTE: prepend, so we don't override user-specified scopes.
111	opts = append([]option.ClientOption{scopesOption}, opts...)
112	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
113	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
114	client, endpoint, err := htransport.NewClient(ctx, opts...)
115	if err != nil {
116		return nil, err
117	}
118	s, err := New(client)
119	if err != nil {
120		return nil, err
121	}
122	if endpoint != "" {
123		s.BasePath = endpoint
124	}
125	return s, nil
126}
127
128// New creates a new Service. It uses the provided http.Client for requests.
129//
130// Deprecated: please use NewService instead.
131// To provide a custom HTTP client, use option.WithHTTPClient.
132// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
133func New(client *http.Client) (*Service, error) {
134	if client == nil {
135		return nil, errors.New("client is nil")
136	}
137	s := &Service{client: client, BasePath: basePath}
138	s.Customers = NewCustomersService(s)
139	s.Devices = NewDevicesService(s)
140	s.Groups = NewGroupsService(s)
141	return s, nil
142}
143
144type Service struct {
145	client    *http.Client
146	BasePath  string // API endpoint base URL
147	UserAgent string // optional additional User-Agent fragment
148
149	Customers *CustomersService
150
151	Devices *DevicesService
152
153	Groups *GroupsService
154}
155
156func (s *Service) userAgent() string {
157	if s.UserAgent == "" {
158		return googleapi.UserAgent
159	}
160	return googleapi.UserAgent + " " + s.UserAgent
161}
162
163func NewCustomersService(s *Service) *CustomersService {
164	rs := &CustomersService{s: s}
165	rs.Userinvitations = NewCustomersUserinvitationsService(s)
166	return rs
167}
168
169type CustomersService struct {
170	s *Service
171
172	Userinvitations *CustomersUserinvitationsService
173}
174
175func NewCustomersUserinvitationsService(s *Service) *CustomersUserinvitationsService {
176	rs := &CustomersUserinvitationsService{s: s}
177	return rs
178}
179
180type CustomersUserinvitationsService struct {
181	s *Service
182}
183
184func NewDevicesService(s *Service) *DevicesService {
185	rs := &DevicesService{s: s}
186	rs.DeviceUsers = NewDevicesDeviceUsersService(s)
187	return rs
188}
189
190type DevicesService struct {
191	s *Service
192
193	DeviceUsers *DevicesDeviceUsersService
194}
195
196func NewDevicesDeviceUsersService(s *Service) *DevicesDeviceUsersService {
197	rs := &DevicesDeviceUsersService{s: s}
198	rs.ClientStates = NewDevicesDeviceUsersClientStatesService(s)
199	return rs
200}
201
202type DevicesDeviceUsersService struct {
203	s *Service
204
205	ClientStates *DevicesDeviceUsersClientStatesService
206}
207
208func NewDevicesDeviceUsersClientStatesService(s *Service) *DevicesDeviceUsersClientStatesService {
209	rs := &DevicesDeviceUsersClientStatesService{s: s}
210	return rs
211}
212
213type DevicesDeviceUsersClientStatesService struct {
214	s *Service
215}
216
217func NewGroupsService(s *Service) *GroupsService {
218	rs := &GroupsService{s: s}
219	rs.Memberships = NewGroupsMembershipsService(s)
220	return rs
221}
222
223type GroupsService struct {
224	s *Service
225
226	Memberships *GroupsMembershipsService
227}
228
229func NewGroupsMembershipsService(s *Service) *GroupsMembershipsService {
230	rs := &GroupsMembershipsService{s: s}
231	return rs
232}
233
234type GroupsMembershipsService struct {
235	s *Service
236}
237
238// AndroidAttributes: Resource representing the Android specific
239// attributes of a Device.
240type AndroidAttributes struct {
241	// EnabledUnknownSources: Whether applications from unknown sources can
242	// be installed on device.
243	EnabledUnknownSources bool `json:"enabledUnknownSources,omitempty"`
244
245	// OwnerProfileAccount: Whether this account is on an owner/primary
246	// profile. For phones, only true for owner profiles. Android 4+ devices
247	// can have secondary or restricted user profiles.
248	OwnerProfileAccount bool `json:"ownerProfileAccount,omitempty"`
249
250	// OwnershipPrivilege: Ownership privileges on device.
251	//
252	// Possible values:
253	//   "OWNERSHIP_PRIVILEGE_UNSPECIFIED" - Ownership privilege is not set.
254	//   "DEVICE_ADMINISTRATOR" - Active device administrator privileges on
255	// the device.
256	//   "PROFILE_OWNER" - Profile Owner privileges. The account is in a
257	// managed corporate profile.
258	//   "DEVICE_OWNER" - Device Owner privileges on the device.
259	OwnershipPrivilege string `json:"ownershipPrivilege,omitempty"`
260
261	// SupportsWorkProfile: Whether device supports Android work profiles.
262	// If false, this service will not block access to corp data even if an
263	// administrator turns on the "Enforce Work Profile" policy.
264	SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
265
266	// ForceSendFields is a list of field names (e.g.
267	// "EnabledUnknownSources") to unconditionally include in API requests.
268	// By default, fields with empty or default values are omitted from API
269	// requests. However, any non-pointer, non-interface field appearing in
270	// ForceSendFields will be sent to the server regardless of whether the
271	// field is empty or not. This may be used to include empty fields in
272	// Patch requests.
273	ForceSendFields []string `json:"-"`
274
275	// NullFields is a list of field names (e.g. "EnabledUnknownSources") to
276	// include in API requests with the JSON null value. By default, fields
277	// with empty values are omitted from API requests. However, any field
278	// with an empty value appearing in NullFields will be sent to the
279	// server as null. It is an error if a field in this list has a
280	// non-empty value. This may be used to include null fields in Patch
281	// requests.
282	NullFields []string `json:"-"`
283}
284
285func (s *AndroidAttributes) MarshalJSON() ([]byte, error) {
286	type NoMethod AndroidAttributes
287	raw := NoMethod(*s)
288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
289}
290
291// ApproveDeviceUserRequest: Request message for approving the device to
292// access user data.
293type ApproveDeviceUserRequest struct {
294}
295
296// ApproveDeviceUserResponse: Response message for approving the device
297// to access user data.
298type ApproveDeviceUserResponse struct {
299	// DeviceUser: Resultant DeviceUser object for the action.
300	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
301
302	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
303	// unconditionally include in API requests. By default, fields with
304	// empty or default values are omitted from API requests. However, any
305	// non-pointer, non-interface field appearing in ForceSendFields will be
306	// sent to the server regardless of whether the field is empty or not.
307	// This may be used to include empty fields in Patch requests.
308	ForceSendFields []string `json:"-"`
309
310	// NullFields is a list of field names (e.g. "DeviceUser") to include in
311	// API requests with the JSON null value. By default, fields with empty
312	// values are omitted from API requests. However, any field with an
313	// empty value appearing in NullFields will be sent to the server as
314	// null. It is an error if a field in this list has a non-empty value.
315	// This may be used to include null fields in Patch requests.
316	NullFields []string `json:"-"`
317}
318
319func (s *ApproveDeviceUserResponse) MarshalJSON() ([]byte, error) {
320	type NoMethod ApproveDeviceUserResponse
321	raw := NoMethod(*s)
322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
323}
324
325// BlockDeviceUserRequest: Request message for blocking account on
326// device.
327type BlockDeviceUserRequest struct {
328}
329
330// BlockDeviceUserResponse: Response message for blocking the device
331// from accessing user data.
332type BlockDeviceUserResponse struct {
333	// DeviceUser: Resultant DeviceUser object for the action.
334	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
335
336	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
337	// unconditionally include in API requests. By default, fields with
338	// empty or default values are omitted from API requests. However, any
339	// non-pointer, non-interface field appearing in ForceSendFields will be
340	// sent to the server regardless of whether the field is empty or not.
341	// This may be used to include empty fields in Patch requests.
342	ForceSendFields []string `json:"-"`
343
344	// NullFields is a list of field names (e.g. "DeviceUser") to include in
345	// API requests with the JSON null value. By default, fields with empty
346	// values are omitted from API requests. However, any field with an
347	// empty value appearing in NullFields will be sent to the server as
348	// null. It is an error if a field in this list has a non-empty value.
349	// This may be used to include null fields in Patch requests.
350	NullFields []string `json:"-"`
351}
352
353func (s *BlockDeviceUserResponse) MarshalJSON() ([]byte, error) {
354	type NoMethod BlockDeviceUserResponse
355	raw := NoMethod(*s)
356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
357}
358
359// CancelUserInvitationRequest: Request to cancel sent invitation for
360// target email in UserInvitation.
361type CancelUserInvitationRequest struct {
362}
363
364// CancelWipeDeviceRequest: Request message for cancelling an unfinished
365// device wipe.
366type CancelWipeDeviceRequest struct {
367}
368
369// CancelWipeDeviceResponse: Response message for cancelling an
370// unfinished device wipe.
371type CancelWipeDeviceResponse struct {
372	// Device: Resultant Device object for the action. Note that asset tags
373	// will not be returned in the device object.
374	Device *Device `json:"device,omitempty"`
375
376	// ForceSendFields is a list of field names (e.g. "Device") to
377	// unconditionally include in API requests. By default, fields with
378	// empty or default values are omitted from API requests. However, any
379	// non-pointer, non-interface field appearing in ForceSendFields will be
380	// sent to the server regardless of whether the field is empty or not.
381	// This may be used to include empty fields in Patch requests.
382	ForceSendFields []string `json:"-"`
383
384	// NullFields is a list of field names (e.g. "Device") to include in API
385	// requests with the JSON null value. By default, fields with empty
386	// values are omitted from API requests. However, any field with an
387	// empty value appearing in NullFields will be sent to the server as
388	// null. It is an error if a field in this list has a non-empty value.
389	// This may be used to include null fields in Patch requests.
390	NullFields []string `json:"-"`
391}
392
393func (s *CancelWipeDeviceResponse) MarshalJSON() ([]byte, error) {
394	type NoMethod CancelWipeDeviceResponse
395	raw := NoMethod(*s)
396	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
397}
398
399// CancelWipeDeviceUserRequest: Request message for cancelling an
400// unfinished user account wipe.
401type CancelWipeDeviceUserRequest struct {
402}
403
404// CancelWipeDeviceUserResponse: Response message for cancelling an
405// unfinished user account wipe.
406type CancelWipeDeviceUserResponse struct {
407	// DeviceUser: Resultant DeviceUser object for the action.
408	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
409
410	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
411	// unconditionally include in API requests. By default, fields with
412	// empty or default values are omitted from API requests. However, any
413	// non-pointer, non-interface field appearing in ForceSendFields will be
414	// sent to the server regardless of whether the field is empty or not.
415	// This may be used to include empty fields in Patch requests.
416	ForceSendFields []string `json:"-"`
417
418	// NullFields is a list of field names (e.g. "DeviceUser") to include in
419	// API requests with the JSON null value. By default, fields with empty
420	// values are omitted from API requests. However, any field with an
421	// empty value appearing in NullFields will be sent to the server as
422	// null. It is an error if a field in this list has a non-empty value.
423	// This may be used to include null fields in Patch requests.
424	NullFields []string `json:"-"`
425}
426
427func (s *CancelWipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
428	type NoMethod CancelWipeDeviceUserResponse
429	raw := NoMethod(*s)
430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
431}
432
433// CheckTransitiveMembershipResponse: The response message for
434// MembershipsService.CheckTransitiveMembership.
435type CheckTransitiveMembershipResponse struct {
436	// HasMembership: Response does not include the possible roles of a
437	// member since the behavior of this rpc is not all-or-nothing unlike
438	// the other rpcs. So, it may not be possible to list all the roles
439	// definitively, due to possible lack of authorization in some of the
440	// paths.
441	HasMembership bool `json:"hasMembership,omitempty"`
442
443	// ServerResponse contains the HTTP response code and headers from the
444	// server.
445	googleapi.ServerResponse `json:"-"`
446
447	// ForceSendFields is a list of field names (e.g. "HasMembership") to
448	// unconditionally include in API requests. By default, fields with
449	// empty or default values are omitted from API requests. However, any
450	// non-pointer, non-interface field appearing in ForceSendFields will be
451	// sent to the server regardless of whether the field is empty or not.
452	// This may be used to include empty fields in Patch requests.
453	ForceSendFields []string `json:"-"`
454
455	// NullFields is a list of field names (e.g. "HasMembership") to include
456	// in API requests with the JSON null value. By default, fields with
457	// empty values are omitted from API requests. However, any field with
458	// an empty value appearing in NullFields will be sent to the server as
459	// null. It is an error if a field in this list has a non-empty value.
460	// This may be used to include null fields in Patch requests.
461	NullFields []string `json:"-"`
462}
463
464func (s *CheckTransitiveMembershipResponse) MarshalJSON() ([]byte, error) {
465	type NoMethod CheckTransitiveMembershipResponse
466	raw := NoMethod(*s)
467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
468}
469
470// ClientState: Represents the state associated with an API client
471// calling the Devices API. Resource representing ClientState and
472// supports updates from API users
473type ClientState struct {
474	// AssetTags: The caller can specify asset tags for this resource
475	AssetTags []string `json:"assetTags,omitempty"`
476
477	// ComplianceState: The compliance state of the resource as specified by
478	// the API client.
479	//
480	// Possible values:
481	//   "COMPLIANCE_STATE_UNSPECIFIED" - The compliance state of the
482	// resource is unknown or unspecified.
483	//   "COMPLIANT" - Device is compliant with third party policies
484	//   "NON_COMPLIANT" - Device is not compliant with third party policies
485	ComplianceState string `json:"complianceState,omitempty"`
486
487	// CreateTime: Output only. The time the client state data was created.
488	CreateTime string `json:"createTime,omitempty"`
489
490	// CustomId: This field may be used to store a unique identifier for the
491	// API resource within which these CustomAttributes are a field.
492	CustomId string `json:"customId,omitempty"`
493
494	// Etag: The token that needs to be passed back for concurrency control
495	// in updates. Token needs to be passed back in UpdateRequest
496	Etag string `json:"etag,omitempty"`
497
498	// HealthScore: The Health score of the resource
499	//
500	// Possible values:
501	//   "HEALTH_SCORE_UNSPECIFIED" - Default value
502	//   "VERY_POOR" - The object is in very poor health as defined by the
503	// caller.
504	//   "POOR" - The object is in poor health as defined by the caller.
505	//   "NEUTRAL" - The object health is neither good nor poor, as defined
506	// by the caller.
507	//   "GOOD" - The object is in good health as defined by the caller.
508	//   "VERY_GOOD" - The object is in very good health as defined by the
509	// caller.
510	HealthScore string `json:"healthScore,omitempty"`
511
512	// KeyValuePairs: The map of key-value attributes stored by callers
513	// specific to a device. The total serialized length of this map may not
514	// exceed 10KB. No limit is placed on the number of attributes in a map.
515	KeyValuePairs map[string]CustomAttributeValue `json:"keyValuePairs,omitempty"`
516
517	// LastUpdateTime: Output only. The time the client state data was last
518	// updated.
519	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
520
521	// Managed: The management state of the resource as specified by the API
522	// client.
523	//
524	// Possible values:
525	//   "MANAGED_STATE_UNSPECIFIED" - The management state of the resource
526	// is unknown or unspecified.
527	//   "MANAGED" - The resource is managed.
528	//   "UNMANAGED" - The resource is not managed.
529	Managed string `json:"managed,omitempty"`
530
531	// Name: Output only. Resource name
532	// (https://cloud.google.com/apis/design/resource_names) of the
533	// ClientState in format:
534	// `devices/{device_id}/deviceUsers/{device_user_id}/clientState/{partner
535	// _id}`, where partner_id corresponds to the partner storing the data.
536	Name string `json:"name,omitempty"`
537
538	// OwnerType: Output only. The owner of the ClientState
539	//
540	// Possible values:
541	//   "OWNER_TYPE_UNSPECIFIED" - Unknown owner type
542	//   "OWNER_TYPE_CUSTOMER" - Customer is the owner
543	//   "OWNER_TYPE_PARTNER" - Partner is the owner
544	OwnerType string `json:"ownerType,omitempty"`
545
546	// ScoreReason: A descriptive cause of the health score.
547	ScoreReason string `json:"scoreReason,omitempty"`
548
549	// ServerResponse contains the HTTP response code and headers from the
550	// server.
551	googleapi.ServerResponse `json:"-"`
552
553	// ForceSendFields is a list of field names (e.g. "AssetTags") to
554	// unconditionally include in API requests. By default, fields with
555	// empty or default values are omitted from API requests. However, any
556	// non-pointer, non-interface field appearing in ForceSendFields will be
557	// sent to the server regardless of whether the field is empty or not.
558	// This may be used to include empty fields in Patch requests.
559	ForceSendFields []string `json:"-"`
560
561	// NullFields is a list of field names (e.g. "AssetTags") to include in
562	// API requests with the JSON null value. By default, fields with empty
563	// values are omitted from API requests. However, any field with an
564	// empty value appearing in NullFields will be sent to the server as
565	// null. It is an error if a field in this list has a non-empty value.
566	// This may be used to include null fields in Patch requests.
567	NullFields []string `json:"-"`
568}
569
570func (s *ClientState) MarshalJSON() ([]byte, error) {
571	type NoMethod ClientState
572	raw := NoMethod(*s)
573	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
574}
575
576// CreateDeviceRequest: Request message for creating a Company Owned
577// device.
578type CreateDeviceRequest struct {
579	// Device: Required. The device to be created. The name field within
580	// this device is ignored in the create method. A new name is created by
581	// the method, and returned within the response. Only the fields
582	// `device_type`, `serial_number` and `asset_tag` (if present) are used
583	// to create the device. All other fields are ignored. The `device_type`
584	// and `serial_number` fields are required.
585	Device *Device `json:"device,omitempty"`
586
587	// ForceSendFields is a list of field names (e.g. "Device") to
588	// unconditionally include in API requests. By default, fields with
589	// empty or default values are omitted from API requests. However, any
590	// non-pointer, non-interface field appearing in ForceSendFields will be
591	// sent to the server regardless of whether the field is empty or not.
592	// This may be used to include empty fields in Patch requests.
593	ForceSendFields []string `json:"-"`
594
595	// NullFields is a list of field names (e.g. "Device") to include in API
596	// requests with the JSON null value. By default, fields with empty
597	// values are omitted from API requests. However, any field with an
598	// empty value appearing in NullFields will be sent to the server as
599	// null. It is an error if a field in this list has a non-empty value.
600	// This may be used to include null fields in Patch requests.
601	NullFields []string `json:"-"`
602}
603
604func (s *CreateDeviceRequest) MarshalJSON() ([]byte, error) {
605	type NoMethod CreateDeviceRequest
606	raw := NoMethod(*s)
607	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
608}
609
610// CustomAttributeValue: Additional custom attribute values may be one
611// of these types
612type CustomAttributeValue struct {
613	// BoolValue: Represents a boolean value.
614	BoolValue bool `json:"boolValue,omitempty"`
615
616	// NumberValue: Represents a double value.
617	NumberValue float64 `json:"numberValue,omitempty"`
618
619	// StringValue: Represents a string value.
620	StringValue string `json:"stringValue,omitempty"`
621
622	// ForceSendFields is a list of field names (e.g. "BoolValue") to
623	// unconditionally include in API requests. By default, fields with
624	// empty or default values are omitted from API requests. However, any
625	// non-pointer, non-interface field appearing in ForceSendFields will be
626	// sent to the server regardless of whether the field is empty or not.
627	// This may be used to include empty fields in Patch requests.
628	ForceSendFields []string `json:"-"`
629
630	// NullFields is a list of field names (e.g. "BoolValue") to include in
631	// API requests with the JSON null value. By default, fields with empty
632	// values are omitted from API requests. However, any field with an
633	// empty value appearing in NullFields will be sent to the server as
634	// null. It is an error if a field in this list has a non-empty value.
635	// This may be used to include null fields in Patch requests.
636	NullFields []string `json:"-"`
637}
638
639func (s *CustomAttributeValue) MarshalJSON() ([]byte, error) {
640	type NoMethod CustomAttributeValue
641	raw := NoMethod(*s)
642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
643}
644
645func (s *CustomAttributeValue) UnmarshalJSON(data []byte) error {
646	type NoMethod CustomAttributeValue
647	var s1 struct {
648		NumberValue gensupport.JSONFloat64 `json:"numberValue"`
649		*NoMethod
650	}
651	s1.NoMethod = (*NoMethod)(s)
652	if err := json.Unmarshal(data, &s1); err != nil {
653		return err
654	}
655	s.NumberValue = float64(s1.NumberValue)
656	return nil
657}
658
659// Device: A Device within the Cloud Identity Devices API. Represents a
660// Device known to Google Cloud, independent of the device ownership,
661// type, and whether it is assigned or in use by a user.
662type Device struct {
663	// AndroidSpecificAttributes: Output only. Attributes specific to
664	// Android devices.
665	AndroidSpecificAttributes *AndroidAttributes `json:"androidSpecificAttributes,omitempty"`
666
667	// AssetTag: Asset tag of the device.
668	AssetTag string `json:"assetTag,omitempty"`
669
670	// BasebandVersion: Output only. Baseband version of the device.
671	BasebandVersion string `json:"basebandVersion,omitempty"`
672
673	// BootloaderVersion: Output only. Device bootloader version. Example:
674	// 0.6.7.
675	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
676
677	// Brand: Output only. Device brand. Example: Samsung.
678	Brand string `json:"brand,omitempty"`
679
680	// BuildNumber: Output only. Build number of the device.
681	BuildNumber string `json:"buildNumber,omitempty"`
682
683	// CompromisedState: Output only. Represents whether the Device is
684	// compromised.
685	//
686	// Possible values:
687	//   "COMPROMISED_STATE_UNSPECIFIED" - Default value.
688	//   "COMPROMISED" - The device is compromised (currently, this means
689	// Android device is rooted).
690	//   "UNCOMPROMISED" - The device is safe (currently, this means Android
691	// device is unrooted).
692	CompromisedState string `json:"compromisedState,omitempty"`
693
694	// CreateTime: Output only. When the Company-Owned device was imported.
695	// This field is empty for BYOD devices.
696	CreateTime string `json:"createTime,omitempty"`
697
698	// DeviceType: Output only. Type of device.
699	//
700	// Possible values:
701	//   "DEVICE_TYPE_UNSPECIFIED" - Unknown device type
702	//   "ANDROID" - Device is an Android device
703	//   "IOS" - Device is an iOS device
704	//   "GOOGLE_SYNC" - Device is a Google Sync device.
705	//   "WINDOWS" - Device is a Windows device.
706	//   "MAC_OS" - Device is a MacOS device.
707	//   "LINUX" - Device is a Linux device.
708	//   "CHROME_OS" - Device is a ChromeOS device.
709	DeviceType string `json:"deviceType,omitempty"`
710
711	// EnabledDeveloperOptions: Output only. Whether developer options is
712	// enabled on device.
713	EnabledDeveloperOptions bool `json:"enabledDeveloperOptions,omitempty"`
714
715	// EnabledUsbDebugging: Output only. Whether USB debugging is enabled on
716	// device.
717	EnabledUsbDebugging bool `json:"enabledUsbDebugging,omitempty"`
718
719	// EncryptionState: Output only. Device encryption state.
720	//
721	// Possible values:
722	//   "ENCRYPTION_STATE_UNSPECIFIED" - Encryption Status is not set.
723	//   "UNSUPPORTED_BY_DEVICE" - Device doesn't support encryption.
724	//   "ENCRYPTED" - Device is encrypted.
725	//   "NOT_ENCRYPTED" - Device is not encrypted.
726	EncryptionState string `json:"encryptionState,omitempty"`
727
728	// Imei: Output only. IMEI number of device if GSM device; empty
729	// otherwise.
730	Imei string `json:"imei,omitempty"`
731
732	// KernelVersion: Output only. Kernel version of the device.
733	KernelVersion string `json:"kernelVersion,omitempty"`
734
735	// LastSyncTime: Most recent time when device synced with this service.
736	LastSyncTime string `json:"lastSyncTime,omitempty"`
737
738	// ManagementState: Output only. Management state of the device
739	//
740	// Possible values:
741	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
742	// unused.
743	//   "APPROVED" - Device is approved.
744	//   "BLOCKED" - Device is blocked.
745	//   "PENDING" - Device is pending approval.
746	//   "UNPROVISIONED" - The device is not provisioned. Device will start
747	// from this state until some action is taken (i.e. a user starts using
748	// the device).
749	//   "WIPING" - Data and settings on the device are being removed.
750	//   "WIPED" - All data and settings on the device are removed.
751	ManagementState string `json:"managementState,omitempty"`
752
753	// Manufacturer: Output only. Device manufacturer. Example: Motorola.
754	Manufacturer string `json:"manufacturer,omitempty"`
755
756	// Meid: Output only. MEID number of device if CDMA device; empty
757	// otherwise.
758	Meid string `json:"meid,omitempty"`
759
760	// Model: Output only. Model name of device. Example: Pixel 3.
761	Model string `json:"model,omitempty"`
762
763	// Name: Output only. Resource name
764	// (https://cloud.google.com/apis/design/resource_names) of the Device
765	// in format: `devices/{device_id}`, where device_id is the unique id
766	// assigned to the Device.
767	Name string `json:"name,omitempty"`
768
769	// NetworkOperator: Output only. Mobile or network operator of device,
770	// if available.
771	NetworkOperator string `json:"networkOperator,omitempty"`
772
773	// OsVersion: Output only. OS version of the device. Example: Android
774	// 8.1.0.
775	OsVersion string `json:"osVersion,omitempty"`
776
777	// OtherAccounts: Output only. Domain name for Google accounts on
778	// device. Type for other accounts on device. On Android, will only be
779	// populated if |ownership_privilege| is |PROFILE_OWNER| or
780	// |DEVICE_OWNER|. Does not include the account signed in to the device
781	// policy app if that account's domain has only one account. Examples:
782	// "com.example", "xyz.com".
783	OtherAccounts []string `json:"otherAccounts,omitempty"`
784
785	// OwnerType: Output only. Whether the device is owned by the company or
786	// an individual
787	//
788	// Possible values:
789	//   "DEVICE_OWNERSHIP_UNSPECIFIED" - Default value. The value is
790	// unused.
791	//   "COMPANY" - Company owns the device.
792	//   "BYOD" - Bring Your Own Device (i.e. individual owns the device)
793	OwnerType string `json:"ownerType,omitempty"`
794
795	// ReleaseVersion: Output only. OS release version. Example: 6.0.
796	ReleaseVersion string `json:"releaseVersion,omitempty"`
797
798	// SecurityPatchTime: Output only. OS security patch update time on
799	// device.
800	SecurityPatchTime string `json:"securityPatchTime,omitempty"`
801
802	// SerialNumber: Serial Number of device. Example: HT82V1A01076.
803	SerialNumber string `json:"serialNumber,omitempty"`
804
805	// WifiMacAddresses: WiFi MAC addresses of device.
806	WifiMacAddresses []string `json:"wifiMacAddresses,omitempty"`
807
808	// ServerResponse contains the HTTP response code and headers from the
809	// server.
810	googleapi.ServerResponse `json:"-"`
811
812	// ForceSendFields is a list of field names (e.g.
813	// "AndroidSpecificAttributes") to unconditionally include in API
814	// requests. By default, fields with empty or default values are omitted
815	// from API requests. However, any non-pointer, non-interface field
816	// appearing in ForceSendFields will be sent to the server regardless of
817	// whether the field is empty or not. This may be used to include empty
818	// fields in Patch requests.
819	ForceSendFields []string `json:"-"`
820
821	// NullFields is a list of field names (e.g.
822	// "AndroidSpecificAttributes") to include in API requests with the JSON
823	// null value. By default, fields with empty values are omitted from API
824	// requests. However, any field with an empty value appearing in
825	// NullFields will be sent to the server as null. It is an error if a
826	// field in this list has a non-empty value. This may be used to include
827	// null fields in Patch requests.
828	NullFields []string `json:"-"`
829}
830
831func (s *Device) MarshalJSON() ([]byte, error) {
832	type NoMethod Device
833	raw := NoMethod(*s)
834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
835}
836
837// DeviceUser: Represents a user's use of a Device in the Cloud Identity
838// Devices API. A DeviceUser is a resource representing a user's use of
839// a Device
840type DeviceUser struct {
841	// CompromisedState: Compromised State of the DeviceUser object
842	//
843	// Possible values:
844	//   "COMPROMISED_STATE_UNSPECIFIED" - Compromised state of Device User
845	// account is unknown or unspecified.
846	//   "COMPROMISED" - Device User Account is compromised.
847	//   "NOT_COMPROMISED" - Device User Account is not compromised.
848	CompromisedState string `json:"compromisedState,omitempty"`
849
850	// CreateTime: When the user first signed in to the device
851	CreateTime string `json:"createTime,omitempty"`
852
853	// FirstSyncTime: Output only. Most recent time when user registered
854	// with this service.
855	FirstSyncTime string `json:"firstSyncTime,omitempty"`
856
857	// LanguageCode: Output only. Default locale used on device, in IETF
858	// BCP-47 format.
859	LanguageCode string `json:"languageCode,omitempty"`
860
861	// LastSyncTime: Output only. Last time when user synced with policies.
862	LastSyncTime string `json:"lastSyncTime,omitempty"`
863
864	// ManagementState: Output only. Management state of the user on the
865	// device.
866	//
867	// Possible values:
868	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
869	// unused.
870	//   "WIPING" - This user's data and profile is being removed from the
871	// device.
872	//   "WIPED" - This user's data and profile is removed from the device.
873	//   "APPROVED" - User is approved to access data on the device.
874	//   "BLOCKED" - User is blocked from accessing data on the device.
875	//   "PENDING_APPROVAL" - User is awaiting approval.
876	//   "UNENROLLED" - User is unenrolled from Advanced Windows Management,
877	// but the Windows account is still intact.
878	ManagementState string `json:"managementState,omitempty"`
879
880	// Name: Output only. Resource name
881	// (https://cloud.google.com/apis/design/resource_names) of the
882	// DeviceUser in format:
883	// `devices/{device_id}/deviceUsers/{device_user_id}`, where
884	// `device_user_id` uniquely identifies a user's use of a device.
885	Name string `json:"name,omitempty"`
886
887	// PasswordState: Password state of the DeviceUser object
888	//
889	// Possible values:
890	//   "PASSWORD_STATE_UNSPECIFIED" - Password state not set.
891	//   "PASSWORD_SET" - Password set in object.
892	//   "PASSWORD_NOT_SET" - Password not set in object.
893	PasswordState string `json:"passwordState,omitempty"`
894
895	// UserAgent: Output only. User agent on the device for this specific
896	// user
897	UserAgent string `json:"userAgent,omitempty"`
898
899	// UserEmail: Email address of the user registered on the device.
900	UserEmail string `json:"userEmail,omitempty"`
901
902	// ServerResponse contains the HTTP response code and headers from the
903	// server.
904	googleapi.ServerResponse `json:"-"`
905
906	// ForceSendFields is a list of field names (e.g. "CompromisedState") to
907	// unconditionally include in API requests. By default, fields with
908	// empty or default values are omitted from API requests. However, any
909	// non-pointer, non-interface field appearing in ForceSendFields will be
910	// sent to the server regardless of whether the field is empty or not.
911	// This may be used to include empty fields in Patch requests.
912	ForceSendFields []string `json:"-"`
913
914	// NullFields is a list of field names (e.g. "CompromisedState") to
915	// include in API requests with the JSON null value. By default, fields
916	// with empty values are omitted from API requests. However, any field
917	// with an empty value appearing in NullFields will be sent to the
918	// server as null. It is an error if a field in this list has a
919	// non-empty value. This may be used to include null fields in Patch
920	// requests.
921	NullFields []string `json:"-"`
922}
923
924func (s *DeviceUser) MarshalJSON() ([]byte, error) {
925	type NoMethod DeviceUser
926	raw := NoMethod(*s)
927	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
928}
929
930// DynamicGroupMetadata: Dynamic group metadata like queries and status.
931type DynamicGroupMetadata struct {
932	// Queries: Memberships will be the union of all queries. Only one entry
933	// with USER resource is currently supported. Customers can create up to
934	// 100 dynamic groups.
935	Queries []*DynamicGroupQuery `json:"queries,omitempty"`
936
937	// Status: Output only. Status of the dynamic group.
938	Status *DynamicGroupStatus `json:"status,omitempty"`
939
940	// ForceSendFields is a list of field names (e.g. "Queries") to
941	// unconditionally include in API requests. By default, fields with
942	// empty or default values are omitted from API requests. However, any
943	// non-pointer, non-interface field appearing in ForceSendFields will be
944	// sent to the server regardless of whether the field is empty or not.
945	// This may be used to include empty fields in Patch requests.
946	ForceSendFields []string `json:"-"`
947
948	// NullFields is a list of field names (e.g. "Queries") to include in
949	// API requests with the JSON null value. By default, fields with empty
950	// values are omitted from API requests. However, any field with an
951	// empty value appearing in NullFields will be sent to the server as
952	// null. It is an error if a field in this list has a non-empty value.
953	// This may be used to include null fields in Patch requests.
954	NullFields []string `json:"-"`
955}
956
957func (s *DynamicGroupMetadata) MarshalJSON() ([]byte, error) {
958	type NoMethod DynamicGroupMetadata
959	raw := NoMethod(*s)
960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
961}
962
963// DynamicGroupQuery: Defines a query on a resource.
964type DynamicGroupQuery struct {
965	// Query: Query that determines the memberships of the dynamic group.
966	// Examples: All users with at least one `organizations.department` of
967	// engineering. `user.organizations.exists(org,
968	// org.department=='engineering')` All users with at least one location
969	// that has `area` of `foo` and `building_id` of `bar`.
970	// `user.locations.exists(loc, loc.area=='foo' &&
971	// loc.building_id=='bar')`
972	Query string `json:"query,omitempty"`
973
974	// Possible values:
975	//   "RESOURCE_TYPE_UNSPECIFIED" - Default value (not valid)
976	//   "USER" - For queries on User
977	ResourceType string `json:"resourceType,omitempty"`
978
979	// ForceSendFields is a list of field names (e.g. "Query") to
980	// unconditionally include in API requests. By default, fields with
981	// empty or default values are omitted from API requests. However, any
982	// non-pointer, non-interface field appearing in ForceSendFields will be
983	// sent to the server regardless of whether the field is empty or not.
984	// This may be used to include empty fields in Patch requests.
985	ForceSendFields []string `json:"-"`
986
987	// NullFields is a list of field names (e.g. "Query") to include in API
988	// requests with the JSON null value. By default, fields with empty
989	// values are omitted from API requests. However, any field with an
990	// empty value appearing in NullFields will be sent to the server as
991	// null. It is an error if a field in this list has a non-empty value.
992	// This may be used to include null fields in Patch requests.
993	NullFields []string `json:"-"`
994}
995
996func (s *DynamicGroupQuery) MarshalJSON() ([]byte, error) {
997	type NoMethod DynamicGroupQuery
998	raw := NoMethod(*s)
999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1000}
1001
1002// DynamicGroupStatus: The current status of a dynamic group along with
1003// timestamp.
1004type DynamicGroupStatus struct {
1005	// Status: Status of the dynamic group.
1006	//
1007	// Possible values:
1008	//   "STATUS_UNSPECIFIED" - Default.
1009	//   "UP_TO_DATE" - The dynamic group is up-to-date.
1010	//   "UPDATING_MEMBERSHIPS" - The dynamic group has just been created
1011	// and memberships are being updated.
1012	Status string `json:"status,omitempty"`
1013
1014	// StatusTime: The latest time at which the dynamic group is guaranteed
1015	// to be in the given status. If status is `UP_TO_DATE`, the latest time
1016	// at which the dynamic group was confirmed to be up-to-date. If status
1017	// is `UPDATING_MEMBERSHIPS`, the time at which dynamic group was
1018	// created.
1019	StatusTime string `json:"statusTime,omitempty"`
1020
1021	// ForceSendFields is a list of field names (e.g. "Status") to
1022	// unconditionally include in API requests. By default, fields with
1023	// empty or default values are omitted from API requests. However, any
1024	// non-pointer, non-interface field appearing in ForceSendFields will be
1025	// sent to the server regardless of whether the field is empty or not.
1026	// This may be used to include empty fields in Patch requests.
1027	ForceSendFields []string `json:"-"`
1028
1029	// NullFields is a list of field names (e.g. "Status") to include in API
1030	// requests with the JSON null value. By default, fields with empty
1031	// values are omitted from API requests. However, any field with an
1032	// empty value appearing in NullFields will be sent to the server as
1033	// null. It is an error if a field in this list has a non-empty value.
1034	// This may be used to include null fields in Patch requests.
1035	NullFields []string `json:"-"`
1036}
1037
1038func (s *DynamicGroupStatus) MarshalJSON() ([]byte, error) {
1039	type NoMethod DynamicGroupStatus
1040	raw := NoMethod(*s)
1041	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1042}
1043
1044// EntityKey: A unique identifier for an entity in the Cloud Identity
1045// Groups API. An entity can represent either a group with an optional
1046// `namespace` or a user without a `namespace`. The combination of `id`
1047// and `namespace` must be unique; however, the same `id` can be used
1048// with different `namespace`s.
1049type EntityKey struct {
1050	// Id: The ID of the entity. For Google-managed entities, the `id` must
1051	// be the email address of an existing group or user. For
1052	// external-identity-mapped entities, the `id` must be a string
1053	// conforming to the Identity Source's requirements. Must be unique
1054	// within a `namespace`.
1055	Id string `json:"id,omitempty"`
1056
1057	// Namespace: The namespace in which the entity exists. If not
1058	// specified, the `EntityKey` represents a Google-managed entity such as
1059	// a Google user or a Google Group. If specified, the `EntityKey`
1060	// represents an external-identity-mapped group. The namespace must
1061	// correspond to an identity source created in Admin Console and must be
1062	// in the form of `identitysources/{identity_source_id}`.
1063	Namespace string `json:"namespace,omitempty"`
1064
1065	// ForceSendFields is a list of field names (e.g. "Id") to
1066	// unconditionally include in API requests. By default, fields with
1067	// empty or default values are omitted from API requests. However, any
1068	// non-pointer, non-interface field appearing in ForceSendFields will be
1069	// sent to the server regardless of whether the field is empty or not.
1070	// This may be used to include empty fields in Patch requests.
1071	ForceSendFields []string `json:"-"`
1072
1073	// NullFields is a list of field names (e.g. "Id") to include in API
1074	// requests with the JSON null value. By default, fields with empty
1075	// values are omitted from API requests. However, any field with an
1076	// empty value appearing in NullFields will be sent to the server as
1077	// null. It is an error if a field in this list has a non-empty value.
1078	// This may be used to include null fields in Patch requests.
1079	NullFields []string `json:"-"`
1080}
1081
1082func (s *EntityKey) MarshalJSON() ([]byte, error) {
1083	type NoMethod EntityKey
1084	raw := NoMethod(*s)
1085	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1086}
1087
1088// ExpiryDetail: The `MembershipRole` expiry details.
1089type ExpiryDetail struct {
1090	// ExpireTime: The time at which the `MembershipRole` will expire.
1091	ExpireTime string `json:"expireTime,omitempty"`
1092
1093	// ForceSendFields is a list of field names (e.g. "ExpireTime") to
1094	// unconditionally include in API requests. By default, fields with
1095	// empty or default values are omitted from API requests. However, any
1096	// non-pointer, non-interface field appearing in ForceSendFields will be
1097	// sent to the server regardless of whether the field is empty or not.
1098	// This may be used to include empty fields in Patch requests.
1099	ForceSendFields []string `json:"-"`
1100
1101	// NullFields is a list of field names (e.g. "ExpireTime") to include in
1102	// API requests with the JSON null value. By default, fields with empty
1103	// values are omitted from API requests. However, any field with an
1104	// empty value appearing in NullFields will be sent to the server as
1105	// null. It is an error if a field in this list has a non-empty value.
1106	// This may be used to include null fields in Patch requests.
1107	NullFields []string `json:"-"`
1108}
1109
1110func (s *ExpiryDetail) MarshalJSON() ([]byte, error) {
1111	type NoMethod ExpiryDetail
1112	raw := NoMethod(*s)
1113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1114}
1115
1116// GetMembershipGraphResponse: The response message for
1117// MembershipsService.GetMembershipGraph.
1118type GetMembershipGraphResponse struct {
1119	// AdjacencyList: The membership graph's path information represented as
1120	// an adjacency list.
1121	AdjacencyList []*MembershipAdjacencyList `json:"adjacencyList,omitempty"`
1122
1123	// Groups: The resources representing each group in the adjacency list.
1124	// Each group in this list can be correlated to a 'group' of the
1125	// MembershipAdjacencyList using the 'name' of the Group resource.
1126	Groups []*Group `json:"groups,omitempty"`
1127
1128	// ForceSendFields is a list of field names (e.g. "AdjacencyList") to
1129	// unconditionally include in API requests. By default, fields with
1130	// empty or default values are omitted from API requests. However, any
1131	// non-pointer, non-interface field appearing in ForceSendFields will be
1132	// sent to the server regardless of whether the field is empty or not.
1133	// This may be used to include empty fields in Patch requests.
1134	ForceSendFields []string `json:"-"`
1135
1136	// NullFields is a list of field names (e.g. "AdjacencyList") to include
1137	// in API requests with the JSON null value. By default, fields with
1138	// empty values are omitted from API requests. However, any field with
1139	// an empty value appearing in NullFields will be sent to the server as
1140	// null. It is an error if a field in this list has a non-empty value.
1141	// This may be used to include null fields in Patch requests.
1142	NullFields []string `json:"-"`
1143}
1144
1145func (s *GetMembershipGraphResponse) MarshalJSON() ([]byte, error) {
1146	type NoMethod GetMembershipGraphResponse
1147	raw := NoMethod(*s)
1148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1149}
1150
1151// GoogleAppsCloudidentityDevicesV1AndroidAttributes: Resource
1152// representing the Android specific attributes of a Device.
1153type GoogleAppsCloudidentityDevicesV1AndroidAttributes struct {
1154	// EnabledUnknownSources: Whether applications from unknown sources can
1155	// be installed on device.
1156	EnabledUnknownSources bool `json:"enabledUnknownSources,omitempty"`
1157
1158	// OwnerProfileAccount: Whether this account is on an owner/primary
1159	// profile. For phones, only true for owner profiles. Android 4+ devices
1160	// can have secondary or restricted user profiles.
1161	OwnerProfileAccount bool `json:"ownerProfileAccount,omitempty"`
1162
1163	// OwnershipPrivilege: Ownership privileges on device.
1164	//
1165	// Possible values:
1166	//   "OWNERSHIP_PRIVILEGE_UNSPECIFIED" - Ownership privilege is not set.
1167	//   "DEVICE_ADMINISTRATOR" - Active device administrator privileges on
1168	// the device.
1169	//   "PROFILE_OWNER" - Profile Owner privileges. The account is in a
1170	// managed corporate profile.
1171	//   "DEVICE_OWNER" - Device Owner privileges on the device.
1172	OwnershipPrivilege string `json:"ownershipPrivilege,omitempty"`
1173
1174	// SupportsWorkProfile: Whether device supports Android work profiles.
1175	// If false, this service will not block access to corp data even if an
1176	// administrator turns on the "Enforce Work Profile" policy.
1177	SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
1178
1179	// ForceSendFields is a list of field names (e.g.
1180	// "EnabledUnknownSources") to unconditionally include in API requests.
1181	// By default, fields with empty or default values are omitted from API
1182	// requests. However, any non-pointer, non-interface field appearing in
1183	// ForceSendFields will be sent to the server regardless of whether the
1184	// field is empty or not. This may be used to include empty fields in
1185	// Patch requests.
1186	ForceSendFields []string `json:"-"`
1187
1188	// NullFields is a list of field names (e.g. "EnabledUnknownSources") to
1189	// include in API requests with the JSON null value. By default, fields
1190	// with empty values are omitted from API requests. However, any field
1191	// with an empty value appearing in NullFields will be sent to the
1192	// server as null. It is an error if a field in this list has a
1193	// non-empty value. This may be used to include null fields in Patch
1194	// requests.
1195	NullFields []string `json:"-"`
1196}
1197
1198func (s *GoogleAppsCloudidentityDevicesV1AndroidAttributes) MarshalJSON() ([]byte, error) {
1199	type NoMethod GoogleAppsCloudidentityDevicesV1AndroidAttributes
1200	raw := NoMethod(*s)
1201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1202}
1203
1204// GoogleAppsCloudidentityDevicesV1ApproveDeviceUserMetadata: Metadata
1205// for ApproveDeviceUser LRO.
1206type GoogleAppsCloudidentityDevicesV1ApproveDeviceUserMetadata struct {
1207}
1208
1209// GoogleAppsCloudidentityDevicesV1ApproveDeviceUserResponse: Response
1210// message for approving the device to access user data.
1211type GoogleAppsCloudidentityDevicesV1ApproveDeviceUserResponse struct {
1212	// DeviceUser: Resultant DeviceUser object for the action.
1213	DeviceUser *GoogleAppsCloudidentityDevicesV1DeviceUser `json:"deviceUser,omitempty"`
1214
1215	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
1216	// unconditionally include in API requests. By default, fields with
1217	// empty or default values are omitted from API requests. However, any
1218	// non-pointer, non-interface field appearing in ForceSendFields will be
1219	// sent to the server regardless of whether the field is empty or not.
1220	// This may be used to include empty fields in Patch requests.
1221	ForceSendFields []string `json:"-"`
1222
1223	// NullFields is a list of field names (e.g. "DeviceUser") to include in
1224	// API requests with the JSON null value. By default, fields with empty
1225	// values are omitted from API requests. However, any field with an
1226	// empty value appearing in NullFields will be sent to the server as
1227	// null. It is an error if a field in this list has a non-empty value.
1228	// This may be used to include null fields in Patch requests.
1229	NullFields []string `json:"-"`
1230}
1231
1232func (s *GoogleAppsCloudidentityDevicesV1ApproveDeviceUserResponse) MarshalJSON() ([]byte, error) {
1233	type NoMethod GoogleAppsCloudidentityDevicesV1ApproveDeviceUserResponse
1234	raw := NoMethod(*s)
1235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1236}
1237
1238// GoogleAppsCloudidentityDevicesV1BlockDeviceUserMetadata: Metadata for
1239// BlockDeviceUser LRO.
1240type GoogleAppsCloudidentityDevicesV1BlockDeviceUserMetadata struct {
1241}
1242
1243// GoogleAppsCloudidentityDevicesV1BlockDeviceUserResponse: Response
1244// message for blocking the device from accessing user data.
1245type GoogleAppsCloudidentityDevicesV1BlockDeviceUserResponse struct {
1246	// DeviceUser: Resultant DeviceUser object for the action.
1247	DeviceUser *GoogleAppsCloudidentityDevicesV1DeviceUser `json:"deviceUser,omitempty"`
1248
1249	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
1250	// unconditionally include in API requests. By default, fields with
1251	// empty or default values are omitted from API requests. However, any
1252	// non-pointer, non-interface field appearing in ForceSendFields will be
1253	// sent to the server regardless of whether the field is empty or not.
1254	// This may be used to include empty fields in Patch requests.
1255	ForceSendFields []string `json:"-"`
1256
1257	// NullFields is a list of field names (e.g. "DeviceUser") to include in
1258	// API requests with the JSON null value. By default, fields with empty
1259	// values are omitted from API requests. However, any field with an
1260	// empty value appearing in NullFields will be sent to the server as
1261	// null. It is an error if a field in this list has a non-empty value.
1262	// This may be used to include null fields in Patch requests.
1263	NullFields []string `json:"-"`
1264}
1265
1266func (s *GoogleAppsCloudidentityDevicesV1BlockDeviceUserResponse) MarshalJSON() ([]byte, error) {
1267	type NoMethod GoogleAppsCloudidentityDevicesV1BlockDeviceUserResponse
1268	raw := NoMethod(*s)
1269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1270}
1271
1272// GoogleAppsCloudidentityDevicesV1CancelWipeDeviceMetadata: Metadata
1273// for CancelWipeDevice LRO.
1274type GoogleAppsCloudidentityDevicesV1CancelWipeDeviceMetadata struct {
1275}
1276
1277// GoogleAppsCloudidentityDevicesV1CancelWipeDeviceResponse: Response
1278// message for cancelling an unfinished device wipe.
1279type GoogleAppsCloudidentityDevicesV1CancelWipeDeviceResponse struct {
1280	// Device: Resultant Device object for the action. Note that asset tags
1281	// will not be returned in the device object.
1282	Device *GoogleAppsCloudidentityDevicesV1Device `json:"device,omitempty"`
1283
1284	// ForceSendFields is a list of field names (e.g. "Device") to
1285	// unconditionally include in API requests. By default, fields with
1286	// empty or default values are omitted from API requests. However, any
1287	// non-pointer, non-interface field appearing in ForceSendFields will be
1288	// sent to the server regardless of whether the field is empty or not.
1289	// This may be used to include empty fields in Patch requests.
1290	ForceSendFields []string `json:"-"`
1291
1292	// NullFields is a list of field names (e.g. "Device") to include in API
1293	// requests with the JSON null value. By default, fields with empty
1294	// values are omitted from API requests. However, any field with an
1295	// empty value appearing in NullFields will be sent to the server as
1296	// null. It is an error if a field in this list has a non-empty value.
1297	// This may be used to include null fields in Patch requests.
1298	NullFields []string `json:"-"`
1299}
1300
1301func (s *GoogleAppsCloudidentityDevicesV1CancelWipeDeviceResponse) MarshalJSON() ([]byte, error) {
1302	type NoMethod GoogleAppsCloudidentityDevicesV1CancelWipeDeviceResponse
1303	raw := NoMethod(*s)
1304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1305}
1306
1307// GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserMetadata:
1308// Metadata for CancelWipeDeviceUser LRO.
1309type GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserMetadata struct {
1310}
1311
1312// GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserResponse:
1313// Response message for cancelling an unfinished user account wipe.
1314type GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserResponse struct {
1315	// DeviceUser: Resultant DeviceUser object for the action.
1316	DeviceUser *GoogleAppsCloudidentityDevicesV1DeviceUser `json:"deviceUser,omitempty"`
1317
1318	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
1319	// unconditionally include in API requests. By default, fields with
1320	// empty or default values are omitted from API requests. However, any
1321	// non-pointer, non-interface field appearing in ForceSendFields will be
1322	// sent to the server regardless of whether the field is empty or not.
1323	// This may be used to include empty fields in Patch requests.
1324	ForceSendFields []string `json:"-"`
1325
1326	// NullFields is a list of field names (e.g. "DeviceUser") to include in
1327	// API requests with the JSON null value. By default, fields with empty
1328	// values are omitted from API requests. However, any field with an
1329	// empty value appearing in NullFields will be sent to the server as
1330	// null. It is an error if a field in this list has a non-empty value.
1331	// This may be used to include null fields in Patch requests.
1332	NullFields []string `json:"-"`
1333}
1334
1335func (s *GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
1336	type NoMethod GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserResponse
1337	raw := NoMethod(*s)
1338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1339}
1340
1341// GoogleAppsCloudidentityDevicesV1ClientState: Represents the state
1342// associated with an API client calling the Devices API. Resource
1343// representing ClientState and supports updates from API users
1344type GoogleAppsCloudidentityDevicesV1ClientState struct {
1345	// AssetTags: The caller can specify asset tags for this resource
1346	AssetTags []string `json:"assetTags,omitempty"`
1347
1348	// ComplianceState: The compliance state of the resource as specified by
1349	// the API client.
1350	//
1351	// Possible values:
1352	//   "COMPLIANCE_STATE_UNSPECIFIED" - The compliance state of the
1353	// resource is unknown or unspecified.
1354	//   "COMPLIANT" - Device is compliant with third party policies
1355	//   "NON_COMPLIANT" - Device is not compliant with third party policies
1356	ComplianceState string `json:"complianceState,omitempty"`
1357
1358	// CreateTime: Output only. The time the client state data was created.
1359	CreateTime string `json:"createTime,omitempty"`
1360
1361	// CustomId: This field may be used to store a unique identifier for the
1362	// API resource within which these CustomAttributes are a field.
1363	CustomId string `json:"customId,omitempty"`
1364
1365	// Etag: The token that needs to be passed back for concurrency control
1366	// in updates. Token needs to be passed back in UpdateRequest
1367	Etag string `json:"etag,omitempty"`
1368
1369	// HealthScore: The Health score of the resource. The Health score is
1370	// the callers specification of the condition of the device from a
1371	// usability point of view. For example, a third-party device management
1372	// provider may specify a health score based on its compliance with
1373	// organizational policies.
1374	//
1375	// Possible values:
1376	//   "HEALTH_SCORE_UNSPECIFIED" - Default value
1377	//   "VERY_POOR" - The object is in very poor health as defined by the
1378	// caller.
1379	//   "POOR" - The object is in poor health as defined by the caller.
1380	//   "NEUTRAL" - The object health is neither good nor poor, as defined
1381	// by the caller.
1382	//   "GOOD" - The object is in good health as defined by the caller.
1383	//   "VERY_GOOD" - The object is in very good health as defined by the
1384	// caller.
1385	HealthScore string `json:"healthScore,omitempty"`
1386
1387	// KeyValuePairs: The map of key-value attributes stored by callers
1388	// specific to a device. The total serialized length of this map may not
1389	// exceed 10KB. No limit is placed on the number of attributes in a map.
1390	KeyValuePairs map[string]GoogleAppsCloudidentityDevicesV1CustomAttributeValue `json:"keyValuePairs,omitempty"`
1391
1392	// LastUpdateTime: Output only. The time the client state data was last
1393	// updated.
1394	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
1395
1396	// Managed: The management state of the resource as specified by the API
1397	// client.
1398	//
1399	// Possible values:
1400	//   "MANAGED_STATE_UNSPECIFIED" - The management state of the resource
1401	// is unknown or unspecified.
1402	//   "MANAGED" - The resource is managed.
1403	//   "UNMANAGED" - The resource is not managed.
1404	Managed string `json:"managed,omitempty"`
1405
1406	// Name: Output only. Resource name
1407	// (https://cloud.google.com/apis/design/resource_names) of the
1408	// ClientState in format:
1409	// `devices/{device}/deviceUsers/{device_user}/clientState/{partner}`,
1410	// where partner corresponds to the partner storing the data. For
1411	// partners belonging to the "BeyondCorp Alliance", this is the partner
1412	// ID specified to you by Google. For all other callers, this is a
1413	// string of the form: `{customer}-suffix`, where `customer` is your
1414	// customer ID. The *suffix* is any string the caller specifies. This
1415	// string will be displayed verbatim in the administration console. This
1416	// suffix is used in setting up Custom Access Levels in Context-Aware
1417	// Access. Your organization's customer ID can be obtained from the URL:
1418	// `GET
1419	// https://www.googleapis.com/admin/directory/v1/customers/my_customer`
1420	// The `id` field in the response contains the customer ID starting with
1421	// the letter 'C'. The customer ID to be used in this API is the string
1422	// after the letter 'C' (not including 'C')
1423	Name string `json:"name,omitempty"`
1424
1425	// OwnerType: Output only. The owner of the ClientState
1426	//
1427	// Possible values:
1428	//   "OWNER_TYPE_UNSPECIFIED" - Unknown owner type
1429	//   "OWNER_TYPE_CUSTOMER" - Customer is the owner
1430	//   "OWNER_TYPE_PARTNER" - Partner is the owner
1431	OwnerType string `json:"ownerType,omitempty"`
1432
1433	// ScoreReason: A descriptive cause of the health score.
1434	ScoreReason string `json:"scoreReason,omitempty"`
1435
1436	// ForceSendFields is a list of field names (e.g. "AssetTags") to
1437	// unconditionally include in API requests. By default, fields with
1438	// empty or default values are omitted from API requests. However, any
1439	// non-pointer, non-interface field appearing in ForceSendFields will be
1440	// sent to the server regardless of whether the field is empty or not.
1441	// This may be used to include empty fields in Patch requests.
1442	ForceSendFields []string `json:"-"`
1443
1444	// NullFields is a list of field names (e.g. "AssetTags") to include in
1445	// API requests with the JSON null value. By default, fields with empty
1446	// values are omitted from API requests. However, any field with an
1447	// empty value appearing in NullFields will be sent to the server as
1448	// null. It is an error if a field in this list has a non-empty value.
1449	// This may be used to include null fields in Patch requests.
1450	NullFields []string `json:"-"`
1451}
1452
1453func (s *GoogleAppsCloudidentityDevicesV1ClientState) MarshalJSON() ([]byte, error) {
1454	type NoMethod GoogleAppsCloudidentityDevicesV1ClientState
1455	raw := NoMethod(*s)
1456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1457}
1458
1459// GoogleAppsCloudidentityDevicesV1CreateDeviceMetadata: Metadata for
1460// CreateDevice LRO.
1461type GoogleAppsCloudidentityDevicesV1CreateDeviceMetadata struct {
1462}
1463
1464// GoogleAppsCloudidentityDevicesV1CustomAttributeValue: Additional
1465// custom attribute values may be one of these types
1466type GoogleAppsCloudidentityDevicesV1CustomAttributeValue struct {
1467	// BoolValue: Represents a boolean value.
1468	BoolValue bool `json:"boolValue,omitempty"`
1469
1470	// NumberValue: Represents a double value.
1471	NumberValue float64 `json:"numberValue,omitempty"`
1472
1473	// StringValue: Represents a string value.
1474	StringValue string `json:"stringValue,omitempty"`
1475
1476	// ForceSendFields is a list of field names (e.g. "BoolValue") to
1477	// unconditionally include in API requests. By default, fields with
1478	// empty or default values are omitted from API requests. However, any
1479	// non-pointer, non-interface field appearing in ForceSendFields will be
1480	// sent to the server regardless of whether the field is empty or not.
1481	// This may be used to include empty fields in Patch requests.
1482	ForceSendFields []string `json:"-"`
1483
1484	// NullFields is a list of field names (e.g. "BoolValue") to include in
1485	// API requests with the JSON null value. By default, fields with empty
1486	// values are omitted from API requests. However, any field with an
1487	// empty value appearing in NullFields will be sent to the server as
1488	// null. It is an error if a field in this list has a non-empty value.
1489	// This may be used to include null fields in Patch requests.
1490	NullFields []string `json:"-"`
1491}
1492
1493func (s *GoogleAppsCloudidentityDevicesV1CustomAttributeValue) MarshalJSON() ([]byte, error) {
1494	type NoMethod GoogleAppsCloudidentityDevicesV1CustomAttributeValue
1495	raw := NoMethod(*s)
1496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1497}
1498
1499func (s *GoogleAppsCloudidentityDevicesV1CustomAttributeValue) UnmarshalJSON(data []byte) error {
1500	type NoMethod GoogleAppsCloudidentityDevicesV1CustomAttributeValue
1501	var s1 struct {
1502		NumberValue gensupport.JSONFloat64 `json:"numberValue"`
1503		*NoMethod
1504	}
1505	s1.NoMethod = (*NoMethod)(s)
1506	if err := json.Unmarshal(data, &s1); err != nil {
1507		return err
1508	}
1509	s.NumberValue = float64(s1.NumberValue)
1510	return nil
1511}
1512
1513// GoogleAppsCloudidentityDevicesV1DeleteDeviceMetadata: Metadata for
1514// DeleteDevice LRO.
1515type GoogleAppsCloudidentityDevicesV1DeleteDeviceMetadata struct {
1516}
1517
1518// GoogleAppsCloudidentityDevicesV1DeleteDeviceUserMetadata: Metadata
1519// for DeleteDeviceUser LRO.
1520type GoogleAppsCloudidentityDevicesV1DeleteDeviceUserMetadata struct {
1521}
1522
1523// GoogleAppsCloudidentityDevicesV1Device:  A Device within the Cloud
1524// Identity Devices API. Represents a Device known to Google Cloud,
1525// independent of the device ownership, type, and whether it is assigned
1526// or in use by a user.
1527type GoogleAppsCloudidentityDevicesV1Device struct {
1528	// AndroidSpecificAttributes: Output only. Attributes specific to
1529	// Android devices.
1530	AndroidSpecificAttributes *GoogleAppsCloudidentityDevicesV1AndroidAttributes `json:"androidSpecificAttributes,omitempty"`
1531
1532	// AssetTag: Asset tag of the device.
1533	AssetTag string `json:"assetTag,omitempty"`
1534
1535	// BasebandVersion: Output only. Baseband version of the device.
1536	BasebandVersion string `json:"basebandVersion,omitempty"`
1537
1538	// BootloaderVersion: Output only. Device bootloader version. Example:
1539	// 0.6.7.
1540	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
1541
1542	// Brand: Output only. Device brand. Example: Samsung.
1543	Brand string `json:"brand,omitempty"`
1544
1545	// BuildNumber: Output only. Build number of the device.
1546	BuildNumber string `json:"buildNumber,omitempty"`
1547
1548	// CompromisedState: Output only. Represents whether the Device is
1549	// compromised.
1550	//
1551	// Possible values:
1552	//   "COMPROMISED_STATE_UNSPECIFIED" - Default value.
1553	//   "COMPROMISED" - The device is compromised (currently, this means
1554	// Android device is rooted).
1555	//   "UNCOMPROMISED" - The device is safe (currently, this means Android
1556	// device is unrooted).
1557	CompromisedState string `json:"compromisedState,omitempty"`
1558
1559	// CreateTime: Output only. When the Company-Owned device was imported.
1560	// This field is empty for BYOD devices.
1561	CreateTime string `json:"createTime,omitempty"`
1562
1563	// DeviceType: Output only. Type of device.
1564	//
1565	// Possible values:
1566	//   "DEVICE_TYPE_UNSPECIFIED" - Unknown device type
1567	//   "ANDROID" - Device is an Android device
1568	//   "IOS" - Device is an iOS device
1569	//   "GOOGLE_SYNC" - Device is a Google Sync device.
1570	//   "WINDOWS" - Device is a Windows device.
1571	//   "MAC_OS" - Device is a MacOS device.
1572	//   "LINUX" - Device is a Linux device.
1573	//   "CHROME_OS" - Device is a ChromeOS device.
1574	DeviceType string `json:"deviceType,omitempty"`
1575
1576	// EnabledDeveloperOptions: Output only. Whether developer options is
1577	// enabled on device.
1578	EnabledDeveloperOptions bool `json:"enabledDeveloperOptions,omitempty"`
1579
1580	// EnabledUsbDebugging: Output only. Whether USB debugging is enabled on
1581	// device.
1582	EnabledUsbDebugging bool `json:"enabledUsbDebugging,omitempty"`
1583
1584	// EncryptionState: Output only. Device encryption state.
1585	//
1586	// Possible values:
1587	//   "ENCRYPTION_STATE_UNSPECIFIED" - Encryption Status is not set.
1588	//   "UNSUPPORTED_BY_DEVICE" - Device doesn't support encryption.
1589	//   "ENCRYPTED" - Device is encrypted.
1590	//   "NOT_ENCRYPTED" - Device is not encrypted.
1591	EncryptionState string `json:"encryptionState,omitempty"`
1592
1593	// Imei: Output only. IMEI number of device if GSM device; empty
1594	// otherwise.
1595	Imei string `json:"imei,omitempty"`
1596
1597	// KernelVersion: Output only. Kernel version of the device.
1598	KernelVersion string `json:"kernelVersion,omitempty"`
1599
1600	// LastSyncTime: Most recent time when device synced with this service.
1601	LastSyncTime string `json:"lastSyncTime,omitempty"`
1602
1603	// ManagementState: Output only. Management state of the device
1604	//
1605	// Possible values:
1606	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
1607	// unused.
1608	//   "APPROVED" - Device is approved.
1609	//   "BLOCKED" - Device is blocked.
1610	//   "PENDING" - Device is pending approval.
1611	//   "UNPROVISIONED" - The device is not provisioned. Device will start
1612	// from this state until some action is taken (i.e. a user starts using
1613	// the device).
1614	//   "WIPING" - Data and settings on the device are being removed.
1615	//   "WIPED" - All data and settings on the device are removed.
1616	ManagementState string `json:"managementState,omitempty"`
1617
1618	// Manufacturer: Output only. Device manufacturer. Example: Motorola.
1619	Manufacturer string `json:"manufacturer,omitempty"`
1620
1621	// Meid: Output only. MEID number of device if CDMA device; empty
1622	// otherwise.
1623	Meid string `json:"meid,omitempty"`
1624
1625	// Model: Output only. Model name of device. Example: Pixel 3.
1626	Model string `json:"model,omitempty"`
1627
1628	// Name: Output only. Resource name
1629	// (https://cloud.google.com/apis/design/resource_names) of the Device
1630	// in format: `devices/{device}`, where device is the unique id assigned
1631	// to the Device.
1632	Name string `json:"name,omitempty"`
1633
1634	// NetworkOperator: Output only. Mobile or network operator of device,
1635	// if available.
1636	NetworkOperator string `json:"networkOperator,omitempty"`
1637
1638	// OsVersion: Output only. OS version of the device. Example: Android
1639	// 8.1.0.
1640	OsVersion string `json:"osVersion,omitempty"`
1641
1642	// OtherAccounts: Output only. Domain name for Google accounts on
1643	// device. Type for other accounts on device. On Android, will only be
1644	// populated if |ownership_privilege| is |PROFILE_OWNER| or
1645	// |DEVICE_OWNER|. Does not include the account signed in to the device
1646	// policy app if that account's domain has only one account. Examples:
1647	// "com.example", "xyz.com".
1648	OtherAccounts []string `json:"otherAccounts,omitempty"`
1649
1650	// OwnerType: Output only. Whether the device is owned by the company or
1651	// an individual
1652	//
1653	// Possible values:
1654	//   "DEVICE_OWNERSHIP_UNSPECIFIED" - Default value. The value is
1655	// unused.
1656	//   "COMPANY" - Company owns the device.
1657	//   "BYOD" - Bring Your Own Device (i.e. individual owns the device)
1658	OwnerType string `json:"ownerType,omitempty"`
1659
1660	// ReleaseVersion: Output only. OS release version. Example: 6.0.
1661	ReleaseVersion string `json:"releaseVersion,omitempty"`
1662
1663	// SecurityPatchTime: Output only. OS security patch update time on
1664	// device.
1665	SecurityPatchTime string `json:"securityPatchTime,omitempty"`
1666
1667	// SerialNumber: Serial Number of device. Example: HT82V1A01076.
1668	SerialNumber string `json:"serialNumber,omitempty"`
1669
1670	// WifiMacAddresses: WiFi MAC addresses of device.
1671	WifiMacAddresses []string `json:"wifiMacAddresses,omitempty"`
1672
1673	// ForceSendFields is a list of field names (e.g.
1674	// "AndroidSpecificAttributes") to unconditionally include in API
1675	// requests. By default, fields with empty or default values are omitted
1676	// from API requests. However, any non-pointer, non-interface field
1677	// appearing in ForceSendFields will be sent to the server regardless of
1678	// whether the field is empty or not. This may be used to include empty
1679	// fields in Patch requests.
1680	ForceSendFields []string `json:"-"`
1681
1682	// NullFields is a list of field names (e.g.
1683	// "AndroidSpecificAttributes") to include in API requests with the JSON
1684	// null value. By default, fields with empty values are omitted from API
1685	// requests. However, any field with an empty value appearing in
1686	// NullFields will be sent to the server as null. It is an error if a
1687	// field in this list has a non-empty value. This may be used to include
1688	// null fields in Patch requests.
1689	NullFields []string `json:"-"`
1690}
1691
1692func (s *GoogleAppsCloudidentityDevicesV1Device) MarshalJSON() ([]byte, error) {
1693	type NoMethod GoogleAppsCloudidentityDevicesV1Device
1694	raw := NoMethod(*s)
1695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1696}
1697
1698// GoogleAppsCloudidentityDevicesV1DeviceUser: Represents a user's use
1699// of a Device in the Cloud Identity Devices API. A DeviceUser is a
1700// resource representing a user's use of a Device
1701type GoogleAppsCloudidentityDevicesV1DeviceUser struct {
1702	// CompromisedState: Compromised State of the DeviceUser object
1703	//
1704	// Possible values:
1705	//   "COMPROMISED_STATE_UNSPECIFIED" - Compromised state of Device User
1706	// account is unknown or unspecified.
1707	//   "COMPROMISED" - Device User Account is compromised.
1708	//   "NOT_COMPROMISED" - Device User Account is not compromised.
1709	CompromisedState string `json:"compromisedState,omitempty"`
1710
1711	// CreateTime: When the user first signed in to the device
1712	CreateTime string `json:"createTime,omitempty"`
1713
1714	// FirstSyncTime: Output only. Most recent time when user registered
1715	// with this service.
1716	FirstSyncTime string `json:"firstSyncTime,omitempty"`
1717
1718	// LanguageCode: Output only. Default locale used on device, in IETF
1719	// BCP-47 format.
1720	LanguageCode string `json:"languageCode,omitempty"`
1721
1722	// LastSyncTime: Output only. Last time when user synced with policies.
1723	LastSyncTime string `json:"lastSyncTime,omitempty"`
1724
1725	// ManagementState: Output only. Management state of the user on the
1726	// device.
1727	//
1728	// Possible values:
1729	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
1730	// unused.
1731	//   "WIPING" - This user's data and profile is being removed from the
1732	// device.
1733	//   "WIPED" - This user's data and profile is removed from the device.
1734	//   "APPROVED" - User is approved to access data on the device.
1735	//   "BLOCKED" - User is blocked from accessing data on the device.
1736	//   "PENDING_APPROVAL" - User is awaiting approval.
1737	//   "UNENROLLED" - User is unenrolled from Advanced Windows Management,
1738	// but the Windows account is still intact.
1739	ManagementState string `json:"managementState,omitempty"`
1740
1741	// Name: Output only. Resource name
1742	// (https://cloud.google.com/apis/design/resource_names) of the
1743	// DeviceUser in format: `devices/{device}/deviceUsers/{device_user}`,
1744	// where `device_user` uniquely identifies a user's use of a device.
1745	Name string `json:"name,omitempty"`
1746
1747	// PasswordState: Password state of the DeviceUser object
1748	//
1749	// Possible values:
1750	//   "PASSWORD_STATE_UNSPECIFIED" - Password state not set.
1751	//   "PASSWORD_SET" - Password set in object.
1752	//   "PASSWORD_NOT_SET" - Password not set in object.
1753	PasswordState string `json:"passwordState,omitempty"`
1754
1755	// UserAgent: Output only. User agent on the device for this specific
1756	// user
1757	UserAgent string `json:"userAgent,omitempty"`
1758
1759	// UserEmail: Email address of the user registered on the device.
1760	UserEmail string `json:"userEmail,omitempty"`
1761
1762	// ForceSendFields is a list of field names (e.g. "CompromisedState") to
1763	// unconditionally include in API requests. By default, fields with
1764	// empty or default values are omitted from API requests. However, any
1765	// non-pointer, non-interface field appearing in ForceSendFields will be
1766	// sent to the server regardless of whether the field is empty or not.
1767	// This may be used to include empty fields in Patch requests.
1768	ForceSendFields []string `json:"-"`
1769
1770	// NullFields is a list of field names (e.g. "CompromisedState") to
1771	// include in API requests with the JSON null value. By default, fields
1772	// with empty values are omitted from API requests. However, any field
1773	// with an empty value appearing in NullFields will be sent to the
1774	// server as null. It is an error if a field in this list has a
1775	// non-empty value. This may be used to include null fields in Patch
1776	// requests.
1777	NullFields []string `json:"-"`
1778}
1779
1780func (s *GoogleAppsCloudidentityDevicesV1DeviceUser) MarshalJSON() ([]byte, error) {
1781	type NoMethod GoogleAppsCloudidentityDevicesV1DeviceUser
1782	raw := NoMethod(*s)
1783	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1784}
1785
1786// GoogleAppsCloudidentityDevicesV1ListEndpointAppsMetadata: Metadata
1787// for ListEndpointApps LRO.
1788type GoogleAppsCloudidentityDevicesV1ListEndpointAppsMetadata struct {
1789}
1790
1791// GoogleAppsCloudidentityDevicesV1SignoutDeviceUserMetadata: Metadata
1792// for SignoutDeviceUser LRO.
1793type GoogleAppsCloudidentityDevicesV1SignoutDeviceUserMetadata struct {
1794}
1795
1796// GoogleAppsCloudidentityDevicesV1UpdateClientStateMetadata: Metadata
1797// for UpdateClientState LRO.
1798type GoogleAppsCloudidentityDevicesV1UpdateClientStateMetadata struct {
1799}
1800
1801// GoogleAppsCloudidentityDevicesV1UpdateDeviceMetadata: Metadata for
1802// UpdateDevice LRO.
1803type GoogleAppsCloudidentityDevicesV1UpdateDeviceMetadata struct {
1804}
1805
1806// GoogleAppsCloudidentityDevicesV1WipeDeviceMetadata: Metadata for
1807// WipeDevice LRO.
1808type GoogleAppsCloudidentityDevicesV1WipeDeviceMetadata struct {
1809}
1810
1811// GoogleAppsCloudidentityDevicesV1WipeDeviceResponse: Response message
1812// for wiping all data on the device.
1813type GoogleAppsCloudidentityDevicesV1WipeDeviceResponse struct {
1814	// Device: Resultant Device object for the action. Note that asset tags
1815	// will not be returned in the device object.
1816	Device *GoogleAppsCloudidentityDevicesV1Device `json:"device,omitempty"`
1817
1818	// ForceSendFields is a list of field names (e.g. "Device") to
1819	// unconditionally include in API requests. By default, fields with
1820	// empty or default values are omitted from API requests. However, any
1821	// non-pointer, non-interface field appearing in ForceSendFields will be
1822	// sent to the server regardless of whether the field is empty or not.
1823	// This may be used to include empty fields in Patch requests.
1824	ForceSendFields []string `json:"-"`
1825
1826	// NullFields is a list of field names (e.g. "Device") to include in API
1827	// requests with the JSON null value. By default, fields with empty
1828	// values are omitted from API requests. However, any field with an
1829	// empty value appearing in NullFields will be sent to the server as
1830	// null. It is an error if a field in this list has a non-empty value.
1831	// This may be used to include null fields in Patch requests.
1832	NullFields []string `json:"-"`
1833}
1834
1835func (s *GoogleAppsCloudidentityDevicesV1WipeDeviceResponse) MarshalJSON() ([]byte, error) {
1836	type NoMethod GoogleAppsCloudidentityDevicesV1WipeDeviceResponse
1837	raw := NoMethod(*s)
1838	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1839}
1840
1841// GoogleAppsCloudidentityDevicesV1WipeDeviceUserMetadata: Metadata for
1842// WipeDeviceUser LRO.
1843type GoogleAppsCloudidentityDevicesV1WipeDeviceUserMetadata struct {
1844}
1845
1846// GoogleAppsCloudidentityDevicesV1WipeDeviceUserResponse: Response
1847// message for wiping the user's account from the device.
1848type GoogleAppsCloudidentityDevicesV1WipeDeviceUserResponse struct {
1849	// DeviceUser: Resultant DeviceUser object for the action.
1850	DeviceUser *GoogleAppsCloudidentityDevicesV1DeviceUser `json:"deviceUser,omitempty"`
1851
1852	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
1853	// unconditionally include in API requests. By default, fields with
1854	// empty or default values are omitted from API requests. However, any
1855	// non-pointer, non-interface field appearing in ForceSendFields will be
1856	// sent to the server regardless of whether the field is empty or not.
1857	// This may be used to include empty fields in Patch requests.
1858	ForceSendFields []string `json:"-"`
1859
1860	// NullFields is a list of field names (e.g. "DeviceUser") to include in
1861	// API requests with the JSON null value. By default, fields with empty
1862	// values are omitted from API requests. However, any field with an
1863	// empty value appearing in NullFields will be sent to the server as
1864	// null. It is an error if a field in this list has a non-empty value.
1865	// This may be used to include null fields in Patch requests.
1866	NullFields []string `json:"-"`
1867}
1868
1869func (s *GoogleAppsCloudidentityDevicesV1WipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
1870	type NoMethod GoogleAppsCloudidentityDevicesV1WipeDeviceUserResponse
1871	raw := NoMethod(*s)
1872	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1873}
1874
1875// Group: A group within the Cloud Identity Groups API. A `Group` is a
1876// collection of entities, where each entity is either a user, another
1877// group, or a service account.
1878type Group struct {
1879	// AdditionalGroupKeys: Additional entity key aliases for a Group.
1880	AdditionalGroupKeys []*EntityKey `json:"additionalGroupKeys,omitempty"`
1881
1882	// CreateTime: Output only. The time when the `Group` was created.
1883	CreateTime string `json:"createTime,omitempty"`
1884
1885	// Description: An extended description to help users determine the
1886	// purpose of a `Group`. Must not be longer than 4,096 characters.
1887	Description string `json:"description,omitempty"`
1888
1889	// DisplayName: The display name of the `Group`.
1890	DisplayName string `json:"displayName,omitempty"`
1891
1892	// DynamicGroupMetadata: Optional. Dynamic group metadata like queries
1893	// and status.
1894	DynamicGroupMetadata *DynamicGroupMetadata `json:"dynamicGroupMetadata,omitempty"`
1895
1896	// GroupKey: Required. Immutable. The `EntityKey` of the `Group`.
1897	GroupKey *EntityKey `json:"groupKey,omitempty"`
1898
1899	// Labels: Required. One or more label entries that apply to the Group.
1900	// Currently supported labels contain a key with an empty value. Google
1901	// Groups are the default type of group and have a label with a key of
1902	// `cloudidentity.googleapis.com/groups.discussion_forum` and an empty
1903	// value. Existing Google Groups can have an additional label with a key
1904	// of `cloudidentity.googleapis.com/groups.security` and an empty value
1905	// added to them. **This is an immutable change and the security label
1906	// cannot be removed once added.** Dynamic groups have a label with a
1907	// key of `cloudidentity.googleapis.com/groups.dynamic`. Identity-mapped
1908	// groups for Cloud Search have a label with a key of
1909	// `system/groups/external` and an empty value.
1910	Labels map[string]string `json:"labels,omitempty"`
1911
1912	// Name: Output only. The resource name
1913	// (https://cloud.google.com/apis/design/resource_names) of the `Group`.
1914	// Shall be of the form `groups/{group_id}`.
1915	Name string `json:"name,omitempty"`
1916
1917	// Parent: Required. Immutable. The resource name of the entity under
1918	// which this `Group` resides in the Cloud Identity resource hierarchy.
1919	// Must be of the form `identitysources/{identity_source_id}` for
1920	// external- identity-mapped groups or `customers/{customer_id}` for
1921	// Google Groups. The `customer_id` must begin with "C" (for example,
1922	// 'C046psxkn').
1923	Parent string `json:"parent,omitempty"`
1924
1925	// PosixGroups: Optional. The POSIX groups associated with the `Group`.
1926	PosixGroups []*PosixGroup `json:"posixGroups,omitempty"`
1927
1928	// UpdateTime: Output only. The time when the `Group` was last updated.
1929	UpdateTime string `json:"updateTime,omitempty"`
1930
1931	// ServerResponse contains the HTTP response code and headers from the
1932	// server.
1933	googleapi.ServerResponse `json:"-"`
1934
1935	// ForceSendFields is a list of field names (e.g. "AdditionalGroupKeys")
1936	// to unconditionally include in API requests. By default, fields with
1937	// empty or default values are omitted from API requests. However, any
1938	// non-pointer, non-interface field appearing in ForceSendFields will be
1939	// sent to the server regardless of whether the field is empty or not.
1940	// This may be used to include empty fields in Patch requests.
1941	ForceSendFields []string `json:"-"`
1942
1943	// NullFields is a list of field names (e.g. "AdditionalGroupKeys") to
1944	// include in API requests with the JSON null value. By default, fields
1945	// with empty values are omitted from API requests. However, any field
1946	// with an empty value appearing in NullFields will be sent to the
1947	// server as null. It is an error if a field in this list has a
1948	// non-empty value. This may be used to include null fields in Patch
1949	// requests.
1950	NullFields []string `json:"-"`
1951}
1952
1953func (s *Group) MarshalJSON() ([]byte, error) {
1954	type NoMethod Group
1955	raw := NoMethod(*s)
1956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1957}
1958
1959// GroupRelation: Message representing a transitive group of a user or a
1960// group.
1961type GroupRelation struct {
1962	// DisplayName: Display name for this group.
1963	DisplayName string `json:"displayName,omitempty"`
1964
1965	// Group: Resource name for this group.
1966	Group string `json:"group,omitempty"`
1967
1968	// GroupKey: Entity key has an id and a namespace. In case of discussion
1969	// forums, the id will be an email address without a namespace.
1970	GroupKey *EntityKey `json:"groupKey,omitempty"`
1971
1972	// Labels: Labels for Group resource.
1973	Labels map[string]string `json:"labels,omitempty"`
1974
1975	// RelationType: The relation between the member and the transitive
1976	// group.
1977	//
1978	// Possible values:
1979	//   "RELATION_TYPE_UNSPECIFIED" - The relation type is undefined or
1980	// undetermined.
1981	//   "DIRECT" - The two entities have only a direct membership with each
1982	// other.
1983	//   "INDIRECT" - The two entities have only an indirect membership with
1984	// each other.
1985	//   "DIRECT_AND_INDIRECT" - The two entities have both a direct and an
1986	// indirect membership with each other.
1987	RelationType string `json:"relationType,omitempty"`
1988
1989	// Roles: Membership roles of the member for the group.
1990	Roles []*TransitiveMembershipRole `json:"roles,omitempty"`
1991
1992	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1993	// unconditionally include in API requests. By default, fields with
1994	// empty or default values are omitted from API requests. However, any
1995	// non-pointer, non-interface field appearing in ForceSendFields will be
1996	// sent to the server regardless of whether the field is empty or not.
1997	// This may be used to include empty fields in Patch requests.
1998	ForceSendFields []string `json:"-"`
1999
2000	// NullFields is a list of field names (e.g. "DisplayName") to include
2001	// in API requests with the JSON null value. By default, fields with
2002	// empty values are omitted from API requests. However, any field with
2003	// an empty value appearing in NullFields will be sent to the server as
2004	// null. It is an error if a field in this list has a non-empty value.
2005	// This may be used to include null fields in Patch requests.
2006	NullFields []string `json:"-"`
2007}
2008
2009func (s *GroupRelation) MarshalJSON() ([]byte, error) {
2010	type NoMethod GroupRelation
2011	raw := NoMethod(*s)
2012	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2013}
2014
2015// IsInvitableUserResponse: Response for IsInvitableUser RPC.
2016type IsInvitableUserResponse struct {
2017	// IsInvitableUser: Returns true if the email address is invitable.
2018	IsInvitableUser bool `json:"isInvitableUser,omitempty"`
2019
2020	// ServerResponse contains the HTTP response code and headers from the
2021	// server.
2022	googleapi.ServerResponse `json:"-"`
2023
2024	// ForceSendFields is a list of field names (e.g. "IsInvitableUser") to
2025	// unconditionally include in API requests. By default, fields with
2026	// empty or default values are omitted from API requests. However, any
2027	// non-pointer, non-interface field appearing in ForceSendFields will be
2028	// sent to the server regardless of whether the field is empty or not.
2029	// This may be used to include empty fields in Patch requests.
2030	ForceSendFields []string `json:"-"`
2031
2032	// NullFields is a list of field names (e.g. "IsInvitableUser") to
2033	// include in API requests with the JSON null value. By default, fields
2034	// with empty values are omitted from API requests. However, any field
2035	// with an empty value appearing in NullFields will be sent to the
2036	// server as null. It is an error if a field in this list has a
2037	// non-empty value. This may be used to include null fields in Patch
2038	// requests.
2039	NullFields []string `json:"-"`
2040}
2041
2042func (s *IsInvitableUserResponse) MarshalJSON() ([]byte, error) {
2043	type NoMethod IsInvitableUserResponse
2044	raw := NoMethod(*s)
2045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2046}
2047
2048// ListClientStatesResponse: Response message that is returned in LRO
2049// result of ListClientStates Operation.
2050type ListClientStatesResponse struct {
2051	// ClientStates: Client states meeting the list restrictions.
2052	ClientStates []*ClientState `json:"clientStates,omitempty"`
2053
2054	// NextPageToken: Token to retrieve the next page of results. Empty if
2055	// there are no more results.
2056	NextPageToken string `json:"nextPageToken,omitempty"`
2057
2058	// ForceSendFields is a list of field names (e.g. "ClientStates") to
2059	// unconditionally include in API requests. By default, fields with
2060	// empty or default values are omitted from API requests. However, any
2061	// non-pointer, non-interface field appearing in ForceSendFields will be
2062	// sent to the server regardless of whether the field is empty or not.
2063	// This may be used to include empty fields in Patch requests.
2064	ForceSendFields []string `json:"-"`
2065
2066	// NullFields is a list of field names (e.g. "ClientStates") to include
2067	// in API requests with the JSON null value. By default, fields with
2068	// empty values are omitted from API requests. However, any field with
2069	// an empty value appearing in NullFields will be sent to the server as
2070	// null. It is an error if a field in this list has a non-empty value.
2071	// This may be used to include null fields in Patch requests.
2072	NullFields []string `json:"-"`
2073}
2074
2075func (s *ListClientStatesResponse) MarshalJSON() ([]byte, error) {
2076	type NoMethod ListClientStatesResponse
2077	raw := NoMethod(*s)
2078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2079}
2080
2081// ListDeviceUsersResponse: Response message that is returned from the
2082// ListDeviceUsers method.
2083type ListDeviceUsersResponse struct {
2084	// DeviceUsers: Devices meeting the list restrictions.
2085	DeviceUsers []*DeviceUser `json:"deviceUsers,omitempty"`
2086
2087	// NextPageToken: Token to retrieve the next page of results. Empty if
2088	// there are no more results.
2089	NextPageToken string `json:"nextPageToken,omitempty"`
2090
2091	// ServerResponse contains the HTTP response code and headers from the
2092	// server.
2093	googleapi.ServerResponse `json:"-"`
2094
2095	// ForceSendFields is a list of field names (e.g. "DeviceUsers") to
2096	// unconditionally include in API requests. By default, fields with
2097	// empty or default values are omitted from API requests. However, any
2098	// non-pointer, non-interface field appearing in ForceSendFields will be
2099	// sent to the server regardless of whether the field is empty or not.
2100	// This may be used to include empty fields in Patch requests.
2101	ForceSendFields []string `json:"-"`
2102
2103	// NullFields is a list of field names (e.g. "DeviceUsers") to include
2104	// in API requests with the JSON null value. By default, fields with
2105	// empty values are omitted from API requests. However, any field with
2106	// an 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 *ListDeviceUsersResponse) MarshalJSON() ([]byte, error) {
2113	type NoMethod ListDeviceUsersResponse
2114	raw := NoMethod(*s)
2115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2116}
2117
2118// ListDevicesResponse: Response message that is returned from the
2119// ListDevices method.
2120type ListDevicesResponse struct {
2121	// Devices: Devices meeting the list restrictions.
2122	Devices []*Device `json:"devices,omitempty"`
2123
2124	// NextPageToken: Token to retrieve the next page of results. Empty if
2125	// there are no more results.
2126	NextPageToken string `json:"nextPageToken,omitempty"`
2127
2128	// ServerResponse contains the HTTP response code and headers from the
2129	// server.
2130	googleapi.ServerResponse `json:"-"`
2131
2132	// ForceSendFields is a list of field names (e.g. "Devices") to
2133	// unconditionally include in API requests. By default, fields with
2134	// empty or default values are omitted from API requests. However, any
2135	// non-pointer, non-interface field appearing in ForceSendFields will be
2136	// sent to the server regardless of whether the field is empty or not.
2137	// This may be used to include empty fields in Patch requests.
2138	ForceSendFields []string `json:"-"`
2139
2140	// NullFields is a list of field names (e.g. "Devices") to include in
2141	// API requests with the JSON null value. By default, fields with empty
2142	// values are omitted from API requests. However, any field with an
2143	// empty value appearing in NullFields will be sent to the server as
2144	// null. It is an error if a field in this list has a non-empty value.
2145	// This may be used to include null fields in Patch requests.
2146	NullFields []string `json:"-"`
2147}
2148
2149func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) {
2150	type NoMethod ListDevicesResponse
2151	raw := NoMethod(*s)
2152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2153}
2154
2155// ListGroupsResponse: The response message for
2156// GroupsService.ListGroups.
2157type ListGroupsResponse struct {
2158	// Groups: The `Group` resources under the specified `parent`.
2159	Groups []*Group `json:"groups,omitempty"`
2160
2161	// NextPageToken: A continuation token to retrieve the next page of
2162	// results, or empty if there are no more results available.
2163	NextPageToken string `json:"nextPageToken,omitempty"`
2164
2165	// ServerResponse contains the HTTP response code and headers from the
2166	// server.
2167	googleapi.ServerResponse `json:"-"`
2168
2169	// ForceSendFields is a list of field names (e.g. "Groups") to
2170	// unconditionally include in API requests. By default, fields with
2171	// empty or default values are omitted from API requests. However, any
2172	// non-pointer, non-interface field appearing in ForceSendFields will be
2173	// sent to the server regardless of whether the field is empty or not.
2174	// This may be used to include empty fields in Patch requests.
2175	ForceSendFields []string `json:"-"`
2176
2177	// NullFields is a list of field names (e.g. "Groups") to include in API
2178	// requests with the JSON null value. By default, fields with empty
2179	// values are omitted from API requests. However, any field with an
2180	// empty value appearing in NullFields will be sent to the server as
2181	// null. It is an error if a field in this list has a non-empty value.
2182	// This may be used to include null fields in Patch requests.
2183	NullFields []string `json:"-"`
2184}
2185
2186func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
2187	type NoMethod ListGroupsResponse
2188	raw := NoMethod(*s)
2189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2190}
2191
2192// ListMembershipsResponse: The response message for
2193// MembershipsService.ListMemberships.
2194type ListMembershipsResponse struct {
2195	// Memberships: The `Membership`s under the specified `parent`.
2196	Memberships []*Membership `json:"memberships,omitempty"`
2197
2198	// NextPageToken: A continuation token to retrieve the next page of
2199	// results, or empty if there are no more results available.
2200	NextPageToken string `json:"nextPageToken,omitempty"`
2201
2202	// ServerResponse contains the HTTP response code and headers from the
2203	// server.
2204	googleapi.ServerResponse `json:"-"`
2205
2206	// ForceSendFields is a list of field names (e.g. "Memberships") to
2207	// unconditionally include in API requests. By default, fields with
2208	// empty or default values are omitted from API requests. However, any
2209	// non-pointer, non-interface field appearing in ForceSendFields will be
2210	// sent to the server regardless of whether the field is empty or not.
2211	// This may be used to include empty fields in Patch requests.
2212	ForceSendFields []string `json:"-"`
2213
2214	// NullFields is a list of field names (e.g. "Memberships") to include
2215	// in API requests with the JSON null value. By default, fields with
2216	// empty values are omitted from API requests. However, any field with
2217	// an empty value appearing in NullFields will be sent to the server as
2218	// null. It is an error if a field in this list has a non-empty value.
2219	// This may be used to include null fields in Patch requests.
2220	NullFields []string `json:"-"`
2221}
2222
2223func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error) {
2224	type NoMethod ListMembershipsResponse
2225	raw := NoMethod(*s)
2226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2227}
2228
2229// ListUserInvitationsResponse: Response message for UserInvitation
2230// listing request.
2231type ListUserInvitationsResponse struct {
2232	// NextPageToken: The token for the next page. If not empty, indicates
2233	// that there may be more `UserInvitation` resources that match the
2234	// listing request; this value can be used in a subsequent
2235	// ListUserInvitationsRequest to get continued results with the current
2236	// list call.
2237	NextPageToken string `json:"nextPageToken,omitempty"`
2238
2239	// UserInvitations: The list of UserInvitation resources.
2240	UserInvitations []*UserInvitation `json:"userInvitations,omitempty"`
2241
2242	// ServerResponse contains the HTTP response code and headers from the
2243	// server.
2244	googleapi.ServerResponse `json:"-"`
2245
2246	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2247	// unconditionally include in API requests. By default, fields with
2248	// empty or default values are omitted from API requests. However, any
2249	// non-pointer, non-interface field appearing in ForceSendFields will be
2250	// sent to the server regardless of whether the field is empty or not.
2251	// This may be used to include empty fields in Patch requests.
2252	ForceSendFields []string `json:"-"`
2253
2254	// NullFields is a list of field names (e.g. "NextPageToken") to include
2255	// in API requests with the JSON null value. By default, fields with
2256	// empty values are omitted from API requests. However, any field with
2257	// an empty value appearing in NullFields will be sent to the server as
2258	// null. It is an error if a field in this list has a non-empty value.
2259	// This may be used to include null fields in Patch requests.
2260	NullFields []string `json:"-"`
2261}
2262
2263func (s *ListUserInvitationsResponse) MarshalJSON() ([]byte, error) {
2264	type NoMethod ListUserInvitationsResponse
2265	raw := NoMethod(*s)
2266	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2267}
2268
2269// LookupGroupNameResponse: The response message for
2270// GroupsService.LookupGroupName.
2271type LookupGroupNameResponse struct {
2272	// Name: Output only. The resource name
2273	// (https://cloud.google.com/apis/design/resource_names) of the
2274	// looked-up `Group`.
2275	Name string `json:"name,omitempty"`
2276
2277	// ServerResponse contains the HTTP response code and headers from the
2278	// server.
2279	googleapi.ServerResponse `json:"-"`
2280
2281	// ForceSendFields is a list of field names (e.g. "Name") to
2282	// unconditionally include in API requests. By default, fields with
2283	// empty or default values are omitted from API requests. However, any
2284	// non-pointer, non-interface field appearing in ForceSendFields will be
2285	// sent to the server regardless of whether the field is empty or not.
2286	// This may be used to include empty fields in Patch requests.
2287	ForceSendFields []string `json:"-"`
2288
2289	// NullFields is a list of field names (e.g. "Name") to include in API
2290	// requests with the JSON null value. By default, fields with empty
2291	// values are omitted from API requests. However, any field with an
2292	// empty value appearing in NullFields will be sent to the server as
2293	// null. It is an error if a field in this list has a non-empty value.
2294	// This may be used to include null fields in Patch requests.
2295	NullFields []string `json:"-"`
2296}
2297
2298func (s *LookupGroupNameResponse) MarshalJSON() ([]byte, error) {
2299	type NoMethod LookupGroupNameResponse
2300	raw := NoMethod(*s)
2301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2302}
2303
2304// LookupMembershipNameResponse: The response message for
2305// MembershipsService.LookupMembershipName.
2306type LookupMembershipNameResponse struct {
2307	// Name: The resource name
2308	// (https://cloud.google.com/apis/design/resource_names) of the
2309	// looked-up `Membership`. Must be of the form
2310	// `groups/{group_id}/memberships/{membership_id}`.
2311	Name string `json:"name,omitempty"`
2312
2313	// ServerResponse contains the HTTP response code and headers from the
2314	// server.
2315	googleapi.ServerResponse `json:"-"`
2316
2317	// ForceSendFields is a list of field names (e.g. "Name") to
2318	// unconditionally include in API requests. By default, fields with
2319	// empty or default values are omitted from API requests. However, any
2320	// non-pointer, non-interface field appearing in ForceSendFields will be
2321	// sent to the server regardless of whether the field is empty or not.
2322	// This may be used to include empty fields in Patch requests.
2323	ForceSendFields []string `json:"-"`
2324
2325	// NullFields is a list of field names (e.g. "Name") to include in API
2326	// requests with the JSON null value. By default, fields with empty
2327	// values are omitted from API requests. However, any field with an
2328	// empty value appearing in NullFields will be sent to the server as
2329	// null. It is an error if a field in this list has a non-empty value.
2330	// This may be used to include null fields in Patch requests.
2331	NullFields []string `json:"-"`
2332}
2333
2334func (s *LookupMembershipNameResponse) MarshalJSON() ([]byte, error) {
2335	type NoMethod LookupMembershipNameResponse
2336	raw := NoMethod(*s)
2337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2338}
2339
2340// LookupSelfDeviceUsersResponse: Response containing resource names of
2341// the DeviceUsers associated with the caller's credentials.
2342type LookupSelfDeviceUsersResponse struct {
2343	// Customer: The obfuscated customer Id that may be passed back to other
2344	// Devices API methods such as List, Get, etc.
2345	Customer string `json:"customer,omitempty"`
2346
2347	// Names: Resource names
2348	// (https://cloud.google.com/apis/design/resource_names) of the
2349	// DeviceUsers in the format:
2350	// `devices/{device_id}/deviceUsers/{user_resource_id}`, where device_id
2351	// is the unique ID assigned to a Device and user_resource_id is the
2352	// unique user ID
2353	Names []string `json:"names,omitempty"`
2354
2355	// NextPageToken: Token to retrieve the next page of results. Empty if
2356	// there are no more results.
2357	NextPageToken string `json:"nextPageToken,omitempty"`
2358
2359	// ServerResponse contains the HTTP response code and headers from the
2360	// server.
2361	googleapi.ServerResponse `json:"-"`
2362
2363	// ForceSendFields is a list of field names (e.g. "Customer") to
2364	// unconditionally include in API requests. By default, fields with
2365	// empty or default values are omitted from API requests. However, any
2366	// non-pointer, non-interface field appearing in ForceSendFields will be
2367	// sent to the server regardless of whether the field is empty or not.
2368	// This may be used to include empty fields in Patch requests.
2369	ForceSendFields []string `json:"-"`
2370
2371	// NullFields is a list of field names (e.g. "Customer") to include in
2372	// API requests with the JSON null value. By default, fields with empty
2373	// values are omitted from API requests. However, any field with an
2374	// empty value appearing in NullFields will be sent to the server as
2375	// null. It is an error if a field in this list has a non-empty value.
2376	// This may be used to include null fields in Patch requests.
2377	NullFields []string `json:"-"`
2378}
2379
2380func (s *LookupSelfDeviceUsersResponse) MarshalJSON() ([]byte, error) {
2381	type NoMethod LookupSelfDeviceUsersResponse
2382	raw := NoMethod(*s)
2383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2384}
2385
2386// MemberRelation: Message representing a transitive membership of a
2387// group.
2388type MemberRelation struct {
2389	// Member: Resource name for this member.
2390	Member string `json:"member,omitempty"`
2391
2392	// PreferredMemberKey: Entity key has an id and a namespace. In case of
2393	// discussion forums, the id will be an email address without a
2394	// namespace.
2395	PreferredMemberKey []*EntityKey `json:"preferredMemberKey,omitempty"`
2396
2397	// RelationType: The relation between the group and the transitive
2398	// member.
2399	//
2400	// Possible values:
2401	//   "RELATION_TYPE_UNSPECIFIED" - The relation type is undefined or
2402	// undetermined.
2403	//   "DIRECT" - The two entities have only a direct membership with each
2404	// other.
2405	//   "INDIRECT" - The two entities have only an indirect membership with
2406	// each other.
2407	//   "DIRECT_AND_INDIRECT" - The two entities have both a direct and an
2408	// indirect membership with each other.
2409	RelationType string `json:"relationType,omitempty"`
2410
2411	// Roles: The membership role details (i.e name of role and expiry
2412	// time).
2413	Roles []*TransitiveMembershipRole `json:"roles,omitempty"`
2414
2415	// ForceSendFields is a list of field names (e.g. "Member") to
2416	// unconditionally include in API requests. By default, fields with
2417	// empty or default values are omitted from API requests. However, any
2418	// non-pointer, non-interface field appearing in ForceSendFields will be
2419	// sent to the server regardless of whether the field is empty or not.
2420	// This may be used to include empty fields in Patch requests.
2421	ForceSendFields []string `json:"-"`
2422
2423	// NullFields is a list of field names (e.g. "Member") to include in API
2424	// requests with the JSON null value. By default, fields with empty
2425	// values are omitted from API requests. However, any field with an
2426	// empty value appearing in NullFields will be sent to the server as
2427	// null. It is an error if a field in this list has a non-empty value.
2428	// This may be used to include null fields in Patch requests.
2429	NullFields []string `json:"-"`
2430}
2431
2432func (s *MemberRelation) MarshalJSON() ([]byte, error) {
2433	type NoMethod MemberRelation
2434	raw := NoMethod(*s)
2435	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2436}
2437
2438// Membership: A membership within the Cloud Identity Groups API. A
2439// `Membership` defines a relationship between a `Group` and an entity
2440// belonging to that `Group`, referred to as a "member".
2441type Membership struct {
2442	// CreateTime: Output only. The time when the `Membership` was created.
2443	CreateTime string `json:"createTime,omitempty"`
2444
2445	// MemberKey: Immutable. The `EntityKey` of the member. Either
2446	// `member_key` or `preferred_member_key` must be set when calling
2447	// MembershipsService.CreateMembership but not both; both shall be set
2448	// when returned.
2449	MemberKey *EntityKey `json:"memberKey,omitempty"`
2450
2451	// Name: Output only. The resource name
2452	// (https://cloud.google.com/apis/design/resource_names) of the
2453	// `Membership`. Shall be of the form
2454	// `groups/{group_id}/memberships/{membership_id}`.
2455	Name string `json:"name,omitempty"`
2456
2457	// PreferredMemberKey: Required. Immutable. The `EntityKey` of the
2458	// member. Either `member_key` or `preferred_member_key` must be set
2459	// when calling MembershipsService.CreateMembership but not both; both
2460	// shall be set when returned.
2461	PreferredMemberKey *EntityKey `json:"preferredMemberKey,omitempty"`
2462
2463	// Roles: The `MembershipRole`s that apply to the `Membership`. If
2464	// unspecified, defaults to a single `MembershipRole` with `name`
2465	// `MEMBER`. Must not contain duplicate `MembershipRole`s with the same
2466	// `name`.
2467	Roles []*MembershipRole `json:"roles,omitempty"`
2468
2469	// Type: Output only. The type of the membership.
2470	//
2471	// Possible values:
2472	//   "TYPE_UNSPECIFIED" - Default. Should not be used.
2473	//   "USER" - Represents user type.
2474	//   "SERVICE_ACCOUNT" - Represents service account type.
2475	//   "GROUP" - Represents group type.
2476	//   "SHARED_DRIVE" - Represents Shared drive.
2477	//   "OTHER" - Represents other type.
2478	Type string `json:"type,omitempty"`
2479
2480	// UpdateTime: Output only. The time when the `Membership` was last
2481	// updated.
2482	UpdateTime string `json:"updateTime,omitempty"`
2483
2484	// ServerResponse contains the HTTP response code and headers from the
2485	// server.
2486	googleapi.ServerResponse `json:"-"`
2487
2488	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2489	// unconditionally include in API requests. By default, fields with
2490	// empty or default values are omitted from API requests. However, any
2491	// non-pointer, non-interface field appearing in ForceSendFields will be
2492	// sent to the server regardless of whether the field is empty or not.
2493	// This may be used to include empty fields in Patch requests.
2494	ForceSendFields []string `json:"-"`
2495
2496	// NullFields is a list of field names (e.g. "CreateTime") to include in
2497	// API requests with the JSON null value. By default, fields with empty
2498	// values are omitted from API requests. However, any field with an
2499	// empty value appearing in NullFields will be sent to the server as
2500	// null. It is an error if a field in this list has a non-empty value.
2501	// This may be used to include null fields in Patch requests.
2502	NullFields []string `json:"-"`
2503}
2504
2505func (s *Membership) MarshalJSON() ([]byte, error) {
2506	type NoMethod Membership
2507	raw := NoMethod(*s)
2508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2509}
2510
2511// MembershipAdjacencyList: Membership graph's path information as an
2512// adjacency list.
2513type MembershipAdjacencyList struct {
2514	// Edges: Each edge contains information about the member that belongs
2515	// to this group. Note: Fields returned here will help identify the
2516	// specific Membership resource (e.g name, preferred_member_key and
2517	// role), but may not be a comprehensive list of all fields.
2518	Edges []*Membership `json:"edges,omitempty"`
2519
2520	// Group: Resource name of the group that the members belong to.
2521	Group string `json:"group,omitempty"`
2522
2523	// ForceSendFields is a list of field names (e.g. "Edges") to
2524	// unconditionally include in API requests. By default, fields with
2525	// empty or default values are omitted from API requests. However, any
2526	// non-pointer, non-interface field appearing in ForceSendFields will be
2527	// sent to the server regardless of whether the field is empty or not.
2528	// This may be used to include empty fields in Patch requests.
2529	ForceSendFields []string `json:"-"`
2530
2531	// NullFields is a list of field names (e.g. "Edges") to include in API
2532	// requests with the JSON null value. By default, fields with empty
2533	// values are omitted from API requests. However, any field with an
2534	// empty value appearing in NullFields will be sent to the server as
2535	// null. It is an error if a field in this list has a non-empty value.
2536	// This may be used to include null fields in Patch requests.
2537	NullFields []string `json:"-"`
2538}
2539
2540func (s *MembershipAdjacencyList) MarshalJSON() ([]byte, error) {
2541	type NoMethod MembershipAdjacencyList
2542	raw := NoMethod(*s)
2543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2544}
2545
2546// MembershipRole: A membership role within the Cloud Identity Groups
2547// API. A `MembershipRole` defines the privileges granted to a
2548// `Membership`.
2549type MembershipRole struct {
2550	// ExpiryDetail: The expiry details of the `MembershipRole`. Expiry
2551	// details are only supported for `MEMBER` `MembershipRoles`. May be set
2552	// if `name` is `MEMBER`. Must not be set if `name` is any other value.
2553	ExpiryDetail *ExpiryDetail `json:"expiryDetail,omitempty"`
2554
2555	// Name: The name of the `MembershipRole`. Must be one of `OWNER`,
2556	// `MANAGER`, `MEMBER`.
2557	Name string `json:"name,omitempty"`
2558
2559	// ForceSendFields is a list of field names (e.g. "ExpiryDetail") to
2560	// unconditionally include in API requests. By default, fields with
2561	// empty or default values are omitted from API requests. However, any
2562	// non-pointer, non-interface field appearing in ForceSendFields will be
2563	// sent to the server regardless of whether the field is empty or not.
2564	// This may be used to include empty fields in Patch requests.
2565	ForceSendFields []string `json:"-"`
2566
2567	// NullFields is a list of field names (e.g. "ExpiryDetail") to include
2568	// in API requests with the JSON null value. By default, fields with
2569	// empty values are omitted from API requests. However, any field with
2570	// an empty value appearing in NullFields will be sent to the server as
2571	// null. It is an error if a field in this list has a non-empty value.
2572	// This may be used to include null fields in Patch requests.
2573	NullFields []string `json:"-"`
2574}
2575
2576func (s *MembershipRole) MarshalJSON() ([]byte, error) {
2577	type NoMethod MembershipRole
2578	raw := NoMethod(*s)
2579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2580}
2581
2582// ModifyMembershipRolesRequest: The request message for
2583// MembershipsService.ModifyMembershipRoles.
2584type ModifyMembershipRolesRequest struct {
2585	// AddRoles: The `MembershipRole`s to be added. Adding or removing roles
2586	// in the same request as updating roles is not supported. Must not be
2587	// set if `update_roles_params` is set.
2588	AddRoles []*MembershipRole `json:"addRoles,omitempty"`
2589
2590	// RemoveRoles: The `name`s of the `MembershipRole`s to be removed.
2591	// Adding or removing roles in the same request as updating roles is not
2592	// supported. It is not possible to remove the `MEMBER`
2593	// `MembershipRole`. If you wish to delete a `Membership`, call
2594	// MembershipsService.DeleteMembership instead. Must not contain
2595	// `MEMBER`. Must not be set if `update_roles_params` is set.
2596	RemoveRoles []string `json:"removeRoles,omitempty"`
2597
2598	// UpdateRolesParams: The `MembershipRole`s to be updated. Updating
2599	// roles in the same request as adding or removing roles is not
2600	// supported. Must not be set if either `add_roles` or `remove_roles` is
2601	// set.
2602	UpdateRolesParams []*UpdateMembershipRolesParams `json:"updateRolesParams,omitempty"`
2603
2604	// ForceSendFields is a list of field names (e.g. "AddRoles") to
2605	// unconditionally include in API requests. By default, fields with
2606	// empty or default values are omitted from API requests. However, any
2607	// non-pointer, non-interface field appearing in ForceSendFields will be
2608	// sent to the server regardless of whether the field is empty or not.
2609	// This may be used to include empty fields in Patch requests.
2610	ForceSendFields []string `json:"-"`
2611
2612	// NullFields is a list of field names (e.g. "AddRoles") to include in
2613	// API requests with the JSON null value. By default, fields with empty
2614	// values are omitted from API requests. However, any field with an
2615	// empty value appearing in NullFields will be sent to the server as
2616	// null. It is an error if a field in this list has a non-empty value.
2617	// This may be used to include null fields in Patch requests.
2618	NullFields []string `json:"-"`
2619}
2620
2621func (s *ModifyMembershipRolesRequest) MarshalJSON() ([]byte, error) {
2622	type NoMethod ModifyMembershipRolesRequest
2623	raw := NoMethod(*s)
2624	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2625}
2626
2627// ModifyMembershipRolesResponse: The response message for
2628// MembershipsService.ModifyMembershipRoles.
2629type ModifyMembershipRolesResponse struct {
2630	// Membership: The `Membership` resource after modifying its
2631	// `MembershipRole`s.
2632	Membership *Membership `json:"membership,omitempty"`
2633
2634	// ServerResponse contains the HTTP response code and headers from the
2635	// server.
2636	googleapi.ServerResponse `json:"-"`
2637
2638	// ForceSendFields is a list of field names (e.g. "Membership") to
2639	// unconditionally include in API requests. By default, fields with
2640	// empty or default values are omitted from API requests. However, any
2641	// non-pointer, non-interface field appearing in ForceSendFields will be
2642	// sent to the server regardless of whether the field is empty or not.
2643	// This may be used to include empty fields in Patch requests.
2644	ForceSendFields []string `json:"-"`
2645
2646	// NullFields is a list of field names (e.g. "Membership") to include in
2647	// API requests with the JSON null value. By default, fields with empty
2648	// values are omitted from API requests. However, any field with an
2649	// empty value appearing in NullFields will be sent to the server as
2650	// null. It is an error if a field in this list has a non-empty value.
2651	// This may be used to include null fields in Patch requests.
2652	NullFields []string `json:"-"`
2653}
2654
2655func (s *ModifyMembershipRolesResponse) MarshalJSON() ([]byte, error) {
2656	type NoMethod ModifyMembershipRolesResponse
2657	raw := NoMethod(*s)
2658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2659}
2660
2661// Operation: This resource represents a long-running operation that is
2662// the result of a network API call.
2663type Operation struct {
2664	// Done: If the value is `false`, it means the operation is still in
2665	// progress. If `true`, the operation is completed, and either `error`
2666	// or `response` is available.
2667	Done bool `json:"done,omitempty"`
2668
2669	// Error: The error result of the operation in case of failure or
2670	// cancellation.
2671	Error *Status `json:"error,omitempty"`
2672
2673	// Metadata: Service-specific metadata associated with the operation. It
2674	// typically contains progress information and common metadata such as
2675	// create time. Some services might not provide such metadata. Any
2676	// method that returns a long-running operation should document the
2677	// metadata type, if any.
2678	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2679
2680	// Name: The server-assigned name, which is only unique within the same
2681	// service that originally returns it. If you use the default HTTP
2682	// mapping, the `name` should be a resource name ending with
2683	// `operations/{unique_id}`.
2684	Name string `json:"name,omitempty"`
2685
2686	// Response: The normal response of the operation in case of success. If
2687	// the original method returns no data on success, such as `Delete`, the
2688	// response is `google.protobuf.Empty`. If the original method is
2689	// standard `Get`/`Create`/`Update`, the response should be the
2690	// resource. For other methods, the response should have the type
2691	// `XxxResponse`, where `Xxx` is the original method name. For example,
2692	// if the original method name is `TakeSnapshot()`, the inferred
2693	// response type is `TakeSnapshotResponse`.
2694	Response googleapi.RawMessage `json:"response,omitempty"`
2695
2696	// ServerResponse contains the HTTP response code and headers from the
2697	// server.
2698	googleapi.ServerResponse `json:"-"`
2699
2700	// ForceSendFields is a list of field names (e.g. "Done") to
2701	// unconditionally include in API requests. By default, fields with
2702	// empty or default values are omitted from API requests. However, any
2703	// non-pointer, non-interface field appearing in ForceSendFields will be
2704	// sent to the server regardless of whether the field is empty or not.
2705	// This may be used to include empty fields in Patch requests.
2706	ForceSendFields []string `json:"-"`
2707
2708	// NullFields is a list of field names (e.g. "Done") to include in API
2709	// requests with the JSON null value. By default, fields with empty
2710	// values are omitted from API requests. However, any field with an
2711	// empty value appearing in NullFields will be sent to the server as
2712	// null. It is an error if a field in this list has a non-empty value.
2713	// This may be used to include null fields in Patch requests.
2714	NullFields []string `json:"-"`
2715}
2716
2717func (s *Operation) MarshalJSON() ([]byte, error) {
2718	type NoMethod Operation
2719	raw := NoMethod(*s)
2720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2721}
2722
2723// PosixGroup: POSIX Group definition to represent a group in a POSIX
2724// compliant system.
2725type PosixGroup struct {
2726	// Gid: GID of the POSIX group.
2727	Gid uint64 `json:"gid,omitempty,string"`
2728
2729	// Name: Name of the POSIX group.
2730	Name string `json:"name,omitempty"`
2731
2732	// SystemId: System identifier for which group name and gid apply to. If
2733	// not specified it will default to empty value.
2734	SystemId string `json:"systemId,omitempty"`
2735
2736	// ForceSendFields is a list of field names (e.g. "Gid") to
2737	// unconditionally include in API requests. By default, fields with
2738	// empty or default values are omitted from API requests. However, any
2739	// non-pointer, non-interface field appearing in ForceSendFields will be
2740	// sent to the server regardless of whether the field is empty or not.
2741	// This may be used to include empty fields in Patch requests.
2742	ForceSendFields []string `json:"-"`
2743
2744	// NullFields is a list of field names (e.g. "Gid") to include in API
2745	// requests with the JSON null value. By default, fields with empty
2746	// values are omitted from API requests. However, any field with an
2747	// empty value appearing in NullFields will be sent to the server as
2748	// null. It is an error if a field in this list has a non-empty value.
2749	// This may be used to include null fields in Patch requests.
2750	NullFields []string `json:"-"`
2751}
2752
2753func (s *PosixGroup) MarshalJSON() ([]byte, error) {
2754	type NoMethod PosixGroup
2755	raw := NoMethod(*s)
2756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2757}
2758
2759// SearchGroupsResponse: The response message for
2760// GroupsService.SearchGroups.
2761type SearchGroupsResponse struct {
2762	// Groups: The `Group` resources that match the search query.
2763	Groups []*Group `json:"groups,omitempty"`
2764
2765	// NextPageToken: A continuation token to retrieve the next page of
2766	// results, or empty if there are no more results available.
2767	NextPageToken string `json:"nextPageToken,omitempty"`
2768
2769	// ServerResponse contains the HTTP response code and headers from the
2770	// server.
2771	googleapi.ServerResponse `json:"-"`
2772
2773	// ForceSendFields is a list of field names (e.g. "Groups") to
2774	// unconditionally include in API requests. By default, fields with
2775	// empty or default values are omitted from API requests. However, any
2776	// non-pointer, non-interface field appearing in ForceSendFields will be
2777	// sent to the server regardless of whether the field is empty or not.
2778	// This may be used to include empty fields in Patch requests.
2779	ForceSendFields []string `json:"-"`
2780
2781	// NullFields is a list of field names (e.g. "Groups") to include in API
2782	// requests with the JSON null value. By default, fields with empty
2783	// values are omitted from API requests. However, any field with an
2784	// empty value appearing in NullFields will be sent to the server as
2785	// null. It is an error if a field in this list has a non-empty value.
2786	// This may be used to include null fields in Patch requests.
2787	NullFields []string `json:"-"`
2788}
2789
2790func (s *SearchGroupsResponse) MarshalJSON() ([]byte, error) {
2791	type NoMethod SearchGroupsResponse
2792	raw := NoMethod(*s)
2793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2794}
2795
2796// SearchTransitiveGroupsResponse: The response message for
2797// MembershipsService.SearchTransitiveGroups.
2798type SearchTransitiveGroupsResponse struct {
2799	// Memberships: List of transitive groups satisfying the query.
2800	Memberships []*GroupRelation `json:"memberships,omitempty"`
2801
2802	// NextPageToken: Token to retrieve the next page of results, or empty
2803	// if there are no more results available for listing.
2804	NextPageToken string `json:"nextPageToken,omitempty"`
2805
2806	// ServerResponse contains the HTTP response code and headers from the
2807	// server.
2808	googleapi.ServerResponse `json:"-"`
2809
2810	// ForceSendFields is a list of field names (e.g. "Memberships") to
2811	// unconditionally include in API requests. By default, fields with
2812	// empty or default values are omitted from API requests. However, any
2813	// non-pointer, non-interface field appearing in ForceSendFields will be
2814	// sent to the server regardless of whether the field is empty or not.
2815	// This may be used to include empty fields in Patch requests.
2816	ForceSendFields []string `json:"-"`
2817
2818	// NullFields is a list of field names (e.g. "Memberships") to include
2819	// in API requests with the JSON null value. By default, fields with
2820	// empty values are omitted from API requests. However, any field with
2821	// an empty value appearing in NullFields will be sent to the server as
2822	// null. It is an error if a field in this list has a non-empty value.
2823	// This may be used to include null fields in Patch requests.
2824	NullFields []string `json:"-"`
2825}
2826
2827func (s *SearchTransitiveGroupsResponse) MarshalJSON() ([]byte, error) {
2828	type NoMethod SearchTransitiveGroupsResponse
2829	raw := NoMethod(*s)
2830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2831}
2832
2833// SearchTransitiveMembershipsResponse: The response message for
2834// MembershipsService.SearchTransitiveMemberships.
2835type SearchTransitiveMembershipsResponse struct {
2836	// Memberships: List of transitive members satisfying the query.
2837	Memberships []*MemberRelation `json:"memberships,omitempty"`
2838
2839	// NextPageToken: Token to retrieve the next page of results, or empty
2840	// if there are no more results.
2841	NextPageToken string `json:"nextPageToken,omitempty"`
2842
2843	// ServerResponse contains the HTTP response code and headers from the
2844	// server.
2845	googleapi.ServerResponse `json:"-"`
2846
2847	// ForceSendFields is a list of field names (e.g. "Memberships") to
2848	// unconditionally include in API requests. By default, fields with
2849	// empty or default values are omitted from API requests. However, any
2850	// non-pointer, non-interface field appearing in ForceSendFields will be
2851	// sent to the server regardless of whether the field is empty or not.
2852	// This may be used to include empty fields in Patch requests.
2853	ForceSendFields []string `json:"-"`
2854
2855	// NullFields is a list of field names (e.g. "Memberships") to include
2856	// in API requests with the JSON null value. By default, fields with
2857	// empty values are omitted from API requests. However, any field with
2858	// an empty value appearing in NullFields will be sent to the server as
2859	// null. It is an error if a field in this list has a non-empty value.
2860	// This may be used to include null fields in Patch requests.
2861	NullFields []string `json:"-"`
2862}
2863
2864func (s *SearchTransitiveMembershipsResponse) MarshalJSON() ([]byte, error) {
2865	type NoMethod SearchTransitiveMembershipsResponse
2866	raw := NoMethod(*s)
2867	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2868}
2869
2870// SendUserInvitationRequest: A request to send email for inviting
2871// target user corresponding to the UserInvitation.
2872type SendUserInvitationRequest struct {
2873}
2874
2875// Status: The `Status` type defines a logical error model that is
2876// suitable for different programming environments, including REST APIs
2877// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2878// `Status` message contains three pieces of data: error code, error
2879// message, and error details. You can find out more about this error
2880// model and how to work with it in the API Design Guide
2881// (https://cloud.google.com/apis/design/errors).
2882type Status struct {
2883	// Code: The status code, which should be an enum value of
2884	// google.rpc.Code.
2885	Code int64 `json:"code,omitempty"`
2886
2887	// Details: A list of messages that carry the error details. There is a
2888	// common set of message types for APIs to use.
2889	Details []googleapi.RawMessage `json:"details,omitempty"`
2890
2891	// Message: A developer-facing error message, which should be in
2892	// English. Any user-facing error message should be localized and sent
2893	// in the google.rpc.Status.details field, or localized by the client.
2894	Message string `json:"message,omitempty"`
2895
2896	// ForceSendFields is a list of field names (e.g. "Code") to
2897	// unconditionally include in API requests. By default, fields with
2898	// empty or default values are omitted from API requests. However, any
2899	// non-pointer, non-interface field appearing in ForceSendFields will be
2900	// sent to the server regardless of whether the field is empty or not.
2901	// This may be used to include empty fields in Patch requests.
2902	ForceSendFields []string `json:"-"`
2903
2904	// NullFields is a list of field names (e.g. "Code") to include in API
2905	// requests with the JSON null value. By default, fields with empty
2906	// values are omitted from API requests. However, any field with an
2907	// empty value appearing in NullFields will be sent to the server as
2908	// null. It is an error if a field in this list has a non-empty value.
2909	// This may be used to include null fields in Patch requests.
2910	NullFields []string `json:"-"`
2911}
2912
2913func (s *Status) MarshalJSON() ([]byte, error) {
2914	type NoMethod Status
2915	raw := NoMethod(*s)
2916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2917}
2918
2919// TransitiveMembershipRole: Message representing the role of a
2920// TransitiveMembership.
2921type TransitiveMembershipRole struct {
2922	// Role: TransitiveMembershipRole in string format. Currently supported
2923	// TransitiveMembershipRoles: "MEMBER", "OWNER", and "MANAGER".
2924	Role string `json:"role,omitempty"`
2925
2926	// ForceSendFields is a list of field names (e.g. "Role") to
2927	// unconditionally include in API requests. By default, fields with
2928	// empty or default values are omitted from API requests. However, any
2929	// non-pointer, non-interface field appearing in ForceSendFields will be
2930	// sent to the server regardless of whether the field is empty or not.
2931	// This may be used to include empty fields in Patch requests.
2932	ForceSendFields []string `json:"-"`
2933
2934	// NullFields is a list of field names (e.g. "Role") to include in API
2935	// requests with the JSON null value. By default, fields with empty
2936	// values are omitted from API requests. However, any field with an
2937	// empty value appearing in NullFields will be sent to the server as
2938	// null. It is an error if a field in this list has a non-empty value.
2939	// This may be used to include null fields in Patch requests.
2940	NullFields []string `json:"-"`
2941}
2942
2943func (s *TransitiveMembershipRole) MarshalJSON() ([]byte, error) {
2944	type NoMethod TransitiveMembershipRole
2945	raw := NoMethod(*s)
2946	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2947}
2948
2949// UpdateMembershipRolesParams: The details of an update to a
2950// `MembershipRole`.
2951type UpdateMembershipRolesParams struct {
2952	// FieldMask: The fully-qualified names of fields to update. May only
2953	// contain the field `expiry_detail.expire_time`.
2954	FieldMask string `json:"fieldMask,omitempty"`
2955
2956	// MembershipRole: The `MembershipRole`s to be updated. Only `MEMBER`
2957	// `MembershipRoles` can currently be updated. May only contain a
2958	// `MembershipRole` with `name` `MEMBER`.
2959	MembershipRole *MembershipRole `json:"membershipRole,omitempty"`
2960
2961	// ForceSendFields is a list of field names (e.g. "FieldMask") to
2962	// unconditionally include in API requests. By default, fields with
2963	// empty or default values are omitted from API requests. However, any
2964	// non-pointer, non-interface field appearing in ForceSendFields will be
2965	// sent to the server regardless of whether the field is empty or not.
2966	// This may be used to include empty fields in Patch requests.
2967	ForceSendFields []string `json:"-"`
2968
2969	// NullFields is a list of field names (e.g. "FieldMask") to include in
2970	// API requests with the JSON null value. By default, fields with empty
2971	// values are omitted from API requests. However, any field with an
2972	// empty value appearing in NullFields will be sent to the server as
2973	// null. It is an error if a field in this list has a non-empty value.
2974	// This may be used to include null fields in Patch requests.
2975	NullFields []string `json:"-"`
2976}
2977
2978func (s *UpdateMembershipRolesParams) MarshalJSON() ([]byte, error) {
2979	type NoMethod UpdateMembershipRolesParams
2980	raw := NoMethod(*s)
2981	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2982}
2983
2984// UserInvitation: The `UserInvitation` resource represents an email
2985// that can be sent to an unmanaged user account inviting them to join
2986// the customer’s Google Workspace or Cloud Identity account. An
2987// unmanaged account shares an email address domain with the Google
2988// Workspace or Cloud Identity account but is not managed by it yet. If
2989// the user accepts the `UserInvitation`, the user account will become
2990// managed.
2991type UserInvitation struct {
2992	// MailsSentCount: Number of invitation emails sent to the user.
2993	MailsSentCount int64 `json:"mailsSentCount,omitempty,string"`
2994
2995	// Name: Shall be of the form
2996	// `customers/{customer}/userinvitations/{user_email_address}`.
2997	Name string `json:"name,omitempty"`
2998
2999	// State: State of the `UserInvitation`.
3000	//
3001	// Possible values:
3002	//   "STATE_UNSPECIFIED" - The default value. This value is used if the
3003	// state is omitted.
3004	//   "NOT_YET_SENT" - The `UserInvitation` has been created and is ready
3005	// for sending as an email.
3006	//   "INVITED" - The user has been invited by email.
3007	//   "ACCEPTED" - The user has accepted the invitation and is part of
3008	// the organization.
3009	//   "DECLINED" - The user declined the invitation.
3010	State string `json:"state,omitempty"`
3011
3012	// UpdateTime: Time when the `UserInvitation` was last updated.
3013	UpdateTime string `json:"updateTime,omitempty"`
3014
3015	// ServerResponse contains the HTTP response code and headers from the
3016	// server.
3017	googleapi.ServerResponse `json:"-"`
3018
3019	// ForceSendFields is a list of field names (e.g. "MailsSentCount") to
3020	// unconditionally include in API requests. By default, fields with
3021	// empty or default values are omitted from API requests. However, any
3022	// non-pointer, non-interface field appearing in ForceSendFields will be
3023	// sent to the server regardless of whether the field is empty or not.
3024	// This may be used to include empty fields in Patch requests.
3025	ForceSendFields []string `json:"-"`
3026
3027	// NullFields is a list of field names (e.g. "MailsSentCount") to
3028	// include in API requests with the JSON null value. By default, fields
3029	// with empty values are omitted from API requests. However, any field
3030	// with an empty value appearing in NullFields will be sent to the
3031	// server as null. It is an error if a field in this list has a
3032	// non-empty value. This may be used to include null fields in Patch
3033	// requests.
3034	NullFields []string `json:"-"`
3035}
3036
3037func (s *UserInvitation) MarshalJSON() ([]byte, error) {
3038	type NoMethod UserInvitation
3039	raw := NoMethod(*s)
3040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3041}
3042
3043// WipeDeviceRequest: Request message for wiping all data on the device.
3044type WipeDeviceRequest struct {
3045	// RemoveResetLock: Optional. Specifies if a user is able to factory
3046	// reset a device after a Device Wipe. On iOS, this is called
3047	// "Activation Lock", while on Android, this is known as "Factory Reset
3048	// Protection". If true, this protection will be removed from the
3049	// device, so that a user can successfully factory reset. If false, the
3050	// setting is untouched on the device.
3051	RemoveResetLock bool `json:"removeResetLock,omitempty"`
3052
3053	// ForceSendFields is a list of field names (e.g. "RemoveResetLock") to
3054	// unconditionally include in API requests. By default, fields with
3055	// empty or default values are omitted from API requests. However, any
3056	// non-pointer, non-interface field appearing in ForceSendFields will be
3057	// sent to the server regardless of whether the field is empty or not.
3058	// This may be used to include empty fields in Patch requests.
3059	ForceSendFields []string `json:"-"`
3060
3061	// NullFields is a list of field names (e.g. "RemoveResetLock") to
3062	// include in API requests with the JSON null value. By default, fields
3063	// with empty values are omitted from API requests. However, any field
3064	// with an empty value appearing in NullFields will be sent to the
3065	// server as null. It is an error if a field in this list has a
3066	// non-empty value. This may be used to include null fields in Patch
3067	// requests.
3068	NullFields []string `json:"-"`
3069}
3070
3071func (s *WipeDeviceRequest) MarshalJSON() ([]byte, error) {
3072	type NoMethod WipeDeviceRequest
3073	raw := NoMethod(*s)
3074	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3075}
3076
3077// WipeDeviceResponse: Response message for wiping all data on the
3078// device.
3079type WipeDeviceResponse struct {
3080	// Device: Resultant Device object for the action. Note that asset tags
3081	// will not be returned in the device object.
3082	Device *Device `json:"device,omitempty"`
3083
3084	// ForceSendFields is a list of field names (e.g. "Device") to
3085	// unconditionally include in API requests. By default, fields with
3086	// empty or default values are omitted from API requests. However, any
3087	// non-pointer, non-interface field appearing in ForceSendFields will be
3088	// sent to the server regardless of whether the field is empty or not.
3089	// This may be used to include empty fields in Patch requests.
3090	ForceSendFields []string `json:"-"`
3091
3092	// NullFields is a list of field names (e.g. "Device") to include in API
3093	// requests with the JSON null value. By default, fields with empty
3094	// values are omitted from API requests. However, any field with an
3095	// empty value appearing in NullFields will be sent to the server as
3096	// null. It is an error if a field in this list has a non-empty value.
3097	// This may be used to include null fields in Patch requests.
3098	NullFields []string `json:"-"`
3099}
3100
3101func (s *WipeDeviceResponse) MarshalJSON() ([]byte, error) {
3102	type NoMethod WipeDeviceResponse
3103	raw := NoMethod(*s)
3104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3105}
3106
3107// WipeDeviceUserRequest: Request message for starting an account wipe
3108// on device.
3109type WipeDeviceUserRequest struct {
3110}
3111
3112// WipeDeviceUserResponse: Response message for wiping the user's
3113// account from the device.
3114type WipeDeviceUserResponse struct {
3115	// DeviceUser: Resultant DeviceUser object for the action.
3116	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
3117
3118	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
3119	// unconditionally include in API requests. By default, fields with
3120	// empty or default values are omitted from API requests. However, any
3121	// non-pointer, non-interface field appearing in ForceSendFields will be
3122	// sent to the server regardless of whether the field is empty or not.
3123	// This may be used to include empty fields in Patch requests.
3124	ForceSendFields []string `json:"-"`
3125
3126	// NullFields is a list of field names (e.g. "DeviceUser") to include in
3127	// API requests with the JSON null value. By default, fields with empty
3128	// values are omitted from API requests. However, any field with an
3129	// empty value appearing in NullFields will be sent to the server as
3130	// null. It is an error if a field in this list has a non-empty value.
3131	// This may be used to include null fields in Patch requests.
3132	NullFields []string `json:"-"`
3133}
3134
3135func (s *WipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
3136	type NoMethod WipeDeviceUserResponse
3137	raw := NoMethod(*s)
3138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3139}
3140
3141// method id "cloudidentity.customers.userinvitations.cancel":
3142
3143type CustomersUserinvitationsCancelCall struct {
3144	s                           *Service
3145	name                        string
3146	canceluserinvitationrequest *CancelUserInvitationRequest
3147	urlParams_                  gensupport.URLParams
3148	ctx_                        context.Context
3149	header_                     http.Header
3150}
3151
3152// Cancel: Cancels a UserInvitation that was already sent.
3153//
3154// - name: `UserInvitation` name in the format
3155//   `customers/{customer}/userinvitations/{user_email_address}`.
3156func (r *CustomersUserinvitationsService) Cancel(name string, canceluserinvitationrequest *CancelUserInvitationRequest) *CustomersUserinvitationsCancelCall {
3157	c := &CustomersUserinvitationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3158	c.name = name
3159	c.canceluserinvitationrequest = canceluserinvitationrequest
3160	return c
3161}
3162
3163// Fields allows partial responses to be retrieved. See
3164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3165// for more information.
3166func (c *CustomersUserinvitationsCancelCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsCancelCall {
3167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3168	return c
3169}
3170
3171// Context sets the context to be used in this call's Do method. Any
3172// pending HTTP request will be aborted if the provided context is
3173// canceled.
3174func (c *CustomersUserinvitationsCancelCall) Context(ctx context.Context) *CustomersUserinvitationsCancelCall {
3175	c.ctx_ = ctx
3176	return c
3177}
3178
3179// Header returns an http.Header that can be modified by the caller to
3180// add HTTP headers to the request.
3181func (c *CustomersUserinvitationsCancelCall) Header() http.Header {
3182	if c.header_ == nil {
3183		c.header_ = make(http.Header)
3184	}
3185	return c.header_
3186}
3187
3188func (c *CustomersUserinvitationsCancelCall) doRequest(alt string) (*http.Response, error) {
3189	reqHeaders := make(http.Header)
3190	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3191	for k, v := range c.header_ {
3192		reqHeaders[k] = v
3193	}
3194	reqHeaders.Set("User-Agent", c.s.userAgent())
3195	var body io.Reader = nil
3196	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceluserinvitationrequest)
3197	if err != nil {
3198		return nil, err
3199	}
3200	reqHeaders.Set("Content-Type", "application/json")
3201	c.urlParams_.Set("alt", alt)
3202	c.urlParams_.Set("prettyPrint", "false")
3203	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
3204	urls += "?" + c.urlParams_.Encode()
3205	req, err := http.NewRequest("POST", urls, body)
3206	if err != nil {
3207		return nil, err
3208	}
3209	req.Header = reqHeaders
3210	googleapi.Expand(req.URL, map[string]string{
3211		"name": c.name,
3212	})
3213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3214}
3215
3216// Do executes the "cloudidentity.customers.userinvitations.cancel" call.
3217// Exactly one of *Operation or error will be non-nil. Any non-2xx
3218// status code is an error. Response headers are in either
3219// *Operation.ServerResponse.Header or (if a response was returned at
3220// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3221// to check whether the returned error was because
3222// http.StatusNotModified was returned.
3223func (c *CustomersUserinvitationsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3224	gensupport.SetOptions(c.urlParams_, opts...)
3225	res, err := c.doRequest("json")
3226	if res != nil && res.StatusCode == http.StatusNotModified {
3227		if res.Body != nil {
3228			res.Body.Close()
3229		}
3230		return nil, &googleapi.Error{
3231			Code:   res.StatusCode,
3232			Header: res.Header,
3233		}
3234	}
3235	if err != nil {
3236		return nil, err
3237	}
3238	defer googleapi.CloseBody(res)
3239	if err := googleapi.CheckResponse(res); err != nil {
3240		return nil, err
3241	}
3242	ret := &Operation{
3243		ServerResponse: googleapi.ServerResponse{
3244			Header:         res.Header,
3245			HTTPStatusCode: res.StatusCode,
3246		},
3247	}
3248	target := &ret
3249	if err := gensupport.DecodeResponse(target, res); err != nil {
3250		return nil, err
3251	}
3252	return ret, nil
3253	// {
3254	//   "description": "Cancels a UserInvitation that was already sent.",
3255	//   "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:cancel",
3256	//   "httpMethod": "POST",
3257	//   "id": "cloudidentity.customers.userinvitations.cancel",
3258	//   "parameterOrder": [
3259	//     "name"
3260	//   ],
3261	//   "parameters": {
3262	//     "name": {
3263	//       "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`",
3264	//       "location": "path",
3265	//       "pattern": "^customers/[^/]+/userinvitations/[^/]+$",
3266	//       "required": true,
3267	//       "type": "string"
3268	//     }
3269	//   },
3270	//   "path": "v1beta1/{+name}:cancel",
3271	//   "request": {
3272	//     "$ref": "CancelUserInvitationRequest"
3273	//   },
3274	//   "response": {
3275	//     "$ref": "Operation"
3276	//   }
3277	// }
3278
3279}
3280
3281// method id "cloudidentity.customers.userinvitations.get":
3282
3283type CustomersUserinvitationsGetCall struct {
3284	s            *Service
3285	name         string
3286	urlParams_   gensupport.URLParams
3287	ifNoneMatch_ string
3288	ctx_         context.Context
3289	header_      http.Header
3290}
3291
3292// Get: Retrieves a UserInvitation resource. **Note:** New consumer
3293// accounts with the customer's verified domain created within the
3294// previous 48 hours will not appear in the result. This delay also
3295// applies to newly-verified domains.
3296//
3297// - name: `UserInvitation` name in the format
3298//   `customers/{customer}/userinvitations/{user_email_address}`.
3299func (r *CustomersUserinvitationsService) Get(name string) *CustomersUserinvitationsGetCall {
3300	c := &CustomersUserinvitationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3301	c.name = name
3302	return c
3303}
3304
3305// Fields allows partial responses to be retrieved. See
3306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3307// for more information.
3308func (c *CustomersUserinvitationsGetCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsGetCall {
3309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3310	return c
3311}
3312
3313// IfNoneMatch sets the optional parameter which makes the operation
3314// fail if the object's ETag matches the given value. This is useful for
3315// getting updates only after the object has changed since the last
3316// request. Use googleapi.IsNotModified to check whether the response
3317// error from Do is the result of In-None-Match.
3318func (c *CustomersUserinvitationsGetCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsGetCall {
3319	c.ifNoneMatch_ = entityTag
3320	return c
3321}
3322
3323// Context sets the context to be used in this call's Do method. Any
3324// pending HTTP request will be aborted if the provided context is
3325// canceled.
3326func (c *CustomersUserinvitationsGetCall) Context(ctx context.Context) *CustomersUserinvitationsGetCall {
3327	c.ctx_ = ctx
3328	return c
3329}
3330
3331// Header returns an http.Header that can be modified by the caller to
3332// add HTTP headers to the request.
3333func (c *CustomersUserinvitationsGetCall) Header() http.Header {
3334	if c.header_ == nil {
3335		c.header_ = make(http.Header)
3336	}
3337	return c.header_
3338}
3339
3340func (c *CustomersUserinvitationsGetCall) doRequest(alt string) (*http.Response, error) {
3341	reqHeaders := make(http.Header)
3342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3343	for k, v := range c.header_ {
3344		reqHeaders[k] = v
3345	}
3346	reqHeaders.Set("User-Agent", c.s.userAgent())
3347	if c.ifNoneMatch_ != "" {
3348		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3349	}
3350	var body io.Reader = nil
3351	c.urlParams_.Set("alt", alt)
3352	c.urlParams_.Set("prettyPrint", "false")
3353	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3354	urls += "?" + c.urlParams_.Encode()
3355	req, err := http.NewRequest("GET", urls, body)
3356	if err != nil {
3357		return nil, err
3358	}
3359	req.Header = reqHeaders
3360	googleapi.Expand(req.URL, map[string]string{
3361		"name": c.name,
3362	})
3363	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3364}
3365
3366// Do executes the "cloudidentity.customers.userinvitations.get" call.
3367// Exactly one of *UserInvitation or error will be non-nil. Any non-2xx
3368// status code is an error. Response headers are in either
3369// *UserInvitation.ServerResponse.Header or (if a response was returned
3370// at all) in error.(*googleapi.Error).Header. Use
3371// googleapi.IsNotModified to check whether the returned error was
3372// because http.StatusNotModified was returned.
3373func (c *CustomersUserinvitationsGetCall) Do(opts ...googleapi.CallOption) (*UserInvitation, error) {
3374	gensupport.SetOptions(c.urlParams_, opts...)
3375	res, err := c.doRequest("json")
3376	if res != nil && res.StatusCode == http.StatusNotModified {
3377		if res.Body != nil {
3378			res.Body.Close()
3379		}
3380		return nil, &googleapi.Error{
3381			Code:   res.StatusCode,
3382			Header: res.Header,
3383		}
3384	}
3385	if err != nil {
3386		return nil, err
3387	}
3388	defer googleapi.CloseBody(res)
3389	if err := googleapi.CheckResponse(res); err != nil {
3390		return nil, err
3391	}
3392	ret := &UserInvitation{
3393		ServerResponse: googleapi.ServerResponse{
3394			Header:         res.Header,
3395			HTTPStatusCode: res.StatusCode,
3396		},
3397	}
3398	target := &ret
3399	if err := gensupport.DecodeResponse(target, res); err != nil {
3400		return nil, err
3401	}
3402	return ret, nil
3403	// {
3404	//   "description": "Retrieves a UserInvitation resource. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.",
3405	//   "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}",
3406	//   "httpMethod": "GET",
3407	//   "id": "cloudidentity.customers.userinvitations.get",
3408	//   "parameterOrder": [
3409	//     "name"
3410	//   ],
3411	//   "parameters": {
3412	//     "name": {
3413	//       "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`",
3414	//       "location": "path",
3415	//       "pattern": "^customers/[^/]+/userinvitations/[^/]+$",
3416	//       "required": true,
3417	//       "type": "string"
3418	//     }
3419	//   },
3420	//   "path": "v1beta1/{+name}",
3421	//   "response": {
3422	//     "$ref": "UserInvitation"
3423	//   }
3424	// }
3425
3426}
3427
3428// method id "cloudidentity.customers.userinvitations.isInvitableUser":
3429
3430type CustomersUserinvitationsIsInvitableUserCall struct {
3431	s            *Service
3432	name         string
3433	urlParams_   gensupport.URLParams
3434	ifNoneMatch_ string
3435	ctx_         context.Context
3436	header_      http.Header
3437}
3438
3439// IsInvitableUser: Verifies whether a user account is eligible to
3440// receive a UserInvitation (is an unmanaged account). Eligibility is
3441// based on the following criteria: * the email address is a consumer
3442// account and it's the primary email address of the account, and * the
3443// domain of the email address matches an existing verified Google
3444// Workspace or Cloud Identity domain If both conditions are met, the
3445// user is eligible. **Note:** This method is not supported for
3446// Workspace Essentials customers.
3447//
3448// - name: `UserInvitation` name in the format
3449//   `customers/{customer}/userinvitations/{user_email_address}`.
3450func (r *CustomersUserinvitationsService) IsInvitableUser(name string) *CustomersUserinvitationsIsInvitableUserCall {
3451	c := &CustomersUserinvitationsIsInvitableUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3452	c.name = name
3453	return c
3454}
3455
3456// Fields allows partial responses to be retrieved. See
3457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3458// for more information.
3459func (c *CustomersUserinvitationsIsInvitableUserCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsIsInvitableUserCall {
3460	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3461	return c
3462}
3463
3464// IfNoneMatch sets the optional parameter which makes the operation
3465// fail if the object's ETag matches the given value. This is useful for
3466// getting updates only after the object has changed since the last
3467// request. Use googleapi.IsNotModified to check whether the response
3468// error from Do is the result of In-None-Match.
3469func (c *CustomersUserinvitationsIsInvitableUserCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsIsInvitableUserCall {
3470	c.ifNoneMatch_ = entityTag
3471	return c
3472}
3473
3474// Context sets the context to be used in this call's Do method. Any
3475// pending HTTP request will be aborted if the provided context is
3476// canceled.
3477func (c *CustomersUserinvitationsIsInvitableUserCall) Context(ctx context.Context) *CustomersUserinvitationsIsInvitableUserCall {
3478	c.ctx_ = ctx
3479	return c
3480}
3481
3482// Header returns an http.Header that can be modified by the caller to
3483// add HTTP headers to the request.
3484func (c *CustomersUserinvitationsIsInvitableUserCall) Header() http.Header {
3485	if c.header_ == nil {
3486		c.header_ = make(http.Header)
3487	}
3488	return c.header_
3489}
3490
3491func (c *CustomersUserinvitationsIsInvitableUserCall) doRequest(alt string) (*http.Response, error) {
3492	reqHeaders := make(http.Header)
3493	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3494	for k, v := range c.header_ {
3495		reqHeaders[k] = v
3496	}
3497	reqHeaders.Set("User-Agent", c.s.userAgent())
3498	if c.ifNoneMatch_ != "" {
3499		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3500	}
3501	var body io.Reader = nil
3502	c.urlParams_.Set("alt", alt)
3503	c.urlParams_.Set("prettyPrint", "false")
3504	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:isInvitableUser")
3505	urls += "?" + c.urlParams_.Encode()
3506	req, err := http.NewRequest("GET", urls, body)
3507	if err != nil {
3508		return nil, err
3509	}
3510	req.Header = reqHeaders
3511	googleapi.Expand(req.URL, map[string]string{
3512		"name": c.name,
3513	})
3514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3515}
3516
3517// Do executes the "cloudidentity.customers.userinvitations.isInvitableUser" call.
3518// Exactly one of *IsInvitableUserResponse or error will be non-nil. Any
3519// non-2xx status code is an error. Response headers are in either
3520// *IsInvitableUserResponse.ServerResponse.Header or (if a response was
3521// returned at all) in error.(*googleapi.Error).Header. Use
3522// googleapi.IsNotModified to check whether the returned error was
3523// because http.StatusNotModified was returned.
3524func (c *CustomersUserinvitationsIsInvitableUserCall) Do(opts ...googleapi.CallOption) (*IsInvitableUserResponse, error) {
3525	gensupport.SetOptions(c.urlParams_, opts...)
3526	res, err := c.doRequest("json")
3527	if res != nil && res.StatusCode == http.StatusNotModified {
3528		if res.Body != nil {
3529			res.Body.Close()
3530		}
3531		return nil, &googleapi.Error{
3532			Code:   res.StatusCode,
3533			Header: res.Header,
3534		}
3535	}
3536	if err != nil {
3537		return nil, err
3538	}
3539	defer googleapi.CloseBody(res)
3540	if err := googleapi.CheckResponse(res); err != nil {
3541		return nil, err
3542	}
3543	ret := &IsInvitableUserResponse{
3544		ServerResponse: googleapi.ServerResponse{
3545			Header:         res.Header,
3546			HTTPStatusCode: res.StatusCode,
3547		},
3548	}
3549	target := &ret
3550	if err := gensupport.DecodeResponse(target, res); err != nil {
3551		return nil, err
3552	}
3553	return ret, nil
3554	// {
3555	//   "description": "Verifies whether a user account is eligible to receive a UserInvitation (is an unmanaged account). Eligibility is based on the following criteria: * the email address is a consumer account and it's the primary email address of the account, and * the domain of the email address matches an existing verified Google Workspace or Cloud Identity domain If both conditions are met, the user is eligible. **Note:** This method is not supported for Workspace Essentials customers.",
3556	//   "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:isInvitableUser",
3557	//   "httpMethod": "GET",
3558	//   "id": "cloudidentity.customers.userinvitations.isInvitableUser",
3559	//   "parameterOrder": [
3560	//     "name"
3561	//   ],
3562	//   "parameters": {
3563	//     "name": {
3564	//       "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`",
3565	//       "location": "path",
3566	//       "pattern": "^customers/[^/]+/userinvitations/[^/]+$",
3567	//       "required": true,
3568	//       "type": "string"
3569	//     }
3570	//   },
3571	//   "path": "v1beta1/{+name}:isInvitableUser",
3572	//   "response": {
3573	//     "$ref": "IsInvitableUserResponse"
3574	//   }
3575	// }
3576
3577}
3578
3579// method id "cloudidentity.customers.userinvitations.list":
3580
3581type CustomersUserinvitationsListCall struct {
3582	s            *Service
3583	parent       string
3584	urlParams_   gensupport.URLParams
3585	ifNoneMatch_ string
3586	ctx_         context.Context
3587	header_      http.Header
3588}
3589
3590// List: Retrieves a list of UserInvitation resources. **Note:** New
3591// consumer accounts with the customer's verified domain created within
3592// the previous 48 hours will not appear in the result. This delay also
3593// applies to newly-verified domains.
3594//
3595// - parent: The customer ID of the Google Workspace or Cloud Identity
3596//   account the UserInvitation resources are associated with.
3597func (r *CustomersUserinvitationsService) List(parent string) *CustomersUserinvitationsListCall {
3598	c := &CustomersUserinvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3599	c.parent = parent
3600	return c
3601}
3602
3603// Filter sets the optional parameter "filter": A query string for
3604// filtering `UserInvitation` results by their current state, in the
3605// format: "state=='invited'".
3606func (c *CustomersUserinvitationsListCall) Filter(filter string) *CustomersUserinvitationsListCall {
3607	c.urlParams_.Set("filter", filter)
3608	return c
3609}
3610
3611// OrderBy sets the optional parameter "orderBy": The sort order of the
3612// list results. You can sort the results in descending order based on
3613// either email or last update timestamp but not both, using
3614// `order_by="email desc". Currently, sorting is supported for
3615// `update_time asc`, `update_time desc`, `email asc`, and `email desc`.
3616// If not specified, results will be returned based on `email asc`
3617// order.
3618func (c *CustomersUserinvitationsListCall) OrderBy(orderBy string) *CustomersUserinvitationsListCall {
3619	c.urlParams_.Set("orderBy", orderBy)
3620	return c
3621}
3622
3623// PageSize sets the optional parameter "pageSize": The maximum number
3624// of UserInvitation resources to return. If unspecified, at most 100
3625// resources will be returned. The maximum value is 200; values above
3626// 200 will be set to 200.
3627func (c *CustomersUserinvitationsListCall) PageSize(pageSize int64) *CustomersUserinvitationsListCall {
3628	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3629	return c
3630}
3631
3632// PageToken sets the optional parameter "pageToken": A page token,
3633// received from a previous `ListUserInvitations` call. Provide this to
3634// retrieve the subsequent page. When paginating, all other parameters
3635// provided to `ListBooks` must match the call that provided the page
3636// token.
3637func (c *CustomersUserinvitationsListCall) PageToken(pageToken string) *CustomersUserinvitationsListCall {
3638	c.urlParams_.Set("pageToken", pageToken)
3639	return c
3640}
3641
3642// Fields allows partial responses to be retrieved. See
3643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3644// for more information.
3645func (c *CustomersUserinvitationsListCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsListCall {
3646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3647	return c
3648}
3649
3650// IfNoneMatch sets the optional parameter which makes the operation
3651// fail if the object's ETag matches the given value. This is useful for
3652// getting updates only after the object has changed since the last
3653// request. Use googleapi.IsNotModified to check whether the response
3654// error from Do is the result of In-None-Match.
3655func (c *CustomersUserinvitationsListCall) IfNoneMatch(entityTag string) *CustomersUserinvitationsListCall {
3656	c.ifNoneMatch_ = entityTag
3657	return c
3658}
3659
3660// Context sets the context to be used in this call's Do method. Any
3661// pending HTTP request will be aborted if the provided context is
3662// canceled.
3663func (c *CustomersUserinvitationsListCall) Context(ctx context.Context) *CustomersUserinvitationsListCall {
3664	c.ctx_ = ctx
3665	return c
3666}
3667
3668// Header returns an http.Header that can be modified by the caller to
3669// add HTTP headers to the request.
3670func (c *CustomersUserinvitationsListCall) Header() http.Header {
3671	if c.header_ == nil {
3672		c.header_ = make(http.Header)
3673	}
3674	return c.header_
3675}
3676
3677func (c *CustomersUserinvitationsListCall) doRequest(alt string) (*http.Response, error) {
3678	reqHeaders := make(http.Header)
3679	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3680	for k, v := range c.header_ {
3681		reqHeaders[k] = v
3682	}
3683	reqHeaders.Set("User-Agent", c.s.userAgent())
3684	if c.ifNoneMatch_ != "" {
3685		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3686	}
3687	var body io.Reader = nil
3688	c.urlParams_.Set("alt", alt)
3689	c.urlParams_.Set("prettyPrint", "false")
3690	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userinvitations")
3691	urls += "?" + c.urlParams_.Encode()
3692	req, err := http.NewRequest("GET", urls, body)
3693	if err != nil {
3694		return nil, err
3695	}
3696	req.Header = reqHeaders
3697	googleapi.Expand(req.URL, map[string]string{
3698		"parent": c.parent,
3699	})
3700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3701}
3702
3703// Do executes the "cloudidentity.customers.userinvitations.list" call.
3704// Exactly one of *ListUserInvitationsResponse or error will be non-nil.
3705// Any non-2xx status code is an error. Response headers are in either
3706// *ListUserInvitationsResponse.ServerResponse.Header or (if a response
3707// was returned at all) in error.(*googleapi.Error).Header. Use
3708// googleapi.IsNotModified to check whether the returned error was
3709// because http.StatusNotModified was returned.
3710func (c *CustomersUserinvitationsListCall) Do(opts ...googleapi.CallOption) (*ListUserInvitationsResponse, error) {
3711	gensupport.SetOptions(c.urlParams_, opts...)
3712	res, err := c.doRequest("json")
3713	if res != nil && res.StatusCode == http.StatusNotModified {
3714		if res.Body != nil {
3715			res.Body.Close()
3716		}
3717		return nil, &googleapi.Error{
3718			Code:   res.StatusCode,
3719			Header: res.Header,
3720		}
3721	}
3722	if err != nil {
3723		return nil, err
3724	}
3725	defer googleapi.CloseBody(res)
3726	if err := googleapi.CheckResponse(res); err != nil {
3727		return nil, err
3728	}
3729	ret := &ListUserInvitationsResponse{
3730		ServerResponse: googleapi.ServerResponse{
3731			Header:         res.Header,
3732			HTTPStatusCode: res.StatusCode,
3733		},
3734	}
3735	target := &ret
3736	if err := gensupport.DecodeResponse(target, res); err != nil {
3737		return nil, err
3738	}
3739	return ret, nil
3740	// {
3741	//   "description": "Retrieves a list of UserInvitation resources. **Note:** New consumer accounts with the customer's verified domain created within the previous 48 hours will not appear in the result. This delay also applies to newly-verified domains.",
3742	//   "flatPath": "v1beta1/customers/{customersId}/userinvitations",
3743	//   "httpMethod": "GET",
3744	//   "id": "cloudidentity.customers.userinvitations.list",
3745	//   "parameterOrder": [
3746	//     "parent"
3747	//   ],
3748	//   "parameters": {
3749	//     "filter": {
3750	//       "description": "Optional. A query string for filtering `UserInvitation` results by their current state, in the format: `\"state=='invited'\"`.",
3751	//       "location": "query",
3752	//       "type": "string"
3753	//     },
3754	//     "orderBy": {
3755	//       "description": "Optional. The sort order of the list results. You can sort the results in descending order based on either email or last update timestamp but not both, using `order_by=\"email desc\"`. Currently, sorting is supported for `update_time asc`, `update_time desc`, `email asc`, and `email desc`. If not specified, results will be returned based on `email asc` order.",
3756	//       "location": "query",
3757	//       "type": "string"
3758	//     },
3759	//     "pageSize": {
3760	//       "description": "Optional. The maximum number of UserInvitation resources to return. If unspecified, at most 100 resources will be returned. The maximum value is 200; values above 200 will be set to 200.",
3761	//       "format": "int32",
3762	//       "location": "query",
3763	//       "type": "integer"
3764	//     },
3765	//     "pageToken": {
3766	//       "description": "Optional. A page token, received from a previous `ListUserInvitations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token.",
3767	//       "location": "query",
3768	//       "type": "string"
3769	//     },
3770	//     "parent": {
3771	//       "description": "Required. The customer ID of the Google Workspace or Cloud Identity account the UserInvitation resources are associated with.",
3772	//       "location": "path",
3773	//       "pattern": "^customers/[^/]+$",
3774	//       "required": true,
3775	//       "type": "string"
3776	//     }
3777	//   },
3778	//   "path": "v1beta1/{+parent}/userinvitations",
3779	//   "response": {
3780	//     "$ref": "ListUserInvitationsResponse"
3781	//   }
3782	// }
3783
3784}
3785
3786// Pages invokes f for each page of results.
3787// A non-nil error returned from f will halt the iteration.
3788// The provided context supersedes any context provided to the Context method.
3789func (c *CustomersUserinvitationsListCall) Pages(ctx context.Context, f func(*ListUserInvitationsResponse) error) error {
3790	c.ctx_ = ctx
3791	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3792	for {
3793		x, err := c.Do()
3794		if err != nil {
3795			return err
3796		}
3797		if err := f(x); err != nil {
3798			return err
3799		}
3800		if x.NextPageToken == "" {
3801			return nil
3802		}
3803		c.PageToken(x.NextPageToken)
3804	}
3805}
3806
3807// method id "cloudidentity.customers.userinvitations.send":
3808
3809type CustomersUserinvitationsSendCall struct {
3810	s                         *Service
3811	name                      string
3812	senduserinvitationrequest *SendUserInvitationRequest
3813	urlParams_                gensupport.URLParams
3814	ctx_                      context.Context
3815	header_                   http.Header
3816}
3817
3818// Send: Sends a UserInvitation to email. If the `UserInvitation` does
3819// not exist for this request and it is a valid request, the request
3820// creates a `UserInvitation`. **Note:** The `get` and `list` methods
3821// have a 48-hour delay where newly-created consumer accounts will not
3822// appear in the results. You can still send a `UserInvitation` to those
3823// accounts if you know the unmanaged email address and
3824// IsInvitableUser==True.
3825//
3826// - name: `UserInvitation` name in the format
3827//   `customers/{customer}/userinvitations/{user_email_address}`.
3828func (r *CustomersUserinvitationsService) Send(name string, senduserinvitationrequest *SendUserInvitationRequest) *CustomersUserinvitationsSendCall {
3829	c := &CustomersUserinvitationsSendCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3830	c.name = name
3831	c.senduserinvitationrequest = senduserinvitationrequest
3832	return c
3833}
3834
3835// Fields allows partial responses to be retrieved. See
3836// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3837// for more information.
3838func (c *CustomersUserinvitationsSendCall) Fields(s ...googleapi.Field) *CustomersUserinvitationsSendCall {
3839	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3840	return c
3841}
3842
3843// Context sets the context to be used in this call's Do method. Any
3844// pending HTTP request will be aborted if the provided context is
3845// canceled.
3846func (c *CustomersUserinvitationsSendCall) Context(ctx context.Context) *CustomersUserinvitationsSendCall {
3847	c.ctx_ = ctx
3848	return c
3849}
3850
3851// Header returns an http.Header that can be modified by the caller to
3852// add HTTP headers to the request.
3853func (c *CustomersUserinvitationsSendCall) Header() http.Header {
3854	if c.header_ == nil {
3855		c.header_ = make(http.Header)
3856	}
3857	return c.header_
3858}
3859
3860func (c *CustomersUserinvitationsSendCall) doRequest(alt string) (*http.Response, error) {
3861	reqHeaders := make(http.Header)
3862	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
3863	for k, v := range c.header_ {
3864		reqHeaders[k] = v
3865	}
3866	reqHeaders.Set("User-Agent", c.s.userAgent())
3867	var body io.Reader = nil
3868	body, err := googleapi.WithoutDataWrapper.JSONReader(c.senduserinvitationrequest)
3869	if err != nil {
3870		return nil, err
3871	}
3872	reqHeaders.Set("Content-Type", "application/json")
3873	c.urlParams_.Set("alt", alt)
3874	c.urlParams_.Set("prettyPrint", "false")
3875	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:send")
3876	urls += "?" + c.urlParams_.Encode()
3877	req, err := http.NewRequest("POST", urls, body)
3878	if err != nil {
3879		return nil, err
3880	}
3881	req.Header = reqHeaders
3882	googleapi.Expand(req.URL, map[string]string{
3883		"name": c.name,
3884	})
3885	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3886}
3887
3888// Do executes the "cloudidentity.customers.userinvitations.send" call.
3889// Exactly one of *Operation or error will be non-nil. Any non-2xx
3890// status code is an error. Response headers are in either
3891// *Operation.ServerResponse.Header or (if a response was returned at
3892// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3893// to check whether the returned error was because
3894// http.StatusNotModified was returned.
3895func (c *CustomersUserinvitationsSendCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3896	gensupport.SetOptions(c.urlParams_, opts...)
3897	res, err := c.doRequest("json")
3898	if res != nil && res.StatusCode == http.StatusNotModified {
3899		if res.Body != nil {
3900			res.Body.Close()
3901		}
3902		return nil, &googleapi.Error{
3903			Code:   res.StatusCode,
3904			Header: res.Header,
3905		}
3906	}
3907	if err != nil {
3908		return nil, err
3909	}
3910	defer googleapi.CloseBody(res)
3911	if err := googleapi.CheckResponse(res); err != nil {
3912		return nil, err
3913	}
3914	ret := &Operation{
3915		ServerResponse: googleapi.ServerResponse{
3916			Header:         res.Header,
3917			HTTPStatusCode: res.StatusCode,
3918		},
3919	}
3920	target := &ret
3921	if err := gensupport.DecodeResponse(target, res); err != nil {
3922		return nil, err
3923	}
3924	return ret, nil
3925	// {
3926	//   "description": "Sends a UserInvitation to email. If the `UserInvitation` does not exist for this request and it is a valid request, the request creates a `UserInvitation`. **Note:** The `get` and `list` methods have a 48-hour delay where newly-created consumer accounts will not appear in the results. You can still send a `UserInvitation` to those accounts if you know the unmanaged email address and IsInvitableUser==True.",
3927	//   "flatPath": "v1beta1/customers/{customersId}/userinvitations/{userinvitationsId}:send",
3928	//   "httpMethod": "POST",
3929	//   "id": "cloudidentity.customers.userinvitations.send",
3930	//   "parameterOrder": [
3931	//     "name"
3932	//   ],
3933	//   "parameters": {
3934	//     "name": {
3935	//       "description": "Required. `UserInvitation` name in the format `customers/{customer}/userinvitations/{user_email_address}`",
3936	//       "location": "path",
3937	//       "pattern": "^customers/[^/]+/userinvitations/[^/]+$",
3938	//       "required": true,
3939	//       "type": "string"
3940	//     }
3941	//   },
3942	//   "path": "v1beta1/{+name}:send",
3943	//   "request": {
3944	//     "$ref": "SendUserInvitationRequest"
3945	//   },
3946	//   "response": {
3947	//     "$ref": "Operation"
3948	//   }
3949	// }
3950
3951}
3952
3953// method id "cloudidentity.devices.cancelWipe":
3954
3955type DevicesCancelWipeCall struct {
3956	s                       *Service
3957	name                    string
3958	cancelwipedevicerequest *CancelWipeDeviceRequest
3959	urlParams_              gensupport.URLParams
3960	ctx_                    context.Context
3961	header_                 http.Header
3962}
3963
3964// CancelWipe: Cancels an unfinished device wipe. This operation can be
3965// used to cancel device wipe in the gap between the wipe operation
3966// returning success and the device being wiped.
3967//
3968// - name: Resource name
3969//   (https://cloud.google.com/apis/design/resource_names) of the Device
3970//   in format: `devices/{device_id}`, where device_id is the unique ID
3971//   assigned to the Device.
3972func (r *DevicesService) CancelWipe(name string, cancelwipedevicerequest *CancelWipeDeviceRequest) *DevicesCancelWipeCall {
3973	c := &DevicesCancelWipeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3974	c.name = name
3975	c.cancelwipedevicerequest = cancelwipedevicerequest
3976	return c
3977}
3978
3979// Fields allows partial responses to be retrieved. See
3980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3981// for more information.
3982func (c *DevicesCancelWipeCall) Fields(s ...googleapi.Field) *DevicesCancelWipeCall {
3983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3984	return c
3985}
3986
3987// Context sets the context to be used in this call's Do method. Any
3988// pending HTTP request will be aborted if the provided context is
3989// canceled.
3990func (c *DevicesCancelWipeCall) Context(ctx context.Context) *DevicesCancelWipeCall {
3991	c.ctx_ = ctx
3992	return c
3993}
3994
3995// Header returns an http.Header that can be modified by the caller to
3996// add HTTP headers to the request.
3997func (c *DevicesCancelWipeCall) Header() http.Header {
3998	if c.header_ == nil {
3999		c.header_ = make(http.Header)
4000	}
4001	return c.header_
4002}
4003
4004func (c *DevicesCancelWipeCall) doRequest(alt string) (*http.Response, error) {
4005	reqHeaders := make(http.Header)
4006	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4007	for k, v := range c.header_ {
4008		reqHeaders[k] = v
4009	}
4010	reqHeaders.Set("User-Agent", c.s.userAgent())
4011	var body io.Reader = nil
4012	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelwipedevicerequest)
4013	if err != nil {
4014		return nil, err
4015	}
4016	reqHeaders.Set("Content-Type", "application/json")
4017	c.urlParams_.Set("alt", alt)
4018	c.urlParams_.Set("prettyPrint", "false")
4019	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancelWipe")
4020	urls += "?" + c.urlParams_.Encode()
4021	req, err := http.NewRequest("POST", urls, body)
4022	if err != nil {
4023		return nil, err
4024	}
4025	req.Header = reqHeaders
4026	googleapi.Expand(req.URL, map[string]string{
4027		"name": c.name,
4028	})
4029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4030}
4031
4032// Do executes the "cloudidentity.devices.cancelWipe" call.
4033// Exactly one of *Operation or error will be non-nil. Any non-2xx
4034// status code is an error. Response headers are in either
4035// *Operation.ServerResponse.Header or (if a response was returned at
4036// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4037// to check whether the returned error was because
4038// http.StatusNotModified was returned.
4039func (c *DevicesCancelWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4040	gensupport.SetOptions(c.urlParams_, opts...)
4041	res, err := c.doRequest("json")
4042	if res != nil && res.StatusCode == http.StatusNotModified {
4043		if res.Body != nil {
4044			res.Body.Close()
4045		}
4046		return nil, &googleapi.Error{
4047			Code:   res.StatusCode,
4048			Header: res.Header,
4049		}
4050	}
4051	if err != nil {
4052		return nil, err
4053	}
4054	defer googleapi.CloseBody(res)
4055	if err := googleapi.CheckResponse(res); err != nil {
4056		return nil, err
4057	}
4058	ret := &Operation{
4059		ServerResponse: googleapi.ServerResponse{
4060			Header:         res.Header,
4061			HTTPStatusCode: res.StatusCode,
4062		},
4063	}
4064	target := &ret
4065	if err := gensupport.DecodeResponse(target, res); err != nil {
4066		return nil, err
4067	}
4068	return ret, nil
4069	// {
4070	//   "description": "Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped.",
4071	//   "flatPath": "v1beta1/devices/{devicesId}:cancelWipe",
4072	//   "httpMethod": "POST",
4073	//   "id": "cloudidentity.devices.cancelWipe",
4074	//   "parameterOrder": [
4075	//     "name"
4076	//   ],
4077	//   "parameters": {
4078	//     "name": {
4079	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}`, where device_id is the unique ID assigned to the Device.",
4080	//       "location": "path",
4081	//       "pattern": "^devices/[^/]+$",
4082	//       "required": true,
4083	//       "type": "string"
4084	//     }
4085	//   },
4086	//   "path": "v1beta1/{+name}:cancelWipe",
4087	//   "request": {
4088	//     "$ref": "CancelWipeDeviceRequest"
4089	//   },
4090	//   "response": {
4091	//     "$ref": "Operation"
4092	//   }
4093	// }
4094
4095}
4096
4097// method id "cloudidentity.devices.create":
4098
4099type DevicesCreateCall struct {
4100	s                   *Service
4101	createdevicerequest *CreateDeviceRequest
4102	urlParams_          gensupport.URLParams
4103	ctx_                context.Context
4104	header_             http.Header
4105}
4106
4107// Create: Creates a device. Only company-owned device may be created.
4108// **Note**: This method is available only to customers who have one of
4109// the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise
4110// for Education, and Cloud Identity Premium
4111func (r *DevicesService) Create(createdevicerequest *CreateDeviceRequest) *DevicesCreateCall {
4112	c := &DevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4113	c.createdevicerequest = createdevicerequest
4114	return c
4115}
4116
4117// Fields allows partial responses to be retrieved. See
4118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4119// for more information.
4120func (c *DevicesCreateCall) Fields(s ...googleapi.Field) *DevicesCreateCall {
4121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4122	return c
4123}
4124
4125// Context sets the context to be used in this call's Do method. Any
4126// pending HTTP request will be aborted if the provided context is
4127// canceled.
4128func (c *DevicesCreateCall) Context(ctx context.Context) *DevicesCreateCall {
4129	c.ctx_ = ctx
4130	return c
4131}
4132
4133// Header returns an http.Header that can be modified by the caller to
4134// add HTTP headers to the request.
4135func (c *DevicesCreateCall) Header() http.Header {
4136	if c.header_ == nil {
4137		c.header_ = make(http.Header)
4138	}
4139	return c.header_
4140}
4141
4142func (c *DevicesCreateCall) doRequest(alt string) (*http.Response, error) {
4143	reqHeaders := make(http.Header)
4144	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4145	for k, v := range c.header_ {
4146		reqHeaders[k] = v
4147	}
4148	reqHeaders.Set("User-Agent", c.s.userAgent())
4149	var body io.Reader = nil
4150	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createdevicerequest)
4151	if err != nil {
4152		return nil, err
4153	}
4154	reqHeaders.Set("Content-Type", "application/json")
4155	c.urlParams_.Set("alt", alt)
4156	c.urlParams_.Set("prettyPrint", "false")
4157	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/devices")
4158	urls += "?" + c.urlParams_.Encode()
4159	req, err := http.NewRequest("POST", urls, body)
4160	if err != nil {
4161		return nil, err
4162	}
4163	req.Header = reqHeaders
4164	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4165}
4166
4167// Do executes the "cloudidentity.devices.create" call.
4168// Exactly one of *Operation or error will be non-nil. Any non-2xx
4169// status code is an error. Response headers are in either
4170// *Operation.ServerResponse.Header or (if a response was returned at
4171// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4172// to check whether the returned error was because
4173// http.StatusNotModified was returned.
4174func (c *DevicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4175	gensupport.SetOptions(c.urlParams_, opts...)
4176	res, err := c.doRequest("json")
4177	if res != nil && res.StatusCode == http.StatusNotModified {
4178		if res.Body != nil {
4179			res.Body.Close()
4180		}
4181		return nil, &googleapi.Error{
4182			Code:   res.StatusCode,
4183			Header: res.Header,
4184		}
4185	}
4186	if err != nil {
4187		return nil, err
4188	}
4189	defer googleapi.CloseBody(res)
4190	if err := googleapi.CheckResponse(res); err != nil {
4191		return nil, err
4192	}
4193	ret := &Operation{
4194		ServerResponse: googleapi.ServerResponse{
4195			Header:         res.Header,
4196			HTTPStatusCode: res.StatusCode,
4197		},
4198	}
4199	target := &ret
4200	if err := gensupport.DecodeResponse(target, res); err != nil {
4201		return nil, err
4202	}
4203	return ret, nil
4204	// {
4205	//   "description": "Creates a device. Only company-owned device may be created. **Note**: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium",
4206	//   "flatPath": "v1beta1/devices",
4207	//   "httpMethod": "POST",
4208	//   "id": "cloudidentity.devices.create",
4209	//   "parameterOrder": [],
4210	//   "parameters": {},
4211	//   "path": "v1beta1/devices",
4212	//   "request": {
4213	//     "$ref": "CreateDeviceRequest"
4214	//   },
4215	//   "response": {
4216	//     "$ref": "Operation"
4217	//   }
4218	// }
4219
4220}
4221
4222// method id "cloudidentity.devices.delete":
4223
4224type DevicesDeleteCall struct {
4225	s          *Service
4226	name       string
4227	urlParams_ gensupport.URLParams
4228	ctx_       context.Context
4229	header_    http.Header
4230}
4231
4232// Delete: Deletes the specified device.
4233//
4234// - name: Resource name
4235//   (https://cloud.google.com/apis/design/resource_names) of the Device
4236//   in format: `devices/{device_id}`, where device_id is the unique ID
4237//   assigned to the Device.
4238func (r *DevicesService) Delete(name string) *DevicesDeleteCall {
4239	c := &DevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4240	c.name = name
4241	return c
4242}
4243
4244// Fields allows partial responses to be retrieved. See
4245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4246// for more information.
4247func (c *DevicesDeleteCall) Fields(s ...googleapi.Field) *DevicesDeleteCall {
4248	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4249	return c
4250}
4251
4252// Context sets the context to be used in this call's Do method. Any
4253// pending HTTP request will be aborted if the provided context is
4254// canceled.
4255func (c *DevicesDeleteCall) Context(ctx context.Context) *DevicesDeleteCall {
4256	c.ctx_ = ctx
4257	return c
4258}
4259
4260// Header returns an http.Header that can be modified by the caller to
4261// add HTTP headers to the request.
4262func (c *DevicesDeleteCall) Header() http.Header {
4263	if c.header_ == nil {
4264		c.header_ = make(http.Header)
4265	}
4266	return c.header_
4267}
4268
4269func (c *DevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
4270	reqHeaders := make(http.Header)
4271	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4272	for k, v := range c.header_ {
4273		reqHeaders[k] = v
4274	}
4275	reqHeaders.Set("User-Agent", c.s.userAgent())
4276	var body io.Reader = nil
4277	c.urlParams_.Set("alt", alt)
4278	c.urlParams_.Set("prettyPrint", "false")
4279	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4280	urls += "?" + c.urlParams_.Encode()
4281	req, err := http.NewRequest("DELETE", urls, body)
4282	if err != nil {
4283		return nil, err
4284	}
4285	req.Header = reqHeaders
4286	googleapi.Expand(req.URL, map[string]string{
4287		"name": c.name,
4288	})
4289	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4290}
4291
4292// Do executes the "cloudidentity.devices.delete" call.
4293// Exactly one of *Operation or error will be non-nil. Any non-2xx
4294// status code is an error. Response headers are in either
4295// *Operation.ServerResponse.Header or (if a response was returned at
4296// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4297// to check whether the returned error was because
4298// http.StatusNotModified was returned.
4299func (c *DevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4300	gensupport.SetOptions(c.urlParams_, opts...)
4301	res, err := c.doRequest("json")
4302	if res != nil && res.StatusCode == http.StatusNotModified {
4303		if res.Body != nil {
4304			res.Body.Close()
4305		}
4306		return nil, &googleapi.Error{
4307			Code:   res.StatusCode,
4308			Header: res.Header,
4309		}
4310	}
4311	if err != nil {
4312		return nil, err
4313	}
4314	defer googleapi.CloseBody(res)
4315	if err := googleapi.CheckResponse(res); err != nil {
4316		return nil, err
4317	}
4318	ret := &Operation{
4319		ServerResponse: googleapi.ServerResponse{
4320			Header:         res.Header,
4321			HTTPStatusCode: res.StatusCode,
4322		},
4323	}
4324	target := &ret
4325	if err := gensupport.DecodeResponse(target, res); err != nil {
4326		return nil, err
4327	}
4328	return ret, nil
4329	// {
4330	//   "description": "Deletes the specified device.",
4331	//   "flatPath": "v1beta1/devices/{devicesId}",
4332	//   "httpMethod": "DELETE",
4333	//   "id": "cloudidentity.devices.delete",
4334	//   "parameterOrder": [
4335	//     "name"
4336	//   ],
4337	//   "parameters": {
4338	//     "name": {
4339	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}`, where device_id is the unique ID assigned to the Device.",
4340	//       "location": "path",
4341	//       "pattern": "^devices/[^/]+$",
4342	//       "required": true,
4343	//       "type": "string"
4344	//     }
4345	//   },
4346	//   "path": "v1beta1/{+name}",
4347	//   "response": {
4348	//     "$ref": "Operation"
4349	//   }
4350	// }
4351
4352}
4353
4354// method id "cloudidentity.devices.get":
4355
4356type DevicesGetCall struct {
4357	s            *Service
4358	name         string
4359	urlParams_   gensupport.URLParams
4360	ifNoneMatch_ string
4361	ctx_         context.Context
4362	header_      http.Header
4363}
4364
4365// Get: Retrieves the specified device.
4366//
4367// - name: Resource name
4368//   (https://cloud.google.com/apis/design/resource_names) of the Device
4369//   in format: `devices/{device_id}`, where device_id is the unique ID
4370//   assigned to the Device.
4371func (r *DevicesService) Get(name string) *DevicesGetCall {
4372	c := &DevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4373	c.name = name
4374	return c
4375}
4376
4377// Fields allows partial responses to be retrieved. See
4378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4379// for more information.
4380func (c *DevicesGetCall) Fields(s ...googleapi.Field) *DevicesGetCall {
4381	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4382	return c
4383}
4384
4385// IfNoneMatch sets the optional parameter which makes the operation
4386// fail if the object's ETag matches the given value. This is useful for
4387// getting updates only after the object has changed since the last
4388// request. Use googleapi.IsNotModified to check whether the response
4389// error from Do is the result of In-None-Match.
4390func (c *DevicesGetCall) IfNoneMatch(entityTag string) *DevicesGetCall {
4391	c.ifNoneMatch_ = entityTag
4392	return c
4393}
4394
4395// Context sets the context to be used in this call's Do method. Any
4396// pending HTTP request will be aborted if the provided context is
4397// canceled.
4398func (c *DevicesGetCall) Context(ctx context.Context) *DevicesGetCall {
4399	c.ctx_ = ctx
4400	return c
4401}
4402
4403// Header returns an http.Header that can be modified by the caller to
4404// add HTTP headers to the request.
4405func (c *DevicesGetCall) Header() http.Header {
4406	if c.header_ == nil {
4407		c.header_ = make(http.Header)
4408	}
4409	return c.header_
4410}
4411
4412func (c *DevicesGetCall) doRequest(alt string) (*http.Response, error) {
4413	reqHeaders := make(http.Header)
4414	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4415	for k, v := range c.header_ {
4416		reqHeaders[k] = v
4417	}
4418	reqHeaders.Set("User-Agent", c.s.userAgent())
4419	if c.ifNoneMatch_ != "" {
4420		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4421	}
4422	var body io.Reader = nil
4423	c.urlParams_.Set("alt", alt)
4424	c.urlParams_.Set("prettyPrint", "false")
4425	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4426	urls += "?" + c.urlParams_.Encode()
4427	req, err := http.NewRequest("GET", urls, body)
4428	if err != nil {
4429		return nil, err
4430	}
4431	req.Header = reqHeaders
4432	googleapi.Expand(req.URL, map[string]string{
4433		"name": c.name,
4434	})
4435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4436}
4437
4438// Do executes the "cloudidentity.devices.get" call.
4439// Exactly one of *Device or error will be non-nil. Any non-2xx status
4440// code is an error. Response headers are in either
4441// *Device.ServerResponse.Header or (if a response was returned at all)
4442// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4443// check whether the returned error was because http.StatusNotModified
4444// was returned.
4445func (c *DevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) {
4446	gensupport.SetOptions(c.urlParams_, opts...)
4447	res, err := c.doRequest("json")
4448	if res != nil && res.StatusCode == http.StatusNotModified {
4449		if res.Body != nil {
4450			res.Body.Close()
4451		}
4452		return nil, &googleapi.Error{
4453			Code:   res.StatusCode,
4454			Header: res.Header,
4455		}
4456	}
4457	if err != nil {
4458		return nil, err
4459	}
4460	defer googleapi.CloseBody(res)
4461	if err := googleapi.CheckResponse(res); err != nil {
4462		return nil, err
4463	}
4464	ret := &Device{
4465		ServerResponse: googleapi.ServerResponse{
4466			Header:         res.Header,
4467			HTTPStatusCode: res.StatusCode,
4468		},
4469	}
4470	target := &ret
4471	if err := gensupport.DecodeResponse(target, res); err != nil {
4472		return nil, err
4473	}
4474	return ret, nil
4475	// {
4476	//   "description": "Retrieves the specified device.",
4477	//   "flatPath": "v1beta1/devices/{devicesId}",
4478	//   "httpMethod": "GET",
4479	//   "id": "cloudidentity.devices.get",
4480	//   "parameterOrder": [
4481	//     "name"
4482	//   ],
4483	//   "parameters": {
4484	//     "name": {
4485	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}`, where device_id is the unique ID assigned to the Device.",
4486	//       "location": "path",
4487	//       "pattern": "^devices/[^/]+$",
4488	//       "required": true,
4489	//       "type": "string"
4490	//     }
4491	//   },
4492	//   "path": "v1beta1/{+name}",
4493	//   "response": {
4494	//     "$ref": "Device"
4495	//   }
4496	// }
4497
4498}
4499
4500// method id "cloudidentity.devices.list":
4501
4502type DevicesListCall struct {
4503	s            *Service
4504	urlParams_   gensupport.URLParams
4505	ifNoneMatch_ string
4506	ctx_         context.Context
4507	header_      http.Header
4508}
4509
4510// List: Lists/Searches devices.
4511func (r *DevicesService) List() *DevicesListCall {
4512	c := &DevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4513	return c
4514}
4515
4516// Filter sets the optional parameter "filter": Additional restrictions
4517// when fetching list of devices. For a list of search fields, refer to
4518// Mobile device search fields
4519// (https://developers.google.com/admin-sdk/directory/v1/search-operators).
4520// Multiple search fields are separated by the space character.
4521func (c *DevicesListCall) Filter(filter string) *DevicesListCall {
4522	c.urlParams_.Set("filter", filter)
4523	return c
4524}
4525
4526// OrderBy sets the optional parameter "orderBy": Order specification
4527// for devices in the response. Only one of the following field names
4528// may be used to specify the order: `create_time`, `last_sync_time`,
4529// `model`, `os_version`, `device_type` and `serial_number`. `desc` may
4530// be specified optionally to specify results to be sorted in descending
4531// order. Default order is ascending.
4532func (c *DevicesListCall) OrderBy(orderBy string) *DevicesListCall {
4533	c.urlParams_.Set("orderBy", orderBy)
4534	return c
4535}
4536
4537// PageSize sets the optional parameter "pageSize": The maximum number
4538// of Devices to return. If unspecified, at most 20 Devices will be
4539// returned. The maximum value is 100; values above 100 will be coerced
4540// to 100.
4541func (c *DevicesListCall) PageSize(pageSize int64) *DevicesListCall {
4542	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4543	return c
4544}
4545
4546// PageToken sets the optional parameter "pageToken": A page token,
4547// received from a previous `ListDevices` call. Provide this to retrieve
4548// the subsequent page. When paginating, all other parameters provided
4549// to `ListDevices` must match the call that provided the page token.
4550func (c *DevicesListCall) PageToken(pageToken string) *DevicesListCall {
4551	c.urlParams_.Set("pageToken", pageToken)
4552	return c
4553}
4554
4555// View sets the optional parameter "view": The view to use for the List
4556// request.
4557//
4558// Possible values:
4559//   "VIEW_UNSPECIFIED" - Default value. The value is unused.
4560//   "COMPANY_INVENTORY" - This view contains all devices imported by
4561// the company admin. Each device in the response contains all
4562// information specified by the company admin when importing the device
4563// (i.e. asset tags).
4564//   "USER_ASSIGNED_DEVICES" - This view contains all devices with at
4565// least one user registered on the device. Each device in the response
4566// contains all device information, except for asset tags.
4567func (c *DevicesListCall) View(view string) *DevicesListCall {
4568	c.urlParams_.Set("view", view)
4569	return c
4570}
4571
4572// Fields allows partial responses to be retrieved. See
4573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4574// for more information.
4575func (c *DevicesListCall) Fields(s ...googleapi.Field) *DevicesListCall {
4576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4577	return c
4578}
4579
4580// IfNoneMatch sets the optional parameter which makes the operation
4581// fail if the object's ETag matches the given value. This is useful for
4582// getting updates only after the object has changed since the last
4583// request. Use googleapi.IsNotModified to check whether the response
4584// error from Do is the result of In-None-Match.
4585func (c *DevicesListCall) IfNoneMatch(entityTag string) *DevicesListCall {
4586	c.ifNoneMatch_ = entityTag
4587	return c
4588}
4589
4590// Context sets the context to be used in this call's Do method. Any
4591// pending HTTP request will be aborted if the provided context is
4592// canceled.
4593func (c *DevicesListCall) Context(ctx context.Context) *DevicesListCall {
4594	c.ctx_ = ctx
4595	return c
4596}
4597
4598// Header returns an http.Header that can be modified by the caller to
4599// add HTTP headers to the request.
4600func (c *DevicesListCall) Header() http.Header {
4601	if c.header_ == nil {
4602		c.header_ = make(http.Header)
4603	}
4604	return c.header_
4605}
4606
4607func (c *DevicesListCall) doRequest(alt string) (*http.Response, error) {
4608	reqHeaders := make(http.Header)
4609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4610	for k, v := range c.header_ {
4611		reqHeaders[k] = v
4612	}
4613	reqHeaders.Set("User-Agent", c.s.userAgent())
4614	if c.ifNoneMatch_ != "" {
4615		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4616	}
4617	var body io.Reader = nil
4618	c.urlParams_.Set("alt", alt)
4619	c.urlParams_.Set("prettyPrint", "false")
4620	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/devices")
4621	urls += "?" + c.urlParams_.Encode()
4622	req, err := http.NewRequest("GET", urls, body)
4623	if err != nil {
4624		return nil, err
4625	}
4626	req.Header = reqHeaders
4627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4628}
4629
4630// Do executes the "cloudidentity.devices.list" call.
4631// Exactly one of *ListDevicesResponse or error will be non-nil. Any
4632// non-2xx status code is an error. Response headers are in either
4633// *ListDevicesResponse.ServerResponse.Header or (if a response was
4634// returned at all) in error.(*googleapi.Error).Header. Use
4635// googleapi.IsNotModified to check whether the returned error was
4636// because http.StatusNotModified was returned.
4637func (c *DevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse, error) {
4638	gensupport.SetOptions(c.urlParams_, opts...)
4639	res, err := c.doRequest("json")
4640	if res != nil && res.StatusCode == http.StatusNotModified {
4641		if res.Body != nil {
4642			res.Body.Close()
4643		}
4644		return nil, &googleapi.Error{
4645			Code:   res.StatusCode,
4646			Header: res.Header,
4647		}
4648	}
4649	if err != nil {
4650		return nil, err
4651	}
4652	defer googleapi.CloseBody(res)
4653	if err := googleapi.CheckResponse(res); err != nil {
4654		return nil, err
4655	}
4656	ret := &ListDevicesResponse{
4657		ServerResponse: googleapi.ServerResponse{
4658			Header:         res.Header,
4659			HTTPStatusCode: res.StatusCode,
4660		},
4661	}
4662	target := &ret
4663	if err := gensupport.DecodeResponse(target, res); err != nil {
4664		return nil, err
4665	}
4666	return ret, nil
4667	// {
4668	//   "description": "Lists/Searches devices.",
4669	//   "flatPath": "v1beta1/devices",
4670	//   "httpMethod": "GET",
4671	//   "id": "cloudidentity.devices.list",
4672	//   "parameterOrder": [],
4673	//   "parameters": {
4674	//     "filter": {
4675	//       "description": "Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character.",
4676	//       "location": "query",
4677	//       "type": "string"
4678	//     },
4679	//     "orderBy": {
4680	//       "description": "Optional. Order specification for devices in the response. Only one of the following field names may be used to specify the order: `create_time`, `last_sync_time`, `model`, `os_version`, `device_type` and `serial_number`. `desc` may be specified optionally to specify results to be sorted in descending order. Default order is ascending.",
4681	//       "location": "query",
4682	//       "type": "string"
4683	//     },
4684	//     "pageSize": {
4685	//       "description": "Optional. The maximum number of Devices to return. If unspecified, at most 20 Devices will be returned. The maximum value is 100; values above 100 will be coerced to 100.",
4686	//       "format": "int32",
4687	//       "location": "query",
4688	//       "type": "integer"
4689	//     },
4690	//     "pageToken": {
4691	//       "description": "Optional. A page token, received from a previous `ListDevices` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDevices` must match the call that provided the page token.",
4692	//       "location": "query",
4693	//       "type": "string"
4694	//     },
4695	//     "view": {
4696	//       "description": "Optional. The view to use for the List request.",
4697	//       "enum": [
4698	//         "VIEW_UNSPECIFIED",
4699	//         "COMPANY_INVENTORY",
4700	//         "USER_ASSIGNED_DEVICES"
4701	//       ],
4702	//       "enumDescriptions": [
4703	//         "Default value. The value is unused.",
4704	//         "This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags).",
4705	//         "This view contains all devices with at least one user registered on the device. Each device in the response contains all device information, except for asset tags."
4706	//       ],
4707	//       "location": "query",
4708	//       "type": "string"
4709	//     }
4710	//   },
4711	//   "path": "v1beta1/devices",
4712	//   "response": {
4713	//     "$ref": "ListDevicesResponse"
4714	//   }
4715	// }
4716
4717}
4718
4719// Pages invokes f for each page of results.
4720// A non-nil error returned from f will halt the iteration.
4721// The provided context supersedes any context provided to the Context method.
4722func (c *DevicesListCall) Pages(ctx context.Context, f func(*ListDevicesResponse) error) error {
4723	c.ctx_ = ctx
4724	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4725	for {
4726		x, err := c.Do()
4727		if err != nil {
4728			return err
4729		}
4730		if err := f(x); err != nil {
4731			return err
4732		}
4733		if x.NextPageToken == "" {
4734			return nil
4735		}
4736		c.PageToken(x.NextPageToken)
4737	}
4738}
4739
4740// method id "cloudidentity.devices.wipe":
4741
4742type DevicesWipeCall struct {
4743	s                 *Service
4744	name              string
4745	wipedevicerequest *WipeDeviceRequest
4746	urlParams_        gensupport.URLParams
4747	ctx_              context.Context
4748	header_           http.Header
4749}
4750
4751// Wipe: Wipes all data on the specified device.
4752//
4753// - name: Resource name
4754//   (https://cloud.google.com/apis/design/resource_names) of the Device
4755//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
4756//   where device_id is the unique ID assigned to the Device, and
4757//   device_user_id is the unique ID assigned to the User.
4758func (r *DevicesService) Wipe(name string, wipedevicerequest *WipeDeviceRequest) *DevicesWipeCall {
4759	c := &DevicesWipeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4760	c.name = name
4761	c.wipedevicerequest = wipedevicerequest
4762	return c
4763}
4764
4765// Fields allows partial responses to be retrieved. See
4766// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4767// for more information.
4768func (c *DevicesWipeCall) Fields(s ...googleapi.Field) *DevicesWipeCall {
4769	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4770	return c
4771}
4772
4773// Context sets the context to be used in this call's Do method. Any
4774// pending HTTP request will be aborted if the provided context is
4775// canceled.
4776func (c *DevicesWipeCall) Context(ctx context.Context) *DevicesWipeCall {
4777	c.ctx_ = ctx
4778	return c
4779}
4780
4781// Header returns an http.Header that can be modified by the caller to
4782// add HTTP headers to the request.
4783func (c *DevicesWipeCall) Header() http.Header {
4784	if c.header_ == nil {
4785		c.header_ = make(http.Header)
4786	}
4787	return c.header_
4788}
4789
4790func (c *DevicesWipeCall) doRequest(alt string) (*http.Response, error) {
4791	reqHeaders := make(http.Header)
4792	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4793	for k, v := range c.header_ {
4794		reqHeaders[k] = v
4795	}
4796	reqHeaders.Set("User-Agent", c.s.userAgent())
4797	var body io.Reader = nil
4798	body, err := googleapi.WithoutDataWrapper.JSONReader(c.wipedevicerequest)
4799	if err != nil {
4800		return nil, err
4801	}
4802	reqHeaders.Set("Content-Type", "application/json")
4803	c.urlParams_.Set("alt", alt)
4804	c.urlParams_.Set("prettyPrint", "false")
4805	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:wipe")
4806	urls += "?" + c.urlParams_.Encode()
4807	req, err := http.NewRequest("POST", urls, body)
4808	if err != nil {
4809		return nil, err
4810	}
4811	req.Header = reqHeaders
4812	googleapi.Expand(req.URL, map[string]string{
4813		"name": c.name,
4814	})
4815	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4816}
4817
4818// Do executes the "cloudidentity.devices.wipe" call.
4819// Exactly one of *Operation or error will be non-nil. Any non-2xx
4820// status code is an error. Response headers are in either
4821// *Operation.ServerResponse.Header or (if a response was returned at
4822// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4823// to check whether the returned error was because
4824// http.StatusNotModified was returned.
4825func (c *DevicesWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4826	gensupport.SetOptions(c.urlParams_, opts...)
4827	res, err := c.doRequest("json")
4828	if res != nil && res.StatusCode == http.StatusNotModified {
4829		if res.Body != nil {
4830			res.Body.Close()
4831		}
4832		return nil, &googleapi.Error{
4833			Code:   res.StatusCode,
4834			Header: res.Header,
4835		}
4836	}
4837	if err != nil {
4838		return nil, err
4839	}
4840	defer googleapi.CloseBody(res)
4841	if err := googleapi.CheckResponse(res); err != nil {
4842		return nil, err
4843	}
4844	ret := &Operation{
4845		ServerResponse: googleapi.ServerResponse{
4846			Header:         res.Header,
4847			HTTPStatusCode: res.StatusCode,
4848		},
4849	}
4850	target := &ret
4851	if err := gensupport.DecodeResponse(target, res); err != nil {
4852		return nil, err
4853	}
4854	return ret, nil
4855	// {
4856	//   "description": "Wipes all data on the specified device.",
4857	//   "flatPath": "v1beta1/devices/{devicesId}:wipe",
4858	//   "httpMethod": "POST",
4859	//   "id": "cloudidentity.devices.wipe",
4860	//   "parameterOrder": [
4861	//     "name"
4862	//   ],
4863	//   "parameters": {
4864	//     "name": {
4865	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
4866	//       "location": "path",
4867	//       "pattern": "^devices/[^/]+$",
4868	//       "required": true,
4869	//       "type": "string"
4870	//     }
4871	//   },
4872	//   "path": "v1beta1/{+name}:wipe",
4873	//   "request": {
4874	//     "$ref": "WipeDeviceRequest"
4875	//   },
4876	//   "response": {
4877	//     "$ref": "Operation"
4878	//   }
4879	// }
4880
4881}
4882
4883// method id "cloudidentity.devices.deviceUsers.approve":
4884
4885type DevicesDeviceUsersApproveCall struct {
4886	s                        *Service
4887	name                     string
4888	approvedeviceuserrequest *ApproveDeviceUserRequest
4889	urlParams_               gensupport.URLParams
4890	ctx_                     context.Context
4891	header_                  http.Header
4892}
4893
4894// Approve: Approves device to access user data.
4895//
4896// - name: Resource name
4897//   (https://cloud.google.com/apis/design/resource_names) of the Device
4898//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
4899//   where device_id is the unique ID assigned to the Device, and
4900//   device_user_id is the unique ID assigned to the User.
4901func (r *DevicesDeviceUsersService) Approve(name string, approvedeviceuserrequest *ApproveDeviceUserRequest) *DevicesDeviceUsersApproveCall {
4902	c := &DevicesDeviceUsersApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4903	c.name = name
4904	c.approvedeviceuserrequest = approvedeviceuserrequest
4905	return c
4906}
4907
4908// Fields allows partial responses to be retrieved. See
4909// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4910// for more information.
4911func (c *DevicesDeviceUsersApproveCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersApproveCall {
4912	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4913	return c
4914}
4915
4916// Context sets the context to be used in this call's Do method. Any
4917// pending HTTP request will be aborted if the provided context is
4918// canceled.
4919func (c *DevicesDeviceUsersApproveCall) Context(ctx context.Context) *DevicesDeviceUsersApproveCall {
4920	c.ctx_ = ctx
4921	return c
4922}
4923
4924// Header returns an http.Header that can be modified by the caller to
4925// add HTTP headers to the request.
4926func (c *DevicesDeviceUsersApproveCall) Header() http.Header {
4927	if c.header_ == nil {
4928		c.header_ = make(http.Header)
4929	}
4930	return c.header_
4931}
4932
4933func (c *DevicesDeviceUsersApproveCall) doRequest(alt string) (*http.Response, error) {
4934	reqHeaders := make(http.Header)
4935	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
4936	for k, v := range c.header_ {
4937		reqHeaders[k] = v
4938	}
4939	reqHeaders.Set("User-Agent", c.s.userAgent())
4940	var body io.Reader = nil
4941	body, err := googleapi.WithoutDataWrapper.JSONReader(c.approvedeviceuserrequest)
4942	if err != nil {
4943		return nil, err
4944	}
4945	reqHeaders.Set("Content-Type", "application/json")
4946	c.urlParams_.Set("alt", alt)
4947	c.urlParams_.Set("prettyPrint", "false")
4948	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:approve")
4949	urls += "?" + c.urlParams_.Encode()
4950	req, err := http.NewRequest("POST", urls, body)
4951	if err != nil {
4952		return nil, err
4953	}
4954	req.Header = reqHeaders
4955	googleapi.Expand(req.URL, map[string]string{
4956		"name": c.name,
4957	})
4958	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4959}
4960
4961// Do executes the "cloudidentity.devices.deviceUsers.approve" call.
4962// Exactly one of *Operation or error will be non-nil. Any non-2xx
4963// status code is an error. Response headers are in either
4964// *Operation.ServerResponse.Header or (if a response was returned at
4965// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4966// to check whether the returned error was because
4967// http.StatusNotModified was returned.
4968func (c *DevicesDeviceUsersApproveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4969	gensupport.SetOptions(c.urlParams_, opts...)
4970	res, err := c.doRequest("json")
4971	if res != nil && res.StatusCode == http.StatusNotModified {
4972		if res.Body != nil {
4973			res.Body.Close()
4974		}
4975		return nil, &googleapi.Error{
4976			Code:   res.StatusCode,
4977			Header: res.Header,
4978		}
4979	}
4980	if err != nil {
4981		return nil, err
4982	}
4983	defer googleapi.CloseBody(res)
4984	if err := googleapi.CheckResponse(res); err != nil {
4985		return nil, err
4986	}
4987	ret := &Operation{
4988		ServerResponse: googleapi.ServerResponse{
4989			Header:         res.Header,
4990			HTTPStatusCode: res.StatusCode,
4991		},
4992	}
4993	target := &ret
4994	if err := gensupport.DecodeResponse(target, res); err != nil {
4995		return nil, err
4996	}
4997	return ret, nil
4998	// {
4999	//   "description": "Approves device to access user data.",
5000	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}:approve",
5001	//   "httpMethod": "POST",
5002	//   "id": "cloudidentity.devices.deviceUsers.approve",
5003	//   "parameterOrder": [
5004	//     "name"
5005	//   ],
5006	//   "parameters": {
5007	//     "name": {
5008	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
5009	//       "location": "path",
5010	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
5011	//       "required": true,
5012	//       "type": "string"
5013	//     }
5014	//   },
5015	//   "path": "v1beta1/{+name}:approve",
5016	//   "request": {
5017	//     "$ref": "ApproveDeviceUserRequest"
5018	//   },
5019	//   "response": {
5020	//     "$ref": "Operation"
5021	//   }
5022	// }
5023
5024}
5025
5026// method id "cloudidentity.devices.deviceUsers.block":
5027
5028type DevicesDeviceUsersBlockCall struct {
5029	s                      *Service
5030	name                   string
5031	blockdeviceuserrequest *BlockDeviceUserRequest
5032	urlParams_             gensupport.URLParams
5033	ctx_                   context.Context
5034	header_                http.Header
5035}
5036
5037// Block: Blocks device from accessing user data
5038//
5039// - name: Resource name
5040//   (https://cloud.google.com/apis/design/resource_names) of the Device
5041//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
5042//   where device_id is the unique ID assigned to the Device, and
5043//   device_user_id is the unique ID assigned to the User.
5044func (r *DevicesDeviceUsersService) Block(name string, blockdeviceuserrequest *BlockDeviceUserRequest) *DevicesDeviceUsersBlockCall {
5045	c := &DevicesDeviceUsersBlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5046	c.name = name
5047	c.blockdeviceuserrequest = blockdeviceuserrequest
5048	return c
5049}
5050
5051// Fields allows partial responses to be retrieved. See
5052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5053// for more information.
5054func (c *DevicesDeviceUsersBlockCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersBlockCall {
5055	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5056	return c
5057}
5058
5059// Context sets the context to be used in this call's Do method. Any
5060// pending HTTP request will be aborted if the provided context is
5061// canceled.
5062func (c *DevicesDeviceUsersBlockCall) Context(ctx context.Context) *DevicesDeviceUsersBlockCall {
5063	c.ctx_ = ctx
5064	return c
5065}
5066
5067// Header returns an http.Header that can be modified by the caller to
5068// add HTTP headers to the request.
5069func (c *DevicesDeviceUsersBlockCall) Header() http.Header {
5070	if c.header_ == nil {
5071		c.header_ = make(http.Header)
5072	}
5073	return c.header_
5074}
5075
5076func (c *DevicesDeviceUsersBlockCall) doRequest(alt string) (*http.Response, error) {
5077	reqHeaders := make(http.Header)
5078	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5079	for k, v := range c.header_ {
5080		reqHeaders[k] = v
5081	}
5082	reqHeaders.Set("User-Agent", c.s.userAgent())
5083	var body io.Reader = nil
5084	body, err := googleapi.WithoutDataWrapper.JSONReader(c.blockdeviceuserrequest)
5085	if err != nil {
5086		return nil, err
5087	}
5088	reqHeaders.Set("Content-Type", "application/json")
5089	c.urlParams_.Set("alt", alt)
5090	c.urlParams_.Set("prettyPrint", "false")
5091	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:block")
5092	urls += "?" + c.urlParams_.Encode()
5093	req, err := http.NewRequest("POST", urls, body)
5094	if err != nil {
5095		return nil, err
5096	}
5097	req.Header = reqHeaders
5098	googleapi.Expand(req.URL, map[string]string{
5099		"name": c.name,
5100	})
5101	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5102}
5103
5104// Do executes the "cloudidentity.devices.deviceUsers.block" call.
5105// Exactly one of *Operation or error will be non-nil. Any non-2xx
5106// status code is an error. Response headers are in either
5107// *Operation.ServerResponse.Header or (if a response was returned at
5108// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5109// to check whether the returned error was because
5110// http.StatusNotModified was returned.
5111func (c *DevicesDeviceUsersBlockCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5112	gensupport.SetOptions(c.urlParams_, opts...)
5113	res, err := c.doRequest("json")
5114	if res != nil && res.StatusCode == http.StatusNotModified {
5115		if res.Body != nil {
5116			res.Body.Close()
5117		}
5118		return nil, &googleapi.Error{
5119			Code:   res.StatusCode,
5120			Header: res.Header,
5121		}
5122	}
5123	if err != nil {
5124		return nil, err
5125	}
5126	defer googleapi.CloseBody(res)
5127	if err := googleapi.CheckResponse(res); err != nil {
5128		return nil, err
5129	}
5130	ret := &Operation{
5131		ServerResponse: googleapi.ServerResponse{
5132			Header:         res.Header,
5133			HTTPStatusCode: res.StatusCode,
5134		},
5135	}
5136	target := &ret
5137	if err := gensupport.DecodeResponse(target, res); err != nil {
5138		return nil, err
5139	}
5140	return ret, nil
5141	// {
5142	//   "description": "Blocks device from accessing user data",
5143	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}:block",
5144	//   "httpMethod": "POST",
5145	//   "id": "cloudidentity.devices.deviceUsers.block",
5146	//   "parameterOrder": [
5147	//     "name"
5148	//   ],
5149	//   "parameters": {
5150	//     "name": {
5151	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
5152	//       "location": "path",
5153	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
5154	//       "required": true,
5155	//       "type": "string"
5156	//     }
5157	//   },
5158	//   "path": "v1beta1/{+name}:block",
5159	//   "request": {
5160	//     "$ref": "BlockDeviceUserRequest"
5161	//   },
5162	//   "response": {
5163	//     "$ref": "Operation"
5164	//   }
5165	// }
5166
5167}
5168
5169// method id "cloudidentity.devices.deviceUsers.cancelWipe":
5170
5171type DevicesDeviceUsersCancelWipeCall struct {
5172	s                           *Service
5173	name                        string
5174	cancelwipedeviceuserrequest *CancelWipeDeviceUserRequest
5175	urlParams_                  gensupport.URLParams
5176	ctx_                        context.Context
5177	header_                     http.Header
5178}
5179
5180// CancelWipe: Cancels an unfinished user account wipe. This operation
5181// can be used to cancel device wipe in the gap between the wipe
5182// operation returning success and the device being wiped.
5183//
5184// - name: Resource name
5185//   (https://cloud.google.com/apis/design/resource_names) of the Device
5186//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
5187//   where device_id is the unique ID assigned to the Device, and
5188//   device_user_id is the unique ID assigned to the User.
5189func (r *DevicesDeviceUsersService) CancelWipe(name string, cancelwipedeviceuserrequest *CancelWipeDeviceUserRequest) *DevicesDeviceUsersCancelWipeCall {
5190	c := &DevicesDeviceUsersCancelWipeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5191	c.name = name
5192	c.cancelwipedeviceuserrequest = cancelwipedeviceuserrequest
5193	return c
5194}
5195
5196// Fields allows partial responses to be retrieved. See
5197// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5198// for more information.
5199func (c *DevicesDeviceUsersCancelWipeCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersCancelWipeCall {
5200	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5201	return c
5202}
5203
5204// Context sets the context to be used in this call's Do method. Any
5205// pending HTTP request will be aborted if the provided context is
5206// canceled.
5207func (c *DevicesDeviceUsersCancelWipeCall) Context(ctx context.Context) *DevicesDeviceUsersCancelWipeCall {
5208	c.ctx_ = ctx
5209	return c
5210}
5211
5212// Header returns an http.Header that can be modified by the caller to
5213// add HTTP headers to the request.
5214func (c *DevicesDeviceUsersCancelWipeCall) Header() http.Header {
5215	if c.header_ == nil {
5216		c.header_ = make(http.Header)
5217	}
5218	return c.header_
5219}
5220
5221func (c *DevicesDeviceUsersCancelWipeCall) doRequest(alt string) (*http.Response, error) {
5222	reqHeaders := make(http.Header)
5223	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5224	for k, v := range c.header_ {
5225		reqHeaders[k] = v
5226	}
5227	reqHeaders.Set("User-Agent", c.s.userAgent())
5228	var body io.Reader = nil
5229	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelwipedeviceuserrequest)
5230	if err != nil {
5231		return nil, err
5232	}
5233	reqHeaders.Set("Content-Type", "application/json")
5234	c.urlParams_.Set("alt", alt)
5235	c.urlParams_.Set("prettyPrint", "false")
5236	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancelWipe")
5237	urls += "?" + c.urlParams_.Encode()
5238	req, err := http.NewRequest("POST", urls, body)
5239	if err != nil {
5240		return nil, err
5241	}
5242	req.Header = reqHeaders
5243	googleapi.Expand(req.URL, map[string]string{
5244		"name": c.name,
5245	})
5246	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5247}
5248
5249// Do executes the "cloudidentity.devices.deviceUsers.cancelWipe" call.
5250// Exactly one of *Operation or error will be non-nil. Any non-2xx
5251// status code is an error. Response headers are in either
5252// *Operation.ServerResponse.Header or (if a response was returned at
5253// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5254// to check whether the returned error was because
5255// http.StatusNotModified was returned.
5256func (c *DevicesDeviceUsersCancelWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5257	gensupport.SetOptions(c.urlParams_, opts...)
5258	res, err := c.doRequest("json")
5259	if res != nil && res.StatusCode == http.StatusNotModified {
5260		if res.Body != nil {
5261			res.Body.Close()
5262		}
5263		return nil, &googleapi.Error{
5264			Code:   res.StatusCode,
5265			Header: res.Header,
5266		}
5267	}
5268	if err != nil {
5269		return nil, err
5270	}
5271	defer googleapi.CloseBody(res)
5272	if err := googleapi.CheckResponse(res); err != nil {
5273		return nil, err
5274	}
5275	ret := &Operation{
5276		ServerResponse: googleapi.ServerResponse{
5277			Header:         res.Header,
5278			HTTPStatusCode: res.StatusCode,
5279		},
5280	}
5281	target := &ret
5282	if err := gensupport.DecodeResponse(target, res); err != nil {
5283		return nil, err
5284	}
5285	return ret, nil
5286	// {
5287	//   "description": "Cancels an unfinished user account wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped.",
5288	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}:cancelWipe",
5289	//   "httpMethod": "POST",
5290	//   "id": "cloudidentity.devices.deviceUsers.cancelWipe",
5291	//   "parameterOrder": [
5292	//     "name"
5293	//   ],
5294	//   "parameters": {
5295	//     "name": {
5296	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
5297	//       "location": "path",
5298	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
5299	//       "required": true,
5300	//       "type": "string"
5301	//     }
5302	//   },
5303	//   "path": "v1beta1/{+name}:cancelWipe",
5304	//   "request": {
5305	//     "$ref": "CancelWipeDeviceUserRequest"
5306	//   },
5307	//   "response": {
5308	//     "$ref": "Operation"
5309	//   }
5310	// }
5311
5312}
5313
5314// method id "cloudidentity.devices.deviceUsers.delete":
5315
5316type DevicesDeviceUsersDeleteCall struct {
5317	s          *Service
5318	name       string
5319	urlParams_ gensupport.URLParams
5320	ctx_       context.Context
5321	header_    http.Header
5322}
5323
5324// Delete: Deletes the specified DeviceUser. This also revokes the
5325// user's access to device data.
5326//
5327// - name: Resource name
5328//   (https://cloud.google.com/apis/design/resource_names) of the Device
5329//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
5330//   where device_id is the unique ID assigned to the Device, and
5331//   device_user_id is the unique ID assigned to the User.
5332func (r *DevicesDeviceUsersService) Delete(name string) *DevicesDeviceUsersDeleteCall {
5333	c := &DevicesDeviceUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5334	c.name = name
5335	return c
5336}
5337
5338// Fields allows partial responses to be retrieved. See
5339// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5340// for more information.
5341func (c *DevicesDeviceUsersDeleteCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersDeleteCall {
5342	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5343	return c
5344}
5345
5346// Context sets the context to be used in this call's Do method. Any
5347// pending HTTP request will be aborted if the provided context is
5348// canceled.
5349func (c *DevicesDeviceUsersDeleteCall) Context(ctx context.Context) *DevicesDeviceUsersDeleteCall {
5350	c.ctx_ = ctx
5351	return c
5352}
5353
5354// Header returns an http.Header that can be modified by the caller to
5355// add HTTP headers to the request.
5356func (c *DevicesDeviceUsersDeleteCall) Header() http.Header {
5357	if c.header_ == nil {
5358		c.header_ = make(http.Header)
5359	}
5360	return c.header_
5361}
5362
5363func (c *DevicesDeviceUsersDeleteCall) doRequest(alt string) (*http.Response, error) {
5364	reqHeaders := make(http.Header)
5365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5366	for k, v := range c.header_ {
5367		reqHeaders[k] = v
5368	}
5369	reqHeaders.Set("User-Agent", c.s.userAgent())
5370	var body io.Reader = nil
5371	c.urlParams_.Set("alt", alt)
5372	c.urlParams_.Set("prettyPrint", "false")
5373	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5374	urls += "?" + c.urlParams_.Encode()
5375	req, err := http.NewRequest("DELETE", urls, body)
5376	if err != nil {
5377		return nil, err
5378	}
5379	req.Header = reqHeaders
5380	googleapi.Expand(req.URL, map[string]string{
5381		"name": c.name,
5382	})
5383	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5384}
5385
5386// Do executes the "cloudidentity.devices.deviceUsers.delete" call.
5387// Exactly one of *Operation or error will be non-nil. Any non-2xx
5388// status code is an error. Response headers are in either
5389// *Operation.ServerResponse.Header or (if a response was returned at
5390// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5391// to check whether the returned error was because
5392// http.StatusNotModified was returned.
5393func (c *DevicesDeviceUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5394	gensupport.SetOptions(c.urlParams_, opts...)
5395	res, err := c.doRequest("json")
5396	if res != nil && res.StatusCode == http.StatusNotModified {
5397		if res.Body != nil {
5398			res.Body.Close()
5399		}
5400		return nil, &googleapi.Error{
5401			Code:   res.StatusCode,
5402			Header: res.Header,
5403		}
5404	}
5405	if err != nil {
5406		return nil, err
5407	}
5408	defer googleapi.CloseBody(res)
5409	if err := googleapi.CheckResponse(res); err != nil {
5410		return nil, err
5411	}
5412	ret := &Operation{
5413		ServerResponse: googleapi.ServerResponse{
5414			Header:         res.Header,
5415			HTTPStatusCode: res.StatusCode,
5416		},
5417	}
5418	target := &ret
5419	if err := gensupport.DecodeResponse(target, res); err != nil {
5420		return nil, err
5421	}
5422	return ret, nil
5423	// {
5424	//   "description": "Deletes the specified DeviceUser. This also revokes the user's access to device data.",
5425	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}",
5426	//   "httpMethod": "DELETE",
5427	//   "id": "cloudidentity.devices.deviceUsers.delete",
5428	//   "parameterOrder": [
5429	//     "name"
5430	//   ],
5431	//   "parameters": {
5432	//     "name": {
5433	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
5434	//       "location": "path",
5435	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
5436	//       "required": true,
5437	//       "type": "string"
5438	//     }
5439	//   },
5440	//   "path": "v1beta1/{+name}",
5441	//   "response": {
5442	//     "$ref": "Operation"
5443	//   }
5444	// }
5445
5446}
5447
5448// method id "cloudidentity.devices.deviceUsers.get":
5449
5450type DevicesDeviceUsersGetCall struct {
5451	s            *Service
5452	name         string
5453	urlParams_   gensupport.URLParams
5454	ifNoneMatch_ string
5455	ctx_         context.Context
5456	header_      http.Header
5457}
5458
5459// Get: Retrieves the specified DeviceUser
5460//
5461// - name: Resource name
5462//   (https://cloud.google.com/apis/design/resource_names) of the Device
5463//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
5464//   where device_id is the unique ID assigned to the Device, and
5465//   device_user_id is the unique ID assigned to the User.
5466func (r *DevicesDeviceUsersService) Get(name string) *DevicesDeviceUsersGetCall {
5467	c := &DevicesDeviceUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5468	c.name = name
5469	return c
5470}
5471
5472// Fields allows partial responses to be retrieved. See
5473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5474// for more information.
5475func (c *DevicesDeviceUsersGetCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersGetCall {
5476	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5477	return c
5478}
5479
5480// IfNoneMatch sets the optional parameter which makes the operation
5481// fail if the object's ETag matches the given value. This is useful for
5482// getting updates only after the object has changed since the last
5483// request. Use googleapi.IsNotModified to check whether the response
5484// error from Do is the result of In-None-Match.
5485func (c *DevicesDeviceUsersGetCall) IfNoneMatch(entityTag string) *DevicesDeviceUsersGetCall {
5486	c.ifNoneMatch_ = entityTag
5487	return c
5488}
5489
5490// Context sets the context to be used in this call's Do method. Any
5491// pending HTTP request will be aborted if the provided context is
5492// canceled.
5493func (c *DevicesDeviceUsersGetCall) Context(ctx context.Context) *DevicesDeviceUsersGetCall {
5494	c.ctx_ = ctx
5495	return c
5496}
5497
5498// Header returns an http.Header that can be modified by the caller to
5499// add HTTP headers to the request.
5500func (c *DevicesDeviceUsersGetCall) Header() http.Header {
5501	if c.header_ == nil {
5502		c.header_ = make(http.Header)
5503	}
5504	return c.header_
5505}
5506
5507func (c *DevicesDeviceUsersGetCall) doRequest(alt string) (*http.Response, error) {
5508	reqHeaders := make(http.Header)
5509	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5510	for k, v := range c.header_ {
5511		reqHeaders[k] = v
5512	}
5513	reqHeaders.Set("User-Agent", c.s.userAgent())
5514	if c.ifNoneMatch_ != "" {
5515		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5516	}
5517	var body io.Reader = nil
5518	c.urlParams_.Set("alt", alt)
5519	c.urlParams_.Set("prettyPrint", "false")
5520	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5521	urls += "?" + c.urlParams_.Encode()
5522	req, err := http.NewRequest("GET", urls, body)
5523	if err != nil {
5524		return nil, err
5525	}
5526	req.Header = reqHeaders
5527	googleapi.Expand(req.URL, map[string]string{
5528		"name": c.name,
5529	})
5530	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5531}
5532
5533// Do executes the "cloudidentity.devices.deviceUsers.get" call.
5534// Exactly one of *DeviceUser or error will be non-nil. Any non-2xx
5535// status code is an error. Response headers are in either
5536// *DeviceUser.ServerResponse.Header or (if a response was returned at
5537// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5538// to check whether the returned error was because
5539// http.StatusNotModified was returned.
5540func (c *DevicesDeviceUsersGetCall) Do(opts ...googleapi.CallOption) (*DeviceUser, error) {
5541	gensupport.SetOptions(c.urlParams_, opts...)
5542	res, err := c.doRequest("json")
5543	if res != nil && res.StatusCode == http.StatusNotModified {
5544		if res.Body != nil {
5545			res.Body.Close()
5546		}
5547		return nil, &googleapi.Error{
5548			Code:   res.StatusCode,
5549			Header: res.Header,
5550		}
5551	}
5552	if err != nil {
5553		return nil, err
5554	}
5555	defer googleapi.CloseBody(res)
5556	if err := googleapi.CheckResponse(res); err != nil {
5557		return nil, err
5558	}
5559	ret := &DeviceUser{
5560		ServerResponse: googleapi.ServerResponse{
5561			Header:         res.Header,
5562			HTTPStatusCode: res.StatusCode,
5563		},
5564	}
5565	target := &ret
5566	if err := gensupport.DecodeResponse(target, res); err != nil {
5567		return nil, err
5568	}
5569	return ret, nil
5570	// {
5571	//   "description": "Retrieves the specified DeviceUser",
5572	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}",
5573	//   "httpMethod": "GET",
5574	//   "id": "cloudidentity.devices.deviceUsers.get",
5575	//   "parameterOrder": [
5576	//     "name"
5577	//   ],
5578	//   "parameters": {
5579	//     "name": {
5580	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
5581	//       "location": "path",
5582	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
5583	//       "required": true,
5584	//       "type": "string"
5585	//     }
5586	//   },
5587	//   "path": "v1beta1/{+name}",
5588	//   "response": {
5589	//     "$ref": "DeviceUser"
5590	//   }
5591	// }
5592
5593}
5594
5595// method id "cloudidentity.devices.deviceUsers.list":
5596
5597type DevicesDeviceUsersListCall struct {
5598	s            *Service
5599	parent       string
5600	urlParams_   gensupport.URLParams
5601	ifNoneMatch_ string
5602	ctx_         context.Context
5603	header_      http.Header
5604}
5605
5606// List: Lists/Searches DeviceUsers.
5607//
5608// - parent: To list all DeviceUsers, set this to "devices/-". To list
5609//   all DeviceUsers owned by a device, set this to the resource name of
5610//   the device. Format: devices/{device}.
5611func (r *DevicesDeviceUsersService) List(parent string) *DevicesDeviceUsersListCall {
5612	c := &DevicesDeviceUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5613	c.parent = parent
5614	return c
5615}
5616
5617// Filter sets the optional parameter "filter": Additional restrictions
5618// when fetching list of devices. For a list of search fields, refer to
5619// Mobile device search fields
5620// (https://developers.google.com/admin-sdk/directory/v1/search-operators).
5621// Multiple search fields are separated by the space character.
5622func (c *DevicesDeviceUsersListCall) Filter(filter string) *DevicesDeviceUsersListCall {
5623	c.urlParams_.Set("filter", filter)
5624	return c
5625}
5626
5627// OrderBy sets the optional parameter "orderBy": Order specification
5628// for devices in the response.
5629func (c *DevicesDeviceUsersListCall) OrderBy(orderBy string) *DevicesDeviceUsersListCall {
5630	c.urlParams_.Set("orderBy", orderBy)
5631	return c
5632}
5633
5634// PageSize sets the optional parameter "pageSize": The maximum number
5635// of DeviceUsers to return. If unspecified, at most 5 DeviceUsers will
5636// be returned. The maximum value is 20; values above 20 will be coerced
5637// to 20.
5638func (c *DevicesDeviceUsersListCall) PageSize(pageSize int64) *DevicesDeviceUsersListCall {
5639	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5640	return c
5641}
5642
5643// PageToken sets the optional parameter "pageToken": A page token,
5644// received from a previous `ListDeviceUsers` call. Provide this to
5645// retrieve the subsequent page. When paginating, all other parameters
5646// provided to `ListBooks` must match the call that provided the page
5647// token.
5648func (c *DevicesDeviceUsersListCall) PageToken(pageToken string) *DevicesDeviceUsersListCall {
5649	c.urlParams_.Set("pageToken", pageToken)
5650	return c
5651}
5652
5653// Fields allows partial responses to be retrieved. See
5654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5655// for more information.
5656func (c *DevicesDeviceUsersListCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersListCall {
5657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5658	return c
5659}
5660
5661// IfNoneMatch sets the optional parameter which makes the operation
5662// fail if the object's ETag matches the given value. This is useful for
5663// getting updates only after the object has changed since the last
5664// request. Use googleapi.IsNotModified to check whether the response
5665// error from Do is the result of In-None-Match.
5666func (c *DevicesDeviceUsersListCall) IfNoneMatch(entityTag string) *DevicesDeviceUsersListCall {
5667	c.ifNoneMatch_ = entityTag
5668	return c
5669}
5670
5671// Context sets the context to be used in this call's Do method. Any
5672// pending HTTP request will be aborted if the provided context is
5673// canceled.
5674func (c *DevicesDeviceUsersListCall) Context(ctx context.Context) *DevicesDeviceUsersListCall {
5675	c.ctx_ = ctx
5676	return c
5677}
5678
5679// Header returns an http.Header that can be modified by the caller to
5680// add HTTP headers to the request.
5681func (c *DevicesDeviceUsersListCall) Header() http.Header {
5682	if c.header_ == nil {
5683		c.header_ = make(http.Header)
5684	}
5685	return c.header_
5686}
5687
5688func (c *DevicesDeviceUsersListCall) doRequest(alt string) (*http.Response, error) {
5689	reqHeaders := make(http.Header)
5690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5691	for k, v := range c.header_ {
5692		reqHeaders[k] = v
5693	}
5694	reqHeaders.Set("User-Agent", c.s.userAgent())
5695	if c.ifNoneMatch_ != "" {
5696		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5697	}
5698	var body io.Reader = nil
5699	c.urlParams_.Set("alt", alt)
5700	c.urlParams_.Set("prettyPrint", "false")
5701	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/deviceUsers")
5702	urls += "?" + c.urlParams_.Encode()
5703	req, err := http.NewRequest("GET", urls, body)
5704	if err != nil {
5705		return nil, err
5706	}
5707	req.Header = reqHeaders
5708	googleapi.Expand(req.URL, map[string]string{
5709		"parent": c.parent,
5710	})
5711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5712}
5713
5714// Do executes the "cloudidentity.devices.deviceUsers.list" call.
5715// Exactly one of *ListDeviceUsersResponse or error will be non-nil. Any
5716// non-2xx status code is an error. Response headers are in either
5717// *ListDeviceUsersResponse.ServerResponse.Header or (if a response was
5718// returned at all) in error.(*googleapi.Error).Header. Use
5719// googleapi.IsNotModified to check whether the returned error was
5720// because http.StatusNotModified was returned.
5721func (c *DevicesDeviceUsersListCall) Do(opts ...googleapi.CallOption) (*ListDeviceUsersResponse, error) {
5722	gensupport.SetOptions(c.urlParams_, opts...)
5723	res, err := c.doRequest("json")
5724	if res != nil && res.StatusCode == http.StatusNotModified {
5725		if res.Body != nil {
5726			res.Body.Close()
5727		}
5728		return nil, &googleapi.Error{
5729			Code:   res.StatusCode,
5730			Header: res.Header,
5731		}
5732	}
5733	if err != nil {
5734		return nil, err
5735	}
5736	defer googleapi.CloseBody(res)
5737	if err := googleapi.CheckResponse(res); err != nil {
5738		return nil, err
5739	}
5740	ret := &ListDeviceUsersResponse{
5741		ServerResponse: googleapi.ServerResponse{
5742			Header:         res.Header,
5743			HTTPStatusCode: res.StatusCode,
5744		},
5745	}
5746	target := &ret
5747	if err := gensupport.DecodeResponse(target, res); err != nil {
5748		return nil, err
5749	}
5750	return ret, nil
5751	// {
5752	//   "description": "Lists/Searches DeviceUsers.",
5753	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers",
5754	//   "httpMethod": "GET",
5755	//   "id": "cloudidentity.devices.deviceUsers.list",
5756	//   "parameterOrder": [
5757	//     "parent"
5758	//   ],
5759	//   "parameters": {
5760	//     "filter": {
5761	//       "description": "Optional. Additional restrictions when fetching list of devices. For a list of search fields, refer to [Mobile device search fields](https://developers.google.com/admin-sdk/directory/v1/search-operators). Multiple search fields are separated by the space character.",
5762	//       "location": "query",
5763	//       "type": "string"
5764	//     },
5765	//     "orderBy": {
5766	//       "description": "Optional. Order specification for devices in the response.",
5767	//       "location": "query",
5768	//       "type": "string"
5769	//     },
5770	//     "pageSize": {
5771	//       "description": "Optional. The maximum number of DeviceUsers to return. If unspecified, at most 5 DeviceUsers will be returned. The maximum value is 20; values above 20 will be coerced to 20.",
5772	//       "format": "int32",
5773	//       "location": "query",
5774	//       "type": "integer"
5775	//     },
5776	//     "pageToken": {
5777	//       "description": "Optional. A page token, received from a previous `ListDeviceUsers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBooks` must match the call that provided the page token.",
5778	//       "location": "query",
5779	//       "type": "string"
5780	//     },
5781	//     "parent": {
5782	//       "description": "Required. To list all DeviceUsers, set this to \"devices/-\". To list all DeviceUsers owned by a device, set this to the resource name of the device. Format: devices/{device}",
5783	//       "location": "path",
5784	//       "pattern": "^devices/[^/]+$",
5785	//       "required": true,
5786	//       "type": "string"
5787	//     }
5788	//   },
5789	//   "path": "v1beta1/{+parent}/deviceUsers",
5790	//   "response": {
5791	//     "$ref": "ListDeviceUsersResponse"
5792	//   }
5793	// }
5794
5795}
5796
5797// Pages invokes f for each page of results.
5798// A non-nil error returned from f will halt the iteration.
5799// The provided context supersedes any context provided to the Context method.
5800func (c *DevicesDeviceUsersListCall) Pages(ctx context.Context, f func(*ListDeviceUsersResponse) error) error {
5801	c.ctx_ = ctx
5802	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5803	for {
5804		x, err := c.Do()
5805		if err != nil {
5806			return err
5807		}
5808		if err := f(x); err != nil {
5809			return err
5810		}
5811		if x.NextPageToken == "" {
5812			return nil
5813		}
5814		c.PageToken(x.NextPageToken)
5815	}
5816}
5817
5818// method id "cloudidentity.devices.deviceUsers.lookup":
5819
5820type DevicesDeviceUsersLookupCall struct {
5821	s            *Service
5822	parent       string
5823	urlParams_   gensupport.URLParams
5824	ifNoneMatch_ string
5825	ctx_         context.Context
5826	header_      http.Header
5827}
5828
5829// Lookup: Looks up resource names of the DeviceUsers associated with
5830// the caller's credentials, as well as the properties provided in the
5831// request. This method must be called with end-user credentials with
5832// the scope:
5833// https://www.googleapis.com/auth/cloud-identity.devices.lookup If
5834// multiple properties are provided, only DeviceUsers having all of
5835// these properties are considered as matches - i.e. the query behaves
5836// like an AND. Different platforms require different amounts of
5837// information from the caller to ensure that the DeviceUser is uniquely
5838// identified. - iOS: No properties need to be passed, the caller's
5839// credentials are sufficient to identify the corresponding DeviceUser.
5840// - Android: Specifying the 'android_id' field is required. - Desktop:
5841// Specifying the 'raw_resource_id' field is required.
5842//
5843// - parent: Must be set to "devices/-/deviceUsers" to search across all
5844//   DeviceUser belonging to the user.
5845func (r *DevicesDeviceUsersService) Lookup(parent string) *DevicesDeviceUsersLookupCall {
5846	c := &DevicesDeviceUsersLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5847	c.parent = parent
5848	return c
5849}
5850
5851// AndroidId sets the optional parameter "androidId": Android Id
5852// returned by Settings.Secure#ANDROID_ID
5853// (https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID).
5854func (c *DevicesDeviceUsersLookupCall) AndroidId(androidId string) *DevicesDeviceUsersLookupCall {
5855	c.urlParams_.Set("androidId", androidId)
5856	return c
5857}
5858
5859// PageSize sets the optional parameter "pageSize": The maximum number
5860// of DeviceUsers to return. If unspecified, at most 20 DeviceUsers will
5861// be returned. The maximum value is 20; values above 20 will be coerced
5862// to 20.
5863func (c *DevicesDeviceUsersLookupCall) PageSize(pageSize int64) *DevicesDeviceUsersLookupCall {
5864	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5865	return c
5866}
5867
5868// PageToken sets the optional parameter "pageToken": A page token,
5869// received from a previous `LookupDeviceUsers` call. Provide this to
5870// retrieve the subsequent page. When paginating, all other parameters
5871// provided to `LookupDeviceUsers` must match the call that provided the
5872// page token.
5873func (c *DevicesDeviceUsersLookupCall) PageToken(pageToken string) *DevicesDeviceUsersLookupCall {
5874	c.urlParams_.Set("pageToken", pageToken)
5875	return c
5876}
5877
5878// RawResourceId sets the optional parameter "rawResourceId": Raw
5879// Resource Id used by Google Endpoint Verification. If the user is
5880// enrolled into Google Endpoint Verification, this id will be saved as
5881// the 'device_resource_id' field in the following platform dependent
5882// files. Mac: ~/.secureConnect/context_aware_config.json Windows:
5883// C:\Users\%USERPROFILE%\.secureConnect\context_aware_config.json
5884// Linux: ~/.secureConnect/context_aware_config.json
5885func (c *DevicesDeviceUsersLookupCall) RawResourceId(rawResourceId string) *DevicesDeviceUsersLookupCall {
5886	c.urlParams_.Set("rawResourceId", rawResourceId)
5887	return c
5888}
5889
5890// UserId sets the optional parameter "userId": The user whose
5891// DeviceUser's resource name will be fetched. Must be set to 'me' to
5892// fetch the DeviceUser's resource name for the calling user.
5893func (c *DevicesDeviceUsersLookupCall) UserId(userId string) *DevicesDeviceUsersLookupCall {
5894	c.urlParams_.Set("userId", userId)
5895	return c
5896}
5897
5898// Fields allows partial responses to be retrieved. See
5899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5900// for more information.
5901func (c *DevicesDeviceUsersLookupCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersLookupCall {
5902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5903	return c
5904}
5905
5906// IfNoneMatch sets the optional parameter which makes the operation
5907// fail if the object's ETag matches the given value. This is useful for
5908// getting updates only after the object has changed since the last
5909// request. Use googleapi.IsNotModified to check whether the response
5910// error from Do is the result of In-None-Match.
5911func (c *DevicesDeviceUsersLookupCall) IfNoneMatch(entityTag string) *DevicesDeviceUsersLookupCall {
5912	c.ifNoneMatch_ = entityTag
5913	return c
5914}
5915
5916// Context sets the context to be used in this call's Do method. Any
5917// pending HTTP request will be aborted if the provided context is
5918// canceled.
5919func (c *DevicesDeviceUsersLookupCall) Context(ctx context.Context) *DevicesDeviceUsersLookupCall {
5920	c.ctx_ = ctx
5921	return c
5922}
5923
5924// Header returns an http.Header that can be modified by the caller to
5925// add HTTP headers to the request.
5926func (c *DevicesDeviceUsersLookupCall) Header() http.Header {
5927	if c.header_ == nil {
5928		c.header_ = make(http.Header)
5929	}
5930	return c.header_
5931}
5932
5933func (c *DevicesDeviceUsersLookupCall) doRequest(alt string) (*http.Response, error) {
5934	reqHeaders := make(http.Header)
5935	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
5936	for k, v := range c.header_ {
5937		reqHeaders[k] = v
5938	}
5939	reqHeaders.Set("User-Agent", c.s.userAgent())
5940	if c.ifNoneMatch_ != "" {
5941		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5942	}
5943	var body io.Reader = nil
5944	c.urlParams_.Set("alt", alt)
5945	c.urlParams_.Set("prettyPrint", "false")
5946	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:lookup")
5947	urls += "?" + c.urlParams_.Encode()
5948	req, err := http.NewRequest("GET", urls, body)
5949	if err != nil {
5950		return nil, err
5951	}
5952	req.Header = reqHeaders
5953	googleapi.Expand(req.URL, map[string]string{
5954		"parent": c.parent,
5955	})
5956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5957}
5958
5959// Do executes the "cloudidentity.devices.deviceUsers.lookup" call.
5960// Exactly one of *LookupSelfDeviceUsersResponse or error will be
5961// non-nil. Any non-2xx status code is an error. Response headers are in
5962// either *LookupSelfDeviceUsersResponse.ServerResponse.Header or (if a
5963// response was returned at all) in error.(*googleapi.Error).Header. Use
5964// googleapi.IsNotModified to check whether the returned error was
5965// because http.StatusNotModified was returned.
5966func (c *DevicesDeviceUsersLookupCall) Do(opts ...googleapi.CallOption) (*LookupSelfDeviceUsersResponse, error) {
5967	gensupport.SetOptions(c.urlParams_, opts...)
5968	res, err := c.doRequest("json")
5969	if res != nil && res.StatusCode == http.StatusNotModified {
5970		if res.Body != nil {
5971			res.Body.Close()
5972		}
5973		return nil, &googleapi.Error{
5974			Code:   res.StatusCode,
5975			Header: res.Header,
5976		}
5977	}
5978	if err != nil {
5979		return nil, err
5980	}
5981	defer googleapi.CloseBody(res)
5982	if err := googleapi.CheckResponse(res); err != nil {
5983		return nil, err
5984	}
5985	ret := &LookupSelfDeviceUsersResponse{
5986		ServerResponse: googleapi.ServerResponse{
5987			Header:         res.Header,
5988			HTTPStatusCode: res.StatusCode,
5989		},
5990	}
5991	target := &ret
5992	if err := gensupport.DecodeResponse(target, res); err != nil {
5993		return nil, err
5994	}
5995	return ret, nil
5996	// {
5997	//   "description": "Looks up resource names of the DeviceUsers associated with the caller's credentials, as well as the properties provided in the request. This method must be called with end-user credentials with the scope: https://www.googleapis.com/auth/cloud-identity.devices.lookup If multiple properties are provided, only DeviceUsers having all of these properties are considered as matches - i.e. the query behaves like an AND. Different platforms require different amounts of information from the caller to ensure that the DeviceUser is uniquely identified. - iOS: No properties need to be passed, the caller's credentials are sufficient to identify the corresponding DeviceUser. - Android: Specifying the 'android_id' field is required. - Desktop: Specifying the 'raw_resource_id' field is required.",
5998	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers:lookup",
5999	//   "httpMethod": "GET",
6000	//   "id": "cloudidentity.devices.deviceUsers.lookup",
6001	//   "parameterOrder": [
6002	//     "parent"
6003	//   ],
6004	//   "parameters": {
6005	//     "androidId": {
6006	//       "description": "Android Id returned by [Settings.Secure#ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID).",
6007	//       "location": "query",
6008	//       "type": "string"
6009	//     },
6010	//     "pageSize": {
6011	//       "description": "The maximum number of DeviceUsers to return. If unspecified, at most 20 DeviceUsers will be returned. The maximum value is 20; values above 20 will be coerced to 20.",
6012	//       "format": "int32",
6013	//       "location": "query",
6014	//       "type": "integer"
6015	//     },
6016	//     "pageToken": {
6017	//       "description": "A page token, received from a previous `LookupDeviceUsers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `LookupDeviceUsers` must match the call that provided the page token.",
6018	//       "location": "query",
6019	//       "type": "string"
6020	//     },
6021	//     "parent": {
6022	//       "description": "Must be set to \"devices/-/deviceUsers\" to search across all DeviceUser belonging to the user.",
6023	//       "location": "path",
6024	//       "pattern": "^devices/[^/]+/deviceUsers$",
6025	//       "required": true,
6026	//       "type": "string"
6027	//     },
6028	//     "rawResourceId": {
6029	//       "description": "Raw Resource Id used by Google Endpoint Verification. If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files. Mac: ~/.secureConnect/context_aware_config.json Windows: C:\\Users\\%USERPROFILE%\\.secureConnect\\context_aware_config.json Linux: ~/.secureConnect/context_aware_config.json",
6030	//       "location": "query",
6031	//       "type": "string"
6032	//     },
6033	//     "userId": {
6034	//       "description": "The user whose DeviceUser's resource name will be fetched. Must be set to 'me' to fetch the DeviceUser's resource name for the calling user.",
6035	//       "location": "query",
6036	//       "type": "string"
6037	//     }
6038	//   },
6039	//   "path": "v1beta1/{+parent}:lookup",
6040	//   "response": {
6041	//     "$ref": "LookupSelfDeviceUsersResponse"
6042	//   },
6043	//   "scopes": [
6044	//     "https://www.googleapis.com/auth/cloud-identity.devices.lookup"
6045	//   ]
6046	// }
6047
6048}
6049
6050// Pages invokes f for each page of results.
6051// A non-nil error returned from f will halt the iteration.
6052// The provided context supersedes any context provided to the Context method.
6053func (c *DevicesDeviceUsersLookupCall) Pages(ctx context.Context, f func(*LookupSelfDeviceUsersResponse) error) error {
6054	c.ctx_ = ctx
6055	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6056	for {
6057		x, err := c.Do()
6058		if err != nil {
6059			return err
6060		}
6061		if err := f(x); err != nil {
6062			return err
6063		}
6064		if x.NextPageToken == "" {
6065			return nil
6066		}
6067		c.PageToken(x.NextPageToken)
6068	}
6069}
6070
6071// method id "cloudidentity.devices.deviceUsers.wipe":
6072
6073type DevicesDeviceUsersWipeCall struct {
6074	s                     *Service
6075	name                  string
6076	wipedeviceuserrequest *WipeDeviceUserRequest
6077	urlParams_            gensupport.URLParams
6078	ctx_                  context.Context
6079	header_               http.Header
6080}
6081
6082// Wipe: Wipes the user's account on a device.
6083//
6084// - name: Resource name
6085//   (https://cloud.google.com/apis/design/resource_names) of the Device
6086//   in format: `devices/{device_id}/deviceUsers/{device_user_id}`,
6087//   where device_id is the unique ID assigned to the Device, and
6088//   device_user_id is the unique ID assigned to the User.
6089func (r *DevicesDeviceUsersService) Wipe(name string, wipedeviceuserrequest *WipeDeviceUserRequest) *DevicesDeviceUsersWipeCall {
6090	c := &DevicesDeviceUsersWipeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6091	c.name = name
6092	c.wipedeviceuserrequest = wipedeviceuserrequest
6093	return c
6094}
6095
6096// Fields allows partial responses to be retrieved. See
6097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6098// for more information.
6099func (c *DevicesDeviceUsersWipeCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersWipeCall {
6100	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6101	return c
6102}
6103
6104// Context sets the context to be used in this call's Do method. Any
6105// pending HTTP request will be aborted if the provided context is
6106// canceled.
6107func (c *DevicesDeviceUsersWipeCall) Context(ctx context.Context) *DevicesDeviceUsersWipeCall {
6108	c.ctx_ = ctx
6109	return c
6110}
6111
6112// Header returns an http.Header that can be modified by the caller to
6113// add HTTP headers to the request.
6114func (c *DevicesDeviceUsersWipeCall) Header() http.Header {
6115	if c.header_ == nil {
6116		c.header_ = make(http.Header)
6117	}
6118	return c.header_
6119}
6120
6121func (c *DevicesDeviceUsersWipeCall) doRequest(alt string) (*http.Response, error) {
6122	reqHeaders := make(http.Header)
6123	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6124	for k, v := range c.header_ {
6125		reqHeaders[k] = v
6126	}
6127	reqHeaders.Set("User-Agent", c.s.userAgent())
6128	var body io.Reader = nil
6129	body, err := googleapi.WithoutDataWrapper.JSONReader(c.wipedeviceuserrequest)
6130	if err != nil {
6131		return nil, err
6132	}
6133	reqHeaders.Set("Content-Type", "application/json")
6134	c.urlParams_.Set("alt", alt)
6135	c.urlParams_.Set("prettyPrint", "false")
6136	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:wipe")
6137	urls += "?" + c.urlParams_.Encode()
6138	req, err := http.NewRequest("POST", urls, body)
6139	if err != nil {
6140		return nil, err
6141	}
6142	req.Header = reqHeaders
6143	googleapi.Expand(req.URL, map[string]string{
6144		"name": c.name,
6145	})
6146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6147}
6148
6149// Do executes the "cloudidentity.devices.deviceUsers.wipe" call.
6150// Exactly one of *Operation or error will be non-nil. Any non-2xx
6151// status code is an error. Response headers are in either
6152// *Operation.ServerResponse.Header or (if a response was returned at
6153// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6154// to check whether the returned error was because
6155// http.StatusNotModified was returned.
6156func (c *DevicesDeviceUsersWipeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6157	gensupport.SetOptions(c.urlParams_, opts...)
6158	res, err := c.doRequest("json")
6159	if res != nil && res.StatusCode == http.StatusNotModified {
6160		if res.Body != nil {
6161			res.Body.Close()
6162		}
6163		return nil, &googleapi.Error{
6164			Code:   res.StatusCode,
6165			Header: res.Header,
6166		}
6167	}
6168	if err != nil {
6169		return nil, err
6170	}
6171	defer googleapi.CloseBody(res)
6172	if err := googleapi.CheckResponse(res); err != nil {
6173		return nil, err
6174	}
6175	ret := &Operation{
6176		ServerResponse: googleapi.ServerResponse{
6177			Header:         res.Header,
6178			HTTPStatusCode: res.StatusCode,
6179		},
6180	}
6181	target := &ret
6182	if err := gensupport.DecodeResponse(target, res); err != nil {
6183		return nil, err
6184	}
6185	return ret, nil
6186	// {
6187	//   "description": "Wipes the user's account on a device.",
6188	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}:wipe",
6189	//   "httpMethod": "POST",
6190	//   "id": "cloudidentity.devices.deviceUsers.wipe",
6191	//   "parameterOrder": [
6192	//     "name"
6193	//   ],
6194	//   "parameters": {
6195	//     "name": {
6196	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the Device in format: `devices/{device_id}/deviceUsers/{device_user_id}`, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User.",
6197	//       "location": "path",
6198	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+$",
6199	//       "required": true,
6200	//       "type": "string"
6201	//     }
6202	//   },
6203	//   "path": "v1beta1/{+name}:wipe",
6204	//   "request": {
6205	//     "$ref": "WipeDeviceUserRequest"
6206	//   },
6207	//   "response": {
6208	//     "$ref": "Operation"
6209	//   }
6210	// }
6211
6212}
6213
6214// method id "cloudidentity.devices.deviceUsers.clientStates.get":
6215
6216type DevicesDeviceUsersClientStatesGetCall struct {
6217	s            *Service
6218	name         string
6219	urlParams_   gensupport.URLParams
6220	ifNoneMatch_ string
6221	ctx_         context.Context
6222	header_      http.Header
6223}
6224
6225// Get: Gets the client state for the device user
6226//
6227// - name: Resource name
6228//   (https://cloud.google.com/apis/design/resource_names) of the
6229//   ClientState in format:
6230//   `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{part
6231//   ner_id}`, where `device_id` is the unique ID assigned to the
6232//   Device, `device_user_id` is the unique ID assigned to the User and
6233//   `partner_id` identifies the partner storing the data. To get the
6234//   client state for devices belonging to your own organization, the
6235//   `partnerId` is in the format: `customerId-*anystring*`. Where the
6236//   `customerId` is your organization's customer ID and `anystring` is
6237//   any suffix. This suffix is used in setting up Custom Access Levels
6238//   in Context-Aware Access. You may use `my_customer` instead of the
6239//   customer ID for devices managed by your own organization. You may
6240//   specify `-` in place of the `{device_id}`, so the ClientState
6241//   resource name can be:
6242//   `devices/-/deviceUsers/{device_user_resource_id}/clientStates/{partn
6243//   er_id}`.
6244func (r *DevicesDeviceUsersClientStatesService) Get(name string) *DevicesDeviceUsersClientStatesGetCall {
6245	c := &DevicesDeviceUsersClientStatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6246	c.name = name
6247	return c
6248}
6249
6250// Customer sets the optional parameter "customer": Resource name
6251// (https://cloud.google.com/apis/design/resource_names) of the
6252// customer. If you're using this API for your own organization, use
6253// `customers/my_customer` If you're using this API to manage another
6254// organization, use `customers/{customer_id}`, where customer_id is the
6255// customer to whom the device belongs.
6256func (c *DevicesDeviceUsersClientStatesGetCall) Customer(customer string) *DevicesDeviceUsersClientStatesGetCall {
6257	c.urlParams_.Set("customer", customer)
6258	return c
6259}
6260
6261// Fields allows partial responses to be retrieved. See
6262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6263// for more information.
6264func (c *DevicesDeviceUsersClientStatesGetCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersClientStatesGetCall {
6265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6266	return c
6267}
6268
6269// IfNoneMatch sets the optional parameter which makes the operation
6270// fail if the object's ETag matches the given value. This is useful for
6271// getting updates only after the object has changed since the last
6272// request. Use googleapi.IsNotModified to check whether the response
6273// error from Do is the result of In-None-Match.
6274func (c *DevicesDeviceUsersClientStatesGetCall) IfNoneMatch(entityTag string) *DevicesDeviceUsersClientStatesGetCall {
6275	c.ifNoneMatch_ = entityTag
6276	return c
6277}
6278
6279// Context sets the context to be used in this call's Do method. Any
6280// pending HTTP request will be aborted if the provided context is
6281// canceled.
6282func (c *DevicesDeviceUsersClientStatesGetCall) Context(ctx context.Context) *DevicesDeviceUsersClientStatesGetCall {
6283	c.ctx_ = ctx
6284	return c
6285}
6286
6287// Header returns an http.Header that can be modified by the caller to
6288// add HTTP headers to the request.
6289func (c *DevicesDeviceUsersClientStatesGetCall) Header() http.Header {
6290	if c.header_ == nil {
6291		c.header_ = make(http.Header)
6292	}
6293	return c.header_
6294}
6295
6296func (c *DevicesDeviceUsersClientStatesGetCall) doRequest(alt string) (*http.Response, error) {
6297	reqHeaders := make(http.Header)
6298	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6299	for k, v := range c.header_ {
6300		reqHeaders[k] = v
6301	}
6302	reqHeaders.Set("User-Agent", c.s.userAgent())
6303	if c.ifNoneMatch_ != "" {
6304		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6305	}
6306	var body io.Reader = nil
6307	c.urlParams_.Set("alt", alt)
6308	c.urlParams_.Set("prettyPrint", "false")
6309	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6310	urls += "?" + c.urlParams_.Encode()
6311	req, err := http.NewRequest("GET", urls, body)
6312	if err != nil {
6313		return nil, err
6314	}
6315	req.Header = reqHeaders
6316	googleapi.Expand(req.URL, map[string]string{
6317		"name": c.name,
6318	})
6319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6320}
6321
6322// Do executes the "cloudidentity.devices.deviceUsers.clientStates.get" call.
6323// Exactly one of *ClientState or error will be non-nil. Any non-2xx
6324// status code is an error. Response headers are in either
6325// *ClientState.ServerResponse.Header or (if a response was returned at
6326// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6327// to check whether the returned error was because
6328// http.StatusNotModified was returned.
6329func (c *DevicesDeviceUsersClientStatesGetCall) Do(opts ...googleapi.CallOption) (*ClientState, error) {
6330	gensupport.SetOptions(c.urlParams_, opts...)
6331	res, err := c.doRequest("json")
6332	if res != nil && res.StatusCode == http.StatusNotModified {
6333		if res.Body != nil {
6334			res.Body.Close()
6335		}
6336		return nil, &googleapi.Error{
6337			Code:   res.StatusCode,
6338			Header: res.Header,
6339		}
6340	}
6341	if err != nil {
6342		return nil, err
6343	}
6344	defer googleapi.CloseBody(res)
6345	if err := googleapi.CheckResponse(res); err != nil {
6346		return nil, err
6347	}
6348	ret := &ClientState{
6349		ServerResponse: googleapi.ServerResponse{
6350			Header:         res.Header,
6351			HTTPStatusCode: res.StatusCode,
6352		},
6353	}
6354	target := &ret
6355	if err := gensupport.DecodeResponse(target, res); err != nil {
6356		return nil, err
6357	}
6358	return ret, nil
6359	// {
6360	//   "description": "Gets the client state for the device user",
6361	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}/clientStates/{clientStatesId}",
6362	//   "httpMethod": "GET",
6363	//   "id": "cloudidentity.devices.deviceUsers.clientStates.get",
6364	//   "parameterOrder": [
6365	//     "name"
6366	//   ],
6367	//   "parameters": {
6368	//     "customer": {
6369	//       "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.",
6370	//       "location": "query",
6371	//       "type": "string"
6372	//     },
6373	//     "name": {
6374	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}`, where `device_id` is the unique ID assigned to the Device, `device_user_id` is the unique ID assigned to the User and `partner_id` identifies the partner storing the data. To get the client state for devices belonging to your own organization, the `partnerId` is in the format: `customerId-*anystring*`. Where the `customerId` is your organization's customer ID and `anystring` is any suffix. This suffix is used in setting up Custom Access Levels in Context-Aware Access. You may use `my_customer` instead of the customer ID for devices managed by your own organization. You may specify `-` in place of the `{device_id}`, so the ClientState resource name can be: `devices/-/deviceUsers/{device_user_resource_id}/clientStates/{partner_id}`.",
6375	//       "location": "path",
6376	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+/clientStates/[^/]+$",
6377	//       "required": true,
6378	//       "type": "string"
6379	//     }
6380	//   },
6381	//   "path": "v1beta1/{+name}",
6382	//   "response": {
6383	//     "$ref": "ClientState"
6384	//   }
6385	// }
6386
6387}
6388
6389// method id "cloudidentity.devices.deviceUsers.clientStates.patch":
6390
6391type DevicesDeviceUsersClientStatesPatchCall struct {
6392	s           *Service
6393	name        string
6394	clientstate *ClientState
6395	urlParams_  gensupport.URLParams
6396	ctx_        context.Context
6397	header_     http.Header
6398}
6399
6400// Patch: Updates the client state for the device user **Note**: This
6401// method is available only to customers who have one of the following
6402// SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education,
6403// and Cloud Identity Premium
6404//
6405// - name: Output only. Resource name
6406//   (https://cloud.google.com/apis/design/resource_names) of the
6407//   ClientState in format:
6408//   `devices/{device_id}/deviceUsers/{device_user_id}/clientState/{partn
6409//   er_id}`, where partner_id corresponds to the partner storing the
6410//   data.
6411func (r *DevicesDeviceUsersClientStatesService) Patch(name string, clientstate *ClientState) *DevicesDeviceUsersClientStatesPatchCall {
6412	c := &DevicesDeviceUsersClientStatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6413	c.name = name
6414	c.clientstate = clientstate
6415	return c
6416}
6417
6418// Customer sets the optional parameter "customer": Resource name
6419// (https://cloud.google.com/apis/design/resource_names) of the
6420// customer. If you're using this API for your own organization, use
6421// `customers/my_customer` If you're using this API to manage another
6422// organization, use `customers/{customer_id}`, where customer_id is the
6423// customer to whom the device belongs.
6424func (c *DevicesDeviceUsersClientStatesPatchCall) Customer(customer string) *DevicesDeviceUsersClientStatesPatchCall {
6425	c.urlParams_.Set("customer", customer)
6426	return c
6427}
6428
6429// UpdateMask sets the optional parameter "updateMask": Comma-separated
6430// list of fully qualified names of fields to be updated. If not
6431// specified, all updatable fields in ClientState are updated.
6432func (c *DevicesDeviceUsersClientStatesPatchCall) UpdateMask(updateMask string) *DevicesDeviceUsersClientStatesPatchCall {
6433	c.urlParams_.Set("updateMask", updateMask)
6434	return c
6435}
6436
6437// Fields allows partial responses to be retrieved. See
6438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6439// for more information.
6440func (c *DevicesDeviceUsersClientStatesPatchCall) Fields(s ...googleapi.Field) *DevicesDeviceUsersClientStatesPatchCall {
6441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6442	return c
6443}
6444
6445// Context sets the context to be used in this call's Do method. Any
6446// pending HTTP request will be aborted if the provided context is
6447// canceled.
6448func (c *DevicesDeviceUsersClientStatesPatchCall) Context(ctx context.Context) *DevicesDeviceUsersClientStatesPatchCall {
6449	c.ctx_ = ctx
6450	return c
6451}
6452
6453// Header returns an http.Header that can be modified by the caller to
6454// add HTTP headers to the request.
6455func (c *DevicesDeviceUsersClientStatesPatchCall) Header() http.Header {
6456	if c.header_ == nil {
6457		c.header_ = make(http.Header)
6458	}
6459	return c.header_
6460}
6461
6462func (c *DevicesDeviceUsersClientStatesPatchCall) doRequest(alt string) (*http.Response, error) {
6463	reqHeaders := make(http.Header)
6464	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6465	for k, v := range c.header_ {
6466		reqHeaders[k] = v
6467	}
6468	reqHeaders.Set("User-Agent", c.s.userAgent())
6469	var body io.Reader = nil
6470	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientstate)
6471	if err != nil {
6472		return nil, err
6473	}
6474	reqHeaders.Set("Content-Type", "application/json")
6475	c.urlParams_.Set("alt", alt)
6476	c.urlParams_.Set("prettyPrint", "false")
6477	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6478	urls += "?" + c.urlParams_.Encode()
6479	req, err := http.NewRequest("PATCH", urls, body)
6480	if err != nil {
6481		return nil, err
6482	}
6483	req.Header = reqHeaders
6484	googleapi.Expand(req.URL, map[string]string{
6485		"name": c.name,
6486	})
6487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6488}
6489
6490// Do executes the "cloudidentity.devices.deviceUsers.clientStates.patch" call.
6491// Exactly one of *Operation or error will be non-nil. Any non-2xx
6492// status code is an error. Response headers are in either
6493// *Operation.ServerResponse.Header or (if a response was returned at
6494// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6495// to check whether the returned error was because
6496// http.StatusNotModified was returned.
6497func (c *DevicesDeviceUsersClientStatesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6498	gensupport.SetOptions(c.urlParams_, opts...)
6499	res, err := c.doRequest("json")
6500	if res != nil && res.StatusCode == http.StatusNotModified {
6501		if res.Body != nil {
6502			res.Body.Close()
6503		}
6504		return nil, &googleapi.Error{
6505			Code:   res.StatusCode,
6506			Header: res.Header,
6507		}
6508	}
6509	if err != nil {
6510		return nil, err
6511	}
6512	defer googleapi.CloseBody(res)
6513	if err := googleapi.CheckResponse(res); err != nil {
6514		return nil, err
6515	}
6516	ret := &Operation{
6517		ServerResponse: googleapi.ServerResponse{
6518			Header:         res.Header,
6519			HTTPStatusCode: res.StatusCode,
6520		},
6521	}
6522	target := &ret
6523	if err := gensupport.DecodeResponse(target, res); err != nil {
6524		return nil, err
6525	}
6526	return ret, nil
6527	// {
6528	//   "description": "Updates the client state for the device user **Note**: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium",
6529	//   "flatPath": "v1beta1/devices/{devicesId}/deviceUsers/{deviceUsersId}/clientStates/{clientStatesId}",
6530	//   "httpMethod": "PATCH",
6531	//   "id": "cloudidentity.devices.deviceUsers.clientStates.patch",
6532	//   "parameterOrder": [
6533	//     "name"
6534	//   ],
6535	//   "parameters": {
6536	//     "customer": {
6537	//       "description": "Optional. [Resource name](https://cloud.google.com/apis/design/resource_names) of the customer. If you're using this API for your own organization, use `customers/my_customer` If you're using this API to manage another organization, use `customers/{customer_id}`, where customer_id is the customer to whom the device belongs.",
6538	//       "location": "query",
6539	//       "type": "string"
6540	//     },
6541	//     "name": {
6542	//       "description": "Output only. [Resource name](https://cloud.google.com/apis/design/resource_names) of the ClientState in format: `devices/{device_id}/deviceUsers/{device_user_id}/clientState/{partner_id}`, where partner_id corresponds to the partner storing the data.",
6543	//       "location": "path",
6544	//       "pattern": "^devices/[^/]+/deviceUsers/[^/]+/clientStates/[^/]+$",
6545	//       "required": true,
6546	//       "type": "string"
6547	//     },
6548	//     "updateMask": {
6549	//       "description": "Optional. Comma-separated list of fully qualified names of fields to be updated. If not specified, all updatable fields in ClientState are updated.",
6550	//       "format": "google-fieldmask",
6551	//       "location": "query",
6552	//       "type": "string"
6553	//     }
6554	//   },
6555	//   "path": "v1beta1/{+name}",
6556	//   "request": {
6557	//     "$ref": "ClientState"
6558	//   },
6559	//   "response": {
6560	//     "$ref": "Operation"
6561	//   }
6562	// }
6563
6564}
6565
6566// method id "cloudidentity.groups.create":
6567
6568type GroupsCreateCall struct {
6569	s          *Service
6570	group      *Group
6571	urlParams_ gensupport.URLParams
6572	ctx_       context.Context
6573	header_    http.Header
6574}
6575
6576// Create: Creates a `Group`.
6577func (r *GroupsService) Create(group *Group) *GroupsCreateCall {
6578	c := &GroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6579	c.group = group
6580	return c
6581}
6582
6583// InitialGroupConfig sets the optional parameter "initialGroupConfig":
6584// Required. The initial configuration option for the `Group`.
6585//
6586// Possible values:
6587//   "INITIAL_GROUP_CONFIG_UNSPECIFIED" - Default. Should not be used.
6588//   "WITH_INITIAL_OWNER" - The end user making the request will be
6589// added as the initial owner of the `Group`.
6590//   "EMPTY" - An empty group is created without any initial owners.
6591// This can only be used by admins of the domain.
6592func (c *GroupsCreateCall) InitialGroupConfig(initialGroupConfig string) *GroupsCreateCall {
6593	c.urlParams_.Set("initialGroupConfig", initialGroupConfig)
6594	return c
6595}
6596
6597// Fields allows partial responses to be retrieved. See
6598// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6599// for more information.
6600func (c *GroupsCreateCall) Fields(s ...googleapi.Field) *GroupsCreateCall {
6601	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6602	return c
6603}
6604
6605// Context sets the context to be used in this call's Do method. Any
6606// pending HTTP request will be aborted if the provided context is
6607// canceled.
6608func (c *GroupsCreateCall) Context(ctx context.Context) *GroupsCreateCall {
6609	c.ctx_ = ctx
6610	return c
6611}
6612
6613// Header returns an http.Header that can be modified by the caller to
6614// add HTTP headers to the request.
6615func (c *GroupsCreateCall) Header() http.Header {
6616	if c.header_ == nil {
6617		c.header_ = make(http.Header)
6618	}
6619	return c.header_
6620}
6621
6622func (c *GroupsCreateCall) doRequest(alt string) (*http.Response, error) {
6623	reqHeaders := make(http.Header)
6624	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6625	for k, v := range c.header_ {
6626		reqHeaders[k] = v
6627	}
6628	reqHeaders.Set("User-Agent", c.s.userAgent())
6629	var body io.Reader = nil
6630	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
6631	if err != nil {
6632		return nil, err
6633	}
6634	reqHeaders.Set("Content-Type", "application/json")
6635	c.urlParams_.Set("alt", alt)
6636	c.urlParams_.Set("prettyPrint", "false")
6637	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups")
6638	urls += "?" + c.urlParams_.Encode()
6639	req, err := http.NewRequest("POST", urls, body)
6640	if err != nil {
6641		return nil, err
6642	}
6643	req.Header = reqHeaders
6644	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6645}
6646
6647// Do executes the "cloudidentity.groups.create" call.
6648// Exactly one of *Operation or error will be non-nil. Any non-2xx
6649// status code is an error. Response headers are in either
6650// *Operation.ServerResponse.Header or (if a response was returned at
6651// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6652// to check whether the returned error was because
6653// http.StatusNotModified was returned.
6654func (c *GroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6655	gensupport.SetOptions(c.urlParams_, opts...)
6656	res, err := c.doRequest("json")
6657	if res != nil && res.StatusCode == http.StatusNotModified {
6658		if res.Body != nil {
6659			res.Body.Close()
6660		}
6661		return nil, &googleapi.Error{
6662			Code:   res.StatusCode,
6663			Header: res.Header,
6664		}
6665	}
6666	if err != nil {
6667		return nil, err
6668	}
6669	defer googleapi.CloseBody(res)
6670	if err := googleapi.CheckResponse(res); err != nil {
6671		return nil, err
6672	}
6673	ret := &Operation{
6674		ServerResponse: googleapi.ServerResponse{
6675			Header:         res.Header,
6676			HTTPStatusCode: res.StatusCode,
6677		},
6678	}
6679	target := &ret
6680	if err := gensupport.DecodeResponse(target, res); err != nil {
6681		return nil, err
6682	}
6683	return ret, nil
6684	// {
6685	//   "description": "Creates a `Group`.",
6686	//   "flatPath": "v1beta1/groups",
6687	//   "httpMethod": "POST",
6688	//   "id": "cloudidentity.groups.create",
6689	//   "parameterOrder": [],
6690	//   "parameters": {
6691	//     "initialGroupConfig": {
6692	//       "description": "Required. The initial configuration option for the `Group`.",
6693	//       "enum": [
6694	//         "INITIAL_GROUP_CONFIG_UNSPECIFIED",
6695	//         "WITH_INITIAL_OWNER",
6696	//         "EMPTY"
6697	//       ],
6698	//       "enumDescriptions": [
6699	//         "Default. Should not be used.",
6700	//         "The end user making the request will be added as the initial owner of the `Group`.",
6701	//         "An empty group is created without any initial owners. This can only be used by admins of the domain."
6702	//       ],
6703	//       "location": "query",
6704	//       "type": "string"
6705	//     }
6706	//   },
6707	//   "path": "v1beta1/groups",
6708	//   "request": {
6709	//     "$ref": "Group"
6710	//   },
6711	//   "response": {
6712	//     "$ref": "Operation"
6713	//   },
6714	//   "scopes": [
6715	//     "https://www.googleapis.com/auth/cloud-identity.groups",
6716	//     "https://www.googleapis.com/auth/cloud-platform"
6717	//   ]
6718	// }
6719
6720}
6721
6722// method id "cloudidentity.groups.delete":
6723
6724type GroupsDeleteCall struct {
6725	s          *Service
6726	name       string
6727	urlParams_ gensupport.URLParams
6728	ctx_       context.Context
6729	header_    http.Header
6730}
6731
6732// Delete: Deletes a `Group`.
6733//
6734// - name: The resource name
6735//   (https://cloud.google.com/apis/design/resource_names) of the
6736//   `Group` to retrieve. Must be of the form `groups/{group_id}`.
6737func (r *GroupsService) Delete(name string) *GroupsDeleteCall {
6738	c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6739	c.name = name
6740	return c
6741}
6742
6743// Fields allows partial responses to be retrieved. See
6744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6745// for more information.
6746func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall {
6747	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6748	return c
6749}
6750
6751// Context sets the context to be used in this call's Do method. Any
6752// pending HTTP request will be aborted if the provided context is
6753// canceled.
6754func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
6755	c.ctx_ = ctx
6756	return c
6757}
6758
6759// Header returns an http.Header that can be modified by the caller to
6760// add HTTP headers to the request.
6761func (c *GroupsDeleteCall) Header() http.Header {
6762	if c.header_ == nil {
6763		c.header_ = make(http.Header)
6764	}
6765	return c.header_
6766}
6767
6768func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
6769	reqHeaders := make(http.Header)
6770	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6771	for k, v := range c.header_ {
6772		reqHeaders[k] = v
6773	}
6774	reqHeaders.Set("User-Agent", c.s.userAgent())
6775	var body io.Reader = nil
6776	c.urlParams_.Set("alt", alt)
6777	c.urlParams_.Set("prettyPrint", "false")
6778	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6779	urls += "?" + c.urlParams_.Encode()
6780	req, err := http.NewRequest("DELETE", urls, body)
6781	if err != nil {
6782		return nil, err
6783	}
6784	req.Header = reqHeaders
6785	googleapi.Expand(req.URL, map[string]string{
6786		"name": c.name,
6787	})
6788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6789}
6790
6791// Do executes the "cloudidentity.groups.delete" call.
6792// Exactly one of *Operation or error will be non-nil. Any non-2xx
6793// status code is an error. Response headers are in either
6794// *Operation.ServerResponse.Header or (if a response was returned at
6795// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6796// to check whether the returned error was because
6797// http.StatusNotModified was returned.
6798func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6799	gensupport.SetOptions(c.urlParams_, opts...)
6800	res, err := c.doRequest("json")
6801	if res != nil && res.StatusCode == http.StatusNotModified {
6802		if res.Body != nil {
6803			res.Body.Close()
6804		}
6805		return nil, &googleapi.Error{
6806			Code:   res.StatusCode,
6807			Header: res.Header,
6808		}
6809	}
6810	if err != nil {
6811		return nil, err
6812	}
6813	defer googleapi.CloseBody(res)
6814	if err := googleapi.CheckResponse(res); err != nil {
6815		return nil, err
6816	}
6817	ret := &Operation{
6818		ServerResponse: googleapi.ServerResponse{
6819			Header:         res.Header,
6820			HTTPStatusCode: res.StatusCode,
6821		},
6822	}
6823	target := &ret
6824	if err := gensupport.DecodeResponse(target, res); err != nil {
6825		return nil, err
6826	}
6827	return ret, nil
6828	// {
6829	//   "description": "Deletes a `Group`.",
6830	//   "flatPath": "v1beta1/groups/{groupsId}",
6831	//   "httpMethod": "DELETE",
6832	//   "id": "cloudidentity.groups.delete",
6833	//   "parameterOrder": [
6834	//     "name"
6835	//   ],
6836	//   "parameters": {
6837	//     "name": {
6838	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Group` to retrieve. Must be of the form `groups/{group_id}`.",
6839	//       "location": "path",
6840	//       "pattern": "^groups/[^/]+$",
6841	//       "required": true,
6842	//       "type": "string"
6843	//     }
6844	//   },
6845	//   "path": "v1beta1/{+name}",
6846	//   "response": {
6847	//     "$ref": "Operation"
6848	//   },
6849	//   "scopes": [
6850	//     "https://www.googleapis.com/auth/cloud-identity.groups",
6851	//     "https://www.googleapis.com/auth/cloud-platform"
6852	//   ]
6853	// }
6854
6855}
6856
6857// method id "cloudidentity.groups.get":
6858
6859type GroupsGetCall struct {
6860	s            *Service
6861	name         string
6862	urlParams_   gensupport.URLParams
6863	ifNoneMatch_ string
6864	ctx_         context.Context
6865	header_      http.Header
6866}
6867
6868// Get: Retrieves a `Group`.
6869//
6870// - name: The resource name
6871//   (https://cloud.google.com/apis/design/resource_names) of the
6872//   `Group` to retrieve. Must be of the form `groups/{group_id}`.
6873func (r *GroupsService) Get(name string) *GroupsGetCall {
6874	c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6875	c.name = name
6876	return c
6877}
6878
6879// Fields allows partial responses to be retrieved. See
6880// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6881// for more information.
6882func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
6883	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6884	return c
6885}
6886
6887// IfNoneMatch sets the optional parameter which makes the operation
6888// fail if the object's ETag matches the given value. This is useful for
6889// getting updates only after the object has changed since the last
6890// request. Use googleapi.IsNotModified to check whether the response
6891// error from Do is the result of In-None-Match.
6892func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
6893	c.ifNoneMatch_ = entityTag
6894	return c
6895}
6896
6897// Context sets the context to be used in this call's Do method. Any
6898// pending HTTP request will be aborted if the provided context is
6899// canceled.
6900func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
6901	c.ctx_ = ctx
6902	return c
6903}
6904
6905// Header returns an http.Header that can be modified by the caller to
6906// add HTTP headers to the request.
6907func (c *GroupsGetCall) Header() http.Header {
6908	if c.header_ == nil {
6909		c.header_ = make(http.Header)
6910	}
6911	return c.header_
6912}
6913
6914func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
6915	reqHeaders := make(http.Header)
6916	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
6917	for k, v := range c.header_ {
6918		reqHeaders[k] = v
6919	}
6920	reqHeaders.Set("User-Agent", c.s.userAgent())
6921	if c.ifNoneMatch_ != "" {
6922		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6923	}
6924	var body io.Reader = nil
6925	c.urlParams_.Set("alt", alt)
6926	c.urlParams_.Set("prettyPrint", "false")
6927	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6928	urls += "?" + c.urlParams_.Encode()
6929	req, err := http.NewRequest("GET", urls, body)
6930	if err != nil {
6931		return nil, err
6932	}
6933	req.Header = reqHeaders
6934	googleapi.Expand(req.URL, map[string]string{
6935		"name": c.name,
6936	})
6937	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6938}
6939
6940// Do executes the "cloudidentity.groups.get" call.
6941// Exactly one of *Group or error will be non-nil. Any non-2xx status
6942// code is an error. Response headers are in either
6943// *Group.ServerResponse.Header or (if a response was returned at all)
6944// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6945// check whether the returned error was because http.StatusNotModified
6946// was returned.
6947func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
6948	gensupport.SetOptions(c.urlParams_, opts...)
6949	res, err := c.doRequest("json")
6950	if res != nil && res.StatusCode == http.StatusNotModified {
6951		if res.Body != nil {
6952			res.Body.Close()
6953		}
6954		return nil, &googleapi.Error{
6955			Code:   res.StatusCode,
6956			Header: res.Header,
6957		}
6958	}
6959	if err != nil {
6960		return nil, err
6961	}
6962	defer googleapi.CloseBody(res)
6963	if err := googleapi.CheckResponse(res); err != nil {
6964		return nil, err
6965	}
6966	ret := &Group{
6967		ServerResponse: googleapi.ServerResponse{
6968			Header:         res.Header,
6969			HTTPStatusCode: res.StatusCode,
6970		},
6971	}
6972	target := &ret
6973	if err := gensupport.DecodeResponse(target, res); err != nil {
6974		return nil, err
6975	}
6976	return ret, nil
6977	// {
6978	//   "description": "Retrieves a `Group`.",
6979	//   "flatPath": "v1beta1/groups/{groupsId}",
6980	//   "httpMethod": "GET",
6981	//   "id": "cloudidentity.groups.get",
6982	//   "parameterOrder": [
6983	//     "name"
6984	//   ],
6985	//   "parameters": {
6986	//     "name": {
6987	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Group` to retrieve. Must be of the form `groups/{group_id}`.",
6988	//       "location": "path",
6989	//       "pattern": "^groups/[^/]+$",
6990	//       "required": true,
6991	//       "type": "string"
6992	//     }
6993	//   },
6994	//   "path": "v1beta1/{+name}",
6995	//   "response": {
6996	//     "$ref": "Group"
6997	//   },
6998	//   "scopes": [
6999	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7000	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
7001	//     "https://www.googleapis.com/auth/cloud-platform"
7002	//   ]
7003	// }
7004
7005}
7006
7007// method id "cloudidentity.groups.list":
7008
7009type GroupsListCall struct {
7010	s            *Service
7011	urlParams_   gensupport.URLParams
7012	ifNoneMatch_ string
7013	ctx_         context.Context
7014	header_      http.Header
7015}
7016
7017// List: Lists the `Group` resources under a customer or namespace.
7018func (r *GroupsService) List() *GroupsListCall {
7019	c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7020	return c
7021}
7022
7023// PageSize sets the optional parameter "pageSize": The maximum number
7024// of results to return. Note that the number of results returned may be
7025// less than this value even if there are more available results. To
7026// fetch all results, clients must continue calling this method
7027// repeatedly until the response no longer contains a `next_page_token`.
7028// If unspecified, defaults to 200 for `View.BASIC` and to 50 for
7029// `View.FULL`. Must not be greater than 1000 for `View.BASIC` or 500
7030// for `View.FULL`.
7031func (c *GroupsListCall) PageSize(pageSize int64) *GroupsListCall {
7032	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7033	return c
7034}
7035
7036// PageToken sets the optional parameter "pageToken": The
7037// `next_page_token` value returned from a previous list request, if
7038// any.
7039func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall {
7040	c.urlParams_.Set("pageToken", pageToken)
7041	return c
7042}
7043
7044// Parent sets the optional parameter "parent": Required. The parent
7045// resource under which to list all `Group` resources. Must be of the
7046// form `identitysources/{identity_source_id}` for external-
7047// identity-mapped groups or `customers/{customer_id}` for Google
7048// Groups. The `customer_id` must begin with "C" (for example,
7049// 'C046psxkn').
7050func (c *GroupsListCall) Parent(parent string) *GroupsListCall {
7051	c.urlParams_.Set("parent", parent)
7052	return c
7053}
7054
7055// View sets the optional parameter "view": The level of detail to be
7056// returned. If unspecified, defaults to `View.BASIC`.
7057//
7058// Possible values:
7059//   "VIEW_UNSPECIFIED" - Default. Should not be used.
7060//   "BASIC" - Only basic resource information is returned.
7061//   "FULL" - All resource information is returned.
7062func (c *GroupsListCall) View(view string) *GroupsListCall {
7063	c.urlParams_.Set("view", view)
7064	return c
7065}
7066
7067// Fields allows partial responses to be retrieved. See
7068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7069// for more information.
7070func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall {
7071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7072	return c
7073}
7074
7075// IfNoneMatch sets the optional parameter which makes the operation
7076// fail if the object's ETag matches the given value. This is useful for
7077// getting updates only after the object has changed since the last
7078// request. Use googleapi.IsNotModified to check whether the response
7079// error from Do is the result of In-None-Match.
7080func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall {
7081	c.ifNoneMatch_ = entityTag
7082	return c
7083}
7084
7085// Context sets the context to be used in this call's Do method. Any
7086// pending HTTP request will be aborted if the provided context is
7087// canceled.
7088func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
7089	c.ctx_ = ctx
7090	return c
7091}
7092
7093// Header returns an http.Header that can be modified by the caller to
7094// add HTTP headers to the request.
7095func (c *GroupsListCall) Header() http.Header {
7096	if c.header_ == nil {
7097		c.header_ = make(http.Header)
7098	}
7099	return c.header_
7100}
7101
7102func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
7103	reqHeaders := make(http.Header)
7104	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7105	for k, v := range c.header_ {
7106		reqHeaders[k] = v
7107	}
7108	reqHeaders.Set("User-Agent", c.s.userAgent())
7109	if c.ifNoneMatch_ != "" {
7110		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7111	}
7112	var body io.Reader = nil
7113	c.urlParams_.Set("alt", alt)
7114	c.urlParams_.Set("prettyPrint", "false")
7115	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups")
7116	urls += "?" + c.urlParams_.Encode()
7117	req, err := http.NewRequest("GET", urls, body)
7118	if err != nil {
7119		return nil, err
7120	}
7121	req.Header = reqHeaders
7122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7123}
7124
7125// Do executes the "cloudidentity.groups.list" call.
7126// Exactly one of *ListGroupsResponse or error will be non-nil. Any
7127// non-2xx status code is an error. Response headers are in either
7128// *ListGroupsResponse.ServerResponse.Header or (if a response was
7129// returned at all) in error.(*googleapi.Error).Header. Use
7130// googleapi.IsNotModified to check whether the returned error was
7131// because http.StatusNotModified was returned.
7132func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
7133	gensupport.SetOptions(c.urlParams_, opts...)
7134	res, err := c.doRequest("json")
7135	if res != nil && res.StatusCode == http.StatusNotModified {
7136		if res.Body != nil {
7137			res.Body.Close()
7138		}
7139		return nil, &googleapi.Error{
7140			Code:   res.StatusCode,
7141			Header: res.Header,
7142		}
7143	}
7144	if err != nil {
7145		return nil, err
7146	}
7147	defer googleapi.CloseBody(res)
7148	if err := googleapi.CheckResponse(res); err != nil {
7149		return nil, err
7150	}
7151	ret := &ListGroupsResponse{
7152		ServerResponse: googleapi.ServerResponse{
7153			Header:         res.Header,
7154			HTTPStatusCode: res.StatusCode,
7155		},
7156	}
7157	target := &ret
7158	if err := gensupport.DecodeResponse(target, res); err != nil {
7159		return nil, err
7160	}
7161	return ret, nil
7162	// {
7163	//   "description": "Lists the `Group` resources under a customer or namespace.",
7164	//   "flatPath": "v1beta1/groups",
7165	//   "httpMethod": "GET",
7166	//   "id": "cloudidentity.groups.list",
7167	//   "parameterOrder": [],
7168	//   "parameters": {
7169	//     "pageSize": {
7170	//       "description": "The maximum number of results to return. Note that the number of results returned may be less than this value even if there are more available results. To fetch all results, clients must continue calling this method repeatedly until the response no longer contains a `next_page_token`. If unspecified, defaults to 200 for `View.BASIC` and to 50 for `View.FULL`. Must not be greater than 1000 for `View.BASIC` or 500 for `View.FULL`.",
7171	//       "format": "int32",
7172	//       "location": "query",
7173	//       "type": "integer"
7174	//     },
7175	//     "pageToken": {
7176	//       "description": "The `next_page_token` value returned from a previous list request, if any.",
7177	//       "location": "query",
7178	//       "type": "string"
7179	//     },
7180	//     "parent": {
7181	//       "description": "Required. The parent resource under which to list all `Group` resources. Must be of the form `identitysources/{identity_source_id}` for external- identity-mapped groups or `customers/{customer_id}` for Google Groups. The `customer_id` must begin with \"C\" (for example, 'C046psxkn').",
7182	//       "location": "query",
7183	//       "type": "string"
7184	//     },
7185	//     "view": {
7186	//       "description": "The level of detail to be returned. If unspecified, defaults to `View.BASIC`.",
7187	//       "enum": [
7188	//         "VIEW_UNSPECIFIED",
7189	//         "BASIC",
7190	//         "FULL"
7191	//       ],
7192	//       "enumDescriptions": [
7193	//         "Default. Should not be used.",
7194	//         "Only basic resource information is returned.",
7195	//         "All resource information is returned."
7196	//       ],
7197	//       "location": "query",
7198	//       "type": "string"
7199	//     }
7200	//   },
7201	//   "path": "v1beta1/groups",
7202	//   "response": {
7203	//     "$ref": "ListGroupsResponse"
7204	//   },
7205	//   "scopes": [
7206	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7207	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
7208	//     "https://www.googleapis.com/auth/cloud-platform"
7209	//   ]
7210	// }
7211
7212}
7213
7214// Pages invokes f for each page of results.
7215// A non-nil error returned from f will halt the iteration.
7216// The provided context supersedes any context provided to the Context method.
7217func (c *GroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
7218	c.ctx_ = ctx
7219	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7220	for {
7221		x, err := c.Do()
7222		if err != nil {
7223			return err
7224		}
7225		if err := f(x); err != nil {
7226			return err
7227		}
7228		if x.NextPageToken == "" {
7229			return nil
7230		}
7231		c.PageToken(x.NextPageToken)
7232	}
7233}
7234
7235// method id "cloudidentity.groups.lookup":
7236
7237type GroupsLookupCall struct {
7238	s            *Service
7239	urlParams_   gensupport.URLParams
7240	ifNoneMatch_ string
7241	ctx_         context.Context
7242	header_      http.Header
7243}
7244
7245// Lookup: Looks up the resource name
7246// (https://cloud.google.com/apis/design/resource_names) of a `Group` by
7247// its `EntityKey`.
7248func (r *GroupsService) Lookup() *GroupsLookupCall {
7249	c := &GroupsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7250	return c
7251}
7252
7253// GroupKeyId sets the optional parameter "groupKey.id": The ID of the
7254// entity. For Google-managed entities, the `id` must be the email
7255// address of an existing group or user. For external-identity-mapped
7256// entities, the `id` must be a string conforming to the Identity
7257// Source's requirements. Must be unique within a `namespace`.
7258func (c *GroupsLookupCall) GroupKeyId(groupKeyId string) *GroupsLookupCall {
7259	c.urlParams_.Set("groupKey.id", groupKeyId)
7260	return c
7261}
7262
7263// GroupKeyNamespace sets the optional parameter "groupKey.namespace":
7264// The namespace in which the entity exists. If not specified, the
7265// `EntityKey` represents a Google-managed entity such as a Google user
7266// or a Google Group. If specified, the `EntityKey` represents an
7267// external-identity-mapped group. The namespace must correspond to an
7268// identity source created in Admin Console and must be in the form of
7269// `identitysources/{identity_source_id}`.
7270func (c *GroupsLookupCall) GroupKeyNamespace(groupKeyNamespace string) *GroupsLookupCall {
7271	c.urlParams_.Set("groupKey.namespace", groupKeyNamespace)
7272	return c
7273}
7274
7275// Fields allows partial responses to be retrieved. See
7276// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7277// for more information.
7278func (c *GroupsLookupCall) Fields(s ...googleapi.Field) *GroupsLookupCall {
7279	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7280	return c
7281}
7282
7283// IfNoneMatch sets the optional parameter which makes the operation
7284// fail if the object's ETag matches the given value. This is useful for
7285// getting updates only after the object has changed since the last
7286// request. Use googleapi.IsNotModified to check whether the response
7287// error from Do is the result of In-None-Match.
7288func (c *GroupsLookupCall) IfNoneMatch(entityTag string) *GroupsLookupCall {
7289	c.ifNoneMatch_ = entityTag
7290	return c
7291}
7292
7293// Context sets the context to be used in this call's Do method. Any
7294// pending HTTP request will be aborted if the provided context is
7295// canceled.
7296func (c *GroupsLookupCall) Context(ctx context.Context) *GroupsLookupCall {
7297	c.ctx_ = ctx
7298	return c
7299}
7300
7301// Header returns an http.Header that can be modified by the caller to
7302// add HTTP headers to the request.
7303func (c *GroupsLookupCall) Header() http.Header {
7304	if c.header_ == nil {
7305		c.header_ = make(http.Header)
7306	}
7307	return c.header_
7308}
7309
7310func (c *GroupsLookupCall) doRequest(alt string) (*http.Response, error) {
7311	reqHeaders := make(http.Header)
7312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7313	for k, v := range c.header_ {
7314		reqHeaders[k] = v
7315	}
7316	reqHeaders.Set("User-Agent", c.s.userAgent())
7317	if c.ifNoneMatch_ != "" {
7318		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7319	}
7320	var body io.Reader = nil
7321	c.urlParams_.Set("alt", alt)
7322	c.urlParams_.Set("prettyPrint", "false")
7323	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups:lookup")
7324	urls += "?" + c.urlParams_.Encode()
7325	req, err := http.NewRequest("GET", urls, body)
7326	if err != nil {
7327		return nil, err
7328	}
7329	req.Header = reqHeaders
7330	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7331}
7332
7333// Do executes the "cloudidentity.groups.lookup" call.
7334// Exactly one of *LookupGroupNameResponse or error will be non-nil. Any
7335// non-2xx status code is an error. Response headers are in either
7336// *LookupGroupNameResponse.ServerResponse.Header or (if a response was
7337// returned at all) in error.(*googleapi.Error).Header. Use
7338// googleapi.IsNotModified to check whether the returned error was
7339// because http.StatusNotModified was returned.
7340func (c *GroupsLookupCall) Do(opts ...googleapi.CallOption) (*LookupGroupNameResponse, error) {
7341	gensupport.SetOptions(c.urlParams_, opts...)
7342	res, err := c.doRequest("json")
7343	if res != nil && res.StatusCode == http.StatusNotModified {
7344		if res.Body != nil {
7345			res.Body.Close()
7346		}
7347		return nil, &googleapi.Error{
7348			Code:   res.StatusCode,
7349			Header: res.Header,
7350		}
7351	}
7352	if err != nil {
7353		return nil, err
7354	}
7355	defer googleapi.CloseBody(res)
7356	if err := googleapi.CheckResponse(res); err != nil {
7357		return nil, err
7358	}
7359	ret := &LookupGroupNameResponse{
7360		ServerResponse: googleapi.ServerResponse{
7361			Header:         res.Header,
7362			HTTPStatusCode: res.StatusCode,
7363		},
7364	}
7365	target := &ret
7366	if err := gensupport.DecodeResponse(target, res); err != nil {
7367		return nil, err
7368	}
7369	return ret, nil
7370	// {
7371	//   "description": "Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Group` by its `EntityKey`.",
7372	//   "flatPath": "v1beta1/groups:lookup",
7373	//   "httpMethod": "GET",
7374	//   "id": "cloudidentity.groups.lookup",
7375	//   "parameterOrder": [],
7376	//   "parameters": {
7377	//     "groupKey.id": {
7378	//       "description": "The ID of the entity. For Google-managed entities, the `id` must be the email address of an existing group or user. For external-identity-mapped entities, the `id` must be a string conforming to the Identity Source's requirements. Must be unique within a `namespace`.",
7379	//       "location": "query",
7380	//       "type": "string"
7381	//     },
7382	//     "groupKey.namespace": {
7383	//       "description": "The namespace in which the entity exists. If not specified, the `EntityKey` represents a Google-managed entity such as a Google user or a Google Group. If specified, the `EntityKey` represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of `identitysources/{identity_source_id}`.",
7384	//       "location": "query",
7385	//       "type": "string"
7386	//     }
7387	//   },
7388	//   "path": "v1beta1/groups:lookup",
7389	//   "response": {
7390	//     "$ref": "LookupGroupNameResponse"
7391	//   },
7392	//   "scopes": [
7393	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7394	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
7395	//     "https://www.googleapis.com/auth/cloud-platform"
7396	//   ]
7397	// }
7398
7399}
7400
7401// method id "cloudidentity.groups.patch":
7402
7403type GroupsPatchCall struct {
7404	s          *Service
7405	name       string
7406	group      *Group
7407	urlParams_ gensupport.URLParams
7408	ctx_       context.Context
7409	header_    http.Header
7410}
7411
7412// Patch: Updates a `Group`.
7413//
7414// - name: Output only. The resource name
7415//   (https://cloud.google.com/apis/design/resource_names) of the
7416//   `Group`. Shall be of the form `groups/{group_id}`.
7417func (r *GroupsService) Patch(name string, group *Group) *GroupsPatchCall {
7418	c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7419	c.name = name
7420	c.group = group
7421	return c
7422}
7423
7424// UpdateMask sets the optional parameter "updateMask": Required. The
7425// names of fields to update. May only contain the following fields:
7426// `display_name`, `description`, `labels`, `dynamic_group_metadata`,
7427// `posix_groups`.
7428func (c *GroupsPatchCall) UpdateMask(updateMask string) *GroupsPatchCall {
7429	c.urlParams_.Set("updateMask", updateMask)
7430	return c
7431}
7432
7433// Fields allows partial responses to be retrieved. See
7434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7435// for more information.
7436func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
7437	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7438	return c
7439}
7440
7441// Context sets the context to be used in this call's Do method. Any
7442// pending HTTP request will be aborted if the provided context is
7443// canceled.
7444func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
7445	c.ctx_ = ctx
7446	return c
7447}
7448
7449// Header returns an http.Header that can be modified by the caller to
7450// add HTTP headers to the request.
7451func (c *GroupsPatchCall) Header() http.Header {
7452	if c.header_ == nil {
7453		c.header_ = make(http.Header)
7454	}
7455	return c.header_
7456}
7457
7458func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
7459	reqHeaders := make(http.Header)
7460	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7461	for k, v := range c.header_ {
7462		reqHeaders[k] = v
7463	}
7464	reqHeaders.Set("User-Agent", c.s.userAgent())
7465	var body io.Reader = nil
7466	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
7467	if err != nil {
7468		return nil, err
7469	}
7470	reqHeaders.Set("Content-Type", "application/json")
7471	c.urlParams_.Set("alt", alt)
7472	c.urlParams_.Set("prettyPrint", "false")
7473	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
7474	urls += "?" + c.urlParams_.Encode()
7475	req, err := http.NewRequest("PATCH", urls, body)
7476	if err != nil {
7477		return nil, err
7478	}
7479	req.Header = reqHeaders
7480	googleapi.Expand(req.URL, map[string]string{
7481		"name": c.name,
7482	})
7483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7484}
7485
7486// Do executes the "cloudidentity.groups.patch" call.
7487// Exactly one of *Operation or error will be non-nil. Any non-2xx
7488// status code is an error. Response headers are in either
7489// *Operation.ServerResponse.Header or (if a response was returned at
7490// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7491// to check whether the returned error was because
7492// http.StatusNotModified was returned.
7493func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7494	gensupport.SetOptions(c.urlParams_, opts...)
7495	res, err := c.doRequest("json")
7496	if res != nil && res.StatusCode == http.StatusNotModified {
7497		if res.Body != nil {
7498			res.Body.Close()
7499		}
7500		return nil, &googleapi.Error{
7501			Code:   res.StatusCode,
7502			Header: res.Header,
7503		}
7504	}
7505	if err != nil {
7506		return nil, err
7507	}
7508	defer googleapi.CloseBody(res)
7509	if err := googleapi.CheckResponse(res); err != nil {
7510		return nil, err
7511	}
7512	ret := &Operation{
7513		ServerResponse: googleapi.ServerResponse{
7514			Header:         res.Header,
7515			HTTPStatusCode: res.StatusCode,
7516		},
7517	}
7518	target := &ret
7519	if err := gensupport.DecodeResponse(target, res); err != nil {
7520		return nil, err
7521	}
7522	return ret, nil
7523	// {
7524	//   "description": "Updates a `Group`.",
7525	//   "flatPath": "v1beta1/groups/{groupsId}",
7526	//   "httpMethod": "PATCH",
7527	//   "id": "cloudidentity.groups.patch",
7528	//   "parameterOrder": [
7529	//     "name"
7530	//   ],
7531	//   "parameters": {
7532	//     "name": {
7533	//       "description": "Output only. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Group`. Shall be of the form `groups/{group_id}`.",
7534	//       "location": "path",
7535	//       "pattern": "^groups/[^/]+$",
7536	//       "required": true,
7537	//       "type": "string"
7538	//     },
7539	//     "updateMask": {
7540	//       "description": "Required. The names of fields to update. May only contain the following fields: `display_name`, `description`, `labels`, `dynamic_group_metadata`, `posix_groups`.",
7541	//       "format": "google-fieldmask",
7542	//       "location": "query",
7543	//       "type": "string"
7544	//     }
7545	//   },
7546	//   "path": "v1beta1/{+name}",
7547	//   "request": {
7548	//     "$ref": "Group"
7549	//   },
7550	//   "response": {
7551	//     "$ref": "Operation"
7552	//   },
7553	//   "scopes": [
7554	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7555	//     "https://www.googleapis.com/auth/cloud-platform"
7556	//   ]
7557	// }
7558
7559}
7560
7561// method id "cloudidentity.groups.search":
7562
7563type GroupsSearchCall struct {
7564	s            *Service
7565	urlParams_   gensupport.URLParams
7566	ifNoneMatch_ string
7567	ctx_         context.Context
7568	header_      http.Header
7569}
7570
7571// Search: Searches for `Group` resources matching a specified query.
7572func (r *GroupsService) Search() *GroupsSearchCall {
7573	c := &GroupsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7574	return c
7575}
7576
7577// PageSize sets the optional parameter "pageSize": The maximum number
7578// of results to return. Note that the number of results returned may be
7579// less than this value even if there are more available results. To
7580// fetch all results, clients must continue calling this method
7581// repeatedly until the response no longer contains a `next_page_token`.
7582// If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for
7583// `GroupView.FULL`. Must not be greater than 1000 for `GroupView.BASIC`
7584// or 500 for `GroupView.FULL`.
7585func (c *GroupsSearchCall) PageSize(pageSize int64) *GroupsSearchCall {
7586	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7587	return c
7588}
7589
7590// PageToken sets the optional parameter "pageToken": The
7591// `next_page_token` value returned from a previous search request, if
7592// any.
7593func (c *GroupsSearchCall) PageToken(pageToken string) *GroupsSearchCall {
7594	c.urlParams_.Set("pageToken", pageToken)
7595	return c
7596}
7597
7598// Query sets the optional parameter "query": Required. The search
7599// query. Must be specified in Common Expression Language
7600// (https://opensource.google/projects/cel). May only contain equality
7601// operators on the parent and inclusion operators on labels (e.g.,
7602// `parent == 'customers/{customer_id}' &&
7603// 'cloudidentity.googleapis.com/groups.discussion_forum' in labels`).
7604// The `customer_id` must begin with "C" (for example, 'C046psxkn').
7605func (c *GroupsSearchCall) Query(query string) *GroupsSearchCall {
7606	c.urlParams_.Set("query", query)
7607	return c
7608}
7609
7610// View sets the optional parameter "view": The level of detail to be
7611// returned. If unspecified, defaults to `View.BASIC`.
7612//
7613// Possible values:
7614//   "BASIC" - Default. Only basic resource information is returned.
7615//   "FULL" - All resource information is returned.
7616func (c *GroupsSearchCall) View(view string) *GroupsSearchCall {
7617	c.urlParams_.Set("view", view)
7618	return c
7619}
7620
7621// Fields allows partial responses to be retrieved. See
7622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7623// for more information.
7624func (c *GroupsSearchCall) Fields(s ...googleapi.Field) *GroupsSearchCall {
7625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7626	return c
7627}
7628
7629// IfNoneMatch sets the optional parameter which makes the operation
7630// fail if the object's ETag matches the given value. This is useful for
7631// getting updates only after the object has changed since the last
7632// request. Use googleapi.IsNotModified to check whether the response
7633// error from Do is the result of In-None-Match.
7634func (c *GroupsSearchCall) IfNoneMatch(entityTag string) *GroupsSearchCall {
7635	c.ifNoneMatch_ = entityTag
7636	return c
7637}
7638
7639// Context sets the context to be used in this call's Do method. Any
7640// pending HTTP request will be aborted if the provided context is
7641// canceled.
7642func (c *GroupsSearchCall) Context(ctx context.Context) *GroupsSearchCall {
7643	c.ctx_ = ctx
7644	return c
7645}
7646
7647// Header returns an http.Header that can be modified by the caller to
7648// add HTTP headers to the request.
7649func (c *GroupsSearchCall) Header() http.Header {
7650	if c.header_ == nil {
7651		c.header_ = make(http.Header)
7652	}
7653	return c.header_
7654}
7655
7656func (c *GroupsSearchCall) doRequest(alt string) (*http.Response, error) {
7657	reqHeaders := make(http.Header)
7658	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7659	for k, v := range c.header_ {
7660		reqHeaders[k] = v
7661	}
7662	reqHeaders.Set("User-Agent", c.s.userAgent())
7663	if c.ifNoneMatch_ != "" {
7664		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7665	}
7666	var body io.Reader = nil
7667	c.urlParams_.Set("alt", alt)
7668	c.urlParams_.Set("prettyPrint", "false")
7669	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups:search")
7670	urls += "?" + c.urlParams_.Encode()
7671	req, err := http.NewRequest("GET", urls, body)
7672	if err != nil {
7673		return nil, err
7674	}
7675	req.Header = reqHeaders
7676	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7677}
7678
7679// Do executes the "cloudidentity.groups.search" call.
7680// Exactly one of *SearchGroupsResponse or error will be non-nil. Any
7681// non-2xx status code is an error. Response headers are in either
7682// *SearchGroupsResponse.ServerResponse.Header or (if a response was
7683// returned at all) in error.(*googleapi.Error).Header. Use
7684// googleapi.IsNotModified to check whether the returned error was
7685// because http.StatusNotModified was returned.
7686func (c *GroupsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGroupsResponse, error) {
7687	gensupport.SetOptions(c.urlParams_, opts...)
7688	res, err := c.doRequest("json")
7689	if res != nil && res.StatusCode == http.StatusNotModified {
7690		if res.Body != nil {
7691			res.Body.Close()
7692		}
7693		return nil, &googleapi.Error{
7694			Code:   res.StatusCode,
7695			Header: res.Header,
7696		}
7697	}
7698	if err != nil {
7699		return nil, err
7700	}
7701	defer googleapi.CloseBody(res)
7702	if err := googleapi.CheckResponse(res); err != nil {
7703		return nil, err
7704	}
7705	ret := &SearchGroupsResponse{
7706		ServerResponse: googleapi.ServerResponse{
7707			Header:         res.Header,
7708			HTTPStatusCode: res.StatusCode,
7709		},
7710	}
7711	target := &ret
7712	if err := gensupport.DecodeResponse(target, res); err != nil {
7713		return nil, err
7714	}
7715	return ret, nil
7716	// {
7717	//   "description": "Searches for `Group` resources matching a specified query.",
7718	//   "flatPath": "v1beta1/groups:search",
7719	//   "httpMethod": "GET",
7720	//   "id": "cloudidentity.groups.search",
7721	//   "parameterOrder": [],
7722	//   "parameters": {
7723	//     "pageSize": {
7724	//       "description": "The maximum number of results to return. Note that the number of results returned may be less than this value even if there are more available results. To fetch all results, clients must continue calling this method repeatedly until the response no longer contains a `next_page_token`. If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for `GroupView.FULL`. Must not be greater than 1000 for `GroupView.BASIC` or 500 for `GroupView.FULL`.",
7725	//       "format": "int32",
7726	//       "location": "query",
7727	//       "type": "integer"
7728	//     },
7729	//     "pageToken": {
7730	//       "description": "The `next_page_token` value returned from a previous search request, if any.",
7731	//       "location": "query",
7732	//       "type": "string"
7733	//     },
7734	//     "query": {
7735	//       "description": "Required. The search query. Must be specified in [Common Expression Language](https://opensource.google/projects/cel). May only contain equality operators on the parent and inclusion operators on labels (e.g., `parent == 'customers/{customer_id}' \u0026\u0026 'cloudidentity.googleapis.com/groups.discussion_forum' in labels`). The `customer_id` must begin with \"C\" (for example, 'C046psxkn').",
7736	//       "location": "query",
7737	//       "type": "string"
7738	//     },
7739	//     "view": {
7740	//       "description": "The level of detail to be returned. If unspecified, defaults to `View.BASIC`.",
7741	//       "enum": [
7742	//         "BASIC",
7743	//         "FULL"
7744	//       ],
7745	//       "enumDescriptions": [
7746	//         "Default. Only basic resource information is returned.",
7747	//         "All resource information is returned."
7748	//       ],
7749	//       "location": "query",
7750	//       "type": "string"
7751	//     }
7752	//   },
7753	//   "path": "v1beta1/groups:search",
7754	//   "response": {
7755	//     "$ref": "SearchGroupsResponse"
7756	//   },
7757	//   "scopes": [
7758	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7759	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
7760	//     "https://www.googleapis.com/auth/cloud-platform"
7761	//   ]
7762	// }
7763
7764}
7765
7766// Pages invokes f for each page of results.
7767// A non-nil error returned from f will halt the iteration.
7768// The provided context supersedes any context provided to the Context method.
7769func (c *GroupsSearchCall) Pages(ctx context.Context, f func(*SearchGroupsResponse) error) error {
7770	c.ctx_ = ctx
7771	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7772	for {
7773		x, err := c.Do()
7774		if err != nil {
7775			return err
7776		}
7777		if err := f(x); err != nil {
7778			return err
7779		}
7780		if x.NextPageToken == "" {
7781			return nil
7782		}
7783		c.PageToken(x.NextPageToken)
7784	}
7785}
7786
7787// method id "cloudidentity.groups.memberships.checkTransitiveMembership":
7788
7789type GroupsMembershipsCheckTransitiveMembershipCall struct {
7790	s            *Service
7791	parent       string
7792	urlParams_   gensupport.URLParams
7793	ifNoneMatch_ string
7794	ctx_         context.Context
7795	header_      http.Header
7796}
7797
7798// CheckTransitiveMembership: Check a potential member for membership in
7799// a group. **Note:** This feature is only available to Google Workspace
7800// Enterprise Standard, Enterprise Plus, and Enterprise for Education;
7801// and Cloud Identity Premium accounts. A member has membership to a
7802// group as long as there is a single viewable transitive membership
7803// between the group and the member. The actor must have view
7804// permissions to at least one transitive membership between the member
7805// and group.
7806//
7807// - parent: Resource name
7808//   (https://cloud.google.com/apis/design/resource_names) of the group
7809//   to check the transitive membership in. Format: `groups/{group_id}`,
7810//   where `group_id` is the unique id assigned to the Group to which
7811//   the Membership belongs to.
7812func (r *GroupsMembershipsService) CheckTransitiveMembership(parent string) *GroupsMembershipsCheckTransitiveMembershipCall {
7813	c := &GroupsMembershipsCheckTransitiveMembershipCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7814	c.parent = parent
7815	return c
7816}
7817
7818// Query sets the optional parameter "query": Required. A CEL expression
7819// that MUST include member specification. This is a `required` field.
7820// Certain groups are uniquely identified by both a 'member_key_id' and
7821// a 'member_key_namespace', which requires an additional query input:
7822// 'member_key_namespace'. Example query: `member_key_id ==
7823// 'member_key_id_value'`
7824func (c *GroupsMembershipsCheckTransitiveMembershipCall) Query(query string) *GroupsMembershipsCheckTransitiveMembershipCall {
7825	c.urlParams_.Set("query", query)
7826	return c
7827}
7828
7829// Fields allows partial responses to be retrieved. See
7830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7831// for more information.
7832func (c *GroupsMembershipsCheckTransitiveMembershipCall) Fields(s ...googleapi.Field) *GroupsMembershipsCheckTransitiveMembershipCall {
7833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7834	return c
7835}
7836
7837// IfNoneMatch sets the optional parameter which makes the operation
7838// fail if the object's ETag matches the given value. This is useful for
7839// getting updates only after the object has changed since the last
7840// request. Use googleapi.IsNotModified to check whether the response
7841// error from Do is the result of In-None-Match.
7842func (c *GroupsMembershipsCheckTransitiveMembershipCall) IfNoneMatch(entityTag string) *GroupsMembershipsCheckTransitiveMembershipCall {
7843	c.ifNoneMatch_ = entityTag
7844	return c
7845}
7846
7847// Context sets the context to be used in this call's Do method. Any
7848// pending HTTP request will be aborted if the provided context is
7849// canceled.
7850func (c *GroupsMembershipsCheckTransitiveMembershipCall) Context(ctx context.Context) *GroupsMembershipsCheckTransitiveMembershipCall {
7851	c.ctx_ = ctx
7852	return c
7853}
7854
7855// Header returns an http.Header that can be modified by the caller to
7856// add HTTP headers to the request.
7857func (c *GroupsMembershipsCheckTransitiveMembershipCall) Header() http.Header {
7858	if c.header_ == nil {
7859		c.header_ = make(http.Header)
7860	}
7861	return c.header_
7862}
7863
7864func (c *GroupsMembershipsCheckTransitiveMembershipCall) doRequest(alt string) (*http.Response, error) {
7865	reqHeaders := make(http.Header)
7866	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
7867	for k, v := range c.header_ {
7868		reqHeaders[k] = v
7869	}
7870	reqHeaders.Set("User-Agent", c.s.userAgent())
7871	if c.ifNoneMatch_ != "" {
7872		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7873	}
7874	var body io.Reader = nil
7875	c.urlParams_.Set("alt", alt)
7876	c.urlParams_.Set("prettyPrint", "false")
7877	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:checkTransitiveMembership")
7878	urls += "?" + c.urlParams_.Encode()
7879	req, err := http.NewRequest("GET", urls, body)
7880	if err != nil {
7881		return nil, err
7882	}
7883	req.Header = reqHeaders
7884	googleapi.Expand(req.URL, map[string]string{
7885		"parent": c.parent,
7886	})
7887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7888}
7889
7890// Do executes the "cloudidentity.groups.memberships.checkTransitiveMembership" call.
7891// Exactly one of *CheckTransitiveMembershipResponse or error will be
7892// non-nil. Any non-2xx status code is an error. Response headers are in
7893// either *CheckTransitiveMembershipResponse.ServerResponse.Header or
7894// (if a response was returned at all) in
7895// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7896// whether the returned error was because http.StatusNotModified was
7897// returned.
7898func (c *GroupsMembershipsCheckTransitiveMembershipCall) Do(opts ...googleapi.CallOption) (*CheckTransitiveMembershipResponse, error) {
7899	gensupport.SetOptions(c.urlParams_, opts...)
7900	res, err := c.doRequest("json")
7901	if res != nil && res.StatusCode == http.StatusNotModified {
7902		if res.Body != nil {
7903			res.Body.Close()
7904		}
7905		return nil, &googleapi.Error{
7906			Code:   res.StatusCode,
7907			Header: res.Header,
7908		}
7909	}
7910	if err != nil {
7911		return nil, err
7912	}
7913	defer googleapi.CloseBody(res)
7914	if err := googleapi.CheckResponse(res); err != nil {
7915		return nil, err
7916	}
7917	ret := &CheckTransitiveMembershipResponse{
7918		ServerResponse: googleapi.ServerResponse{
7919			Header:         res.Header,
7920			HTTPStatusCode: res.StatusCode,
7921		},
7922	}
7923	target := &ret
7924	if err := gensupport.DecodeResponse(target, res); err != nil {
7925		return nil, err
7926	}
7927	return ret, nil
7928	// {
7929	//   "description": "Check a potential member for membership in a group. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. A member has membership to a group as long as there is a single viewable transitive membership between the group and the member. The actor must have view permissions to at least one transitive membership between the member and group.",
7930	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:checkTransitiveMembership",
7931	//   "httpMethod": "GET",
7932	//   "id": "cloudidentity.groups.memberships.checkTransitiveMembership",
7933	//   "parameterOrder": [
7934	//     "parent"
7935	//   ],
7936	//   "parameters": {
7937	//     "parent": {
7938	//       "description": "[Resource name](https://cloud.google.com/apis/design/resource_names) of the group to check the transitive membership in. Format: `groups/{group_id}`, where `group_id` is the unique id assigned to the Group to which the Membership belongs to.",
7939	//       "location": "path",
7940	//       "pattern": "^groups/[^/]+$",
7941	//       "required": true,
7942	//       "type": "string"
7943	//     },
7944	//     "query": {
7945	//       "description": "Required. A CEL expression that MUST include member specification. This is a `required` field. Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. Example query: `member_key_id == 'member_key_id_value'`",
7946	//       "location": "query",
7947	//       "type": "string"
7948	//     }
7949	//   },
7950	//   "path": "v1beta1/{+parent}/memberships:checkTransitiveMembership",
7951	//   "response": {
7952	//     "$ref": "CheckTransitiveMembershipResponse"
7953	//   },
7954	//   "scopes": [
7955	//     "https://www.googleapis.com/auth/cloud-identity.groups",
7956	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
7957	//     "https://www.googleapis.com/auth/cloud-platform"
7958	//   ]
7959	// }
7960
7961}
7962
7963// method id "cloudidentity.groups.memberships.create":
7964
7965type GroupsMembershipsCreateCall struct {
7966	s          *Service
7967	parent     string
7968	membership *Membership
7969	urlParams_ gensupport.URLParams
7970	ctx_       context.Context
7971	header_    http.Header
7972}
7973
7974// Create: Creates a `Membership`.
7975//
7976// - parent: The parent `Group` resource under which to create the
7977//   `Membership`. Must be of the form `groups/{group_id}`.
7978func (r *GroupsMembershipsService) Create(parent string, membership *Membership) *GroupsMembershipsCreateCall {
7979	c := &GroupsMembershipsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7980	c.parent = parent
7981	c.membership = membership
7982	return c
7983}
7984
7985// Fields allows partial responses to be retrieved. See
7986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7987// for more information.
7988func (c *GroupsMembershipsCreateCall) Fields(s ...googleapi.Field) *GroupsMembershipsCreateCall {
7989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7990	return c
7991}
7992
7993// Context sets the context to be used in this call's Do method. Any
7994// pending HTTP request will be aborted if the provided context is
7995// canceled.
7996func (c *GroupsMembershipsCreateCall) Context(ctx context.Context) *GroupsMembershipsCreateCall {
7997	c.ctx_ = ctx
7998	return c
7999}
8000
8001// Header returns an http.Header that can be modified by the caller to
8002// add HTTP headers to the request.
8003func (c *GroupsMembershipsCreateCall) Header() http.Header {
8004	if c.header_ == nil {
8005		c.header_ = make(http.Header)
8006	}
8007	return c.header_
8008}
8009
8010func (c *GroupsMembershipsCreateCall) doRequest(alt string) (*http.Response, error) {
8011	reqHeaders := make(http.Header)
8012	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8013	for k, v := range c.header_ {
8014		reqHeaders[k] = v
8015	}
8016	reqHeaders.Set("User-Agent", c.s.userAgent())
8017	var body io.Reader = nil
8018	body, err := googleapi.WithoutDataWrapper.JSONReader(c.membership)
8019	if err != nil {
8020		return nil, err
8021	}
8022	reqHeaders.Set("Content-Type", "application/json")
8023	c.urlParams_.Set("alt", alt)
8024	c.urlParams_.Set("prettyPrint", "false")
8025	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships")
8026	urls += "?" + c.urlParams_.Encode()
8027	req, err := http.NewRequest("POST", urls, body)
8028	if err != nil {
8029		return nil, err
8030	}
8031	req.Header = reqHeaders
8032	googleapi.Expand(req.URL, map[string]string{
8033		"parent": c.parent,
8034	})
8035	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8036}
8037
8038// Do executes the "cloudidentity.groups.memberships.create" call.
8039// Exactly one of *Operation or error will be non-nil. Any non-2xx
8040// status code is an error. Response headers are in either
8041// *Operation.ServerResponse.Header or (if a response was returned at
8042// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8043// to check whether the returned error was because
8044// http.StatusNotModified was returned.
8045func (c *GroupsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8046	gensupport.SetOptions(c.urlParams_, opts...)
8047	res, err := c.doRequest("json")
8048	if res != nil && res.StatusCode == http.StatusNotModified {
8049		if res.Body != nil {
8050			res.Body.Close()
8051		}
8052		return nil, &googleapi.Error{
8053			Code:   res.StatusCode,
8054			Header: res.Header,
8055		}
8056	}
8057	if err != nil {
8058		return nil, err
8059	}
8060	defer googleapi.CloseBody(res)
8061	if err := googleapi.CheckResponse(res); err != nil {
8062		return nil, err
8063	}
8064	ret := &Operation{
8065		ServerResponse: googleapi.ServerResponse{
8066			Header:         res.Header,
8067			HTTPStatusCode: res.StatusCode,
8068		},
8069	}
8070	target := &ret
8071	if err := gensupport.DecodeResponse(target, res); err != nil {
8072		return nil, err
8073	}
8074	return ret, nil
8075	// {
8076	//   "description": "Creates a `Membership`.",
8077	//   "flatPath": "v1beta1/groups/{groupsId}/memberships",
8078	//   "httpMethod": "POST",
8079	//   "id": "cloudidentity.groups.memberships.create",
8080	//   "parameterOrder": [
8081	//     "parent"
8082	//   ],
8083	//   "parameters": {
8084	//     "parent": {
8085	//       "description": "Required. The parent `Group` resource under which to create the `Membership`. Must be of the form `groups/{group_id}`.",
8086	//       "location": "path",
8087	//       "pattern": "^groups/[^/]+$",
8088	//       "required": true,
8089	//       "type": "string"
8090	//     }
8091	//   },
8092	//   "path": "v1beta1/{+parent}/memberships",
8093	//   "request": {
8094	//     "$ref": "Membership"
8095	//   },
8096	//   "response": {
8097	//     "$ref": "Operation"
8098	//   },
8099	//   "scopes": [
8100	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8101	//     "https://www.googleapis.com/auth/cloud-platform"
8102	//   ]
8103	// }
8104
8105}
8106
8107// method id "cloudidentity.groups.memberships.delete":
8108
8109type GroupsMembershipsDeleteCall struct {
8110	s          *Service
8111	name       string
8112	urlParams_ gensupport.URLParams
8113	ctx_       context.Context
8114	header_    http.Header
8115}
8116
8117// Delete: Deletes a `Membership`.
8118//
8119// - name: The resource name
8120//   (https://cloud.google.com/apis/design/resource_names) of the
8121//   `Membership` to delete. Must be of the form
8122//   `groups/{group_id}/memberships/{membership_id}`.
8123func (r *GroupsMembershipsService) Delete(name string) *GroupsMembershipsDeleteCall {
8124	c := &GroupsMembershipsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8125	c.name = name
8126	return c
8127}
8128
8129// Fields allows partial responses to be retrieved. See
8130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8131// for more information.
8132func (c *GroupsMembershipsDeleteCall) Fields(s ...googleapi.Field) *GroupsMembershipsDeleteCall {
8133	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8134	return c
8135}
8136
8137// Context sets the context to be used in this call's Do method. Any
8138// pending HTTP request will be aborted if the provided context is
8139// canceled.
8140func (c *GroupsMembershipsDeleteCall) Context(ctx context.Context) *GroupsMembershipsDeleteCall {
8141	c.ctx_ = ctx
8142	return c
8143}
8144
8145// Header returns an http.Header that can be modified by the caller to
8146// add HTTP headers to the request.
8147func (c *GroupsMembershipsDeleteCall) Header() http.Header {
8148	if c.header_ == nil {
8149		c.header_ = make(http.Header)
8150	}
8151	return c.header_
8152}
8153
8154func (c *GroupsMembershipsDeleteCall) doRequest(alt string) (*http.Response, error) {
8155	reqHeaders := make(http.Header)
8156	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8157	for k, v := range c.header_ {
8158		reqHeaders[k] = v
8159	}
8160	reqHeaders.Set("User-Agent", c.s.userAgent())
8161	var body io.Reader = nil
8162	c.urlParams_.Set("alt", alt)
8163	c.urlParams_.Set("prettyPrint", "false")
8164	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8165	urls += "?" + c.urlParams_.Encode()
8166	req, err := http.NewRequest("DELETE", urls, body)
8167	if err != nil {
8168		return nil, err
8169	}
8170	req.Header = reqHeaders
8171	googleapi.Expand(req.URL, map[string]string{
8172		"name": c.name,
8173	})
8174	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8175}
8176
8177// Do executes the "cloudidentity.groups.memberships.delete" call.
8178// Exactly one of *Operation or error will be non-nil. Any non-2xx
8179// status code is an error. Response headers are in either
8180// *Operation.ServerResponse.Header or (if a response was returned at
8181// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8182// to check whether the returned error was because
8183// http.StatusNotModified was returned.
8184func (c *GroupsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8185	gensupport.SetOptions(c.urlParams_, opts...)
8186	res, err := c.doRequest("json")
8187	if res != nil && res.StatusCode == http.StatusNotModified {
8188		if res.Body != nil {
8189			res.Body.Close()
8190		}
8191		return nil, &googleapi.Error{
8192			Code:   res.StatusCode,
8193			Header: res.Header,
8194		}
8195	}
8196	if err != nil {
8197		return nil, err
8198	}
8199	defer googleapi.CloseBody(res)
8200	if err := googleapi.CheckResponse(res); err != nil {
8201		return nil, err
8202	}
8203	ret := &Operation{
8204		ServerResponse: googleapi.ServerResponse{
8205			Header:         res.Header,
8206			HTTPStatusCode: res.StatusCode,
8207		},
8208	}
8209	target := &ret
8210	if err := gensupport.DecodeResponse(target, res); err != nil {
8211		return nil, err
8212	}
8213	return ret, nil
8214	// {
8215	//   "description": "Deletes a `Membership`.",
8216	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}",
8217	//   "httpMethod": "DELETE",
8218	//   "id": "cloudidentity.groups.memberships.delete",
8219	//   "parameterOrder": [
8220	//     "name"
8221	//   ],
8222	//   "parameters": {
8223	//     "name": {
8224	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Membership` to delete. Must be of the form `groups/{group_id}/memberships/{membership_id}`.",
8225	//       "location": "path",
8226	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
8227	//       "required": true,
8228	//       "type": "string"
8229	//     }
8230	//   },
8231	//   "path": "v1beta1/{+name}",
8232	//   "response": {
8233	//     "$ref": "Operation"
8234	//   },
8235	//   "scopes": [
8236	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8237	//     "https://www.googleapis.com/auth/cloud-platform"
8238	//   ]
8239	// }
8240
8241}
8242
8243// method id "cloudidentity.groups.memberships.get":
8244
8245type GroupsMembershipsGetCall struct {
8246	s            *Service
8247	name         string
8248	urlParams_   gensupport.URLParams
8249	ifNoneMatch_ string
8250	ctx_         context.Context
8251	header_      http.Header
8252}
8253
8254// Get: Retrieves a `Membership`.
8255//
8256// - name: The resource name
8257//   (https://cloud.google.com/apis/design/resource_names) of the
8258//   `Membership` to retrieve. Must be of the form
8259//   `groups/{group_id}/memberships/{membership_id}`.
8260func (r *GroupsMembershipsService) Get(name string) *GroupsMembershipsGetCall {
8261	c := &GroupsMembershipsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8262	c.name = name
8263	return c
8264}
8265
8266// Fields allows partial responses to be retrieved. See
8267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8268// for more information.
8269func (c *GroupsMembershipsGetCall) Fields(s ...googleapi.Field) *GroupsMembershipsGetCall {
8270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8271	return c
8272}
8273
8274// IfNoneMatch sets the optional parameter which makes the operation
8275// fail if the object's ETag matches the given value. This is useful for
8276// getting updates only after the object has changed since the last
8277// request. Use googleapi.IsNotModified to check whether the response
8278// error from Do is the result of In-None-Match.
8279func (c *GroupsMembershipsGetCall) IfNoneMatch(entityTag string) *GroupsMembershipsGetCall {
8280	c.ifNoneMatch_ = entityTag
8281	return c
8282}
8283
8284// Context sets the context to be used in this call's Do method. Any
8285// pending HTTP request will be aborted if the provided context is
8286// canceled.
8287func (c *GroupsMembershipsGetCall) Context(ctx context.Context) *GroupsMembershipsGetCall {
8288	c.ctx_ = ctx
8289	return c
8290}
8291
8292// Header returns an http.Header that can be modified by the caller to
8293// add HTTP headers to the request.
8294func (c *GroupsMembershipsGetCall) Header() http.Header {
8295	if c.header_ == nil {
8296		c.header_ = make(http.Header)
8297	}
8298	return c.header_
8299}
8300
8301func (c *GroupsMembershipsGetCall) doRequest(alt string) (*http.Response, error) {
8302	reqHeaders := make(http.Header)
8303	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8304	for k, v := range c.header_ {
8305		reqHeaders[k] = v
8306	}
8307	reqHeaders.Set("User-Agent", c.s.userAgent())
8308	if c.ifNoneMatch_ != "" {
8309		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8310	}
8311	var body io.Reader = nil
8312	c.urlParams_.Set("alt", alt)
8313	c.urlParams_.Set("prettyPrint", "false")
8314	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
8315	urls += "?" + c.urlParams_.Encode()
8316	req, err := http.NewRequest("GET", urls, body)
8317	if err != nil {
8318		return nil, err
8319	}
8320	req.Header = reqHeaders
8321	googleapi.Expand(req.URL, map[string]string{
8322		"name": c.name,
8323	})
8324	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8325}
8326
8327// Do executes the "cloudidentity.groups.memberships.get" call.
8328// Exactly one of *Membership or error will be non-nil. Any non-2xx
8329// status code is an error. Response headers are in either
8330// *Membership.ServerResponse.Header or (if a response was returned at
8331// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8332// to check whether the returned error was because
8333// http.StatusNotModified was returned.
8334func (c *GroupsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
8335	gensupport.SetOptions(c.urlParams_, opts...)
8336	res, err := c.doRequest("json")
8337	if res != nil && res.StatusCode == http.StatusNotModified {
8338		if res.Body != nil {
8339			res.Body.Close()
8340		}
8341		return nil, &googleapi.Error{
8342			Code:   res.StatusCode,
8343			Header: res.Header,
8344		}
8345	}
8346	if err != nil {
8347		return nil, err
8348	}
8349	defer googleapi.CloseBody(res)
8350	if err := googleapi.CheckResponse(res); err != nil {
8351		return nil, err
8352	}
8353	ret := &Membership{
8354		ServerResponse: googleapi.ServerResponse{
8355			Header:         res.Header,
8356			HTTPStatusCode: res.StatusCode,
8357		},
8358	}
8359	target := &ret
8360	if err := gensupport.DecodeResponse(target, res); err != nil {
8361		return nil, err
8362	}
8363	return ret, nil
8364	// {
8365	//   "description": "Retrieves a `Membership`.",
8366	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}",
8367	//   "httpMethod": "GET",
8368	//   "id": "cloudidentity.groups.memberships.get",
8369	//   "parameterOrder": [
8370	//     "name"
8371	//   ],
8372	//   "parameters": {
8373	//     "name": {
8374	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Membership` to retrieve. Must be of the form `groups/{group_id}/memberships/{membership_id}`.",
8375	//       "location": "path",
8376	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
8377	//       "required": true,
8378	//       "type": "string"
8379	//     }
8380	//   },
8381	//   "path": "v1beta1/{+name}",
8382	//   "response": {
8383	//     "$ref": "Membership"
8384	//   },
8385	//   "scopes": [
8386	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8387	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
8388	//     "https://www.googleapis.com/auth/cloud-platform"
8389	//   ]
8390	// }
8391
8392}
8393
8394// method id "cloudidentity.groups.memberships.getMembershipGraph":
8395
8396type GroupsMembershipsGetMembershipGraphCall struct {
8397	s            *Service
8398	parent       string
8399	urlParams_   gensupport.URLParams
8400	ifNoneMatch_ string
8401	ctx_         context.Context
8402	header_      http.Header
8403}
8404
8405// GetMembershipGraph: Get a membership graph of just a member or both a
8406// member and a group. **Note:** This feature is only available to
8407// Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise
8408// for Education; and Cloud Identity Premium accounts. Given a member,
8409// the response will contain all membership paths from the member. Given
8410// both a group and a member, the response will contain all membership
8411// paths between the group and the member.
8412//
8413// - parent: Resource name
8414//   (https://cloud.google.com/apis/design/resource_names) of the group
8415//   to search transitive memberships in. Format: `groups/{group_id}`,
8416//   where `group_id` is the unique ID assigned to the Group to which
8417//   the Membership belongs to. group_id can be a wildcard collection id
8418//   "-". When a group_id is specified, the membership graph will be
8419//   constrained to paths between the member (defined in the query) and
8420//   the parent. If a wildcard collection is provided, all membership
8421//   paths connected to the member will be returned.
8422func (r *GroupsMembershipsService) GetMembershipGraph(parent string) *GroupsMembershipsGetMembershipGraphCall {
8423	c := &GroupsMembershipsGetMembershipGraphCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8424	c.parent = parent
8425	return c
8426}
8427
8428// Query sets the optional parameter "query": Required. A CEL expression
8429// that MUST include member specification AND label(s). Certain groups
8430// are uniquely identified by both a 'member_key_id' and a
8431// 'member_key_namespace', which requires an additional query input:
8432// 'member_key_namespace'. Example query: `member_key_id ==
8433// 'member_key_id_value' && in labels`
8434func (c *GroupsMembershipsGetMembershipGraphCall) Query(query string) *GroupsMembershipsGetMembershipGraphCall {
8435	c.urlParams_.Set("query", query)
8436	return c
8437}
8438
8439// Fields allows partial responses to be retrieved. See
8440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8441// for more information.
8442func (c *GroupsMembershipsGetMembershipGraphCall) Fields(s ...googleapi.Field) *GroupsMembershipsGetMembershipGraphCall {
8443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8444	return c
8445}
8446
8447// IfNoneMatch sets the optional parameter which makes the operation
8448// fail if the object's ETag matches the given value. This is useful for
8449// getting updates only after the object has changed since the last
8450// request. Use googleapi.IsNotModified to check whether the response
8451// error from Do is the result of In-None-Match.
8452func (c *GroupsMembershipsGetMembershipGraphCall) IfNoneMatch(entityTag string) *GroupsMembershipsGetMembershipGraphCall {
8453	c.ifNoneMatch_ = entityTag
8454	return c
8455}
8456
8457// Context sets the context to be used in this call's Do method. Any
8458// pending HTTP request will be aborted if the provided context is
8459// canceled.
8460func (c *GroupsMembershipsGetMembershipGraphCall) Context(ctx context.Context) *GroupsMembershipsGetMembershipGraphCall {
8461	c.ctx_ = ctx
8462	return c
8463}
8464
8465// Header returns an http.Header that can be modified by the caller to
8466// add HTTP headers to the request.
8467func (c *GroupsMembershipsGetMembershipGraphCall) Header() http.Header {
8468	if c.header_ == nil {
8469		c.header_ = make(http.Header)
8470	}
8471	return c.header_
8472}
8473
8474func (c *GroupsMembershipsGetMembershipGraphCall) doRequest(alt string) (*http.Response, error) {
8475	reqHeaders := make(http.Header)
8476	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8477	for k, v := range c.header_ {
8478		reqHeaders[k] = v
8479	}
8480	reqHeaders.Set("User-Agent", c.s.userAgent())
8481	if c.ifNoneMatch_ != "" {
8482		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8483	}
8484	var body io.Reader = nil
8485	c.urlParams_.Set("alt", alt)
8486	c.urlParams_.Set("prettyPrint", "false")
8487	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:getMembershipGraph")
8488	urls += "?" + c.urlParams_.Encode()
8489	req, err := http.NewRequest("GET", urls, body)
8490	if err != nil {
8491		return nil, err
8492	}
8493	req.Header = reqHeaders
8494	googleapi.Expand(req.URL, map[string]string{
8495		"parent": c.parent,
8496	})
8497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8498}
8499
8500// Do executes the "cloudidentity.groups.memberships.getMembershipGraph" call.
8501// Exactly one of *Operation or error will be non-nil. Any non-2xx
8502// status code is an error. Response headers are in either
8503// *Operation.ServerResponse.Header or (if a response was returned at
8504// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8505// to check whether the returned error was because
8506// http.StatusNotModified was returned.
8507func (c *GroupsMembershipsGetMembershipGraphCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8508	gensupport.SetOptions(c.urlParams_, opts...)
8509	res, err := c.doRequest("json")
8510	if res != nil && res.StatusCode == http.StatusNotModified {
8511		if res.Body != nil {
8512			res.Body.Close()
8513		}
8514		return nil, &googleapi.Error{
8515			Code:   res.StatusCode,
8516			Header: res.Header,
8517		}
8518	}
8519	if err != nil {
8520		return nil, err
8521	}
8522	defer googleapi.CloseBody(res)
8523	if err := googleapi.CheckResponse(res); err != nil {
8524		return nil, err
8525	}
8526	ret := &Operation{
8527		ServerResponse: googleapi.ServerResponse{
8528			Header:         res.Header,
8529			HTTPStatusCode: res.StatusCode,
8530		},
8531	}
8532	target := &ret
8533	if err := gensupport.DecodeResponse(target, res); err != nil {
8534		return nil, err
8535	}
8536	return ret, nil
8537	// {
8538	//   "description": "Get a membership graph of just a member or both a member and a group. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. Given a member, the response will contain all membership paths from the member. Given both a group and a member, the response will contain all membership paths between the group and the member.",
8539	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:getMembershipGraph",
8540	//   "httpMethod": "GET",
8541	//   "id": "cloudidentity.groups.memberships.getMembershipGraph",
8542	//   "parameterOrder": [
8543	//     "parent"
8544	//   ],
8545	//   "parameters": {
8546	//     "parent": {
8547	//       "description": "Required. [Resource name](https://cloud.google.com/apis/design/resource_names) of the group to search transitive memberships in. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group to which the Membership belongs to. group_id can be a wildcard collection id \"-\". When a group_id is specified, the membership graph will be constrained to paths between the member (defined in the query) and the parent. If a wildcard collection is provided, all membership paths connected to the member will be returned.",
8548	//       "location": "path",
8549	//       "pattern": "^groups/[^/]+$",
8550	//       "required": true,
8551	//       "type": "string"
8552	//     },
8553	//     "query": {
8554	//       "description": "Required. A CEL expression that MUST include member specification AND label(s). Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. Example query: `member_key_id == 'member_key_id_value' \u0026\u0026 in labels`",
8555	//       "location": "query",
8556	//       "type": "string"
8557	//     }
8558	//   },
8559	//   "path": "v1beta1/{+parent}/memberships:getMembershipGraph",
8560	//   "response": {
8561	//     "$ref": "Operation"
8562	//   },
8563	//   "scopes": [
8564	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8565	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
8566	//     "https://www.googleapis.com/auth/cloud-platform"
8567	//   ]
8568	// }
8569
8570}
8571
8572// method id "cloudidentity.groups.memberships.list":
8573
8574type GroupsMembershipsListCall struct {
8575	s            *Service
8576	parent       string
8577	urlParams_   gensupport.URLParams
8578	ifNoneMatch_ string
8579	ctx_         context.Context
8580	header_      http.Header
8581}
8582
8583// List: Lists the `Membership`s within a `Group`.
8584//
8585// - parent: The parent `Group` resource under which to lookup the
8586//   `Membership` name. Must be of the form `groups/{group_id}`.
8587func (r *GroupsMembershipsService) List(parent string) *GroupsMembershipsListCall {
8588	c := &GroupsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8589	c.parent = parent
8590	return c
8591}
8592
8593// PageSize sets the optional parameter "pageSize": The maximum number
8594// of results to return. Note that the number of results returned may be
8595// less than this value even if there are more available results. To
8596// fetch all results, clients must continue calling this method
8597// repeatedly until the response no longer contains a `next_page_token`.
8598// If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for
8599// `GroupView.FULL`. Must not be greater than 1000 for `GroupView.BASIC`
8600// or 500 for `GroupView.FULL`.
8601func (c *GroupsMembershipsListCall) PageSize(pageSize int64) *GroupsMembershipsListCall {
8602	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8603	return c
8604}
8605
8606// PageToken sets the optional parameter "pageToken": The
8607// `next_page_token` value returned from a previous search request, if
8608// any.
8609func (c *GroupsMembershipsListCall) PageToken(pageToken string) *GroupsMembershipsListCall {
8610	c.urlParams_.Set("pageToken", pageToken)
8611	return c
8612}
8613
8614// View sets the optional parameter "view": The level of detail to be
8615// returned. If unspecified, defaults to `MembershipView.BASIC`.
8616//
8617// Possible values:
8618//   "BASIC" - Default. Only basic resource information is returned.
8619//   "FULL" - All resource information is returned.
8620func (c *GroupsMembershipsListCall) View(view string) *GroupsMembershipsListCall {
8621	c.urlParams_.Set("view", view)
8622	return c
8623}
8624
8625// Fields allows partial responses to be retrieved. See
8626// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8627// for more information.
8628func (c *GroupsMembershipsListCall) Fields(s ...googleapi.Field) *GroupsMembershipsListCall {
8629	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8630	return c
8631}
8632
8633// IfNoneMatch sets the optional parameter which makes the operation
8634// fail if the object's ETag matches the given value. This is useful for
8635// getting updates only after the object has changed since the last
8636// request. Use googleapi.IsNotModified to check whether the response
8637// error from Do is the result of In-None-Match.
8638func (c *GroupsMembershipsListCall) IfNoneMatch(entityTag string) *GroupsMembershipsListCall {
8639	c.ifNoneMatch_ = entityTag
8640	return c
8641}
8642
8643// Context sets the context to be used in this call's Do method. Any
8644// pending HTTP request will be aborted if the provided context is
8645// canceled.
8646func (c *GroupsMembershipsListCall) Context(ctx context.Context) *GroupsMembershipsListCall {
8647	c.ctx_ = ctx
8648	return c
8649}
8650
8651// Header returns an http.Header that can be modified by the caller to
8652// add HTTP headers to the request.
8653func (c *GroupsMembershipsListCall) Header() http.Header {
8654	if c.header_ == nil {
8655		c.header_ = make(http.Header)
8656	}
8657	return c.header_
8658}
8659
8660func (c *GroupsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
8661	reqHeaders := make(http.Header)
8662	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8663	for k, v := range c.header_ {
8664		reqHeaders[k] = v
8665	}
8666	reqHeaders.Set("User-Agent", c.s.userAgent())
8667	if c.ifNoneMatch_ != "" {
8668		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8669	}
8670	var body io.Reader = nil
8671	c.urlParams_.Set("alt", alt)
8672	c.urlParams_.Set("prettyPrint", "false")
8673	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships")
8674	urls += "?" + c.urlParams_.Encode()
8675	req, err := http.NewRequest("GET", urls, body)
8676	if err != nil {
8677		return nil, err
8678	}
8679	req.Header = reqHeaders
8680	googleapi.Expand(req.URL, map[string]string{
8681		"parent": c.parent,
8682	})
8683	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8684}
8685
8686// Do executes the "cloudidentity.groups.memberships.list" call.
8687// Exactly one of *ListMembershipsResponse or error will be non-nil. Any
8688// non-2xx status code is an error. Response headers are in either
8689// *ListMembershipsResponse.ServerResponse.Header or (if a response was
8690// returned at all) in error.(*googleapi.Error).Header. Use
8691// googleapi.IsNotModified to check whether the returned error was
8692// because http.StatusNotModified was returned.
8693func (c *GroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
8694	gensupport.SetOptions(c.urlParams_, opts...)
8695	res, err := c.doRequest("json")
8696	if res != nil && res.StatusCode == http.StatusNotModified {
8697		if res.Body != nil {
8698			res.Body.Close()
8699		}
8700		return nil, &googleapi.Error{
8701			Code:   res.StatusCode,
8702			Header: res.Header,
8703		}
8704	}
8705	if err != nil {
8706		return nil, err
8707	}
8708	defer googleapi.CloseBody(res)
8709	if err := googleapi.CheckResponse(res); err != nil {
8710		return nil, err
8711	}
8712	ret := &ListMembershipsResponse{
8713		ServerResponse: googleapi.ServerResponse{
8714			Header:         res.Header,
8715			HTTPStatusCode: res.StatusCode,
8716		},
8717	}
8718	target := &ret
8719	if err := gensupport.DecodeResponse(target, res); err != nil {
8720		return nil, err
8721	}
8722	return ret, nil
8723	// {
8724	//   "description": "Lists the `Membership`s within a `Group`.",
8725	//   "flatPath": "v1beta1/groups/{groupsId}/memberships",
8726	//   "httpMethod": "GET",
8727	//   "id": "cloudidentity.groups.memberships.list",
8728	//   "parameterOrder": [
8729	//     "parent"
8730	//   ],
8731	//   "parameters": {
8732	//     "pageSize": {
8733	//       "description": "The maximum number of results to return. Note that the number of results returned may be less than this value even if there are more available results. To fetch all results, clients must continue calling this method repeatedly until the response no longer contains a `next_page_token`. If unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for `GroupView.FULL`. Must not be greater than 1000 for `GroupView.BASIC` or 500 for `GroupView.FULL`.",
8734	//       "format": "int32",
8735	//       "location": "query",
8736	//       "type": "integer"
8737	//     },
8738	//     "pageToken": {
8739	//       "description": "The `next_page_token` value returned from a previous search request, if any.",
8740	//       "location": "query",
8741	//       "type": "string"
8742	//     },
8743	//     "parent": {
8744	//       "description": "Required. The parent `Group` resource under which to lookup the `Membership` name. Must be of the form `groups/{group_id}`.",
8745	//       "location": "path",
8746	//       "pattern": "^groups/[^/]+$",
8747	//       "required": true,
8748	//       "type": "string"
8749	//     },
8750	//     "view": {
8751	//       "description": "The level of detail to be returned. If unspecified, defaults to `MembershipView.BASIC`.",
8752	//       "enum": [
8753	//         "BASIC",
8754	//         "FULL"
8755	//       ],
8756	//       "enumDescriptions": [
8757	//         "Default. Only basic resource information is returned.",
8758	//         "All resource information is returned."
8759	//       ],
8760	//       "location": "query",
8761	//       "type": "string"
8762	//     }
8763	//   },
8764	//   "path": "v1beta1/{+parent}/memberships",
8765	//   "response": {
8766	//     "$ref": "ListMembershipsResponse"
8767	//   },
8768	//   "scopes": [
8769	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8770	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
8771	//     "https://www.googleapis.com/auth/cloud-platform"
8772	//   ]
8773	// }
8774
8775}
8776
8777// Pages invokes f for each page of results.
8778// A non-nil error returned from f will halt the iteration.
8779// The provided context supersedes any context provided to the Context method.
8780func (c *GroupsMembershipsListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
8781	c.ctx_ = ctx
8782	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8783	for {
8784		x, err := c.Do()
8785		if err != nil {
8786			return err
8787		}
8788		if err := f(x); err != nil {
8789			return err
8790		}
8791		if x.NextPageToken == "" {
8792			return nil
8793		}
8794		c.PageToken(x.NextPageToken)
8795	}
8796}
8797
8798// method id "cloudidentity.groups.memberships.lookup":
8799
8800type GroupsMembershipsLookupCall struct {
8801	s            *Service
8802	parent       string
8803	urlParams_   gensupport.URLParams
8804	ifNoneMatch_ string
8805	ctx_         context.Context
8806	header_      http.Header
8807}
8808
8809// Lookup: Looks up the resource name
8810// (https://cloud.google.com/apis/design/resource_names) of a
8811// `Membership` by its `EntityKey`.
8812//
8813// - parent: The parent `Group` resource under which to lookup the
8814//   `Membership` name. Must be of the form `groups/{group_id}`.
8815func (r *GroupsMembershipsService) Lookup(parent string) *GroupsMembershipsLookupCall {
8816	c := &GroupsMembershipsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8817	c.parent = parent
8818	return c
8819}
8820
8821// MemberKeyId sets the optional parameter "memberKey.id": The ID of the
8822// entity. For Google-managed entities, the `id` must be the email
8823// address of an existing group or user. For external-identity-mapped
8824// entities, the `id` must be a string conforming to the Identity
8825// Source's requirements. Must be unique within a `namespace`.
8826func (c *GroupsMembershipsLookupCall) MemberKeyId(memberKeyId string) *GroupsMembershipsLookupCall {
8827	c.urlParams_.Set("memberKey.id", memberKeyId)
8828	return c
8829}
8830
8831// MemberKeyNamespace sets the optional parameter "memberKey.namespace":
8832// The namespace in which the entity exists. If not specified, the
8833// `EntityKey` represents a Google-managed entity such as a Google user
8834// or a Google Group. If specified, the `EntityKey` represents an
8835// external-identity-mapped group. The namespace must correspond to an
8836// identity source created in Admin Console and must be in the form of
8837// `identitysources/{identity_source_id}`.
8838func (c *GroupsMembershipsLookupCall) MemberKeyNamespace(memberKeyNamespace string) *GroupsMembershipsLookupCall {
8839	c.urlParams_.Set("memberKey.namespace", memberKeyNamespace)
8840	return c
8841}
8842
8843// Fields allows partial responses to be retrieved. See
8844// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8845// for more information.
8846func (c *GroupsMembershipsLookupCall) Fields(s ...googleapi.Field) *GroupsMembershipsLookupCall {
8847	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8848	return c
8849}
8850
8851// IfNoneMatch sets the optional parameter which makes the operation
8852// fail if the object's ETag matches the given value. This is useful for
8853// getting updates only after the object has changed since the last
8854// request. Use googleapi.IsNotModified to check whether the response
8855// error from Do is the result of In-None-Match.
8856func (c *GroupsMembershipsLookupCall) IfNoneMatch(entityTag string) *GroupsMembershipsLookupCall {
8857	c.ifNoneMatch_ = entityTag
8858	return c
8859}
8860
8861// Context sets the context to be used in this call's Do method. Any
8862// pending HTTP request will be aborted if the provided context is
8863// canceled.
8864func (c *GroupsMembershipsLookupCall) Context(ctx context.Context) *GroupsMembershipsLookupCall {
8865	c.ctx_ = ctx
8866	return c
8867}
8868
8869// Header returns an http.Header that can be modified by the caller to
8870// add HTTP headers to the request.
8871func (c *GroupsMembershipsLookupCall) Header() http.Header {
8872	if c.header_ == nil {
8873		c.header_ = make(http.Header)
8874	}
8875	return c.header_
8876}
8877
8878func (c *GroupsMembershipsLookupCall) doRequest(alt string) (*http.Response, error) {
8879	reqHeaders := make(http.Header)
8880	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
8881	for k, v := range c.header_ {
8882		reqHeaders[k] = v
8883	}
8884	reqHeaders.Set("User-Agent", c.s.userAgent())
8885	if c.ifNoneMatch_ != "" {
8886		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8887	}
8888	var body io.Reader = nil
8889	c.urlParams_.Set("alt", alt)
8890	c.urlParams_.Set("prettyPrint", "false")
8891	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:lookup")
8892	urls += "?" + c.urlParams_.Encode()
8893	req, err := http.NewRequest("GET", urls, body)
8894	if err != nil {
8895		return nil, err
8896	}
8897	req.Header = reqHeaders
8898	googleapi.Expand(req.URL, map[string]string{
8899		"parent": c.parent,
8900	})
8901	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8902}
8903
8904// Do executes the "cloudidentity.groups.memberships.lookup" call.
8905// Exactly one of *LookupMembershipNameResponse or error will be
8906// non-nil. Any non-2xx status code is an error. Response headers are in
8907// either *LookupMembershipNameResponse.ServerResponse.Header or (if a
8908// response was returned at all) in error.(*googleapi.Error).Header. Use
8909// googleapi.IsNotModified to check whether the returned error was
8910// because http.StatusNotModified was returned.
8911func (c *GroupsMembershipsLookupCall) Do(opts ...googleapi.CallOption) (*LookupMembershipNameResponse, error) {
8912	gensupport.SetOptions(c.urlParams_, opts...)
8913	res, err := c.doRequest("json")
8914	if res != nil && res.StatusCode == http.StatusNotModified {
8915		if res.Body != nil {
8916			res.Body.Close()
8917		}
8918		return nil, &googleapi.Error{
8919			Code:   res.StatusCode,
8920			Header: res.Header,
8921		}
8922	}
8923	if err != nil {
8924		return nil, err
8925	}
8926	defer googleapi.CloseBody(res)
8927	if err := googleapi.CheckResponse(res); err != nil {
8928		return nil, err
8929	}
8930	ret := &LookupMembershipNameResponse{
8931		ServerResponse: googleapi.ServerResponse{
8932			Header:         res.Header,
8933			HTTPStatusCode: res.StatusCode,
8934		},
8935	}
8936	target := &ret
8937	if err := gensupport.DecodeResponse(target, res); err != nil {
8938		return nil, err
8939	}
8940	return ret, nil
8941	// {
8942	//   "description": "Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Membership` by its `EntityKey`.",
8943	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:lookup",
8944	//   "httpMethod": "GET",
8945	//   "id": "cloudidentity.groups.memberships.lookup",
8946	//   "parameterOrder": [
8947	//     "parent"
8948	//   ],
8949	//   "parameters": {
8950	//     "memberKey.id": {
8951	//       "description": "The ID of the entity. For Google-managed entities, the `id` must be the email address of an existing group or user. For external-identity-mapped entities, the `id` must be a string conforming to the Identity Source's requirements. Must be unique within a `namespace`.",
8952	//       "location": "query",
8953	//       "type": "string"
8954	//     },
8955	//     "memberKey.namespace": {
8956	//       "description": "The namespace in which the entity exists. If not specified, the `EntityKey` represents a Google-managed entity such as a Google user or a Google Group. If specified, the `EntityKey` represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of `identitysources/{identity_source_id}`.",
8957	//       "location": "query",
8958	//       "type": "string"
8959	//     },
8960	//     "parent": {
8961	//       "description": "Required. The parent `Group` resource under which to lookup the `Membership` name. Must be of the form `groups/{group_id}`.",
8962	//       "location": "path",
8963	//       "pattern": "^groups/[^/]+$",
8964	//       "required": true,
8965	//       "type": "string"
8966	//     }
8967	//   },
8968	//   "path": "v1beta1/{+parent}/memberships:lookup",
8969	//   "response": {
8970	//     "$ref": "LookupMembershipNameResponse"
8971	//   },
8972	//   "scopes": [
8973	//     "https://www.googleapis.com/auth/cloud-identity.groups",
8974	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
8975	//     "https://www.googleapis.com/auth/cloud-platform"
8976	//   ]
8977	// }
8978
8979}
8980
8981// method id "cloudidentity.groups.memberships.modifyMembershipRoles":
8982
8983type GroupsMembershipsModifyMembershipRolesCall struct {
8984	s                            *Service
8985	name                         string
8986	modifymembershiprolesrequest *ModifyMembershipRolesRequest
8987	urlParams_                   gensupport.URLParams
8988	ctx_                         context.Context
8989	header_                      http.Header
8990}
8991
8992// ModifyMembershipRoles: Modifies the `MembershipRole`s of a
8993// `Membership`.
8994//
8995// - name: The resource name
8996//   (https://cloud.google.com/apis/design/resource_names) of the
8997//   `Membership` whose roles are to be modified. Must be of the form
8998//   `groups/{group_id}/memberships/{membership_id}`.
8999func (r *GroupsMembershipsService) ModifyMembershipRoles(name string, modifymembershiprolesrequest *ModifyMembershipRolesRequest) *GroupsMembershipsModifyMembershipRolesCall {
9000	c := &GroupsMembershipsModifyMembershipRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9001	c.name = name
9002	c.modifymembershiprolesrequest = modifymembershiprolesrequest
9003	return c
9004}
9005
9006// Fields allows partial responses to be retrieved. See
9007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9008// for more information.
9009func (c *GroupsMembershipsModifyMembershipRolesCall) Fields(s ...googleapi.Field) *GroupsMembershipsModifyMembershipRolesCall {
9010	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9011	return c
9012}
9013
9014// Context sets the context to be used in this call's Do method. Any
9015// pending HTTP request will be aborted if the provided context is
9016// canceled.
9017func (c *GroupsMembershipsModifyMembershipRolesCall) Context(ctx context.Context) *GroupsMembershipsModifyMembershipRolesCall {
9018	c.ctx_ = ctx
9019	return c
9020}
9021
9022// Header returns an http.Header that can be modified by the caller to
9023// add HTTP headers to the request.
9024func (c *GroupsMembershipsModifyMembershipRolesCall) Header() http.Header {
9025	if c.header_ == nil {
9026		c.header_ = make(http.Header)
9027	}
9028	return c.header_
9029}
9030
9031func (c *GroupsMembershipsModifyMembershipRolesCall) doRequest(alt string) (*http.Response, error) {
9032	reqHeaders := make(http.Header)
9033	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9034	for k, v := range c.header_ {
9035		reqHeaders[k] = v
9036	}
9037	reqHeaders.Set("User-Agent", c.s.userAgent())
9038	var body io.Reader = nil
9039	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifymembershiprolesrequest)
9040	if err != nil {
9041		return nil, err
9042	}
9043	reqHeaders.Set("Content-Type", "application/json")
9044	c.urlParams_.Set("alt", alt)
9045	c.urlParams_.Set("prettyPrint", "false")
9046	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:modifyMembershipRoles")
9047	urls += "?" + c.urlParams_.Encode()
9048	req, err := http.NewRequest("POST", urls, body)
9049	if err != nil {
9050		return nil, err
9051	}
9052	req.Header = reqHeaders
9053	googleapi.Expand(req.URL, map[string]string{
9054		"name": c.name,
9055	})
9056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9057}
9058
9059// Do executes the "cloudidentity.groups.memberships.modifyMembershipRoles" call.
9060// Exactly one of *ModifyMembershipRolesResponse or error will be
9061// non-nil. Any non-2xx status code is an error. Response headers are in
9062// either *ModifyMembershipRolesResponse.ServerResponse.Header or (if a
9063// response was returned at all) in error.(*googleapi.Error).Header. Use
9064// googleapi.IsNotModified to check whether the returned error was
9065// because http.StatusNotModified was returned.
9066func (c *GroupsMembershipsModifyMembershipRolesCall) Do(opts ...googleapi.CallOption) (*ModifyMembershipRolesResponse, error) {
9067	gensupport.SetOptions(c.urlParams_, opts...)
9068	res, err := c.doRequest("json")
9069	if res != nil && res.StatusCode == http.StatusNotModified {
9070		if res.Body != nil {
9071			res.Body.Close()
9072		}
9073		return nil, &googleapi.Error{
9074			Code:   res.StatusCode,
9075			Header: res.Header,
9076		}
9077	}
9078	if err != nil {
9079		return nil, err
9080	}
9081	defer googleapi.CloseBody(res)
9082	if err := googleapi.CheckResponse(res); err != nil {
9083		return nil, err
9084	}
9085	ret := &ModifyMembershipRolesResponse{
9086		ServerResponse: googleapi.ServerResponse{
9087			Header:         res.Header,
9088			HTTPStatusCode: res.StatusCode,
9089		},
9090	}
9091	target := &ret
9092	if err := gensupport.DecodeResponse(target, res); err != nil {
9093		return nil, err
9094	}
9095	return ret, nil
9096	// {
9097	//   "description": "Modifies the `MembershipRole`s of a `Membership`.",
9098	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}:modifyMembershipRoles",
9099	//   "httpMethod": "POST",
9100	//   "id": "cloudidentity.groups.memberships.modifyMembershipRoles",
9101	//   "parameterOrder": [
9102	//     "name"
9103	//   ],
9104	//   "parameters": {
9105	//     "name": {
9106	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `Membership` whose roles are to be modified. Must be of the form `groups/{group_id}/memberships/{membership_id}`.",
9107	//       "location": "path",
9108	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
9109	//       "required": true,
9110	//       "type": "string"
9111	//     }
9112	//   },
9113	//   "path": "v1beta1/{+name}:modifyMembershipRoles",
9114	//   "request": {
9115	//     "$ref": "ModifyMembershipRolesRequest"
9116	//   },
9117	//   "response": {
9118	//     "$ref": "ModifyMembershipRolesResponse"
9119	//   },
9120	//   "scopes": [
9121	//     "https://www.googleapis.com/auth/cloud-identity.groups",
9122	//     "https://www.googleapis.com/auth/cloud-platform"
9123	//   ]
9124	// }
9125
9126}
9127
9128// method id "cloudidentity.groups.memberships.searchTransitiveGroups":
9129
9130type GroupsMembershipsSearchTransitiveGroupsCall struct {
9131	s            *Service
9132	parent       string
9133	urlParams_   gensupport.URLParams
9134	ifNoneMatch_ string
9135	ctx_         context.Context
9136	header_      http.Header
9137}
9138
9139// SearchTransitiveGroups: Search transitive groups of a member.
9140// **Note:** This feature is only available to Google Workspace
9141// Enterprise Standard, Enterprise Plus, and Enterprise for Education;
9142// and Cloud Identity Premium accounts. A transitive group is any group
9143// that has a direct or indirect membership to the member. Actor must
9144// have view permissions all transitive groups.
9145//
9146// - parent: Resource name
9147//   (https://cloud.google.com/apis/design/resource_names) of the group
9148//   to search transitive memberships in. Format: `groups/{group_id}`,
9149//   where `group_id` is always '-' as this API will search across all
9150//   groups for a given member.
9151func (r *GroupsMembershipsService) SearchTransitiveGroups(parent string) *GroupsMembershipsSearchTransitiveGroupsCall {
9152	c := &GroupsMembershipsSearchTransitiveGroupsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9153	c.parent = parent
9154	return c
9155}
9156
9157// PageSize sets the optional parameter "pageSize": The default page
9158// size is 200 (max 1000).
9159func (c *GroupsMembershipsSearchTransitiveGroupsCall) PageSize(pageSize int64) *GroupsMembershipsSearchTransitiveGroupsCall {
9160	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9161	return c
9162}
9163
9164// PageToken sets the optional parameter "pageToken": The
9165// next_page_token value returned from a previous list request, if any.
9166func (c *GroupsMembershipsSearchTransitiveGroupsCall) PageToken(pageToken string) *GroupsMembershipsSearchTransitiveGroupsCall {
9167	c.urlParams_.Set("pageToken", pageToken)
9168	return c
9169}
9170
9171// Query sets the optional parameter "query": Required. A CEL expression
9172// that MUST include member specification AND label(s). This is a
9173// `required` field. Users can search on label attributes of groups.
9174// CONTAINS match ('in') is supported on labels. Identity-mapped groups
9175// are uniquely identified by both a `member_key_id` and a
9176// `member_key_namespace`, which requires an additional query input:
9177// `member_key_namespace`. Example query: `member_key_id ==
9178// 'member_key_id_value' && in labels`
9179func (c *GroupsMembershipsSearchTransitiveGroupsCall) Query(query string) *GroupsMembershipsSearchTransitiveGroupsCall {
9180	c.urlParams_.Set("query", query)
9181	return c
9182}
9183
9184// Fields allows partial responses to be retrieved. See
9185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9186// for more information.
9187func (c *GroupsMembershipsSearchTransitiveGroupsCall) Fields(s ...googleapi.Field) *GroupsMembershipsSearchTransitiveGroupsCall {
9188	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9189	return c
9190}
9191
9192// IfNoneMatch sets the optional parameter which makes the operation
9193// fail if the object's ETag matches the given value. This is useful for
9194// getting updates only after the object has changed since the last
9195// request. Use googleapi.IsNotModified to check whether the response
9196// error from Do is the result of In-None-Match.
9197func (c *GroupsMembershipsSearchTransitiveGroupsCall) IfNoneMatch(entityTag string) *GroupsMembershipsSearchTransitiveGroupsCall {
9198	c.ifNoneMatch_ = entityTag
9199	return c
9200}
9201
9202// Context sets the context to be used in this call's Do method. Any
9203// pending HTTP request will be aborted if the provided context is
9204// canceled.
9205func (c *GroupsMembershipsSearchTransitiveGroupsCall) Context(ctx context.Context) *GroupsMembershipsSearchTransitiveGroupsCall {
9206	c.ctx_ = ctx
9207	return c
9208}
9209
9210// Header returns an http.Header that can be modified by the caller to
9211// add HTTP headers to the request.
9212func (c *GroupsMembershipsSearchTransitiveGroupsCall) Header() http.Header {
9213	if c.header_ == nil {
9214		c.header_ = make(http.Header)
9215	}
9216	return c.header_
9217}
9218
9219func (c *GroupsMembershipsSearchTransitiveGroupsCall) doRequest(alt string) (*http.Response, error) {
9220	reqHeaders := make(http.Header)
9221	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9222	for k, v := range c.header_ {
9223		reqHeaders[k] = v
9224	}
9225	reqHeaders.Set("User-Agent", c.s.userAgent())
9226	if c.ifNoneMatch_ != "" {
9227		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9228	}
9229	var body io.Reader = nil
9230	c.urlParams_.Set("alt", alt)
9231	c.urlParams_.Set("prettyPrint", "false")
9232	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:searchTransitiveGroups")
9233	urls += "?" + c.urlParams_.Encode()
9234	req, err := http.NewRequest("GET", urls, body)
9235	if err != nil {
9236		return nil, err
9237	}
9238	req.Header = reqHeaders
9239	googleapi.Expand(req.URL, map[string]string{
9240		"parent": c.parent,
9241	})
9242	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9243}
9244
9245// Do executes the "cloudidentity.groups.memberships.searchTransitiveGroups" call.
9246// Exactly one of *SearchTransitiveGroupsResponse or error will be
9247// non-nil. Any non-2xx status code is an error. Response headers are in
9248// either *SearchTransitiveGroupsResponse.ServerResponse.Header or (if a
9249// response was returned at all) in error.(*googleapi.Error).Header. Use
9250// googleapi.IsNotModified to check whether the returned error was
9251// because http.StatusNotModified was returned.
9252func (c *GroupsMembershipsSearchTransitiveGroupsCall) Do(opts ...googleapi.CallOption) (*SearchTransitiveGroupsResponse, error) {
9253	gensupport.SetOptions(c.urlParams_, opts...)
9254	res, err := c.doRequest("json")
9255	if res != nil && res.StatusCode == http.StatusNotModified {
9256		if res.Body != nil {
9257			res.Body.Close()
9258		}
9259		return nil, &googleapi.Error{
9260			Code:   res.StatusCode,
9261			Header: res.Header,
9262		}
9263	}
9264	if err != nil {
9265		return nil, err
9266	}
9267	defer googleapi.CloseBody(res)
9268	if err := googleapi.CheckResponse(res); err != nil {
9269		return nil, err
9270	}
9271	ret := &SearchTransitiveGroupsResponse{
9272		ServerResponse: googleapi.ServerResponse{
9273			Header:         res.Header,
9274			HTTPStatusCode: res.StatusCode,
9275		},
9276	}
9277	target := &ret
9278	if err := gensupport.DecodeResponse(target, res); err != nil {
9279		return nil, err
9280	}
9281	return ret, nil
9282	// {
9283	//   "description": "Search transitive groups of a member. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. A transitive group is any group that has a direct or indirect membership to the member. Actor must have view permissions all transitive groups.",
9284	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:searchTransitiveGroups",
9285	//   "httpMethod": "GET",
9286	//   "id": "cloudidentity.groups.memberships.searchTransitiveGroups",
9287	//   "parameterOrder": [
9288	//     "parent"
9289	//   ],
9290	//   "parameters": {
9291	//     "pageSize": {
9292	//       "description": "The default page size is 200 (max 1000).",
9293	//       "format": "int32",
9294	//       "location": "query",
9295	//       "type": "integer"
9296	//     },
9297	//     "pageToken": {
9298	//       "description": "The next_page_token value returned from a previous list request, if any.",
9299	//       "location": "query",
9300	//       "type": "string"
9301	//     },
9302	//     "parent": {
9303	//       "description": "[Resource name](https://cloud.google.com/apis/design/resource_names) of the group to search transitive memberships in. Format: `groups/{group_id}`, where `group_id` is always '-' as this API will search across all groups for a given member.",
9304	//       "location": "path",
9305	//       "pattern": "^groups/[^/]+$",
9306	//       "required": true,
9307	//       "type": "string"
9308	//     },
9309	//     "query": {
9310	//       "description": "Required. A CEL expression that MUST include member specification AND label(s). This is a `required` field. Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. Identity-mapped groups are uniquely identified by both a `member_key_id` and a `member_key_namespace`, which requires an additional query input: `member_key_namespace`. Example query: `member_key_id == 'member_key_id_value' \u0026\u0026 in labels`",
9311	//       "location": "query",
9312	//       "type": "string"
9313	//     }
9314	//   },
9315	//   "path": "v1beta1/{+parent}/memberships:searchTransitiveGroups",
9316	//   "response": {
9317	//     "$ref": "SearchTransitiveGroupsResponse"
9318	//   },
9319	//   "scopes": [
9320	//     "https://www.googleapis.com/auth/cloud-identity.groups",
9321	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
9322	//     "https://www.googleapis.com/auth/cloud-platform"
9323	//   ]
9324	// }
9325
9326}
9327
9328// Pages invokes f for each page of results.
9329// A non-nil error returned from f will halt the iteration.
9330// The provided context supersedes any context provided to the Context method.
9331func (c *GroupsMembershipsSearchTransitiveGroupsCall) Pages(ctx context.Context, f func(*SearchTransitiveGroupsResponse) error) error {
9332	c.ctx_ = ctx
9333	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9334	for {
9335		x, err := c.Do()
9336		if err != nil {
9337			return err
9338		}
9339		if err := f(x); err != nil {
9340			return err
9341		}
9342		if x.NextPageToken == "" {
9343			return nil
9344		}
9345		c.PageToken(x.NextPageToken)
9346	}
9347}
9348
9349// method id "cloudidentity.groups.memberships.searchTransitiveMemberships":
9350
9351type GroupsMembershipsSearchTransitiveMembershipsCall struct {
9352	s            *Service
9353	parent       string
9354	urlParams_   gensupport.URLParams
9355	ifNoneMatch_ string
9356	ctx_         context.Context
9357	header_      http.Header
9358}
9359
9360// SearchTransitiveMemberships: Search transitive memberships of a
9361// group. **Note:** This feature is only available to Google Workspace
9362// Enterprise Standard, Enterprise Plus, and Enterprise for Education;
9363// and Cloud Identity Premium accounts. A transitive membership is any
9364// direct or indirect membership of a group. Actor must have view
9365// permissions to all transitive memberships.
9366//
9367// - parent: Resource name
9368//   (https://cloud.google.com/apis/design/resource_names) of the group
9369//   to search transitive memberships in. Format: `groups/{group_id}`,
9370//   where `group_id` is the unique ID assigned to the Group.
9371func (r *GroupsMembershipsService) SearchTransitiveMemberships(parent string) *GroupsMembershipsSearchTransitiveMembershipsCall {
9372	c := &GroupsMembershipsSearchTransitiveMembershipsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9373	c.parent = parent
9374	return c
9375}
9376
9377// PageSize sets the optional parameter "pageSize": The default page
9378// size is 200 (max 1000).
9379func (c *GroupsMembershipsSearchTransitiveMembershipsCall) PageSize(pageSize int64) *GroupsMembershipsSearchTransitiveMembershipsCall {
9380	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9381	return c
9382}
9383
9384// PageToken sets the optional parameter "pageToken": The
9385// next_page_token value returned from a previous list request, if any.
9386func (c *GroupsMembershipsSearchTransitiveMembershipsCall) PageToken(pageToken string) *GroupsMembershipsSearchTransitiveMembershipsCall {
9387	c.urlParams_.Set("pageToken", pageToken)
9388	return c
9389}
9390
9391// Fields allows partial responses to be retrieved. See
9392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9393// for more information.
9394func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Fields(s ...googleapi.Field) *GroupsMembershipsSearchTransitiveMembershipsCall {
9395	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9396	return c
9397}
9398
9399// IfNoneMatch sets the optional parameter which makes the operation
9400// fail if the object's ETag matches the given value. This is useful for
9401// getting updates only after the object has changed since the last
9402// request. Use googleapi.IsNotModified to check whether the response
9403// error from Do is the result of In-None-Match.
9404func (c *GroupsMembershipsSearchTransitiveMembershipsCall) IfNoneMatch(entityTag string) *GroupsMembershipsSearchTransitiveMembershipsCall {
9405	c.ifNoneMatch_ = entityTag
9406	return c
9407}
9408
9409// Context sets the context to be used in this call's Do method. Any
9410// pending HTTP request will be aborted if the provided context is
9411// canceled.
9412func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Context(ctx context.Context) *GroupsMembershipsSearchTransitiveMembershipsCall {
9413	c.ctx_ = ctx
9414	return c
9415}
9416
9417// Header returns an http.Header that can be modified by the caller to
9418// add HTTP headers to the request.
9419func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Header() http.Header {
9420	if c.header_ == nil {
9421		c.header_ = make(http.Header)
9422	}
9423	return c.header_
9424}
9425
9426func (c *GroupsMembershipsSearchTransitiveMembershipsCall) doRequest(alt string) (*http.Response, error) {
9427	reqHeaders := make(http.Header)
9428	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210830")
9429	for k, v := range c.header_ {
9430		reqHeaders[k] = v
9431	}
9432	reqHeaders.Set("User-Agent", c.s.userAgent())
9433	if c.ifNoneMatch_ != "" {
9434		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9435	}
9436	var body io.Reader = nil
9437	c.urlParams_.Set("alt", alt)
9438	c.urlParams_.Set("prettyPrint", "false")
9439	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:searchTransitiveMemberships")
9440	urls += "?" + c.urlParams_.Encode()
9441	req, err := http.NewRequest("GET", urls, body)
9442	if err != nil {
9443		return nil, err
9444	}
9445	req.Header = reqHeaders
9446	googleapi.Expand(req.URL, map[string]string{
9447		"parent": c.parent,
9448	})
9449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9450}
9451
9452// Do executes the "cloudidentity.groups.memberships.searchTransitiveMemberships" call.
9453// Exactly one of *SearchTransitiveMembershipsResponse or error will be
9454// non-nil. Any non-2xx status code is an error. Response headers are in
9455// either *SearchTransitiveMembershipsResponse.ServerResponse.Header or
9456// (if a response was returned at all) in
9457// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9458// whether the returned error was because http.StatusNotModified was
9459// returned.
9460func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Do(opts ...googleapi.CallOption) (*SearchTransitiveMembershipsResponse, error) {
9461	gensupport.SetOptions(c.urlParams_, opts...)
9462	res, err := c.doRequest("json")
9463	if res != nil && res.StatusCode == http.StatusNotModified {
9464		if res.Body != nil {
9465			res.Body.Close()
9466		}
9467		return nil, &googleapi.Error{
9468			Code:   res.StatusCode,
9469			Header: res.Header,
9470		}
9471	}
9472	if err != nil {
9473		return nil, err
9474	}
9475	defer googleapi.CloseBody(res)
9476	if err := googleapi.CheckResponse(res); err != nil {
9477		return nil, err
9478	}
9479	ret := &SearchTransitiveMembershipsResponse{
9480		ServerResponse: googleapi.ServerResponse{
9481			Header:         res.Header,
9482			HTTPStatusCode: res.StatusCode,
9483		},
9484	}
9485	target := &ret
9486	if err := gensupport.DecodeResponse(target, res); err != nil {
9487		return nil, err
9488	}
9489	return ret, nil
9490	// {
9491	//   "description": "Search transitive memberships of a group. **Note:** This feature is only available to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium accounts. A transitive membership is any direct or indirect membership of a group. Actor must have view permissions to all transitive memberships.",
9492	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:searchTransitiveMemberships",
9493	//   "httpMethod": "GET",
9494	//   "id": "cloudidentity.groups.memberships.searchTransitiveMemberships",
9495	//   "parameterOrder": [
9496	//     "parent"
9497	//   ],
9498	//   "parameters": {
9499	//     "pageSize": {
9500	//       "description": "The default page size is 200 (max 1000).",
9501	//       "format": "int32",
9502	//       "location": "query",
9503	//       "type": "integer"
9504	//     },
9505	//     "pageToken": {
9506	//       "description": "The next_page_token value returned from a previous list request, if any.",
9507	//       "location": "query",
9508	//       "type": "string"
9509	//     },
9510	//     "parent": {
9511	//       "description": "[Resource name](https://cloud.google.com/apis/design/resource_names) of the group to search transitive memberships in. Format: `groups/{group_id}`, where `group_id` is the unique ID assigned to the Group.",
9512	//       "location": "path",
9513	//       "pattern": "^groups/[^/]+$",
9514	//       "required": true,
9515	//       "type": "string"
9516	//     }
9517	//   },
9518	//   "path": "v1beta1/{+parent}/memberships:searchTransitiveMemberships",
9519	//   "response": {
9520	//     "$ref": "SearchTransitiveMembershipsResponse"
9521	//   },
9522	//   "scopes": [
9523	//     "https://www.googleapis.com/auth/cloud-identity.groups",
9524	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
9525	//     "https://www.googleapis.com/auth/cloud-platform"
9526	//   ]
9527	// }
9528
9529}
9530
9531// Pages invokes f for each page of results.
9532// A non-nil error returned from f will halt the iteration.
9533// The provided context supersedes any context provided to the Context method.
9534func (c *GroupsMembershipsSearchTransitiveMembershipsCall) Pages(ctx context.Context, f func(*SearchTransitiveMembershipsResponse) error) error {
9535	c.ctx_ = ctx
9536	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9537	for {
9538		x, err := c.Do()
9539		if err != nil {
9540			return err
9541		}
9542		if err := f(x); err != nil {
9543			return err
9544		}
9545		if x.NextPageToken == "" {
9546			return nil
9547		}
9548		c.PageToken(x.NextPageToken)
9549	}
9550}
9551