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/"
82
83// OAuth2 scopes used by this API.
84const (
85	// See, change, create, and delete any of the Cloud Identity Groups that
86	// you can access, including the members of each group
87	CloudIdentityGroupsScope = "https://www.googleapis.com/auth/cloud-identity.groups"
88
89	// See any Cloud Identity Groups that you can access, including group
90	// members and their emails
91	CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly"
92
93	// View and manage your data across Google Cloud Platform services
94	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
95)
96
97// NewService creates a new Service.
98func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
99	scopesOption := option.WithScopes(
100		"https://www.googleapis.com/auth/cloud-identity.groups",
101		"https://www.googleapis.com/auth/cloud-identity.groups.readonly",
102		"https://www.googleapis.com/auth/cloud-platform",
103	)
104	// NOTE: prepend, so we don't override user-specified scopes.
105	opts = append([]option.ClientOption{scopesOption}, opts...)
106	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
107	client, endpoint, err := htransport.NewClient(ctx, opts...)
108	if err != nil {
109		return nil, err
110	}
111	s, err := New(client)
112	if err != nil {
113		return nil, err
114	}
115	if endpoint != "" {
116		s.BasePath = endpoint
117	}
118	return s, nil
119}
120
121// New creates a new Service. It uses the provided http.Client for requests.
122//
123// Deprecated: please use NewService instead.
124// To provide a custom HTTP client, use option.WithHTTPClient.
125// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
126func New(client *http.Client) (*Service, error) {
127	if client == nil {
128		return nil, errors.New("client is nil")
129	}
130	s := &Service{client: client, BasePath: basePath}
131	s.Groups = NewGroupsService(s)
132	return s, nil
133}
134
135type Service struct {
136	client    *http.Client
137	BasePath  string // API endpoint base URL
138	UserAgent string // optional additional User-Agent fragment
139
140	Groups *GroupsService
141}
142
143func (s *Service) userAgent() string {
144	if s.UserAgent == "" {
145		return googleapi.UserAgent
146	}
147	return googleapi.UserAgent + " " + s.UserAgent
148}
149
150func NewGroupsService(s *Service) *GroupsService {
151	rs := &GroupsService{s: s}
152	rs.Memberships = NewGroupsMembershipsService(s)
153	return rs
154}
155
156type GroupsService struct {
157	s *Service
158
159	Memberships *GroupsMembershipsService
160}
161
162func NewGroupsMembershipsService(s *Service) *GroupsMembershipsService {
163	rs := &GroupsMembershipsService{s: s}
164	return rs
165}
166
167type GroupsMembershipsService struct {
168	s *Service
169}
170
171// AndroidAttributes: Resource representing the Android specific
172// attributes of a Device.
173type AndroidAttributes struct {
174	// EnabledUnknownSources: Whether applications from unknown sources can
175	// be installed on device.
176	EnabledUnknownSources bool `json:"enabledUnknownSources,omitempty"`
177
178	// OwnerProfileAccount: Whether this account is on an owner/primary
179	// profile.
180	// For phones, only true for owner profiles. Android 4+ devices
181	// can have secondary or restricted user profiles.
182	OwnerProfileAccount bool `json:"ownerProfileAccount,omitempty"`
183
184	// OwnershipPrivilege: Ownership privileges on device.
185	//
186	// Possible values:
187	//   "OWNERSHIP_PRIVILEGE_UNSPECIFIED" - Ownership privilege is not set.
188	//   "DEVICE_ADMINISTRATOR" - Active device administrator privileges on
189	// the device.
190	//   "PROFILE_OWNER" - Profile Owner privileges.
191	// The account is in a managed corporate profile.
192	//   "DEVICE_OWNER" - Device Owner privileges on the device.
193	OwnershipPrivilege string `json:"ownershipPrivilege,omitempty"`
194
195	// SupportsWorkProfile: Whether device supports Android work profiles.
196	// If false, this service
197	// will not block access to corp data even if an administrator turns on
198	// the
199	// "Enforce Work Profile" policy.
200	SupportsWorkProfile bool `json:"supportsWorkProfile,omitempty"`
201
202	// ForceSendFields is a list of field names (e.g.
203	// "EnabledUnknownSources") to unconditionally include in API requests.
204	// By default, fields with empty values are omitted from API requests.
205	// However, any non-pointer, non-interface field appearing in
206	// ForceSendFields will be sent to the server regardless of whether the
207	// field is empty or not. This may be used to include empty fields in
208	// Patch requests.
209	ForceSendFields []string `json:"-"`
210
211	// NullFields is a list of field names (e.g. "EnabledUnknownSources") to
212	// include in API requests with the JSON null value. By default, fields
213	// with empty values are omitted from API requests. However, any field
214	// with an empty value appearing in NullFields will be sent to the
215	// server as null. It is an error if a field in this list has a
216	// non-empty value. This may be used to include null fields in Patch
217	// requests.
218	NullFields []string `json:"-"`
219}
220
221func (s *AndroidAttributes) MarshalJSON() ([]byte, error) {
222	type NoMethod AndroidAttributes
223	raw := NoMethod(*s)
224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
225}
226
227// ApproveDeviceUserResponse: Response message for approving the device
228// to access user data.
229type ApproveDeviceUserResponse struct {
230	// DeviceUser: Resultant DeviceUser object for the action.
231	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
232
233	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
234	// unconditionally include in API requests. By default, fields with
235	// empty values are omitted from API requests. However, any non-pointer,
236	// non-interface field appearing in ForceSendFields will be sent to the
237	// server regardless of whether the field is empty or not. This may be
238	// used to include empty fields in Patch requests.
239	ForceSendFields []string `json:"-"`
240
241	// NullFields is a list of field names (e.g. "DeviceUser") to include in
242	// API requests with the JSON null value. By default, fields with empty
243	// values are omitted from API requests. However, any field with an
244	// empty value appearing in NullFields will be sent to the server as
245	// null. It is an error if a field in this list has a non-empty value.
246	// This may be used to include null fields in Patch requests.
247	NullFields []string `json:"-"`
248}
249
250func (s *ApproveDeviceUserResponse) MarshalJSON() ([]byte, error) {
251	type NoMethod ApproveDeviceUserResponse
252	raw := NoMethod(*s)
253	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
254}
255
256// BlockDeviceUserResponse: Response message for blocking the device
257// from accessing user data.
258type BlockDeviceUserResponse struct {
259	// DeviceUser: Resultant DeviceUser object for the action.
260	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
261
262	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
263	// unconditionally include in API requests. By default, fields with
264	// empty values are omitted from API requests. However, any non-pointer,
265	// non-interface field appearing in ForceSendFields will be sent to the
266	// server regardless of whether the field is empty or not. This may be
267	// used to include empty fields in Patch requests.
268	ForceSendFields []string `json:"-"`
269
270	// NullFields is a list of field names (e.g. "DeviceUser") to include in
271	// API requests with the JSON null value. By default, fields with empty
272	// values are omitted from API requests. However, any field with an
273	// empty value appearing in NullFields will be sent to the server as
274	// null. It is an error if a field in this list has a non-empty value.
275	// This may be used to include null fields in Patch requests.
276	NullFields []string `json:"-"`
277}
278
279func (s *BlockDeviceUserResponse) MarshalJSON() ([]byte, error) {
280	type NoMethod BlockDeviceUserResponse
281	raw := NoMethod(*s)
282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
283}
284
285// CancelWipeDeviceResponse: Response message for cancelling an
286// unfinished device wipe.
287type CancelWipeDeviceResponse struct {
288	// Device: Resultant Device object for the action. Note that asset tags
289	// will not be
290	// returned in the device object.
291	Device *Device `json:"device,omitempty"`
292
293	// ForceSendFields is a list of field names (e.g. "Device") to
294	// unconditionally include in API requests. By default, fields with
295	// empty values are omitted from API requests. However, any non-pointer,
296	// non-interface field appearing in ForceSendFields will be sent to the
297	// server regardless of whether the field is empty or not. This may be
298	// used to include empty fields in Patch requests.
299	ForceSendFields []string `json:"-"`
300
301	// NullFields is a list of field names (e.g. "Device") to include in API
302	// requests with the JSON null value. By default, fields with empty
303	// values are omitted from API requests. However, any field with an
304	// empty value appearing in NullFields will be sent to the server as
305	// null. It is an error if a field in this list has a non-empty value.
306	// This may be used to include null fields in Patch requests.
307	NullFields []string `json:"-"`
308}
309
310func (s *CancelWipeDeviceResponse) MarshalJSON() ([]byte, error) {
311	type NoMethod CancelWipeDeviceResponse
312	raw := NoMethod(*s)
313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
314}
315
316// CancelWipeDeviceUserResponse: Response message for cancelling an
317// unfinished user account wipe.
318type CancelWipeDeviceUserResponse struct {
319	// DeviceUser: Resultant DeviceUser object for the action.
320	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
321
322	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
323	// unconditionally include in API requests. By default, fields with
324	// empty values are omitted from API requests. However, any non-pointer,
325	// non-interface field appearing in ForceSendFields will be sent to the
326	// server regardless of whether the field is empty or not. This may be
327	// used to include empty fields in Patch requests.
328	ForceSendFields []string `json:"-"`
329
330	// NullFields is a list of field names (e.g. "DeviceUser") to include in
331	// API requests with the JSON null value. By default, fields with empty
332	// values are omitted from API requests. However, any field with an
333	// empty value appearing in NullFields will be sent to the server as
334	// null. It is an error if a field in this list has a non-empty value.
335	// This may be used to include null fields in Patch requests.
336	NullFields []string `json:"-"`
337}
338
339func (s *CancelWipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
340	type NoMethod CancelWipeDeviceUserResponse
341	raw := NoMethod(*s)
342	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
343}
344
345// ClientState: Resource representing ClientState and supports updates
346// from API users
347type ClientState struct {
348	// AssetTags: The caller can specify asset tags for this resource
349	AssetTags []string `json:"assetTags,omitempty"`
350
351	// ComplianceState: The compliance state of the resource as specified by
352	// the API client.
353	//
354	// Possible values:
355	//   "COMPLIANCE_STATE_UNSPECIFIED" - The compliance state of the
356	// resource is unknown or unspecified.
357	//   "COMPLIANT" - Device is compliant with third party policies
358	//   "NON_COMPLIANT" - Device is not compliant with third party policies
359	ComplianceState string `json:"complianceState,omitempty"`
360
361	// CreateTime: Output only. The time the client state data was created.
362	CreateTime string `json:"createTime,omitempty"`
363
364	// CustomId: This field may be used to store a unique identifier for the
365	// API resource
366	// within which these CustomAttributes are a field.
367	CustomId string `json:"customId,omitempty"`
368
369	// Etag: The token that needs to be passed back for
370	// concurrency control in updates. Token needs to be passed back
371	// in UpdateRequest
372	Etag string `json:"etag,omitempty"`
373
374	// HealthScore: The Health score of the resource
375	//
376	// Possible values:
377	//   "HEALTH_SCORE_UNSPECIFIED" - Default value
378	//   "VERY_POOR" - The object is in very poor health as defined by the
379	// caller.
380	//   "POOR" - The object is in poor health as defined by the caller.
381	//   "NEUTRAL" - The object health is neither good nor poor, as defined
382	// by the caller.
383	//   "GOOD" - The object is in good health as defined by the caller.
384	//   "VERY_GOOD" - The object is in very good health as defined by the
385	// caller.
386	HealthScore string `json:"healthScore,omitempty"`
387
388	// KeyValuePairs: The map of key-value attributes stored by callers
389	// specific to a
390	// device. The total serialized length of this map may not exceed 10KB.
391	// No
392	// limit is placed on the number of attributes in a map.
393	KeyValuePairs map[string]CustomAttributeValue `json:"keyValuePairs,omitempty"`
394
395	// LastUpdateTime: Output only. The time the client state data was last
396	// updated.
397	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
398
399	// Managed: The management state of the resource as specified by the API
400	// client.
401	//
402	// Possible values:
403	//   "MANAGED_STATE_UNSPECIFIED" - The management state of the resource
404	// is unknown or unspecified.
405	//   "MANAGED" - The resource is managed.
406	//   "UNMANAGED" - The resource is not managed.
407	Managed string `json:"managed,omitempty"`
408
409	// Name: Output only. [Resource
410	// name](https://cloud.google.com/apis/design/resource_names) of
411	// the ClientState in
412	// format:
413	// `devices/{device_id}/deviceUsers/{device_user_id}/clientState/
414	// {partner_id}`,
415	// where partner_id corresponds to the partner storing the data.
416	Name string `json:"name,omitempty"`
417
418	// OwnerType: Output only. The owner of the ClientState
419	//
420	// Possible values:
421	//   "OWNER_TYPE_UNSPECIFIED" - Unknown owner type
422	//   "OWNER_TYPE_CUSTOMER" - Customer is the owner
423	//   "OWNER_TYPE_PARTNER" - Partner is the owner
424	OwnerType string `json:"ownerType,omitempty"`
425
426	// ScoreReason: A descriptive cause of the health score.
427	ScoreReason string `json:"scoreReason,omitempty"`
428
429	// ForceSendFields is a list of field names (e.g. "AssetTags") to
430	// unconditionally include in API requests. By default, fields with
431	// empty values are omitted from API requests. However, any non-pointer,
432	// non-interface field appearing in ForceSendFields will be sent to the
433	// server regardless of whether the field is empty or not. This may be
434	// used to include empty fields in Patch requests.
435	ForceSendFields []string `json:"-"`
436
437	// NullFields is a list of field names (e.g. "AssetTags") to include in
438	// API requests with the JSON null value. By default, fields with empty
439	// values are omitted from API requests. However, any field with an
440	// empty value appearing in NullFields will be sent to the server as
441	// null. It is an error if a field in this list has a non-empty value.
442	// This may be used to include null fields in Patch requests.
443	NullFields []string `json:"-"`
444}
445
446func (s *ClientState) MarshalJSON() ([]byte, error) {
447	type NoMethod ClientState
448	raw := NoMethod(*s)
449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
450}
451
452// CustomAttributeValue: Additional custom attribute values may be one
453// of these types
454type CustomAttributeValue struct {
455	// BoolValue: Represents a boolean value.
456	BoolValue bool `json:"boolValue,omitempty"`
457
458	// NumberValue: Represents a double value.
459	NumberValue float64 `json:"numberValue,omitempty"`
460
461	// StringValue: Represents a string value.
462	StringValue string `json:"stringValue,omitempty"`
463
464	// ForceSendFields is a list of field names (e.g. "BoolValue") to
465	// unconditionally include in API requests. By default, fields with
466	// empty values are omitted from API requests. However, any non-pointer,
467	// non-interface field appearing in ForceSendFields will be sent to the
468	// server regardless of whether the field is empty or not. This may be
469	// used to include empty fields in Patch requests.
470	ForceSendFields []string `json:"-"`
471
472	// NullFields is a list of field names (e.g. "BoolValue") to include in
473	// API requests with the JSON null value. By default, fields with empty
474	// values are omitted from API requests. However, any field with an
475	// empty value appearing in NullFields will be sent to the server as
476	// null. It is an error if a field in this list has a non-empty value.
477	// This may be used to include null fields in Patch requests.
478	NullFields []string `json:"-"`
479}
480
481func (s *CustomAttributeValue) MarshalJSON() ([]byte, error) {
482	type NoMethod CustomAttributeValue
483	raw := NoMethod(*s)
484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
485}
486
487func (s *CustomAttributeValue) UnmarshalJSON(data []byte) error {
488	type NoMethod CustomAttributeValue
489	var s1 struct {
490		NumberValue gensupport.JSONFloat64 `json:"numberValue"`
491		*NoMethod
492	}
493	s1.NoMethod = (*NoMethod)(s)
494	if err := json.Unmarshal(data, &s1); err != nil {
495		return err
496	}
497	s.NumberValue = float64(s1.NumberValue)
498	return nil
499}
500
501// Device: Represents a Device known to Google Cloud, independent of the
502// device
503// ownership, type, and whether it is assigned or in use by a user.
504type Device struct {
505	// AndroidSpecificAttributes: Output only. Attributes specific to
506	// Android devices.
507	AndroidSpecificAttributes *AndroidAttributes `json:"androidSpecificAttributes,omitempty"`
508
509	// AssetTag: Asset tag of the device.
510	AssetTag string `json:"assetTag,omitempty"`
511
512	// BasebandVersion: Output only. Baseband version of the device.
513	BasebandVersion string `json:"basebandVersion,omitempty"`
514
515	// BootloaderVersion: Output only. Device bootloader version. Example:
516	// 0.6.7.
517	BootloaderVersion string `json:"bootloaderVersion,omitempty"`
518
519	// Brand: Output only. Device brand. Example: Samsung.
520	Brand string `json:"brand,omitempty"`
521
522	// BuildNumber: Output only. Build number of the device.
523	BuildNumber string `json:"buildNumber,omitempty"`
524
525	// CompromisedState: Output only. Represents whether the Device is
526	// compromised.
527	//
528	// Possible values:
529	//   "COMPROMISED_STATE_UNSPECIFIED" - Default value.
530	//   "COMPROMISED" - The device is compromised (currently, this means
531	// Android device is
532	// rooted).
533	//   "UNCOMPROMISED" - The device is safe (currently, this means Android
534	// device is unrooted).
535	CompromisedState string `json:"compromisedState,omitempty"`
536
537	// CreateTime: Output only. When the Company-Owned device was imported.
538	// This field is empty for BYOD
539	// devices.
540	CreateTime string `json:"createTime,omitempty"`
541
542	// DeviceType: Output only. Type of device.
543	//
544	// Possible values:
545	//   "DEVICE_TYPE_UNSPECIFIED" - Unknown device type
546	//   "ANDROID" - Device is an Android device
547	//   "IOS" - Device is an iOS device
548	//   "GOOGLE_SYNC" - Device is a Google Sync device.
549	//   "WINDOWS" - Device is a Windows device.
550	//   "MAC_OS" - Device is a MacOS device.
551	//   "LINUX" - Device is a Linux device.
552	//   "CHROME_OS" - Device is a ChromeOS device.
553	DeviceType string `json:"deviceType,omitempty"`
554
555	// EnabledDeveloperOptions: Output only. Whether developer options is
556	// enabled on device.
557	EnabledDeveloperOptions bool `json:"enabledDeveloperOptions,omitempty"`
558
559	// EnabledUsbDebugging: Output only. Whether USB debugging is enabled on
560	// device.
561	EnabledUsbDebugging bool `json:"enabledUsbDebugging,omitempty"`
562
563	// EncryptionState: Output only. Device encryption state.
564	//
565	// Possible values:
566	//   "ENCRYPTION_STATE_UNSPECIFIED" - Encryption Status is not set.
567	//   "UNSUPPORTED_BY_DEVICE" - Device doesn't support encryption.
568	//   "ENCRYPTED" - Device is encrypted.
569	//   "NOT_ENCRYPTED" - Device is not encrypted.
570	EncryptionState string `json:"encryptionState,omitempty"`
571
572	// Imei: Output only. IMEI number of device if GSM device; empty
573	// otherwise.
574	Imei string `json:"imei,omitempty"`
575
576	// KernelVersion: Output only. Kernel version of the device.
577	KernelVersion string `json:"kernelVersion,omitempty"`
578
579	// LastSyncTime: Most recent time when device synced with this service.
580	LastSyncTime string `json:"lastSyncTime,omitempty"`
581
582	// ManagementState: Output only. Management state of the device
583	//
584	// Possible values:
585	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
586	// unused.
587	//   "APPROVED" - Device is approved.
588	//   "BLOCKED" - Device is blocked.
589	//   "PENDING" - Device is pending approval.
590	//   "UNPROVISIONED" - The device is not provisioned. Device will start
591	// from this state until
592	// some action is taken (i.e. a user starts using the device).
593	//   "WIPING" - Data and settings on the device are being removed.
594	//   "WIPED" - All data and settings on the device are removed.
595	ManagementState string `json:"managementState,omitempty"`
596
597	// Manufacturer: Output only. Device manufacturer. Example: Motorola.
598	Manufacturer string `json:"manufacturer,omitempty"`
599
600	// Meid: Output only. MEID number of device if CDMA device; empty
601	// otherwise.
602	Meid string `json:"meid,omitempty"`
603
604	// Model: Output only. Model name of device. Example: Pixel 3.
605	Model string `json:"model,omitempty"`
606
607	// Name: Output only. [Resource
608	// name](https://cloud.google.com/apis/design/resource_names)
609	// of the Device in format: `devices/{device_id}`, where device_id
610	// is
611	// the unique id assigned to the Device.
612	Name string `json:"name,omitempty"`
613
614	// NetworkOperator: Output only. Mobile or network operator of device,
615	// if available.
616	NetworkOperator string `json:"networkOperator,omitempty"`
617
618	// OsVersion: Output only. OS version of the device. Example: Android
619	// 8.1.0.
620	OsVersion string `json:"osVersion,omitempty"`
621
622	// OtherAccounts: Output only. Domain name for Google accounts on
623	// device. Type for other accounts on
624	// device. On Android, will only be populated if |ownership_privilege|
625	// is
626	// |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account
627	// signed in
628	// to the device policy app if that account's domain has only one
629	// account.
630	// Examples: "com.example", "xyz.com".
631	OtherAccounts []string `json:"otherAccounts,omitempty"`
632
633	// OwnerType: Whether the device is owned by the company or an
634	// individual
635	//
636	// Possible values:
637	//   "DEVICE_OWNERSHIP_UNSPECIFIED" - Default value. The value is
638	// unused.
639	//   "COMPANY" - Company owns the device.
640	//   "BYOD" - Bring Your Own Device (i.e. individual owns the device)
641	OwnerType string `json:"ownerType,omitempty"`
642
643	// ReleaseVersion: Output only. OS release version. Example: 6.0.
644	ReleaseVersion string `json:"releaseVersion,omitempty"`
645
646	// SecurityPatchTime: Output only. OS security patch update time on
647	// device.
648	SecurityPatchTime string `json:"securityPatchTime,omitempty"`
649
650	// SerialNumber: Serial Number of device. Example: HT82V1A01076.
651	SerialNumber string `json:"serialNumber,omitempty"`
652
653	// WifiMacAddresses: WiFi MAC addresses of device.
654	WifiMacAddresses []string `json:"wifiMacAddresses,omitempty"`
655
656	// ForceSendFields is a list of field names (e.g.
657	// "AndroidSpecificAttributes") to unconditionally include in API
658	// requests. By default, fields with empty values are omitted from API
659	// requests. However, any non-pointer, non-interface field appearing in
660	// ForceSendFields will be sent to the server regardless of whether the
661	// field is empty or not. This may be used to include empty fields in
662	// Patch requests.
663	ForceSendFields []string `json:"-"`
664
665	// NullFields is a list of field names (e.g.
666	// "AndroidSpecificAttributes") to include in API requests with the JSON
667	// null value. By default, fields with empty values are omitted from API
668	// requests. However, any field with an empty value appearing in
669	// NullFields will be sent to the server as null. It is an error if a
670	// field in this list has a non-empty value. This may be used to include
671	// null fields in Patch requests.
672	NullFields []string `json:"-"`
673}
674
675func (s *Device) MarshalJSON() ([]byte, error) {
676	type NoMethod Device
677	raw := NoMethod(*s)
678	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
679}
680
681// DeviceUser: A DeviceUser is a resource representing a user's use of a
682// Device
683type DeviceUser struct {
684	// CompromisedState: Compromised State of the DeviceUser object
685	//
686	// Possible values:
687	//   "COMPROMISED_STATE_UNSPECIFIED" - Compromised state of Device User
688	// account is unknown or unspecified.
689	//   "COMPROMISED" - Device User Account is compromised.
690	//   "NOT_COMPROMISED" - Device User Account is not compromised.
691	CompromisedState string `json:"compromisedState,omitempty"`
692
693	// FirstSyncTime: Output only. Most recent time when user registered
694	// with this service.
695	FirstSyncTime string `json:"firstSyncTime,omitempty"`
696
697	// LanguageCode: Output only. Default locale used on device, in IETF
698	// BCP-47 format.
699	LanguageCode string `json:"languageCode,omitempty"`
700
701	// LastSyncTime: Output only. Last time when user synced with policies.
702	LastSyncTime string `json:"lastSyncTime,omitempty"`
703
704	// ManagementState: Output only. Management state of the user on the
705	// device.
706	//
707	// Possible values:
708	//   "MANAGEMENT_STATE_UNSPECIFIED" - Default value. This value is
709	// unused.
710	//   "WIPING" - This user's data and profile is being removed from the
711	// device.
712	//   "WIPED" - This user's data and profile is removed from the device.
713	//   "APPROVED" - User is approved to access data on the device.
714	//   "BLOCKED" - User is blocked from accessing data on the device.
715	//   "PENDING_APPROVAL" - User is awaiting approval.
716	//   "UNENROLLED" - User is unenrolled from Advanced Windows Management,
717	// but the Windows
718	// account is still intact.
719	ManagementState string `json:"managementState,omitempty"`
720
721	// Name: Output only. [Resource
722	// name](https://cloud.google.com/apis/design/resource_names) of
723	// the DeviceUser in format:
724	// `devices/{device_id}/deviceUsers/{user_id}`,
725	// where user_id is the ID of the user associated with the user session.
726	Name string `json:"name,omitempty"`
727
728	// PasswordState: Password state of the DeviceUser object
729	//
730	// Possible values:
731	//   "PASSWORD_STATE_UNSPECIFIED" - Password state not set.
732	//   "PASSWORD_SET" - Password set in object.
733	//   "PASSWORD_NOT_SET" - Password not set in object.
734	PasswordState string `json:"passwordState,omitempty"`
735
736	// UserAgent: Output only. User agent on the device for this specific
737	// user
738	UserAgent string `json:"userAgent,omitempty"`
739
740	// UserEmail: Email address of the user registered on the device.
741	UserEmail string `json:"userEmail,omitempty"`
742
743	// ForceSendFields is a list of field names (e.g. "CompromisedState") to
744	// unconditionally include in API requests. By default, fields with
745	// empty values are omitted from API requests. However, any non-pointer,
746	// non-interface field appearing in ForceSendFields will be sent to the
747	// server regardless of whether the field is empty or not. This may be
748	// used to include empty fields in Patch requests.
749	ForceSendFields []string `json:"-"`
750
751	// NullFields is a list of field names (e.g. "CompromisedState") to
752	// include in API requests with the JSON null value. By default, fields
753	// with empty values are omitted from API requests. However, any field
754	// with an empty value appearing in NullFields will be sent to the
755	// server as null. It is an error if a field in this list has a
756	// non-empty value. This may be used to include null fields in Patch
757	// requests.
758	NullFields []string `json:"-"`
759}
760
761func (s *DeviceUser) MarshalJSON() ([]byte, error) {
762	type NoMethod DeviceUser
763	raw := NoMethod(*s)
764	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
765}
766
767// EndpointApp: An EndpointApp represents an app that is installed on a
768// device
769type EndpointApp struct {
770	// DisplayName: Output only. Name of the app displayed to the user
771	DisplayName string `json:"displayName,omitempty"`
772
773	// Name: Output only. [Resource
774	// name](https://cloud.google.com/apis/design/resource_names) of
775	// the EndpointApp in
776	// format:
777	// `devices/{device}/deviceUsers/{device_user}/endpointApps/{endp
778	// oint_app}`,
779	// where client_app_id is the ID of the app associated with the Device.
780	Name string `json:"name,omitempty"`
781
782	// PackageName: Output only. Full package name of the installed app
783	PackageName string `json:"packageName,omitempty"`
784
785	// Permissions: Output only. Names of all permissions granted to the
786	// installed app
787	Permissions []string `json:"permissions,omitempty"`
788
789	// VersionCode: Output only. Version code of the installed app
790	VersionCode int64 `json:"versionCode,omitempty"`
791
792	// VersionName: Output only. Version name of the installed app
793	VersionName string `json:"versionName,omitempty"`
794
795	// ForceSendFields is a list of field names (e.g. "DisplayName") to
796	// unconditionally include in API requests. By default, fields with
797	// empty values are omitted from API requests. However, any non-pointer,
798	// non-interface field appearing in ForceSendFields will be sent to the
799	// server regardless of whether the field is empty or not. This may be
800	// used to include empty fields in Patch requests.
801	ForceSendFields []string `json:"-"`
802
803	// NullFields is a list of field names (e.g. "DisplayName") to include
804	// in API requests with the JSON null value. By default, fields with
805	// empty values are omitted from API requests. However, any field with
806	// an empty value appearing in NullFields will be sent to the server as
807	// null. It is an error if a field in this list has a non-empty value.
808	// This may be used to include null fields in Patch requests.
809	NullFields []string `json:"-"`
810}
811
812func (s *EndpointApp) MarshalJSON() ([]byte, error) {
813	type NoMethod EndpointApp
814	raw := NoMethod(*s)
815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
816}
817
818// EntityKey: A unique identifier for an entity in the Cloud Identity
819// Groups API.
820//
821// An entity can represent either a group with an optional `namespace`
822// or a user
823// without a `namespace`. The combination of `id` and `namespace` must
824// be
825// unique; however, the same `id` can be used with different
826// `namespace`s.
827type EntityKey struct {
828	// Id: The ID of the entity.
829	//
830	// For Google-managed entities, the `id` must be the email address of
831	// an
832	// existing group or user.
833	//
834	// For external-identity-mapped entities, the `id` must be a string
835	// conforming
836	// to the Identity Source's requirements.
837	//
838	// Must be unique within a `namespace`.
839	Id string `json:"id,omitempty"`
840
841	// Namespace: The namespace in which the entity exists.
842	//
843	// If not specified, the `EntityKey` represents a Google-managed entity
844	// such
845	// as a Google user or a Google Group.
846	//
847	// If specified, the `EntityKey` represents an external-identity-mapped
848	// group.
849	// The namespace must correspond to an identity source created in
850	// Admin
851	// Console and must be in the form of
852	// `identitysources/{identity_source_id}.
853	Namespace string `json:"namespace,omitempty"`
854
855	// ForceSendFields is a list of field names (e.g. "Id") to
856	// unconditionally include in API requests. By default, fields with
857	// empty values are omitted from API requests. However, any non-pointer,
858	// non-interface field appearing in ForceSendFields will be sent to the
859	// server regardless of whether the field is empty or not. This may be
860	// used to include empty fields in Patch requests.
861	ForceSendFields []string `json:"-"`
862
863	// NullFields is a list of field names (e.g. "Id") to include in API
864	// requests with the JSON null value. By default, fields with empty
865	// values are omitted from API requests. However, any field with an
866	// empty value appearing in NullFields will be sent to the server as
867	// null. It is an error if a field in this list has a non-empty value.
868	// This may be used to include null fields in Patch requests.
869	NullFields []string `json:"-"`
870}
871
872func (s *EntityKey) MarshalJSON() ([]byte, error) {
873	type NoMethod EntityKey
874	raw := NoMethod(*s)
875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
876}
877
878// GetMembershipGraphResponse: The response message for
879// MembershipsService.GetMembershipGraph.
880type GetMembershipGraphResponse struct {
881	// AdjacencyList: The membership graph's path information represented as
882	// an adjacency list.
883	AdjacencyList []*MembershipAdjacencyList `json:"adjacencyList,omitempty"`
884
885	// Groups: The resources representing each group in the adjacency list.
886	// Each
887	// group in this list can be correlated to a 'group' of
888	// the
889	// MembershipAdjacencyList using the 'name' of the Group resource.
890	Groups []*Group `json:"groups,omitempty"`
891
892	// ForceSendFields is a list of field names (e.g. "AdjacencyList") to
893	// unconditionally include in API requests. By default, fields with
894	// empty values are omitted from API requests. However, any non-pointer,
895	// non-interface field appearing in ForceSendFields will be sent to the
896	// server regardless of whether the field is empty or not. This may be
897	// used to include empty fields in Patch requests.
898	ForceSendFields []string `json:"-"`
899
900	// NullFields is a list of field names (e.g. "AdjacencyList") to include
901	// in API requests with the JSON null value. By default, fields with
902	// empty values are omitted from API requests. However, any field with
903	// an empty value appearing in NullFields will be sent to the server as
904	// null. It is an error if a field in this list has a non-empty value.
905	// This may be used to include null fields in Patch requests.
906	NullFields []string `json:"-"`
907}
908
909func (s *GetMembershipGraphResponse) MarshalJSON() ([]byte, error) {
910	type NoMethod GetMembershipGraphResponse
911	raw := NoMethod(*s)
912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
913}
914
915// Group: A group within the Cloud Identity Groups API.
916//
917// A `Group` is a collection of entities, where each entity is either a
918// user,
919// another group or a service account.
920type Group struct {
921	// AdditionalGroupKeys: Additional entity key aliases for a Group.
922	AdditionalGroupKeys []*EntityKey `json:"additionalGroupKeys,omitempty"`
923
924	// CreateTime: Output only. The time when the `Group` was created.
925	CreateTime string `json:"createTime,omitempty"`
926
927	// Description: An extended description to help users determine the
928	// purpose of a `Group`.
929	//
930	// Must not be longer than 4,096 characters.
931	Description string `json:"description,omitempty"`
932
933	// DisplayName: The display name of the `Group`.
934	DisplayName string `json:"displayName,omitempty"`
935
936	// GroupKey: Required. Immutable. The `EntityKey` of the `Group`.
937	GroupKey *EntityKey `json:"groupKey,omitempty"`
938
939	// Labels: Required. The labels that apply to the `Group`.
940	//
941	// Must not contain more than one entry. Must contain the
942	// entry
943	// `'cloudidentity.googleapis.com/groups.discussion_forum': ''` if the
944	// `Group`
945	// is a Google Group or `'system/groups/external': ''` if the `Group` is
946	// an
947	// external-identity-mapped group.
948	Labels map[string]string `json:"labels,omitempty"`
949
950	// Name: Output only. The [resource
951	// name](https://cloud.google.com/apis/design/resource_names) of
952	// the `Group`.
953	//
954	// Shall be of the form `groups/{group_id}`.
955	Name string `json:"name,omitempty"`
956
957	// Parent: Required. Immutable. The resource name of the entity under
958	// which this `Group` resides in the
959	// Cloud Identity resource hierarchy.
960	//
961	// Must be of the form `identitysources/{identity_source_id}` for
962	// external-
963	// identity-mapped groups or `customers/{customer_id}` for Google
964	// Groups.
965	Parent string `json:"parent,omitempty"`
966
967	// UpdateTime: Output only. The time when the `Group` was last updated.
968	UpdateTime string `json:"updateTime,omitempty"`
969
970	// ServerResponse contains the HTTP response code and headers from the
971	// server.
972	googleapi.ServerResponse `json:"-"`
973
974	// ForceSendFields is a list of field names (e.g. "AdditionalGroupKeys")
975	// to unconditionally include in API requests. By default, fields with
976	// empty values are omitted from API requests. However, any non-pointer,
977	// non-interface field appearing in ForceSendFields will be sent to the
978	// server regardless of whether the field is empty or not. This may be
979	// used to include empty fields in Patch requests.
980	ForceSendFields []string `json:"-"`
981
982	// NullFields is a list of field names (e.g. "AdditionalGroupKeys") to
983	// include in API requests with the JSON null value. By default, fields
984	// with empty values are omitted from API requests. However, any field
985	// with an empty value appearing in NullFields will be sent to the
986	// server as null. It is an error if a field in this list has a
987	// non-empty value. This may be used to include null fields in Patch
988	// requests.
989	NullFields []string `json:"-"`
990}
991
992func (s *Group) MarshalJSON() ([]byte, error) {
993	type NoMethod Group
994	raw := NoMethod(*s)
995	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
996}
997
998// ListDeviceUsersResponse: Response message that is returned in LRO
999// result of ListDeviceUsers Operation.
1000type ListDeviceUsersResponse struct {
1001	// DeviceUsers: Devices meeting the list restrictions.
1002	DeviceUsers []*DeviceUser `json:"deviceUsers,omitempty"`
1003
1004	// NextPageToken: Token to retrieve the next page of results. Empty if
1005	// there are no more
1006	// results.
1007	NextPageToken string `json:"nextPageToken,omitempty"`
1008
1009	// ForceSendFields is a list of field names (e.g. "DeviceUsers") to
1010	// unconditionally include in API requests. By default, fields with
1011	// empty values are omitted from API requests. However, any non-pointer,
1012	// non-interface field appearing in ForceSendFields will be sent to the
1013	// server regardless of whether the field is empty or not. This may be
1014	// used to include empty fields in Patch requests.
1015	ForceSendFields []string `json:"-"`
1016
1017	// NullFields is a list of field names (e.g. "DeviceUsers") to include
1018	// in API requests with the JSON null value. By default, fields with
1019	// empty values are omitted from API requests. However, any field with
1020	// an empty value appearing in NullFields will be sent to the server as
1021	// null. It is an error if a field in this list has a non-empty value.
1022	// This may be used to include null fields in Patch requests.
1023	NullFields []string `json:"-"`
1024}
1025
1026func (s *ListDeviceUsersResponse) MarshalJSON() ([]byte, error) {
1027	type NoMethod ListDeviceUsersResponse
1028	raw := NoMethod(*s)
1029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1030}
1031
1032// ListDevicesResponse: Response message that is returned in LRO result
1033// of ListDevices Operation.
1034type ListDevicesResponse struct {
1035	// Devices: Devices meeting the list restrictions.
1036	Devices []*Device `json:"devices,omitempty"`
1037
1038	// NextPageToken: Token to retrieve the next page of results. Empty if
1039	// there are no more
1040	// results.
1041	NextPageToken string `json:"nextPageToken,omitempty"`
1042
1043	// ForceSendFields is a list of field names (e.g. "Devices") to
1044	// unconditionally include in API requests. By default, fields with
1045	// empty values are omitted from API requests. However, any non-pointer,
1046	// non-interface field appearing in ForceSendFields will be sent to the
1047	// server regardless of whether the field is empty or not. This may be
1048	// used to include empty fields in Patch requests.
1049	ForceSendFields []string `json:"-"`
1050
1051	// NullFields is a list of field names (e.g. "Devices") to include in
1052	// API requests with the JSON null value. By default, fields with empty
1053	// values are omitted from API requests. However, any field with an
1054	// empty value appearing in NullFields will be sent to the server as
1055	// null. It is an error if a field in this list has a non-empty value.
1056	// This may be used to include null fields in Patch requests.
1057	NullFields []string `json:"-"`
1058}
1059
1060func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) {
1061	type NoMethod ListDevicesResponse
1062	raw := NoMethod(*s)
1063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1064}
1065
1066// ListEndpointAppsResponse: Response message for listing all apps on
1067// the device.
1068type ListEndpointAppsResponse struct {
1069	// EndpointApps: The list of matching EndpointApps found as a result of
1070	// the request.
1071	EndpointApps []*EndpointApp `json:"endpointApps,omitempty"`
1072
1073	// NextPageToken: Token to retrieve the next page of results. Empty if
1074	// there are no more
1075	// results.
1076	NextPageToken string `json:"nextPageToken,omitempty"`
1077
1078	// ForceSendFields is a list of field names (e.g. "EndpointApps") to
1079	// unconditionally include in API requests. By default, fields with
1080	// empty values are omitted from API requests. However, any non-pointer,
1081	// non-interface field appearing in ForceSendFields will be sent to the
1082	// server regardless of whether the field is empty or not. This may be
1083	// used to include empty fields in Patch requests.
1084	ForceSendFields []string `json:"-"`
1085
1086	// NullFields is a list of field names (e.g. "EndpointApps") to include
1087	// in API requests with the JSON null value. By default, fields with
1088	// empty values are omitted from API requests. However, any field with
1089	// an empty value appearing in NullFields will be sent to the server as
1090	// null. It is an error if a field in this list has a non-empty value.
1091	// This may be used to include null fields in Patch requests.
1092	NullFields []string `json:"-"`
1093}
1094
1095func (s *ListEndpointAppsResponse) MarshalJSON() ([]byte, error) {
1096	type NoMethod ListEndpointAppsResponse
1097	raw := NoMethod(*s)
1098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1099}
1100
1101// ListGroupsResponse: The response message for
1102// GroupsService.ListGroups.
1103type ListGroupsResponse struct {
1104	// Groups: The `Group`s under the specified `parent`.
1105	Groups []*Group `json:"groups,omitempty"`
1106
1107	// NextPageToken: A continuation token to retrieve the next page of
1108	// results, or empty if
1109	// there are no more results available.
1110	NextPageToken string `json:"nextPageToken,omitempty"`
1111
1112	// ServerResponse contains the HTTP response code and headers from the
1113	// server.
1114	googleapi.ServerResponse `json:"-"`
1115
1116	// ForceSendFields is a list of field names (e.g. "Groups") to
1117	// unconditionally include in API requests. By default, fields with
1118	// empty values are omitted from API requests. However, any non-pointer,
1119	// non-interface field appearing in ForceSendFields will be sent to the
1120	// server regardless of whether the field is empty or not. This may be
1121	// used to include empty fields in Patch requests.
1122	ForceSendFields []string `json:"-"`
1123
1124	// NullFields is a list of field names (e.g. "Groups") to include in API
1125	// requests with the JSON null value. By default, fields with empty
1126	// values are omitted from API requests. However, any field with an
1127	// empty value appearing in NullFields will be sent to the server as
1128	// null. It is an error if a field in this list has a non-empty value.
1129	// This may be used to include null fields in Patch requests.
1130	NullFields []string `json:"-"`
1131}
1132
1133func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
1134	type NoMethod ListGroupsResponse
1135	raw := NoMethod(*s)
1136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1137}
1138
1139// ListMembershipsResponse: The response message for
1140// MembershipsService.ListMemberships.
1141type ListMembershipsResponse struct {
1142	// Memberships: The `Membership`s under the specified `parent`.
1143	Memberships []*Membership `json:"memberships,omitempty"`
1144
1145	// NextPageToken: A continuation token to retrieve the next page of
1146	// results, or empty if
1147	// there are no more results available.
1148	NextPageToken string `json:"nextPageToken,omitempty"`
1149
1150	// ServerResponse contains the HTTP response code and headers from the
1151	// server.
1152	googleapi.ServerResponse `json:"-"`
1153
1154	// ForceSendFields is a list of field names (e.g. "Memberships") to
1155	// unconditionally include in API requests. By default, fields with
1156	// empty values are omitted from API requests. However, any non-pointer,
1157	// non-interface field appearing in ForceSendFields will be sent to the
1158	// server regardless of whether the field is empty or not. This may be
1159	// used to include empty fields in Patch requests.
1160	ForceSendFields []string `json:"-"`
1161
1162	// NullFields is a list of field names (e.g. "Memberships") to include
1163	// in API requests with the JSON null value. By default, fields with
1164	// empty values are omitted from API requests. However, any field with
1165	// an empty value appearing in NullFields will be sent to the server as
1166	// null. It is an error if a field in this list has a non-empty value.
1167	// This may be used to include null fields in Patch requests.
1168	NullFields []string `json:"-"`
1169}
1170
1171func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error) {
1172	type NoMethod ListMembershipsResponse
1173	raw := NoMethod(*s)
1174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1175}
1176
1177// LookupGroupNameResponse: The response message for
1178// GroupsService.LookupGroupName.
1179type LookupGroupNameResponse struct {
1180	// Name: Output only. The [resource
1181	// name](https://cloud.google.com/apis/design/resource_names) of
1182	// the looked-up `Group`.
1183	Name string `json:"name,omitempty"`
1184
1185	// ServerResponse contains the HTTP response code and headers from the
1186	// server.
1187	googleapi.ServerResponse `json:"-"`
1188
1189	// ForceSendFields is a list of field names (e.g. "Name") to
1190	// unconditionally include in API requests. By default, fields with
1191	// empty values are omitted from API requests. However, any non-pointer,
1192	// non-interface field appearing in ForceSendFields will be sent to the
1193	// server regardless of whether the field is empty or not. This may be
1194	// used to include empty fields in Patch requests.
1195	ForceSendFields []string `json:"-"`
1196
1197	// NullFields is a list of field names (e.g. "Name") to include in API
1198	// requests with the JSON null value. By default, fields with empty
1199	// values are omitted from API requests. However, any field with an
1200	// empty value appearing in NullFields will be sent to the server as
1201	// null. It is an error if a field in this list has a non-empty value.
1202	// This may be used to include null fields in Patch requests.
1203	NullFields []string `json:"-"`
1204}
1205
1206func (s *LookupGroupNameResponse) MarshalJSON() ([]byte, error) {
1207	type NoMethod LookupGroupNameResponse
1208	raw := NoMethod(*s)
1209	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1210}
1211
1212// LookupMembershipNameResponse: The response message for
1213// MembershipsService.LookupMembershipName.
1214type LookupMembershipNameResponse struct {
1215	// Name: The [resource
1216	// name](https://cloud.google.com/apis/design/resource_names) of
1217	// the looked-up `Membership`.
1218	//
1219	// Must be of the form `groups/{group_id}/memberships/{membership_id}`.
1220	Name string `json:"name,omitempty"`
1221
1222	// ServerResponse contains the HTTP response code and headers from the
1223	// server.
1224	googleapi.ServerResponse `json:"-"`
1225
1226	// ForceSendFields is a list of field names (e.g. "Name") to
1227	// unconditionally include in API requests. By default, fields with
1228	// empty values are omitted from API requests. However, any non-pointer,
1229	// non-interface field appearing in ForceSendFields will be sent to the
1230	// server regardless of whether the field is empty or not. This may be
1231	// used to include empty fields in Patch requests.
1232	ForceSendFields []string `json:"-"`
1233
1234	// NullFields is a list of field names (e.g. "Name") to include in API
1235	// requests with the JSON null value. By default, fields with empty
1236	// values are omitted from API requests. However, any field with an
1237	// empty value appearing in NullFields will be sent to the server as
1238	// null. It is an error if a field in this list has a non-empty value.
1239	// This may be used to include null fields in Patch requests.
1240	NullFields []string `json:"-"`
1241}
1242
1243func (s *LookupMembershipNameResponse) MarshalJSON() ([]byte, error) {
1244	type NoMethod LookupMembershipNameResponse
1245	raw := NoMethod(*s)
1246	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1247}
1248
1249// LookupSelfDeviceUsersResponse: Response containing resource names of
1250// the DeviceUsers associated with the
1251// caller's credentials.
1252type LookupSelfDeviceUsersResponse struct {
1253	// Customer: The obfuscated customer Id that may be passed back to
1254	// other
1255	// Devices API methods such as List, Get, etc.
1256	Customer string `json:"customer,omitempty"`
1257
1258	// Names: [Resource
1259	// names](https://cloud.google.com/apis/design/resource_names) of
1260	// the DeviceUsers in the
1261	// format:
1262	// `devices/{device_id}/deviceUsers/{user_resource_id}`, where
1263	// device_id is the unique ID assigned to a Device and
1264	// user_resource_id is the unique user ID
1265	Names []string `json:"names,omitempty"`
1266
1267	// NextPageToken: Token to retrieve the next page of results. Empty if
1268	// there are no more
1269	// results.
1270	NextPageToken string `json:"nextPageToken,omitempty"`
1271
1272	// ForceSendFields is a list of field names (e.g. "Customer") to
1273	// unconditionally include in API requests. By default, fields with
1274	// empty values are omitted from API requests. However, any non-pointer,
1275	// non-interface field appearing in ForceSendFields will be sent to the
1276	// server regardless of whether the field is empty or not. This may be
1277	// used to include empty fields in Patch requests.
1278	ForceSendFields []string `json:"-"`
1279
1280	// NullFields is a list of field names (e.g. "Customer") to include in
1281	// API requests with the JSON null value. By default, fields with empty
1282	// values are omitted from API requests. However, any field with an
1283	// empty value appearing in NullFields will be sent to the server as
1284	// null. It is an error if a field in this list has a non-empty value.
1285	// This may be used to include null fields in Patch requests.
1286	NullFields []string `json:"-"`
1287}
1288
1289func (s *LookupSelfDeviceUsersResponse) MarshalJSON() ([]byte, error) {
1290	type NoMethod LookupSelfDeviceUsersResponse
1291	raw := NoMethod(*s)
1292	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1293}
1294
1295// Membership: A membership within the Cloud Identity Groups API.
1296//
1297// A `Membership` defines a relationship between a `Group` and an
1298// entity
1299// belonging to that `Group`, referred to as a "member".
1300type Membership struct {
1301	// CreateTime: Output only. The time when the `Membership` was created.
1302	CreateTime string `json:"createTime,omitempty"`
1303
1304	// MemberKey: Immutable. The `EntityKey` of the member.
1305	//
1306	// Either `member_key` or `preferred_member_key` must be set when
1307	// calling
1308	// MembershipsService.CreateMembership but not both; both shall be
1309	// set
1310	// when returned.
1311	MemberKey *EntityKey `json:"memberKey,omitempty"`
1312
1313	// Name: Output only. The [resource
1314	// name](https://cloud.google.com/apis/design/resource_names) of
1315	// the `Membership`.
1316	//
1317	// Shall be of the form `groups/{group_id}/memberships/{membership_id}`.
1318	Name string `json:"name,omitempty"`
1319
1320	// PreferredMemberKey: Required. Immutable. The `EntityKey` of the
1321	// member.
1322	//
1323	// Either `member_key` or `preferred_member_key` must be set when
1324	// calling
1325	// MembershipsService.CreateMembership but not both; both shall be
1326	// set
1327	// when returned.
1328	PreferredMemberKey *EntityKey `json:"preferredMemberKey,omitempty"`
1329
1330	// Roles: The `MembershipRole`s that apply to the `Membership`.
1331	//
1332	// If unspecified, defaults to a single `MembershipRole` with `name`
1333	// `MEMBER`.
1334	//
1335	// Must not contain duplicate `MembershipRole`s with the same `name`.
1336	Roles []*MembershipRole `json:"roles,omitempty"`
1337
1338	// UpdateTime: Output only. The time when the `Membership` was last
1339	// updated.
1340	UpdateTime string `json:"updateTime,omitempty"`
1341
1342	// ServerResponse contains the HTTP response code and headers from the
1343	// server.
1344	googleapi.ServerResponse `json:"-"`
1345
1346	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1347	// unconditionally include in API requests. By default, fields with
1348	// empty values are omitted from API requests. However, any non-pointer,
1349	// non-interface field appearing in ForceSendFields will be sent to the
1350	// server regardless of whether the field is empty or not. This may be
1351	// used to include empty fields in Patch requests.
1352	ForceSendFields []string `json:"-"`
1353
1354	// NullFields is a list of field names (e.g. "CreateTime") to include in
1355	// API requests with the JSON null value. By default, fields with empty
1356	// values are omitted from API requests. However, any field with an
1357	// empty value appearing in NullFields will be sent to the server as
1358	// null. It is an error if a field in this list has a non-empty value.
1359	// This may be used to include null fields in Patch requests.
1360	NullFields []string `json:"-"`
1361}
1362
1363func (s *Membership) MarshalJSON() ([]byte, error) {
1364	type NoMethod Membership
1365	raw := NoMethod(*s)
1366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1367}
1368
1369// MembershipAdjacencyList: Membership graph's path information as an
1370// adjacency list.
1371type MembershipAdjacencyList struct {
1372	// Edges: Each edge contains information about the member that belongs
1373	// to this group.
1374	Edges []*Membership `json:"edges,omitempty"`
1375
1376	// Group: Resource name of the group that the members belong to.
1377	Group string `json:"group,omitempty"`
1378
1379	// ForceSendFields is a list of field names (e.g. "Edges") to
1380	// unconditionally include in API requests. By default, fields with
1381	// empty values are omitted from API requests. However, any non-pointer,
1382	// non-interface field appearing in ForceSendFields will be sent to the
1383	// server regardless of whether the field is empty or not. This may be
1384	// used to include empty fields in Patch requests.
1385	ForceSendFields []string `json:"-"`
1386
1387	// NullFields is a list of field names (e.g. "Edges") to include in API
1388	// requests with the JSON null value. By default, fields with empty
1389	// values are omitted from API requests. However, any field with an
1390	// empty value appearing in NullFields will be sent to the server as
1391	// null. It is an error if a field in this list has a non-empty value.
1392	// This may be used to include null fields in Patch requests.
1393	NullFields []string `json:"-"`
1394}
1395
1396func (s *MembershipAdjacencyList) MarshalJSON() ([]byte, error) {
1397	type NoMethod MembershipAdjacencyList
1398	raw := NoMethod(*s)
1399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1400}
1401
1402// MembershipRole: A membership role within the Cloud Identity Groups
1403// API.
1404//
1405// A `MembershipRole` defines the privileges granted to a `Membership`.
1406type MembershipRole struct {
1407	// Name: The name of the `MembershipRole`.
1408	//
1409	// Must be one of `OWNER`, `MANAGER`, `MEMBER`.
1410	Name string `json:"name,omitempty"`
1411
1412	// ForceSendFields is a list of field names (e.g. "Name") to
1413	// unconditionally include in API requests. By default, fields with
1414	// empty values are omitted from API requests. However, any non-pointer,
1415	// non-interface field appearing in ForceSendFields will be sent to the
1416	// server regardless of whether the field is empty or not. This may be
1417	// used to include empty fields in Patch requests.
1418	ForceSendFields []string `json:"-"`
1419
1420	// NullFields is a list of field names (e.g. "Name") to include in API
1421	// requests with the JSON null value. By default, fields with empty
1422	// values are omitted from API requests. However, any field with an
1423	// empty value appearing in NullFields will be sent to the server as
1424	// null. It is an error if a field in this list has a non-empty value.
1425	// This may be used to include null fields in Patch requests.
1426	NullFields []string `json:"-"`
1427}
1428
1429func (s *MembershipRole) MarshalJSON() ([]byte, error) {
1430	type NoMethod MembershipRole
1431	raw := NoMethod(*s)
1432	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1433}
1434
1435// ModifyMembershipRolesRequest: The request message for
1436// MembershipsService.ModifyMembershipRoles.
1437type ModifyMembershipRolesRequest struct {
1438	// AddRoles: The `MembershipRole`s to be added.
1439	//
1440	// Adding or removing roles in the same request as updating roles is
1441	// not
1442	// supported.
1443	//
1444	// Must not be set if `update_roles_params` is set.
1445	AddRoles []*MembershipRole `json:"addRoles,omitempty"`
1446
1447	// RemoveRoles: The `name`s of the `MembershipRole`s to be
1448	// removed.
1449	//
1450	// Adding or removing roles in the same request as updating roles is
1451	// not
1452	// supported.
1453	//
1454	// It is not possible to remove the `MEMBER` `MembershipRole`. If you
1455	// wish to
1456	// delete a `Membership`, call
1457	// MembershipsService.DeleteMembership
1458	// instead.
1459	//
1460	// Must not contain `MEMBER`. Must not be set if `update_roles_params`
1461	// is set.
1462	RemoveRoles []string `json:"removeRoles,omitempty"`
1463
1464	// UpdateRolesParams: The `MembershipRole`s to be updated.
1465	//
1466	// Updating roles in the same request as adding or removing roles is
1467	// not
1468	// supported.
1469	//
1470	// Must not be set if either `add_roles` or `remove_roles` is set.
1471	UpdateRolesParams []*UpdateMembershipRolesParams `json:"updateRolesParams,omitempty"`
1472
1473	// ForceSendFields is a list of field names (e.g. "AddRoles") to
1474	// unconditionally include in API requests. By default, fields with
1475	// empty values are omitted from API requests. However, any non-pointer,
1476	// non-interface field appearing in ForceSendFields will be sent to the
1477	// server regardless of whether the field is empty or not. This may be
1478	// used to include empty fields in Patch requests.
1479	ForceSendFields []string `json:"-"`
1480
1481	// NullFields is a list of field names (e.g. "AddRoles") to include in
1482	// API requests with the JSON null value. By default, fields with empty
1483	// values are omitted from API requests. However, any field with an
1484	// empty value appearing in NullFields will be sent to the server as
1485	// null. It is an error if a field in this list has a non-empty value.
1486	// This may be used to include null fields in Patch requests.
1487	NullFields []string `json:"-"`
1488}
1489
1490func (s *ModifyMembershipRolesRequest) MarshalJSON() ([]byte, error) {
1491	type NoMethod ModifyMembershipRolesRequest
1492	raw := NoMethod(*s)
1493	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1494}
1495
1496// ModifyMembershipRolesResponse: The response message for
1497// MembershipsService.ModifyMembershipRoles.
1498type ModifyMembershipRolesResponse struct {
1499	// Membership: The `Membership` resource after modifying its
1500	// `MembershipRole`s.
1501	Membership *Membership `json:"membership,omitempty"`
1502
1503	// ServerResponse contains the HTTP response code and headers from the
1504	// server.
1505	googleapi.ServerResponse `json:"-"`
1506
1507	// ForceSendFields is a list of field names (e.g. "Membership") 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. "Membership") 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 *ModifyMembershipRolesResponse) MarshalJSON() ([]byte, error) {
1525	type NoMethod ModifyMembershipRolesResponse
1526	raw := NoMethod(*s)
1527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1528}
1529
1530// Operation: This resource represents a long-running operation that is
1531// the result of a
1532// network API call.
1533type Operation struct {
1534	// Done: If the value is `false`, it means the operation is still in
1535	// progress.
1536	// If `true`, the operation is completed, and either `error` or
1537	// `response` is
1538	// available.
1539	Done bool `json:"done,omitempty"`
1540
1541	// Error: The error result of the operation in case of failure or
1542	// cancellation.
1543	Error *Status `json:"error,omitempty"`
1544
1545	// Metadata: Service-specific metadata associated with the operation.
1546	// It typically
1547	// contains progress information and common metadata such as create
1548	// time.
1549	// Some services might not provide such metadata.  Any method that
1550	// returns a
1551	// long-running operation should document the metadata type, if any.
1552	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1553
1554	// Name: The server-assigned name, which is only unique within the same
1555	// service that
1556	// originally returns it. If you use the default HTTP mapping,
1557	// the
1558	// `name` should be a resource name ending with
1559	// `operations/{unique_id}`.
1560	Name string `json:"name,omitempty"`
1561
1562	// Response: The normal response of the operation in case of success.
1563	// If the original
1564	// method returns no data on success, such as `Delete`, the response
1565	// is
1566	// `google.protobuf.Empty`.  If the original method is
1567	// standard
1568	// `Get`/`Create`/`Update`, the response should be the resource.  For
1569	// other
1570	// methods, the response should have the type `XxxResponse`, where
1571	// `Xxx`
1572	// is the original method name.  For example, if the original method
1573	// name
1574	// is `TakeSnapshot()`, the inferred response type
1575	// is
1576	// `TakeSnapshotResponse`.
1577	Response googleapi.RawMessage `json:"response,omitempty"`
1578
1579	// ServerResponse contains the HTTP response code and headers from the
1580	// server.
1581	googleapi.ServerResponse `json:"-"`
1582
1583	// ForceSendFields is a list of field names (e.g. "Done") to
1584	// unconditionally include in API requests. By default, fields with
1585	// empty values are omitted from API requests. However, any non-pointer,
1586	// non-interface field appearing in ForceSendFields will be sent to the
1587	// server regardless of whether the field is empty or not. This may be
1588	// used to include empty fields in Patch requests.
1589	ForceSendFields []string `json:"-"`
1590
1591	// NullFields is a list of field names (e.g. "Done") to include in API
1592	// requests with the JSON null value. By default, fields with empty
1593	// values are omitted from API requests. However, any field with an
1594	// empty value appearing in NullFields will be sent to the server as
1595	// null. It is an error if a field in this list has a non-empty value.
1596	// This may be used to include null fields in Patch requests.
1597	NullFields []string `json:"-"`
1598}
1599
1600func (s *Operation) MarshalJSON() ([]byte, error) {
1601	type NoMethod Operation
1602	raw := NoMethod(*s)
1603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1604}
1605
1606// SearchGroupsResponse: The response message for
1607// GroupsService.SearchGroups.
1608type SearchGroupsResponse struct {
1609	// Groups: The `Group`s that match the search query.
1610	Groups []*Group `json:"groups,omitempty"`
1611
1612	// NextPageToken: A continuation token to retrieve the next page of
1613	// results, or empty if
1614	// there are no more results available.
1615	NextPageToken string `json:"nextPageToken,omitempty"`
1616
1617	// ServerResponse contains the HTTP response code and headers from the
1618	// server.
1619	googleapi.ServerResponse `json:"-"`
1620
1621	// ForceSendFields is a list of field names (e.g. "Groups") to
1622	// unconditionally include in API requests. By default, fields with
1623	// empty values are omitted from API requests. However, any non-pointer,
1624	// non-interface field appearing in ForceSendFields will be sent to the
1625	// server regardless of whether the field is empty or not. This may be
1626	// used to include empty fields in Patch requests.
1627	ForceSendFields []string `json:"-"`
1628
1629	// NullFields is a list of field names (e.g. "Groups") to include in API
1630	// requests with the JSON null value. By default, fields with empty
1631	// values are omitted from API requests. However, any field with an
1632	// empty value appearing in NullFields will be sent to the server as
1633	// null. It is an error if a field in this list has a non-empty value.
1634	// This may be used to include null fields in Patch requests.
1635	NullFields []string `json:"-"`
1636}
1637
1638func (s *SearchGroupsResponse) MarshalJSON() ([]byte, error) {
1639	type NoMethod SearchGroupsResponse
1640	raw := NoMethod(*s)
1641	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1642}
1643
1644// Status: The `Status` type defines a logical error model that is
1645// suitable for
1646// different programming environments, including REST APIs and RPC APIs.
1647// It is
1648// used by [gRPC](https://github.com/grpc). Each `Status` message
1649// contains
1650// three pieces of data: error code, error message, and error
1651// details.
1652//
1653// You can find out more about this error model and how to work with it
1654// in the
1655// [API Design Guide](https://cloud.google.com/apis/design/errors).
1656type Status struct {
1657	// Code: The status code, which should be an enum value of
1658	// google.rpc.Code.
1659	Code int64 `json:"code,omitempty"`
1660
1661	// Details: A list of messages that carry the error details.  There is a
1662	// common set of
1663	// message types for APIs to use.
1664	Details []googleapi.RawMessage `json:"details,omitempty"`
1665
1666	// Message: A developer-facing error message, which should be in
1667	// English. Any
1668	// user-facing error message should be localized and sent in
1669	// the
1670	// google.rpc.Status.details field, or localized by the client.
1671	Message string `json:"message,omitempty"`
1672
1673	// ForceSendFields is a list of field names (e.g. "Code") to
1674	// unconditionally include in API requests. By default, fields with
1675	// empty values are omitted from API requests. However, any non-pointer,
1676	// non-interface field appearing in ForceSendFields will be sent to the
1677	// server regardless of whether the field is empty or not. This may be
1678	// used to include empty fields in Patch requests.
1679	ForceSendFields []string `json:"-"`
1680
1681	// NullFields is a list of field names (e.g. "Code") to include in API
1682	// requests with the JSON null value. By default, fields with empty
1683	// values are omitted from API requests. However, any field with an
1684	// empty value appearing in NullFields will be sent to the server as
1685	// null. It is an error if a field in this list has a non-empty value.
1686	// This may be used to include null fields in Patch requests.
1687	NullFields []string `json:"-"`
1688}
1689
1690func (s *Status) MarshalJSON() ([]byte, error) {
1691	type NoMethod Status
1692	raw := NoMethod(*s)
1693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1694}
1695
1696// UpdateMembershipRolesParams: The details of an update to a
1697// `MembershipRole`.
1698type UpdateMembershipRolesParams struct {
1699	// FieldMask: The fully-qualified names of fields to update.
1700	//
1701	// May only contain the field `expiry_detail`.
1702	FieldMask string `json:"fieldMask,omitempty"`
1703
1704	// MembershipRole: The `MembershipRole`s to be updated.
1705	//
1706	// Only `MEMBER` `MembershipRoles` can currently be updated.
1707	//
1708	// May only contain a `MembershipRole` with `name` `MEMBER`.
1709	MembershipRole *MembershipRole `json:"membershipRole,omitempty"`
1710
1711	// ForceSendFields is a list of field names (e.g. "FieldMask") to
1712	// unconditionally include in API requests. By default, fields with
1713	// empty values are omitted from API requests. However, any non-pointer,
1714	// non-interface field appearing in ForceSendFields will be sent to the
1715	// server regardless of whether the field is empty or not. This may be
1716	// used to include empty fields in Patch requests.
1717	ForceSendFields []string `json:"-"`
1718
1719	// NullFields is a list of field names (e.g. "FieldMask") to include in
1720	// API requests with the JSON null value. By default, fields with empty
1721	// values are omitted from API requests. However, any field with an
1722	// empty value appearing in NullFields will be sent to the server as
1723	// null. It is an error if a field in this list has a non-empty value.
1724	// This may be used to include null fields in Patch requests.
1725	NullFields []string `json:"-"`
1726}
1727
1728func (s *UpdateMembershipRolesParams) MarshalJSON() ([]byte, error) {
1729	type NoMethod UpdateMembershipRolesParams
1730	raw := NoMethod(*s)
1731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1732}
1733
1734// WipeDeviceResponse: Response message for wiping all data on the
1735// device.
1736type WipeDeviceResponse struct {
1737	// Device: Resultant Device object for the action. Note that asset tags
1738	// will not be
1739	// returned in the device object.
1740	Device *Device `json:"device,omitempty"`
1741
1742	// ForceSendFields is a list of field names (e.g. "Device") to
1743	// unconditionally include in API requests. By default, fields with
1744	// empty values are omitted from API requests. However, any non-pointer,
1745	// non-interface field appearing in ForceSendFields will be sent to the
1746	// server regardless of whether the field is empty or not. This may be
1747	// used to include empty fields in Patch requests.
1748	ForceSendFields []string `json:"-"`
1749
1750	// NullFields is a list of field names (e.g. "Device") to include in API
1751	// requests with the JSON null value. By default, fields with empty
1752	// values are omitted from API requests. However, any field with an
1753	// empty value appearing in NullFields will be sent to the server as
1754	// null. It is an error if a field in this list has a non-empty value.
1755	// This may be used to include null fields in Patch requests.
1756	NullFields []string `json:"-"`
1757}
1758
1759func (s *WipeDeviceResponse) MarshalJSON() ([]byte, error) {
1760	type NoMethod WipeDeviceResponse
1761	raw := NoMethod(*s)
1762	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1763}
1764
1765// WipeDeviceUserResponse: Response message for wiping the user's
1766// account from the device.
1767type WipeDeviceUserResponse struct {
1768	// DeviceUser: Resultant DeviceUser object for the action.
1769	DeviceUser *DeviceUser `json:"deviceUser,omitempty"`
1770
1771	// ForceSendFields is a list of field names (e.g. "DeviceUser") to
1772	// unconditionally include in API requests. By default, fields with
1773	// empty values are omitted from API requests. However, any non-pointer,
1774	// non-interface field appearing in ForceSendFields will be sent to the
1775	// server regardless of whether the field is empty or not. This may be
1776	// used to include empty fields in Patch requests.
1777	ForceSendFields []string `json:"-"`
1778
1779	// NullFields is a list of field names (e.g. "DeviceUser") to include in
1780	// API requests with the JSON null value. By default, fields with empty
1781	// values are omitted from API requests. However, any field with an
1782	// empty value appearing in NullFields will be sent to the server as
1783	// null. It is an error if a field in this list has a non-empty value.
1784	// This may be used to include null fields in Patch requests.
1785	NullFields []string `json:"-"`
1786}
1787
1788func (s *WipeDeviceUserResponse) MarshalJSON() ([]byte, error) {
1789	type NoMethod WipeDeviceUserResponse
1790	raw := NoMethod(*s)
1791	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1792}
1793
1794// method id "cloudidentity.groups.create":
1795
1796type GroupsCreateCall struct {
1797	s          *Service
1798	group      *Group
1799	urlParams_ gensupport.URLParams
1800	ctx_       context.Context
1801	header_    http.Header
1802}
1803
1804// Create: Creates a `Group`.
1805func (r *GroupsService) Create(group *Group) *GroupsCreateCall {
1806	c := &GroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1807	c.group = group
1808	return c
1809}
1810
1811// InitialGroupConfig sets the optional parameter "initialGroupConfig":
1812// Required. The initial configuration option for the `Group`.
1813//
1814// Possible values:
1815//   "INITIAL_GROUP_CONFIG_UNSPECIFIED"
1816//   "WITH_INITIAL_OWNER"
1817//   "EMPTY"
1818func (c *GroupsCreateCall) InitialGroupConfig(initialGroupConfig string) *GroupsCreateCall {
1819	c.urlParams_.Set("initialGroupConfig", initialGroupConfig)
1820	return c
1821}
1822
1823// Fields allows partial responses to be retrieved. See
1824// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1825// for more information.
1826func (c *GroupsCreateCall) Fields(s ...googleapi.Field) *GroupsCreateCall {
1827	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1828	return c
1829}
1830
1831// Context sets the context to be used in this call's Do method. Any
1832// pending HTTP request will be aborted if the provided context is
1833// canceled.
1834func (c *GroupsCreateCall) Context(ctx context.Context) *GroupsCreateCall {
1835	c.ctx_ = ctx
1836	return c
1837}
1838
1839// Header returns an http.Header that can be modified by the caller to
1840// add HTTP headers to the request.
1841func (c *GroupsCreateCall) Header() http.Header {
1842	if c.header_ == nil {
1843		c.header_ = make(http.Header)
1844	}
1845	return c.header_
1846}
1847
1848func (c *GroupsCreateCall) doRequest(alt string) (*http.Response, error) {
1849	reqHeaders := make(http.Header)
1850	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1851	for k, v := range c.header_ {
1852		reqHeaders[k] = v
1853	}
1854	reqHeaders.Set("User-Agent", c.s.userAgent())
1855	var body io.Reader = nil
1856	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
1857	if err != nil {
1858		return nil, err
1859	}
1860	reqHeaders.Set("Content-Type", "application/json")
1861	c.urlParams_.Set("alt", alt)
1862	c.urlParams_.Set("prettyPrint", "false")
1863	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups")
1864	urls += "?" + c.urlParams_.Encode()
1865	req, err := http.NewRequest("POST", urls, body)
1866	if err != nil {
1867		return nil, err
1868	}
1869	req.Header = reqHeaders
1870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1871}
1872
1873// Do executes the "cloudidentity.groups.create" call.
1874// Exactly one of *Operation or error will be non-nil. Any non-2xx
1875// status code is an error. Response headers are in either
1876// *Operation.ServerResponse.Header or (if a response was returned at
1877// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1878// to check whether the returned error was because
1879// http.StatusNotModified was returned.
1880func (c *GroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1881	gensupport.SetOptions(c.urlParams_, opts...)
1882	res, err := c.doRequest("json")
1883	if res != nil && res.StatusCode == http.StatusNotModified {
1884		if res.Body != nil {
1885			res.Body.Close()
1886		}
1887		return nil, &googleapi.Error{
1888			Code:   res.StatusCode,
1889			Header: res.Header,
1890		}
1891	}
1892	if err != nil {
1893		return nil, err
1894	}
1895	defer googleapi.CloseBody(res)
1896	if err := googleapi.CheckResponse(res); err != nil {
1897		return nil, err
1898	}
1899	ret := &Operation{
1900		ServerResponse: googleapi.ServerResponse{
1901			Header:         res.Header,
1902			HTTPStatusCode: res.StatusCode,
1903		},
1904	}
1905	target := &ret
1906	if err := gensupport.DecodeResponse(target, res); err != nil {
1907		return nil, err
1908	}
1909	return ret, nil
1910	// {
1911	//   "description": "Creates a `Group`.",
1912	//   "flatPath": "v1beta1/groups",
1913	//   "httpMethod": "POST",
1914	//   "id": "cloudidentity.groups.create",
1915	//   "parameterOrder": [],
1916	//   "parameters": {
1917	//     "initialGroupConfig": {
1918	//       "description": "Required. The initial configuration option for the `Group`.",
1919	//       "enum": [
1920	//         "INITIAL_GROUP_CONFIG_UNSPECIFIED",
1921	//         "WITH_INITIAL_OWNER",
1922	//         "EMPTY"
1923	//       ],
1924	//       "location": "query",
1925	//       "type": "string"
1926	//     }
1927	//   },
1928	//   "path": "v1beta1/groups",
1929	//   "request": {
1930	//     "$ref": "Group"
1931	//   },
1932	//   "response": {
1933	//     "$ref": "Operation"
1934	//   },
1935	//   "scopes": [
1936	//     "https://www.googleapis.com/auth/cloud-identity.groups",
1937	//     "https://www.googleapis.com/auth/cloud-platform"
1938	//   ]
1939	// }
1940
1941}
1942
1943// method id "cloudidentity.groups.delete":
1944
1945type GroupsDeleteCall struct {
1946	s          *Service
1947	name       string
1948	urlParams_ gensupport.URLParams
1949	ctx_       context.Context
1950	header_    http.Header
1951}
1952
1953// Delete: Deletes a `Group`.
1954func (r *GroupsService) Delete(name string) *GroupsDeleteCall {
1955	c := &GroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1956	c.name = name
1957	return c
1958}
1959
1960// Fields allows partial responses to be retrieved. See
1961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1962// for more information.
1963func (c *GroupsDeleteCall) Fields(s ...googleapi.Field) *GroupsDeleteCall {
1964	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1965	return c
1966}
1967
1968// Context sets the context to be used in this call's Do method. Any
1969// pending HTTP request will be aborted if the provided context is
1970// canceled.
1971func (c *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
1972	c.ctx_ = ctx
1973	return c
1974}
1975
1976// Header returns an http.Header that can be modified by the caller to
1977// add HTTP headers to the request.
1978func (c *GroupsDeleteCall) Header() http.Header {
1979	if c.header_ == nil {
1980		c.header_ = make(http.Header)
1981	}
1982	return c.header_
1983}
1984
1985func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
1986	reqHeaders := make(http.Header)
1987	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1988	for k, v := range c.header_ {
1989		reqHeaders[k] = v
1990	}
1991	reqHeaders.Set("User-Agent", c.s.userAgent())
1992	var body io.Reader = nil
1993	c.urlParams_.Set("alt", alt)
1994	c.urlParams_.Set("prettyPrint", "false")
1995	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
1996	urls += "?" + c.urlParams_.Encode()
1997	req, err := http.NewRequest("DELETE", urls, body)
1998	if err != nil {
1999		return nil, err
2000	}
2001	req.Header = reqHeaders
2002	googleapi.Expand(req.URL, map[string]string{
2003		"name": c.name,
2004	})
2005	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2006}
2007
2008// Do executes the "cloudidentity.groups.delete" call.
2009// Exactly one of *Operation or error will be non-nil. Any non-2xx
2010// status code is an error. Response headers are in either
2011// *Operation.ServerResponse.Header or (if a response was returned at
2012// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2013// to check whether the returned error was because
2014// http.StatusNotModified was returned.
2015func (c *GroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2016	gensupport.SetOptions(c.urlParams_, opts...)
2017	res, err := c.doRequest("json")
2018	if res != nil && res.StatusCode == http.StatusNotModified {
2019		if res.Body != nil {
2020			res.Body.Close()
2021		}
2022		return nil, &googleapi.Error{
2023			Code:   res.StatusCode,
2024			Header: res.Header,
2025		}
2026	}
2027	if err != nil {
2028		return nil, err
2029	}
2030	defer googleapi.CloseBody(res)
2031	if err := googleapi.CheckResponse(res); err != nil {
2032		return nil, err
2033	}
2034	ret := &Operation{
2035		ServerResponse: googleapi.ServerResponse{
2036			Header:         res.Header,
2037			HTTPStatusCode: res.StatusCode,
2038		},
2039	}
2040	target := &ret
2041	if err := gensupport.DecodeResponse(target, res); err != nil {
2042		return nil, err
2043	}
2044	return ret, nil
2045	// {
2046	//   "description": "Deletes a `Group`.",
2047	//   "flatPath": "v1beta1/groups/{groupsId}",
2048	//   "httpMethod": "DELETE",
2049	//   "id": "cloudidentity.groups.delete",
2050	//   "parameterOrder": [
2051	//     "name"
2052	//   ],
2053	//   "parameters": {
2054	//     "name": {
2055	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Group` to retrieve.\n\nMust be of the form `groups/{group_id}`.",
2056	//       "location": "path",
2057	//       "pattern": "^groups/[^/]+$",
2058	//       "required": true,
2059	//       "type": "string"
2060	//     }
2061	//   },
2062	//   "path": "v1beta1/{+name}",
2063	//   "response": {
2064	//     "$ref": "Operation"
2065	//   },
2066	//   "scopes": [
2067	//     "https://www.googleapis.com/auth/cloud-identity.groups",
2068	//     "https://www.googleapis.com/auth/cloud-platform"
2069	//   ]
2070	// }
2071
2072}
2073
2074// method id "cloudidentity.groups.get":
2075
2076type GroupsGetCall struct {
2077	s            *Service
2078	name         string
2079	urlParams_   gensupport.URLParams
2080	ifNoneMatch_ string
2081	ctx_         context.Context
2082	header_      http.Header
2083}
2084
2085// Get: Retrieves a `Group`.
2086func (r *GroupsService) Get(name string) *GroupsGetCall {
2087	c := &GroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2088	c.name = name
2089	return c
2090}
2091
2092// Fields allows partial responses to be retrieved. See
2093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2094// for more information.
2095func (c *GroupsGetCall) Fields(s ...googleapi.Field) *GroupsGetCall {
2096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2097	return c
2098}
2099
2100// IfNoneMatch sets the optional parameter which makes the operation
2101// fail if the object's ETag matches the given value. This is useful for
2102// getting updates only after the object has changed since the last
2103// request. Use googleapi.IsNotModified to check whether the response
2104// error from Do is the result of In-None-Match.
2105func (c *GroupsGetCall) IfNoneMatch(entityTag string) *GroupsGetCall {
2106	c.ifNoneMatch_ = entityTag
2107	return c
2108}
2109
2110// Context sets the context to be used in this call's Do method. Any
2111// pending HTTP request will be aborted if the provided context is
2112// canceled.
2113func (c *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
2114	c.ctx_ = ctx
2115	return c
2116}
2117
2118// Header returns an http.Header that can be modified by the caller to
2119// add HTTP headers to the request.
2120func (c *GroupsGetCall) Header() http.Header {
2121	if c.header_ == nil {
2122		c.header_ = make(http.Header)
2123	}
2124	return c.header_
2125}
2126
2127func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
2128	reqHeaders := make(http.Header)
2129	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2130	for k, v := range c.header_ {
2131		reqHeaders[k] = v
2132	}
2133	reqHeaders.Set("User-Agent", c.s.userAgent())
2134	if c.ifNoneMatch_ != "" {
2135		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2136	}
2137	var body io.Reader = nil
2138	c.urlParams_.Set("alt", alt)
2139	c.urlParams_.Set("prettyPrint", "false")
2140	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2141	urls += "?" + c.urlParams_.Encode()
2142	req, err := http.NewRequest("GET", urls, body)
2143	if err != nil {
2144		return nil, err
2145	}
2146	req.Header = reqHeaders
2147	googleapi.Expand(req.URL, map[string]string{
2148		"name": c.name,
2149	})
2150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2151}
2152
2153// Do executes the "cloudidentity.groups.get" call.
2154// Exactly one of *Group or error will be non-nil. Any non-2xx status
2155// code is an error. Response headers are in either
2156// *Group.ServerResponse.Header or (if a response was returned at all)
2157// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2158// check whether the returned error was because http.StatusNotModified
2159// was returned.
2160func (c *GroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
2161	gensupport.SetOptions(c.urlParams_, opts...)
2162	res, err := c.doRequest("json")
2163	if res != nil && res.StatusCode == http.StatusNotModified {
2164		if res.Body != nil {
2165			res.Body.Close()
2166		}
2167		return nil, &googleapi.Error{
2168			Code:   res.StatusCode,
2169			Header: res.Header,
2170		}
2171	}
2172	if err != nil {
2173		return nil, err
2174	}
2175	defer googleapi.CloseBody(res)
2176	if err := googleapi.CheckResponse(res); err != nil {
2177		return nil, err
2178	}
2179	ret := &Group{
2180		ServerResponse: googleapi.ServerResponse{
2181			Header:         res.Header,
2182			HTTPStatusCode: res.StatusCode,
2183		},
2184	}
2185	target := &ret
2186	if err := gensupport.DecodeResponse(target, res); err != nil {
2187		return nil, err
2188	}
2189	return ret, nil
2190	// {
2191	//   "description": "Retrieves a `Group`.",
2192	//   "flatPath": "v1beta1/groups/{groupsId}",
2193	//   "httpMethod": "GET",
2194	//   "id": "cloudidentity.groups.get",
2195	//   "parameterOrder": [
2196	//     "name"
2197	//   ],
2198	//   "parameters": {
2199	//     "name": {
2200	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Group` to retrieve.\n\nMust be of the form `groups/{group_id}`.",
2201	//       "location": "path",
2202	//       "pattern": "^groups/[^/]+$",
2203	//       "required": true,
2204	//       "type": "string"
2205	//     }
2206	//   },
2207	//   "path": "v1beta1/{+name}",
2208	//   "response": {
2209	//     "$ref": "Group"
2210	//   },
2211	//   "scopes": [
2212	//     "https://www.googleapis.com/auth/cloud-identity.groups",
2213	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
2214	//     "https://www.googleapis.com/auth/cloud-platform"
2215	//   ]
2216	// }
2217
2218}
2219
2220// method id "cloudidentity.groups.list":
2221
2222type GroupsListCall struct {
2223	s            *Service
2224	urlParams_   gensupport.URLParams
2225	ifNoneMatch_ string
2226	ctx_         context.Context
2227	header_      http.Header
2228}
2229
2230// List: Lists the `Group`s under a customer or namespace.
2231func (r *GroupsService) List() *GroupsListCall {
2232	c := &GroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2233	return c
2234}
2235
2236// PageSize sets the optional parameter "pageSize": The maximum number
2237// of results to return.
2238//
2239// Note that the number of results returned may be less than this value
2240// even
2241// if there are more available results. To fetch all results, clients
2242// must
2243// continue calling this method repeatedly until the response no
2244// longer
2245// contains a `next_page_token`.
2246//
2247// If unspecified, defaults to 200 for `View.BASIC` and to 50 for
2248// `View.FULL`.
2249//
2250// Must not be greater than 1000 for `View.BASIC` or 500 for
2251// `View.FULL`.
2252func (c *GroupsListCall) PageSize(pageSize int64) *GroupsListCall {
2253	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2254	return c
2255}
2256
2257// PageToken sets the optional parameter "pageToken": The
2258// `next_page_token` value returned from a previous list request, if
2259// any.
2260func (c *GroupsListCall) PageToken(pageToken string) *GroupsListCall {
2261	c.urlParams_.Set("pageToken", pageToken)
2262	return c
2263}
2264
2265// Parent sets the optional parameter "parent": Required. The parent
2266// resource under which to list all `Group`s.
2267//
2268// Must be of the form `identitysources/{identity_source_id}` for
2269// external-
2270// identity-mapped groups or `customers/{customer_id}` for Google
2271// Groups.
2272func (c *GroupsListCall) Parent(parent string) *GroupsListCall {
2273	c.urlParams_.Set("parent", parent)
2274	return c
2275}
2276
2277// View sets the optional parameter "view": The level of detail to be
2278// returned.
2279//
2280// If unspecified, defaults to `View.BASIC`.
2281//
2282// Possible values:
2283//   "VIEW_UNSPECIFIED"
2284//   "BASIC"
2285//   "FULL"
2286func (c *GroupsListCall) View(view string) *GroupsListCall {
2287	c.urlParams_.Set("view", view)
2288	return c
2289}
2290
2291// Fields allows partial responses to be retrieved. See
2292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2293// for more information.
2294func (c *GroupsListCall) Fields(s ...googleapi.Field) *GroupsListCall {
2295	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2296	return c
2297}
2298
2299// IfNoneMatch sets the optional parameter which makes the operation
2300// fail if the object's ETag matches the given value. This is useful for
2301// getting updates only after the object has changed since the last
2302// request. Use googleapi.IsNotModified to check whether the response
2303// error from Do is the result of In-None-Match.
2304func (c *GroupsListCall) IfNoneMatch(entityTag string) *GroupsListCall {
2305	c.ifNoneMatch_ = entityTag
2306	return c
2307}
2308
2309// Context sets the context to be used in this call's Do method. Any
2310// pending HTTP request will be aborted if the provided context is
2311// canceled.
2312func (c *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
2313	c.ctx_ = ctx
2314	return c
2315}
2316
2317// Header returns an http.Header that can be modified by the caller to
2318// add HTTP headers to the request.
2319func (c *GroupsListCall) Header() http.Header {
2320	if c.header_ == nil {
2321		c.header_ = make(http.Header)
2322	}
2323	return c.header_
2324}
2325
2326func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
2327	reqHeaders := make(http.Header)
2328	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2329	for k, v := range c.header_ {
2330		reqHeaders[k] = v
2331	}
2332	reqHeaders.Set("User-Agent", c.s.userAgent())
2333	if c.ifNoneMatch_ != "" {
2334		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2335	}
2336	var body io.Reader = nil
2337	c.urlParams_.Set("alt", alt)
2338	c.urlParams_.Set("prettyPrint", "false")
2339	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups")
2340	urls += "?" + c.urlParams_.Encode()
2341	req, err := http.NewRequest("GET", urls, body)
2342	if err != nil {
2343		return nil, err
2344	}
2345	req.Header = reqHeaders
2346	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2347}
2348
2349// Do executes the "cloudidentity.groups.list" call.
2350// Exactly one of *ListGroupsResponse or error will be non-nil. Any
2351// non-2xx status code is an error. Response headers are in either
2352// *ListGroupsResponse.ServerResponse.Header or (if a response was
2353// returned at all) in error.(*googleapi.Error).Header. Use
2354// googleapi.IsNotModified to check whether the returned error was
2355// because http.StatusNotModified was returned.
2356func (c *GroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
2357	gensupport.SetOptions(c.urlParams_, opts...)
2358	res, err := c.doRequest("json")
2359	if res != nil && res.StatusCode == http.StatusNotModified {
2360		if res.Body != nil {
2361			res.Body.Close()
2362		}
2363		return nil, &googleapi.Error{
2364			Code:   res.StatusCode,
2365			Header: res.Header,
2366		}
2367	}
2368	if err != nil {
2369		return nil, err
2370	}
2371	defer googleapi.CloseBody(res)
2372	if err := googleapi.CheckResponse(res); err != nil {
2373		return nil, err
2374	}
2375	ret := &ListGroupsResponse{
2376		ServerResponse: googleapi.ServerResponse{
2377			Header:         res.Header,
2378			HTTPStatusCode: res.StatusCode,
2379		},
2380	}
2381	target := &ret
2382	if err := gensupport.DecodeResponse(target, res); err != nil {
2383		return nil, err
2384	}
2385	return ret, nil
2386	// {
2387	//   "description": "Lists the `Group`s under a customer or namespace.",
2388	//   "flatPath": "v1beta1/groups",
2389	//   "httpMethod": "GET",
2390	//   "id": "cloudidentity.groups.list",
2391	//   "parameterOrder": [],
2392	//   "parameters": {
2393	//     "pageSize": {
2394	//       "description": "The maximum number of results to return.\n\nNote that the number of results returned may be less than this value even\nif there are more available results. To fetch all results, clients must\ncontinue calling this method repeatedly until the response no longer\ncontains a `next_page_token`.\n\nIf unspecified, defaults to 200 for `View.BASIC` and to 50 for `View.FULL`.\n\nMust not be greater than 1000 for `View.BASIC` or 500 for `View.FULL`.",
2395	//       "format": "int32",
2396	//       "location": "query",
2397	//       "type": "integer"
2398	//     },
2399	//     "pageToken": {
2400	//       "description": "The `next_page_token` value returned from a previous list request, if any.",
2401	//       "location": "query",
2402	//       "type": "string"
2403	//     },
2404	//     "parent": {
2405	//       "description": "Required. The parent resource under which to list all `Group`s.\n\nMust be of the form `identitysources/{identity_source_id}` for external-\nidentity-mapped groups or `customers/{customer_id}` for Google Groups.",
2406	//       "location": "query",
2407	//       "type": "string"
2408	//     },
2409	//     "view": {
2410	//       "description": "The level of detail to be returned.\n\nIf unspecified, defaults to `View.BASIC`.",
2411	//       "enum": [
2412	//         "VIEW_UNSPECIFIED",
2413	//         "BASIC",
2414	//         "FULL"
2415	//       ],
2416	//       "location": "query",
2417	//       "type": "string"
2418	//     }
2419	//   },
2420	//   "path": "v1beta1/groups",
2421	//   "response": {
2422	//     "$ref": "ListGroupsResponse"
2423	//   },
2424	//   "scopes": [
2425	//     "https://www.googleapis.com/auth/cloud-identity.groups",
2426	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
2427	//     "https://www.googleapis.com/auth/cloud-platform"
2428	//   ]
2429	// }
2430
2431}
2432
2433// Pages invokes f for each page of results.
2434// A non-nil error returned from f will halt the iteration.
2435// The provided context supersedes any context provided to the Context method.
2436func (c *GroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
2437	c.ctx_ = ctx
2438	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2439	for {
2440		x, err := c.Do()
2441		if err != nil {
2442			return err
2443		}
2444		if err := f(x); err != nil {
2445			return err
2446		}
2447		if x.NextPageToken == "" {
2448			return nil
2449		}
2450		c.PageToken(x.NextPageToken)
2451	}
2452}
2453
2454// method id "cloudidentity.groups.lookup":
2455
2456type GroupsLookupCall struct {
2457	s            *Service
2458	urlParams_   gensupport.URLParams
2459	ifNoneMatch_ string
2460	ctx_         context.Context
2461	header_      http.Header
2462}
2463
2464// Lookup: Looks up the
2465// [resource
2466// name](https://cloud.google.com/apis/design/resource_names) of a
2467// `Group` by
2468// its `EntityKey`.
2469func (r *GroupsService) Lookup() *GroupsLookupCall {
2470	c := &GroupsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2471	return c
2472}
2473
2474// GroupKeyId sets the optional parameter "groupKey.id": The ID of the
2475// entity.
2476//
2477// For Google-managed entities, the `id` must be the email address of
2478// an
2479// existing group or user.
2480//
2481// For external-identity-mapped entities, the `id` must be a string
2482// conforming
2483// to the Identity Source's requirements.
2484//
2485// Must be unique within a `namespace`.
2486func (c *GroupsLookupCall) GroupKeyId(groupKeyId string) *GroupsLookupCall {
2487	c.urlParams_.Set("groupKey.id", groupKeyId)
2488	return c
2489}
2490
2491// GroupKeyNamespace sets the optional parameter "groupKey.namespace":
2492// The namespace in which the entity exists.
2493//
2494// If not specified, the `EntityKey` represents a Google-managed entity
2495// such
2496// as a Google user or a Google Group.
2497//
2498// If specified, the `EntityKey` represents an external-identity-mapped
2499// group.
2500// The namespace must correspond to an identity source created in
2501// Admin
2502// Console and must be in the form of
2503// `identitysources/{identity_source_id}.
2504func (c *GroupsLookupCall) GroupKeyNamespace(groupKeyNamespace string) *GroupsLookupCall {
2505	c.urlParams_.Set("groupKey.namespace", groupKeyNamespace)
2506	return c
2507}
2508
2509// Fields allows partial responses to be retrieved. See
2510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2511// for more information.
2512func (c *GroupsLookupCall) Fields(s ...googleapi.Field) *GroupsLookupCall {
2513	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2514	return c
2515}
2516
2517// IfNoneMatch sets the optional parameter which makes the operation
2518// fail if the object's ETag matches the given value. This is useful for
2519// getting updates only after the object has changed since the last
2520// request. Use googleapi.IsNotModified to check whether the response
2521// error from Do is the result of In-None-Match.
2522func (c *GroupsLookupCall) IfNoneMatch(entityTag string) *GroupsLookupCall {
2523	c.ifNoneMatch_ = entityTag
2524	return c
2525}
2526
2527// Context sets the context to be used in this call's Do method. Any
2528// pending HTTP request will be aborted if the provided context is
2529// canceled.
2530func (c *GroupsLookupCall) Context(ctx context.Context) *GroupsLookupCall {
2531	c.ctx_ = ctx
2532	return c
2533}
2534
2535// Header returns an http.Header that can be modified by the caller to
2536// add HTTP headers to the request.
2537func (c *GroupsLookupCall) Header() http.Header {
2538	if c.header_ == nil {
2539		c.header_ = make(http.Header)
2540	}
2541	return c.header_
2542}
2543
2544func (c *GroupsLookupCall) doRequest(alt string) (*http.Response, error) {
2545	reqHeaders := make(http.Header)
2546	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2547	for k, v := range c.header_ {
2548		reqHeaders[k] = v
2549	}
2550	reqHeaders.Set("User-Agent", c.s.userAgent())
2551	if c.ifNoneMatch_ != "" {
2552		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2553	}
2554	var body io.Reader = nil
2555	c.urlParams_.Set("alt", alt)
2556	c.urlParams_.Set("prettyPrint", "false")
2557	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups:lookup")
2558	urls += "?" + c.urlParams_.Encode()
2559	req, err := http.NewRequest("GET", urls, body)
2560	if err != nil {
2561		return nil, err
2562	}
2563	req.Header = reqHeaders
2564	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2565}
2566
2567// Do executes the "cloudidentity.groups.lookup" call.
2568// Exactly one of *LookupGroupNameResponse or error will be non-nil. Any
2569// non-2xx status code is an error. Response headers are in either
2570// *LookupGroupNameResponse.ServerResponse.Header or (if a response was
2571// returned at all) in error.(*googleapi.Error).Header. Use
2572// googleapi.IsNotModified to check whether the returned error was
2573// because http.StatusNotModified was returned.
2574func (c *GroupsLookupCall) Do(opts ...googleapi.CallOption) (*LookupGroupNameResponse, error) {
2575	gensupport.SetOptions(c.urlParams_, opts...)
2576	res, err := c.doRequest("json")
2577	if res != nil && res.StatusCode == http.StatusNotModified {
2578		if res.Body != nil {
2579			res.Body.Close()
2580		}
2581		return nil, &googleapi.Error{
2582			Code:   res.StatusCode,
2583			Header: res.Header,
2584		}
2585	}
2586	if err != nil {
2587		return nil, err
2588	}
2589	defer googleapi.CloseBody(res)
2590	if err := googleapi.CheckResponse(res); err != nil {
2591		return nil, err
2592	}
2593	ret := &LookupGroupNameResponse{
2594		ServerResponse: googleapi.ServerResponse{
2595			Header:         res.Header,
2596			HTTPStatusCode: res.StatusCode,
2597		},
2598	}
2599	target := &ret
2600	if err := gensupport.DecodeResponse(target, res); err != nil {
2601		return nil, err
2602	}
2603	return ret, nil
2604	// {
2605	//   "description": "Looks up the [resource\nname](https://cloud.google.com/apis/design/resource_names) of a `Group` by\nits `EntityKey`.",
2606	//   "flatPath": "v1beta1/groups:lookup",
2607	//   "httpMethod": "GET",
2608	//   "id": "cloudidentity.groups.lookup",
2609	//   "parameterOrder": [],
2610	//   "parameters": {
2611	//     "groupKey.id": {
2612	//       "description": "The ID of the entity.\n\nFor Google-managed entities, the `id` must be the email address of an\nexisting group or user.\n\nFor external-identity-mapped entities, the `id` must be a string conforming\nto the Identity Source's requirements.\n\nMust be unique within a `namespace`.",
2613	//       "location": "query",
2614	//       "type": "string"
2615	//     },
2616	//     "groupKey.namespace": {
2617	//       "description": "The namespace in which the entity exists.\n\nIf not specified, the `EntityKey` represents a Google-managed entity such\nas a Google user or a Google Group.\n\nIf specified, the `EntityKey` represents an external-identity-mapped group.\nThe namespace must correspond to an identity source created in Admin\nConsole and must be in the form of `identitysources/{identity_source_id}.",
2618	//       "location": "query",
2619	//       "type": "string"
2620	//     }
2621	//   },
2622	//   "path": "v1beta1/groups:lookup",
2623	//   "response": {
2624	//     "$ref": "LookupGroupNameResponse"
2625	//   },
2626	//   "scopes": [
2627	//     "https://www.googleapis.com/auth/cloud-identity.groups",
2628	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
2629	//     "https://www.googleapis.com/auth/cloud-platform"
2630	//   ]
2631	// }
2632
2633}
2634
2635// method id "cloudidentity.groups.patch":
2636
2637type GroupsPatchCall struct {
2638	s          *Service
2639	name       string
2640	group      *Group
2641	urlParams_ gensupport.URLParams
2642	ctx_       context.Context
2643	header_    http.Header
2644}
2645
2646// Patch: Updates a `Group`.
2647func (r *GroupsService) Patch(name string, group *Group) *GroupsPatchCall {
2648	c := &GroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2649	c.name = name
2650	c.group = group
2651	return c
2652}
2653
2654// UpdateMask sets the optional parameter "updateMask": Required. The
2655// fully-qualified names of fields to update.
2656//
2657// May only contain the following fields: `display_name`, `description`.
2658func (c *GroupsPatchCall) UpdateMask(updateMask string) *GroupsPatchCall {
2659	c.urlParams_.Set("updateMask", updateMask)
2660	return c
2661}
2662
2663// Fields allows partial responses to be retrieved. See
2664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2665// for more information.
2666func (c *GroupsPatchCall) Fields(s ...googleapi.Field) *GroupsPatchCall {
2667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2668	return c
2669}
2670
2671// Context sets the context to be used in this call's Do method. Any
2672// pending HTTP request will be aborted if the provided context is
2673// canceled.
2674func (c *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
2675	c.ctx_ = ctx
2676	return c
2677}
2678
2679// Header returns an http.Header that can be modified by the caller to
2680// add HTTP headers to the request.
2681func (c *GroupsPatchCall) Header() http.Header {
2682	if c.header_ == nil {
2683		c.header_ = make(http.Header)
2684	}
2685	return c.header_
2686}
2687
2688func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
2689	reqHeaders := make(http.Header)
2690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2691	for k, v := range c.header_ {
2692		reqHeaders[k] = v
2693	}
2694	reqHeaders.Set("User-Agent", c.s.userAgent())
2695	var body io.Reader = nil
2696	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
2697	if err != nil {
2698		return nil, err
2699	}
2700	reqHeaders.Set("Content-Type", "application/json")
2701	c.urlParams_.Set("alt", alt)
2702	c.urlParams_.Set("prettyPrint", "false")
2703	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2704	urls += "?" + c.urlParams_.Encode()
2705	req, err := http.NewRequest("PATCH", urls, body)
2706	if err != nil {
2707		return nil, err
2708	}
2709	req.Header = reqHeaders
2710	googleapi.Expand(req.URL, map[string]string{
2711		"name": c.name,
2712	})
2713	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2714}
2715
2716// Do executes the "cloudidentity.groups.patch" call.
2717// Exactly one of *Operation or error will be non-nil. Any non-2xx
2718// status code is an error. Response headers are in either
2719// *Operation.ServerResponse.Header or (if a response was returned at
2720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2721// to check whether the returned error was because
2722// http.StatusNotModified was returned.
2723func (c *GroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2724	gensupport.SetOptions(c.urlParams_, opts...)
2725	res, err := c.doRequest("json")
2726	if res != nil && res.StatusCode == http.StatusNotModified {
2727		if res.Body != nil {
2728			res.Body.Close()
2729		}
2730		return nil, &googleapi.Error{
2731			Code:   res.StatusCode,
2732			Header: res.Header,
2733		}
2734	}
2735	if err != nil {
2736		return nil, err
2737	}
2738	defer googleapi.CloseBody(res)
2739	if err := googleapi.CheckResponse(res); err != nil {
2740		return nil, err
2741	}
2742	ret := &Operation{
2743		ServerResponse: googleapi.ServerResponse{
2744			Header:         res.Header,
2745			HTTPStatusCode: res.StatusCode,
2746		},
2747	}
2748	target := &ret
2749	if err := gensupport.DecodeResponse(target, res); err != nil {
2750		return nil, err
2751	}
2752	return ret, nil
2753	// {
2754	//   "description": "Updates a `Group`.",
2755	//   "flatPath": "v1beta1/groups/{groupsId}",
2756	//   "httpMethod": "PATCH",
2757	//   "id": "cloudidentity.groups.patch",
2758	//   "parameterOrder": [
2759	//     "name"
2760	//   ],
2761	//   "parameters": {
2762	//     "name": {
2763	//       "description": "Output only. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Group`.\n\nShall be of the form `groups/{group_id}`.",
2764	//       "location": "path",
2765	//       "pattern": "^groups/[^/]+$",
2766	//       "required": true,
2767	//       "type": "string"
2768	//     },
2769	//     "updateMask": {
2770	//       "description": "Required. The fully-qualified names of fields to update.\n\nMay only contain the following fields: `display_name`, `description`.",
2771	//       "format": "google-fieldmask",
2772	//       "location": "query",
2773	//       "type": "string"
2774	//     }
2775	//   },
2776	//   "path": "v1beta1/{+name}",
2777	//   "request": {
2778	//     "$ref": "Group"
2779	//   },
2780	//   "response": {
2781	//     "$ref": "Operation"
2782	//   },
2783	//   "scopes": [
2784	//     "https://www.googleapis.com/auth/cloud-identity.groups",
2785	//     "https://www.googleapis.com/auth/cloud-platform"
2786	//   ]
2787	// }
2788
2789}
2790
2791// method id "cloudidentity.groups.search":
2792
2793type GroupsSearchCall struct {
2794	s            *Service
2795	urlParams_   gensupport.URLParams
2796	ifNoneMatch_ string
2797	ctx_         context.Context
2798	header_      http.Header
2799}
2800
2801// Search: Searches for `Group`s matching a specified query.
2802func (r *GroupsService) Search() *GroupsSearchCall {
2803	c := &GroupsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2804	return c
2805}
2806
2807// PageSize sets the optional parameter "pageSize": The maximum number
2808// of results to return.
2809//
2810// Note that the number of results returned may be less than this value
2811// even
2812// if there are more available results. To fetch all results, clients
2813// must
2814// continue calling this method repeatedly until the response no
2815// longer
2816// contains a `next_page_token`.
2817//
2818// If unspecified, defaults to 200 for `GroupView.BASIC` and to 50
2819// for
2820// `GroupView.FULL`.
2821//
2822// Must not be greater than 1000 for `GroupView.BASIC` or 500
2823// for
2824// `GroupView.FULL`.
2825func (c *GroupsSearchCall) PageSize(pageSize int64) *GroupsSearchCall {
2826	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2827	return c
2828}
2829
2830// PageToken sets the optional parameter "pageToken": The
2831// `next_page_token` value returned from a previous search request,
2832// if
2833// any.
2834func (c *GroupsSearchCall) PageToken(pageToken string) *GroupsSearchCall {
2835	c.urlParams_.Set("pageToken", pageToken)
2836	return c
2837}
2838
2839// Query sets the optional parameter "query": Required. The search
2840// query.
2841//
2842// Must be specified in [Common
2843// Expression
2844// Language](https://opensource.google/projects/cel). May only
2845// contain
2846// equality operators on the parent and inclusion operators on labels
2847// (e.g.,
2848// `parent == 'customers/{customer_id}'
2849// &&
2850// 'cloudidentity.googleapis.com/groups.discussion_forum' in labels`).
2851func (c *GroupsSearchCall) Query(query string) *GroupsSearchCall {
2852	c.urlParams_.Set("query", query)
2853	return c
2854}
2855
2856// View sets the optional parameter "view": The level of detail to be
2857// returned.
2858//
2859// If unspecified, defaults to `View.BASIC`.
2860//
2861// Possible values:
2862//   "BASIC"
2863//   "FULL"
2864func (c *GroupsSearchCall) View(view string) *GroupsSearchCall {
2865	c.urlParams_.Set("view", view)
2866	return c
2867}
2868
2869// Fields allows partial responses to be retrieved. See
2870// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2871// for more information.
2872func (c *GroupsSearchCall) Fields(s ...googleapi.Field) *GroupsSearchCall {
2873	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2874	return c
2875}
2876
2877// IfNoneMatch sets the optional parameter which makes the operation
2878// fail if the object's ETag matches the given value. This is useful for
2879// getting updates only after the object has changed since the last
2880// request. Use googleapi.IsNotModified to check whether the response
2881// error from Do is the result of In-None-Match.
2882func (c *GroupsSearchCall) IfNoneMatch(entityTag string) *GroupsSearchCall {
2883	c.ifNoneMatch_ = entityTag
2884	return c
2885}
2886
2887// Context sets the context to be used in this call's Do method. Any
2888// pending HTTP request will be aborted if the provided context is
2889// canceled.
2890func (c *GroupsSearchCall) Context(ctx context.Context) *GroupsSearchCall {
2891	c.ctx_ = ctx
2892	return c
2893}
2894
2895// Header returns an http.Header that can be modified by the caller to
2896// add HTTP headers to the request.
2897func (c *GroupsSearchCall) Header() http.Header {
2898	if c.header_ == nil {
2899		c.header_ = make(http.Header)
2900	}
2901	return c.header_
2902}
2903
2904func (c *GroupsSearchCall) doRequest(alt string) (*http.Response, error) {
2905	reqHeaders := make(http.Header)
2906	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2907	for k, v := range c.header_ {
2908		reqHeaders[k] = v
2909	}
2910	reqHeaders.Set("User-Agent", c.s.userAgent())
2911	if c.ifNoneMatch_ != "" {
2912		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2913	}
2914	var body io.Reader = nil
2915	c.urlParams_.Set("alt", alt)
2916	c.urlParams_.Set("prettyPrint", "false")
2917	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/groups:search")
2918	urls += "?" + c.urlParams_.Encode()
2919	req, err := http.NewRequest("GET", urls, body)
2920	if err != nil {
2921		return nil, err
2922	}
2923	req.Header = reqHeaders
2924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2925}
2926
2927// Do executes the "cloudidentity.groups.search" call.
2928// Exactly one of *SearchGroupsResponse or error will be non-nil. Any
2929// non-2xx status code is an error. Response headers are in either
2930// *SearchGroupsResponse.ServerResponse.Header or (if a response was
2931// returned at all) in error.(*googleapi.Error).Header. Use
2932// googleapi.IsNotModified to check whether the returned error was
2933// because http.StatusNotModified was returned.
2934func (c *GroupsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGroupsResponse, error) {
2935	gensupport.SetOptions(c.urlParams_, opts...)
2936	res, err := c.doRequest("json")
2937	if res != nil && res.StatusCode == http.StatusNotModified {
2938		if res.Body != nil {
2939			res.Body.Close()
2940		}
2941		return nil, &googleapi.Error{
2942			Code:   res.StatusCode,
2943			Header: res.Header,
2944		}
2945	}
2946	if err != nil {
2947		return nil, err
2948	}
2949	defer googleapi.CloseBody(res)
2950	if err := googleapi.CheckResponse(res); err != nil {
2951		return nil, err
2952	}
2953	ret := &SearchGroupsResponse{
2954		ServerResponse: googleapi.ServerResponse{
2955			Header:         res.Header,
2956			HTTPStatusCode: res.StatusCode,
2957		},
2958	}
2959	target := &ret
2960	if err := gensupport.DecodeResponse(target, res); err != nil {
2961		return nil, err
2962	}
2963	return ret, nil
2964	// {
2965	//   "description": "Searches for `Group`s matching a specified query.",
2966	//   "flatPath": "v1beta1/groups:search",
2967	//   "httpMethod": "GET",
2968	//   "id": "cloudidentity.groups.search",
2969	//   "parameterOrder": [],
2970	//   "parameters": {
2971	//     "pageSize": {
2972	//       "description": "The maximum number of results to return.\n\nNote that the number of results returned may be less than this value even\nif there are more available results. To fetch all results, clients must\ncontinue calling this method repeatedly until the response no longer\ncontains a `next_page_token`.\n\nIf unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for\n`GroupView.FULL`.\n\nMust not be greater than 1000 for `GroupView.BASIC` or 500 for\n`GroupView.FULL`.",
2973	//       "format": "int32",
2974	//       "location": "query",
2975	//       "type": "integer"
2976	//     },
2977	//     "pageToken": {
2978	//       "description": "The `next_page_token` value returned from a previous search request, if\nany.",
2979	//       "location": "query",
2980	//       "type": "string"
2981	//     },
2982	//     "query": {
2983	//       "description": "Required. The search query.\n\nMust be specified in [Common Expression\nLanguage](https://opensource.google/projects/cel). May only contain\nequality operators on the parent and inclusion operators on labels (e.g.,\n`parent == 'customers/{customer_id}' \u0026\u0026\n'cloudidentity.googleapis.com/groups.discussion_forum' in labels`).",
2984	//       "location": "query",
2985	//       "type": "string"
2986	//     },
2987	//     "view": {
2988	//       "description": "The level of detail to be returned.\n\nIf unspecified, defaults to `View.BASIC`.",
2989	//       "enum": [
2990	//         "BASIC",
2991	//         "FULL"
2992	//       ],
2993	//       "location": "query",
2994	//       "type": "string"
2995	//     }
2996	//   },
2997	//   "path": "v1beta1/groups:search",
2998	//   "response": {
2999	//     "$ref": "SearchGroupsResponse"
3000	//   },
3001	//   "scopes": [
3002	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3003	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
3004	//     "https://www.googleapis.com/auth/cloud-platform"
3005	//   ]
3006	// }
3007
3008}
3009
3010// Pages invokes f for each page of results.
3011// A non-nil error returned from f will halt the iteration.
3012// The provided context supersedes any context provided to the Context method.
3013func (c *GroupsSearchCall) Pages(ctx context.Context, f func(*SearchGroupsResponse) error) error {
3014	c.ctx_ = ctx
3015	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3016	for {
3017		x, err := c.Do()
3018		if err != nil {
3019			return err
3020		}
3021		if err := f(x); err != nil {
3022			return err
3023		}
3024		if x.NextPageToken == "" {
3025			return nil
3026		}
3027		c.PageToken(x.NextPageToken)
3028	}
3029}
3030
3031// method id "cloudidentity.groups.memberships.create":
3032
3033type GroupsMembershipsCreateCall struct {
3034	s          *Service
3035	parent     string
3036	membership *Membership
3037	urlParams_ gensupport.URLParams
3038	ctx_       context.Context
3039	header_    http.Header
3040}
3041
3042// Create: Creates a `Membership`.
3043func (r *GroupsMembershipsService) Create(parent string, membership *Membership) *GroupsMembershipsCreateCall {
3044	c := &GroupsMembershipsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3045	c.parent = parent
3046	c.membership = membership
3047	return c
3048}
3049
3050// Fields allows partial responses to be retrieved. See
3051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3052// for more information.
3053func (c *GroupsMembershipsCreateCall) Fields(s ...googleapi.Field) *GroupsMembershipsCreateCall {
3054	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3055	return c
3056}
3057
3058// Context sets the context to be used in this call's Do method. Any
3059// pending HTTP request will be aborted if the provided context is
3060// canceled.
3061func (c *GroupsMembershipsCreateCall) Context(ctx context.Context) *GroupsMembershipsCreateCall {
3062	c.ctx_ = ctx
3063	return c
3064}
3065
3066// Header returns an http.Header that can be modified by the caller to
3067// add HTTP headers to the request.
3068func (c *GroupsMembershipsCreateCall) Header() http.Header {
3069	if c.header_ == nil {
3070		c.header_ = make(http.Header)
3071	}
3072	return c.header_
3073}
3074
3075func (c *GroupsMembershipsCreateCall) doRequest(alt string) (*http.Response, error) {
3076	reqHeaders := make(http.Header)
3077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3078	for k, v := range c.header_ {
3079		reqHeaders[k] = v
3080	}
3081	reqHeaders.Set("User-Agent", c.s.userAgent())
3082	var body io.Reader = nil
3083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.membership)
3084	if err != nil {
3085		return nil, err
3086	}
3087	reqHeaders.Set("Content-Type", "application/json")
3088	c.urlParams_.Set("alt", alt)
3089	c.urlParams_.Set("prettyPrint", "false")
3090	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships")
3091	urls += "?" + c.urlParams_.Encode()
3092	req, err := http.NewRequest("POST", urls, body)
3093	if err != nil {
3094		return nil, err
3095	}
3096	req.Header = reqHeaders
3097	googleapi.Expand(req.URL, map[string]string{
3098		"parent": c.parent,
3099	})
3100	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3101}
3102
3103// Do executes the "cloudidentity.groups.memberships.create" call.
3104// Exactly one of *Operation or error will be non-nil. Any non-2xx
3105// status code is an error. Response headers are in either
3106// *Operation.ServerResponse.Header or (if a response was returned at
3107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3108// to check whether the returned error was because
3109// http.StatusNotModified was returned.
3110func (c *GroupsMembershipsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3111	gensupport.SetOptions(c.urlParams_, opts...)
3112	res, err := c.doRequest("json")
3113	if res != nil && res.StatusCode == http.StatusNotModified {
3114		if res.Body != nil {
3115			res.Body.Close()
3116		}
3117		return nil, &googleapi.Error{
3118			Code:   res.StatusCode,
3119			Header: res.Header,
3120		}
3121	}
3122	if err != nil {
3123		return nil, err
3124	}
3125	defer googleapi.CloseBody(res)
3126	if err := googleapi.CheckResponse(res); err != nil {
3127		return nil, err
3128	}
3129	ret := &Operation{
3130		ServerResponse: googleapi.ServerResponse{
3131			Header:         res.Header,
3132			HTTPStatusCode: res.StatusCode,
3133		},
3134	}
3135	target := &ret
3136	if err := gensupport.DecodeResponse(target, res); err != nil {
3137		return nil, err
3138	}
3139	return ret, nil
3140	// {
3141	//   "description": "Creates a `Membership`.",
3142	//   "flatPath": "v1beta1/groups/{groupsId}/memberships",
3143	//   "httpMethod": "POST",
3144	//   "id": "cloudidentity.groups.memberships.create",
3145	//   "parameterOrder": [
3146	//     "parent"
3147	//   ],
3148	//   "parameters": {
3149	//     "parent": {
3150	//       "description": "Required. The parent `Group` resource under which to create the `Membership`.\n\nMust be of the form `groups/{group_id}`.",
3151	//       "location": "path",
3152	//       "pattern": "^groups/[^/]+$",
3153	//       "required": true,
3154	//       "type": "string"
3155	//     }
3156	//   },
3157	//   "path": "v1beta1/{+parent}/memberships",
3158	//   "request": {
3159	//     "$ref": "Membership"
3160	//   },
3161	//   "response": {
3162	//     "$ref": "Operation"
3163	//   },
3164	//   "scopes": [
3165	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3166	//     "https://www.googleapis.com/auth/cloud-platform"
3167	//   ]
3168	// }
3169
3170}
3171
3172// method id "cloudidentity.groups.memberships.delete":
3173
3174type GroupsMembershipsDeleteCall struct {
3175	s          *Service
3176	name       string
3177	urlParams_ gensupport.URLParams
3178	ctx_       context.Context
3179	header_    http.Header
3180}
3181
3182// Delete: Deletes a `Membership`.
3183func (r *GroupsMembershipsService) Delete(name string) *GroupsMembershipsDeleteCall {
3184	c := &GroupsMembershipsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3185	c.name = name
3186	return c
3187}
3188
3189// Fields allows partial responses to be retrieved. See
3190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3191// for more information.
3192func (c *GroupsMembershipsDeleteCall) Fields(s ...googleapi.Field) *GroupsMembershipsDeleteCall {
3193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3194	return c
3195}
3196
3197// Context sets the context to be used in this call's Do method. Any
3198// pending HTTP request will be aborted if the provided context is
3199// canceled.
3200func (c *GroupsMembershipsDeleteCall) Context(ctx context.Context) *GroupsMembershipsDeleteCall {
3201	c.ctx_ = ctx
3202	return c
3203}
3204
3205// Header returns an http.Header that can be modified by the caller to
3206// add HTTP headers to the request.
3207func (c *GroupsMembershipsDeleteCall) Header() http.Header {
3208	if c.header_ == nil {
3209		c.header_ = make(http.Header)
3210	}
3211	return c.header_
3212}
3213
3214func (c *GroupsMembershipsDeleteCall) doRequest(alt string) (*http.Response, error) {
3215	reqHeaders := make(http.Header)
3216	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3217	for k, v := range c.header_ {
3218		reqHeaders[k] = v
3219	}
3220	reqHeaders.Set("User-Agent", c.s.userAgent())
3221	var body io.Reader = nil
3222	c.urlParams_.Set("alt", alt)
3223	c.urlParams_.Set("prettyPrint", "false")
3224	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3225	urls += "?" + c.urlParams_.Encode()
3226	req, err := http.NewRequest("DELETE", urls, body)
3227	if err != nil {
3228		return nil, err
3229	}
3230	req.Header = reqHeaders
3231	googleapi.Expand(req.URL, map[string]string{
3232		"name": c.name,
3233	})
3234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3235}
3236
3237// Do executes the "cloudidentity.groups.memberships.delete" call.
3238// Exactly one of *Operation or error will be non-nil. Any non-2xx
3239// status code is an error. Response headers are in either
3240// *Operation.ServerResponse.Header or (if a response was returned at
3241// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3242// to check whether the returned error was because
3243// http.StatusNotModified was returned.
3244func (c *GroupsMembershipsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3245	gensupport.SetOptions(c.urlParams_, opts...)
3246	res, err := c.doRequest("json")
3247	if res != nil && res.StatusCode == http.StatusNotModified {
3248		if res.Body != nil {
3249			res.Body.Close()
3250		}
3251		return nil, &googleapi.Error{
3252			Code:   res.StatusCode,
3253			Header: res.Header,
3254		}
3255	}
3256	if err != nil {
3257		return nil, err
3258	}
3259	defer googleapi.CloseBody(res)
3260	if err := googleapi.CheckResponse(res); err != nil {
3261		return nil, err
3262	}
3263	ret := &Operation{
3264		ServerResponse: googleapi.ServerResponse{
3265			Header:         res.Header,
3266			HTTPStatusCode: res.StatusCode,
3267		},
3268	}
3269	target := &ret
3270	if err := gensupport.DecodeResponse(target, res); err != nil {
3271		return nil, err
3272	}
3273	return ret, nil
3274	// {
3275	//   "description": "Deletes a `Membership`.",
3276	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}",
3277	//   "httpMethod": "DELETE",
3278	//   "id": "cloudidentity.groups.memberships.delete",
3279	//   "parameterOrder": [
3280	//     "name"
3281	//   ],
3282	//   "parameters": {
3283	//     "name": {
3284	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Membership` to delete.\n\nMust be of the form `groups/{group_id}/memberships/{membership_id}`.",
3285	//       "location": "path",
3286	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
3287	//       "required": true,
3288	//       "type": "string"
3289	//     }
3290	//   },
3291	//   "path": "v1beta1/{+name}",
3292	//   "response": {
3293	//     "$ref": "Operation"
3294	//   },
3295	//   "scopes": [
3296	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3297	//     "https://www.googleapis.com/auth/cloud-platform"
3298	//   ]
3299	// }
3300
3301}
3302
3303// method id "cloudidentity.groups.memberships.get":
3304
3305type GroupsMembershipsGetCall struct {
3306	s            *Service
3307	name         string
3308	urlParams_   gensupport.URLParams
3309	ifNoneMatch_ string
3310	ctx_         context.Context
3311	header_      http.Header
3312}
3313
3314// Get: Retrieves a `Membership`.
3315func (r *GroupsMembershipsService) Get(name string) *GroupsMembershipsGetCall {
3316	c := &GroupsMembershipsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3317	c.name = name
3318	return c
3319}
3320
3321// Fields allows partial responses to be retrieved. See
3322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3323// for more information.
3324func (c *GroupsMembershipsGetCall) Fields(s ...googleapi.Field) *GroupsMembershipsGetCall {
3325	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3326	return c
3327}
3328
3329// IfNoneMatch sets the optional parameter which makes the operation
3330// fail if the object's ETag matches the given value. This is useful for
3331// getting updates only after the object has changed since the last
3332// request. Use googleapi.IsNotModified to check whether the response
3333// error from Do is the result of In-None-Match.
3334func (c *GroupsMembershipsGetCall) IfNoneMatch(entityTag string) *GroupsMembershipsGetCall {
3335	c.ifNoneMatch_ = entityTag
3336	return c
3337}
3338
3339// Context sets the context to be used in this call's Do method. Any
3340// pending HTTP request will be aborted if the provided context is
3341// canceled.
3342func (c *GroupsMembershipsGetCall) Context(ctx context.Context) *GroupsMembershipsGetCall {
3343	c.ctx_ = ctx
3344	return c
3345}
3346
3347// Header returns an http.Header that can be modified by the caller to
3348// add HTTP headers to the request.
3349func (c *GroupsMembershipsGetCall) Header() http.Header {
3350	if c.header_ == nil {
3351		c.header_ = make(http.Header)
3352	}
3353	return c.header_
3354}
3355
3356func (c *GroupsMembershipsGetCall) doRequest(alt string) (*http.Response, error) {
3357	reqHeaders := make(http.Header)
3358	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3359	for k, v := range c.header_ {
3360		reqHeaders[k] = v
3361	}
3362	reqHeaders.Set("User-Agent", c.s.userAgent())
3363	if c.ifNoneMatch_ != "" {
3364		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3365	}
3366	var body io.Reader = nil
3367	c.urlParams_.Set("alt", alt)
3368	c.urlParams_.Set("prettyPrint", "false")
3369	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3370	urls += "?" + c.urlParams_.Encode()
3371	req, err := http.NewRequest("GET", urls, body)
3372	if err != nil {
3373		return nil, err
3374	}
3375	req.Header = reqHeaders
3376	googleapi.Expand(req.URL, map[string]string{
3377		"name": c.name,
3378	})
3379	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3380}
3381
3382// Do executes the "cloudidentity.groups.memberships.get" call.
3383// Exactly one of *Membership or error will be non-nil. Any non-2xx
3384// status code is an error. Response headers are in either
3385// *Membership.ServerResponse.Header or (if a response was returned at
3386// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3387// to check whether the returned error was because
3388// http.StatusNotModified was returned.
3389func (c *GroupsMembershipsGetCall) Do(opts ...googleapi.CallOption) (*Membership, error) {
3390	gensupport.SetOptions(c.urlParams_, opts...)
3391	res, err := c.doRequest("json")
3392	if res != nil && res.StatusCode == http.StatusNotModified {
3393		if res.Body != nil {
3394			res.Body.Close()
3395		}
3396		return nil, &googleapi.Error{
3397			Code:   res.StatusCode,
3398			Header: res.Header,
3399		}
3400	}
3401	if err != nil {
3402		return nil, err
3403	}
3404	defer googleapi.CloseBody(res)
3405	if err := googleapi.CheckResponse(res); err != nil {
3406		return nil, err
3407	}
3408	ret := &Membership{
3409		ServerResponse: googleapi.ServerResponse{
3410			Header:         res.Header,
3411			HTTPStatusCode: res.StatusCode,
3412		},
3413	}
3414	target := &ret
3415	if err := gensupport.DecodeResponse(target, res); err != nil {
3416		return nil, err
3417	}
3418	return ret, nil
3419	// {
3420	//   "description": "Retrieves a `Membership`.",
3421	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}",
3422	//   "httpMethod": "GET",
3423	//   "id": "cloudidentity.groups.memberships.get",
3424	//   "parameterOrder": [
3425	//     "name"
3426	//   ],
3427	//   "parameters": {
3428	//     "name": {
3429	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Membership` to retrieve.\n\nMust be of the form `groups/{group_id}/memberships/{membership_id}`.",
3430	//       "location": "path",
3431	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
3432	//       "required": true,
3433	//       "type": "string"
3434	//     }
3435	//   },
3436	//   "path": "v1beta1/{+name}",
3437	//   "response": {
3438	//     "$ref": "Membership"
3439	//   },
3440	//   "scopes": [
3441	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3442	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
3443	//     "https://www.googleapis.com/auth/cloud-platform"
3444	//   ]
3445	// }
3446
3447}
3448
3449// method id "cloudidentity.groups.memberships.list":
3450
3451type GroupsMembershipsListCall struct {
3452	s            *Service
3453	parent       string
3454	urlParams_   gensupport.URLParams
3455	ifNoneMatch_ string
3456	ctx_         context.Context
3457	header_      http.Header
3458}
3459
3460// List: Lists the `Membership`s within a `Group`.
3461func (r *GroupsMembershipsService) List(parent string) *GroupsMembershipsListCall {
3462	c := &GroupsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3463	c.parent = parent
3464	return c
3465}
3466
3467// PageSize sets the optional parameter "pageSize": The maximum number
3468// of results to return.
3469//
3470// Note that the number of results returned may be less than this value
3471// even
3472// if there are more available results. To fetch all results, clients
3473// must
3474// continue calling this method repeatedly until the response no
3475// longer
3476// contains a `next_page_token`.
3477//
3478// If unspecified, defaults to 200 for `GroupView.BASIC` and to 50
3479// for
3480// `GroupView.FULL`.
3481//
3482// Must not be greater than 1000 for `GroupView.BASIC` or 500
3483// for
3484// `GroupView.FULL`.
3485func (c *GroupsMembershipsListCall) PageSize(pageSize int64) *GroupsMembershipsListCall {
3486	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3487	return c
3488}
3489
3490// PageToken sets the optional parameter "pageToken": The
3491// `next_page_token` value returned from a previous search request,
3492// if
3493// any.
3494func (c *GroupsMembershipsListCall) PageToken(pageToken string) *GroupsMembershipsListCall {
3495	c.urlParams_.Set("pageToken", pageToken)
3496	return c
3497}
3498
3499// View sets the optional parameter "view": The level of detail to be
3500// returned.
3501//
3502// If unspecified, defaults to `MembershipView.BASIC`.
3503//
3504// Possible values:
3505//   "BASIC"
3506//   "FULL"
3507func (c *GroupsMembershipsListCall) View(view string) *GroupsMembershipsListCall {
3508	c.urlParams_.Set("view", view)
3509	return c
3510}
3511
3512// Fields allows partial responses to be retrieved. See
3513// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3514// for more information.
3515func (c *GroupsMembershipsListCall) Fields(s ...googleapi.Field) *GroupsMembershipsListCall {
3516	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3517	return c
3518}
3519
3520// IfNoneMatch sets the optional parameter which makes the operation
3521// fail if the object's ETag matches the given value. This is useful for
3522// getting updates only after the object has changed since the last
3523// request. Use googleapi.IsNotModified to check whether the response
3524// error from Do is the result of In-None-Match.
3525func (c *GroupsMembershipsListCall) IfNoneMatch(entityTag string) *GroupsMembershipsListCall {
3526	c.ifNoneMatch_ = entityTag
3527	return c
3528}
3529
3530// Context sets the context to be used in this call's Do method. Any
3531// pending HTTP request will be aborted if the provided context is
3532// canceled.
3533func (c *GroupsMembershipsListCall) Context(ctx context.Context) *GroupsMembershipsListCall {
3534	c.ctx_ = ctx
3535	return c
3536}
3537
3538// Header returns an http.Header that can be modified by the caller to
3539// add HTTP headers to the request.
3540func (c *GroupsMembershipsListCall) Header() http.Header {
3541	if c.header_ == nil {
3542		c.header_ = make(http.Header)
3543	}
3544	return c.header_
3545}
3546
3547func (c *GroupsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
3548	reqHeaders := make(http.Header)
3549	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3550	for k, v := range c.header_ {
3551		reqHeaders[k] = v
3552	}
3553	reqHeaders.Set("User-Agent", c.s.userAgent())
3554	if c.ifNoneMatch_ != "" {
3555		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3556	}
3557	var body io.Reader = nil
3558	c.urlParams_.Set("alt", alt)
3559	c.urlParams_.Set("prettyPrint", "false")
3560	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships")
3561	urls += "?" + c.urlParams_.Encode()
3562	req, err := http.NewRequest("GET", urls, body)
3563	if err != nil {
3564		return nil, err
3565	}
3566	req.Header = reqHeaders
3567	googleapi.Expand(req.URL, map[string]string{
3568		"parent": c.parent,
3569	})
3570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3571}
3572
3573// Do executes the "cloudidentity.groups.memberships.list" call.
3574// Exactly one of *ListMembershipsResponse or error will be non-nil. Any
3575// non-2xx status code is an error. Response headers are in either
3576// *ListMembershipsResponse.ServerResponse.Header or (if a response was
3577// returned at all) in error.(*googleapi.Error).Header. Use
3578// googleapi.IsNotModified to check whether the returned error was
3579// because http.StatusNotModified was returned.
3580func (c *GroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*ListMembershipsResponse, error) {
3581	gensupport.SetOptions(c.urlParams_, opts...)
3582	res, err := c.doRequest("json")
3583	if res != nil && res.StatusCode == http.StatusNotModified {
3584		if res.Body != nil {
3585			res.Body.Close()
3586		}
3587		return nil, &googleapi.Error{
3588			Code:   res.StatusCode,
3589			Header: res.Header,
3590		}
3591	}
3592	if err != nil {
3593		return nil, err
3594	}
3595	defer googleapi.CloseBody(res)
3596	if err := googleapi.CheckResponse(res); err != nil {
3597		return nil, err
3598	}
3599	ret := &ListMembershipsResponse{
3600		ServerResponse: googleapi.ServerResponse{
3601			Header:         res.Header,
3602			HTTPStatusCode: res.StatusCode,
3603		},
3604	}
3605	target := &ret
3606	if err := gensupport.DecodeResponse(target, res); err != nil {
3607		return nil, err
3608	}
3609	return ret, nil
3610	// {
3611	//   "description": "Lists the `Membership`s within a `Group`.",
3612	//   "flatPath": "v1beta1/groups/{groupsId}/memberships",
3613	//   "httpMethod": "GET",
3614	//   "id": "cloudidentity.groups.memberships.list",
3615	//   "parameterOrder": [
3616	//     "parent"
3617	//   ],
3618	//   "parameters": {
3619	//     "pageSize": {
3620	//       "description": "The maximum number of results to return.\n\nNote that the number of results returned may be less than this value even\nif there are more available results. To fetch all results, clients must\ncontinue calling this method repeatedly until the response no longer\ncontains a `next_page_token`.\n\nIf unspecified, defaults to 200 for `GroupView.BASIC` and to 50 for\n`GroupView.FULL`.\n\nMust not be greater than 1000 for `GroupView.BASIC` or 500 for\n`GroupView.FULL`.",
3621	//       "format": "int32",
3622	//       "location": "query",
3623	//       "type": "integer"
3624	//     },
3625	//     "pageToken": {
3626	//       "description": "The `next_page_token` value returned from a previous search request, if\nany.",
3627	//       "location": "query",
3628	//       "type": "string"
3629	//     },
3630	//     "parent": {
3631	//       "description": "Required. The parent `Group` resource under which to lookup the `Membership` name.\n\nMust be of the form `groups/{group_id}`.",
3632	//       "location": "path",
3633	//       "pattern": "^groups/[^/]+$",
3634	//       "required": true,
3635	//       "type": "string"
3636	//     },
3637	//     "view": {
3638	//       "description": "The level of detail to be returned.\n\nIf unspecified, defaults to `MembershipView.BASIC`.",
3639	//       "enum": [
3640	//         "BASIC",
3641	//         "FULL"
3642	//       ],
3643	//       "location": "query",
3644	//       "type": "string"
3645	//     }
3646	//   },
3647	//   "path": "v1beta1/{+parent}/memberships",
3648	//   "response": {
3649	//     "$ref": "ListMembershipsResponse"
3650	//   },
3651	//   "scopes": [
3652	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3653	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
3654	//     "https://www.googleapis.com/auth/cloud-platform"
3655	//   ]
3656	// }
3657
3658}
3659
3660// Pages invokes f for each page of results.
3661// A non-nil error returned from f will halt the iteration.
3662// The provided context supersedes any context provided to the Context method.
3663func (c *GroupsMembershipsListCall) Pages(ctx context.Context, f func(*ListMembershipsResponse) error) error {
3664	c.ctx_ = ctx
3665	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3666	for {
3667		x, err := c.Do()
3668		if err != nil {
3669			return err
3670		}
3671		if err := f(x); err != nil {
3672			return err
3673		}
3674		if x.NextPageToken == "" {
3675			return nil
3676		}
3677		c.PageToken(x.NextPageToken)
3678	}
3679}
3680
3681// method id "cloudidentity.groups.memberships.lookup":
3682
3683type GroupsMembershipsLookupCall struct {
3684	s            *Service
3685	parent       string
3686	urlParams_   gensupport.URLParams
3687	ifNoneMatch_ string
3688	ctx_         context.Context
3689	header_      http.Header
3690}
3691
3692// Lookup: Looks up the
3693// [resource
3694// name](https://cloud.google.com/apis/design/resource_names) of
3695// a
3696// `Membership` by its `EntityKey`.
3697func (r *GroupsMembershipsService) Lookup(parent string) *GroupsMembershipsLookupCall {
3698	c := &GroupsMembershipsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3699	c.parent = parent
3700	return c
3701}
3702
3703// MemberKeyId sets the optional parameter "memberKey.id": The ID of the
3704// entity.
3705//
3706// For Google-managed entities, the `id` must be the email address of
3707// an
3708// existing group or user.
3709//
3710// For external-identity-mapped entities, the `id` must be a string
3711// conforming
3712// to the Identity Source's requirements.
3713//
3714// Must be unique within a `namespace`.
3715func (c *GroupsMembershipsLookupCall) MemberKeyId(memberKeyId string) *GroupsMembershipsLookupCall {
3716	c.urlParams_.Set("memberKey.id", memberKeyId)
3717	return c
3718}
3719
3720// MemberKeyNamespace sets the optional parameter "memberKey.namespace":
3721// The namespace in which the entity exists.
3722//
3723// If not specified, the `EntityKey` represents a Google-managed entity
3724// such
3725// as a Google user or a Google Group.
3726//
3727// If specified, the `EntityKey` represents an external-identity-mapped
3728// group.
3729// The namespace must correspond to an identity source created in
3730// Admin
3731// Console and must be in the form of
3732// `identitysources/{identity_source_id}.
3733func (c *GroupsMembershipsLookupCall) MemberKeyNamespace(memberKeyNamespace string) *GroupsMembershipsLookupCall {
3734	c.urlParams_.Set("memberKey.namespace", memberKeyNamespace)
3735	return c
3736}
3737
3738// Fields allows partial responses to be retrieved. See
3739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3740// for more information.
3741func (c *GroupsMembershipsLookupCall) Fields(s ...googleapi.Field) *GroupsMembershipsLookupCall {
3742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3743	return c
3744}
3745
3746// IfNoneMatch sets the optional parameter which makes the operation
3747// fail if the object's ETag matches the given value. This is useful for
3748// getting updates only after the object has changed since the last
3749// request. Use googleapi.IsNotModified to check whether the response
3750// error from Do is the result of In-None-Match.
3751func (c *GroupsMembershipsLookupCall) IfNoneMatch(entityTag string) *GroupsMembershipsLookupCall {
3752	c.ifNoneMatch_ = entityTag
3753	return c
3754}
3755
3756// Context sets the context to be used in this call's Do method. Any
3757// pending HTTP request will be aborted if the provided context is
3758// canceled.
3759func (c *GroupsMembershipsLookupCall) Context(ctx context.Context) *GroupsMembershipsLookupCall {
3760	c.ctx_ = ctx
3761	return c
3762}
3763
3764// Header returns an http.Header that can be modified by the caller to
3765// add HTTP headers to the request.
3766func (c *GroupsMembershipsLookupCall) Header() http.Header {
3767	if c.header_ == nil {
3768		c.header_ = make(http.Header)
3769	}
3770	return c.header_
3771}
3772
3773func (c *GroupsMembershipsLookupCall) doRequest(alt string) (*http.Response, error) {
3774	reqHeaders := make(http.Header)
3775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3776	for k, v := range c.header_ {
3777		reqHeaders[k] = v
3778	}
3779	reqHeaders.Set("User-Agent", c.s.userAgent())
3780	if c.ifNoneMatch_ != "" {
3781		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3782	}
3783	var body io.Reader = nil
3784	c.urlParams_.Set("alt", alt)
3785	c.urlParams_.Set("prettyPrint", "false")
3786	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/memberships:lookup")
3787	urls += "?" + c.urlParams_.Encode()
3788	req, err := http.NewRequest("GET", urls, body)
3789	if err != nil {
3790		return nil, err
3791	}
3792	req.Header = reqHeaders
3793	googleapi.Expand(req.URL, map[string]string{
3794		"parent": c.parent,
3795	})
3796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3797}
3798
3799// Do executes the "cloudidentity.groups.memberships.lookup" call.
3800// Exactly one of *LookupMembershipNameResponse or error will be
3801// non-nil. Any non-2xx status code is an error. Response headers are in
3802// either *LookupMembershipNameResponse.ServerResponse.Header or (if a
3803// response was returned at all) in error.(*googleapi.Error).Header. Use
3804// googleapi.IsNotModified to check whether the returned error was
3805// because http.StatusNotModified was returned.
3806func (c *GroupsMembershipsLookupCall) Do(opts ...googleapi.CallOption) (*LookupMembershipNameResponse, error) {
3807	gensupport.SetOptions(c.urlParams_, opts...)
3808	res, err := c.doRequest("json")
3809	if res != nil && res.StatusCode == http.StatusNotModified {
3810		if res.Body != nil {
3811			res.Body.Close()
3812		}
3813		return nil, &googleapi.Error{
3814			Code:   res.StatusCode,
3815			Header: res.Header,
3816		}
3817	}
3818	if err != nil {
3819		return nil, err
3820	}
3821	defer googleapi.CloseBody(res)
3822	if err := googleapi.CheckResponse(res); err != nil {
3823		return nil, err
3824	}
3825	ret := &LookupMembershipNameResponse{
3826		ServerResponse: googleapi.ServerResponse{
3827			Header:         res.Header,
3828			HTTPStatusCode: res.StatusCode,
3829		},
3830	}
3831	target := &ret
3832	if err := gensupport.DecodeResponse(target, res); err != nil {
3833		return nil, err
3834	}
3835	return ret, nil
3836	// {
3837	//   "description": "Looks up the [resource\nname](https://cloud.google.com/apis/design/resource_names) of a\n`Membership` by its `EntityKey`.",
3838	//   "flatPath": "v1beta1/groups/{groupsId}/memberships:lookup",
3839	//   "httpMethod": "GET",
3840	//   "id": "cloudidentity.groups.memberships.lookup",
3841	//   "parameterOrder": [
3842	//     "parent"
3843	//   ],
3844	//   "parameters": {
3845	//     "memberKey.id": {
3846	//       "description": "The ID of the entity.\n\nFor Google-managed entities, the `id` must be the email address of an\nexisting group or user.\n\nFor external-identity-mapped entities, the `id` must be a string conforming\nto the Identity Source's requirements.\n\nMust be unique within a `namespace`.",
3847	//       "location": "query",
3848	//       "type": "string"
3849	//     },
3850	//     "memberKey.namespace": {
3851	//       "description": "The namespace in which the entity exists.\n\nIf not specified, the `EntityKey` represents a Google-managed entity such\nas a Google user or a Google Group.\n\nIf specified, the `EntityKey` represents an external-identity-mapped group.\nThe namespace must correspond to an identity source created in Admin\nConsole and must be in the form of `identitysources/{identity_source_id}.",
3852	//       "location": "query",
3853	//       "type": "string"
3854	//     },
3855	//     "parent": {
3856	//       "description": "Required. The parent `Group` resource under which to lookup the `Membership` name.\n\nMust be of the form `groups/{group_id}`.",
3857	//       "location": "path",
3858	//       "pattern": "^groups/[^/]+$",
3859	//       "required": true,
3860	//       "type": "string"
3861	//     }
3862	//   },
3863	//   "path": "v1beta1/{+parent}/memberships:lookup",
3864	//   "response": {
3865	//     "$ref": "LookupMembershipNameResponse"
3866	//   },
3867	//   "scopes": [
3868	//     "https://www.googleapis.com/auth/cloud-identity.groups",
3869	//     "https://www.googleapis.com/auth/cloud-identity.groups.readonly",
3870	//     "https://www.googleapis.com/auth/cloud-platform"
3871	//   ]
3872	// }
3873
3874}
3875
3876// method id "cloudidentity.groups.memberships.modifyMembershipRoles":
3877
3878type GroupsMembershipsModifyMembershipRolesCall struct {
3879	s                            *Service
3880	name                         string
3881	modifymembershiprolesrequest *ModifyMembershipRolesRequest
3882	urlParams_                   gensupport.URLParams
3883	ctx_                         context.Context
3884	header_                      http.Header
3885}
3886
3887// ModifyMembershipRoles: Modifies the `MembershipRole`s of a
3888// `Membership`.
3889func (r *GroupsMembershipsService) ModifyMembershipRoles(name string, modifymembershiprolesrequest *ModifyMembershipRolesRequest) *GroupsMembershipsModifyMembershipRolesCall {
3890	c := &GroupsMembershipsModifyMembershipRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3891	c.name = name
3892	c.modifymembershiprolesrequest = modifymembershiprolesrequest
3893	return c
3894}
3895
3896// Fields allows partial responses to be retrieved. See
3897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3898// for more information.
3899func (c *GroupsMembershipsModifyMembershipRolesCall) Fields(s ...googleapi.Field) *GroupsMembershipsModifyMembershipRolesCall {
3900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3901	return c
3902}
3903
3904// Context sets the context to be used in this call's Do method. Any
3905// pending HTTP request will be aborted if the provided context is
3906// canceled.
3907func (c *GroupsMembershipsModifyMembershipRolesCall) Context(ctx context.Context) *GroupsMembershipsModifyMembershipRolesCall {
3908	c.ctx_ = ctx
3909	return c
3910}
3911
3912// Header returns an http.Header that can be modified by the caller to
3913// add HTTP headers to the request.
3914func (c *GroupsMembershipsModifyMembershipRolesCall) Header() http.Header {
3915	if c.header_ == nil {
3916		c.header_ = make(http.Header)
3917	}
3918	return c.header_
3919}
3920
3921func (c *GroupsMembershipsModifyMembershipRolesCall) doRequest(alt string) (*http.Response, error) {
3922	reqHeaders := make(http.Header)
3923	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
3924	for k, v := range c.header_ {
3925		reqHeaders[k] = v
3926	}
3927	reqHeaders.Set("User-Agent", c.s.userAgent())
3928	var body io.Reader = nil
3929	body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifymembershiprolesrequest)
3930	if err != nil {
3931		return nil, err
3932	}
3933	reqHeaders.Set("Content-Type", "application/json")
3934	c.urlParams_.Set("alt", alt)
3935	c.urlParams_.Set("prettyPrint", "false")
3936	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:modifyMembershipRoles")
3937	urls += "?" + c.urlParams_.Encode()
3938	req, err := http.NewRequest("POST", urls, body)
3939	if err != nil {
3940		return nil, err
3941	}
3942	req.Header = reqHeaders
3943	googleapi.Expand(req.URL, map[string]string{
3944		"name": c.name,
3945	})
3946	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3947}
3948
3949// Do executes the "cloudidentity.groups.memberships.modifyMembershipRoles" call.
3950// Exactly one of *ModifyMembershipRolesResponse or error will be
3951// non-nil. Any non-2xx status code is an error. Response headers are in
3952// either *ModifyMembershipRolesResponse.ServerResponse.Header or (if a
3953// response was returned at all) in error.(*googleapi.Error).Header. Use
3954// googleapi.IsNotModified to check whether the returned error was
3955// because http.StatusNotModified was returned.
3956func (c *GroupsMembershipsModifyMembershipRolesCall) Do(opts ...googleapi.CallOption) (*ModifyMembershipRolesResponse, error) {
3957	gensupport.SetOptions(c.urlParams_, opts...)
3958	res, err := c.doRequest("json")
3959	if res != nil && res.StatusCode == http.StatusNotModified {
3960		if res.Body != nil {
3961			res.Body.Close()
3962		}
3963		return nil, &googleapi.Error{
3964			Code:   res.StatusCode,
3965			Header: res.Header,
3966		}
3967	}
3968	if err != nil {
3969		return nil, err
3970	}
3971	defer googleapi.CloseBody(res)
3972	if err := googleapi.CheckResponse(res); err != nil {
3973		return nil, err
3974	}
3975	ret := &ModifyMembershipRolesResponse{
3976		ServerResponse: googleapi.ServerResponse{
3977			Header:         res.Header,
3978			HTTPStatusCode: res.StatusCode,
3979		},
3980	}
3981	target := &ret
3982	if err := gensupport.DecodeResponse(target, res); err != nil {
3983		return nil, err
3984	}
3985	return ret, nil
3986	// {
3987	//   "description": "Modifies the `MembershipRole`s of a `Membership`.",
3988	//   "flatPath": "v1beta1/groups/{groupsId}/memberships/{membershipsId}:modifyMembershipRoles",
3989	//   "httpMethod": "POST",
3990	//   "id": "cloudidentity.groups.memberships.modifyMembershipRoles",
3991	//   "parameterOrder": [
3992	//     "name"
3993	//   ],
3994	//   "parameters": {
3995	//     "name": {
3996	//       "description": "Required. The [resource name](https://cloud.google.com/apis/design/resource_names) of\nthe `Membership` whose roles are to be modified.\n\nMust be of the form `groups/{group_id}/memberships/{membership_id}`.",
3997	//       "location": "path",
3998	//       "pattern": "^groups/[^/]+/memberships/[^/]+$",
3999	//       "required": true,
4000	//       "type": "string"
4001	//     }
4002	//   },
4003	//   "path": "v1beta1/{+name}:modifyMembershipRoles",
4004	//   "request": {
4005	//     "$ref": "ModifyMembershipRolesRequest"
4006	//   },
4007	//   "response": {
4008	//     "$ref": "ModifyMembershipRolesResponse"
4009	//   },
4010	//   "scopes": [
4011	//     "https://www.googleapis.com/auth/cloud-identity.groups",
4012	//     "https://www.googleapis.com/auth/cloud-platform"
4013	//   ]
4014	// }
4015
4016}
4017