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