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