1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package managedidentities provides access to the Managed Service for Microsoft Active Directory API.
8//
9// For product documentation, see: https://cloud.google.com/managed-microsoft-ad/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/managedidentities/v1"
16//   ...
17//   ctx := context.Background()
18//   managedidentitiesService, err := managedidentities.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// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   managedidentitiesService, err := managedidentities.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   managedidentitiesService, err := managedidentities.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package managedidentities // import "google.golang.org/api/managedidentities/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "managedidentities:v1"
75const apiName = "managedidentities"
76const apiVersion = "v1"
77const basePath = "https://managedidentities.googleapis.com/"
78const mtlsBasePath = "https://managedidentities.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud Platform data
83	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/cloud-platform",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Projects = NewProjectsService(s)
120	return s, nil
121}
122
123type Service struct {
124	client    *http.Client
125	BasePath  string // API endpoint base URL
126	UserAgent string // optional additional User-Agent fragment
127
128	Projects *ProjectsService
129}
130
131func (s *Service) userAgent() string {
132	if s.UserAgent == "" {
133		return googleapi.UserAgent
134	}
135	return googleapi.UserAgent + " " + s.UserAgent
136}
137
138func NewProjectsService(s *Service) *ProjectsService {
139	rs := &ProjectsService{s: s}
140	rs.Locations = NewProjectsLocationsService(s)
141	return rs
142}
143
144type ProjectsService struct {
145	s *Service
146
147	Locations *ProjectsLocationsService
148}
149
150func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
151	rs := &ProjectsLocationsService{s: s}
152	rs.Global = NewProjectsLocationsGlobalService(s)
153	return rs
154}
155
156type ProjectsLocationsService struct {
157	s *Service
158
159	Global *ProjectsLocationsGlobalService
160}
161
162func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService {
163	rs := &ProjectsLocationsGlobalService{s: s}
164	rs.Domains = NewProjectsLocationsGlobalDomainsService(s)
165	rs.Operations = NewProjectsLocationsGlobalOperationsService(s)
166	return rs
167}
168
169type ProjectsLocationsGlobalService struct {
170	s *Service
171
172	Domains *ProjectsLocationsGlobalDomainsService
173
174	Operations *ProjectsLocationsGlobalOperationsService
175}
176
177func NewProjectsLocationsGlobalDomainsService(s *Service) *ProjectsLocationsGlobalDomainsService {
178	rs := &ProjectsLocationsGlobalDomainsService{s: s}
179	return rs
180}
181
182type ProjectsLocationsGlobalDomainsService struct {
183	s *Service
184}
185
186func NewProjectsLocationsGlobalOperationsService(s *Service) *ProjectsLocationsGlobalOperationsService {
187	rs := &ProjectsLocationsGlobalOperationsService{s: s}
188	return rs
189}
190
191type ProjectsLocationsGlobalOperationsService struct {
192	s *Service
193}
194
195// AttachTrustRequest: Request message for AttachTrust
196type AttachTrustRequest struct {
197	// Trust: Required. The domain trust resource.
198	Trust *Trust `json:"trust,omitempty"`
199
200	// ForceSendFields is a list of field names (e.g. "Trust") to
201	// unconditionally include in API requests. By default, fields with
202	// empty values are omitted from API requests. However, any non-pointer,
203	// non-interface field appearing in ForceSendFields will be sent to the
204	// server regardless of whether the field is empty or not. This may be
205	// used to include empty fields in Patch requests.
206	ForceSendFields []string `json:"-"`
207
208	// NullFields is a list of field names (e.g. "Trust") to include in API
209	// requests with the JSON null value. By default, fields with empty
210	// values are omitted from API requests. However, any field with an
211	// empty value appearing in NullFields will be sent to the server as
212	// null. It is an error if a field in this list has a non-empty value.
213	// This may be used to include null fields in Patch requests.
214	NullFields []string `json:"-"`
215}
216
217func (s *AttachTrustRequest) MarshalJSON() ([]byte, error) {
218	type NoMethod AttachTrustRequest
219	raw := NoMethod(*s)
220	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
221}
222
223// Binding: Associates `members` with a `role`.
224type Binding struct {
225	// Condition: The condition that is associated with this binding. If the
226	// condition evaluates to `true`, then this binding applies to the
227	// current request. If the condition evaluates to `false`, then this
228	// binding does not apply to the current request. However, a different
229	// role binding might grant the same role to one or more of the members
230	// in this binding. To learn which resources support conditions in their
231	// IAM policies, see the IAM documentation
232	// (https://cloud.google.com/iam/help/conditions/resource-policies).
233	Condition *Expr `json:"condition,omitempty"`
234
235	// Members: Specifies the identities requesting access for a Cloud
236	// Platform resource. `members` can have the following values: *
237	// `allUsers`: A special identifier that represents anyone who is on the
238	// internet; with or without a Google account. *
239	// `allAuthenticatedUsers`: A special identifier that represents anyone
240	// who is authenticated with a Google account or a service account. *
241	// `user:{emailid}`: An email address that represents a specific Google
242	// account. For example, `alice@example.com` . *
243	// `serviceAccount:{emailid}`: An email address that represents a
244	// service account. For example,
245	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
246	// email address that represents a Google group. For example,
247	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
248	// email address (plus unique identifier) representing a user that has
249	// been recently deleted. For example,
250	// `alice@example.com?uid=123456789012345678901`. If the user is
251	// recovered, this value reverts to `user:{emailid}` and the recovered
252	// user retains the role in the binding. *
253	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
254	// (plus unique identifier) representing a service account that has been
255	// recently deleted. For example,
256	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
257	// If the service account is undeleted, this value reverts to
258	// `serviceAccount:{emailid}` and the undeleted service account retains
259	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
260	// An email address (plus unique identifier) representing a Google group
261	// that has been recently deleted. For example,
262	// `admins@example.com?uid=123456789012345678901`. If the group is
263	// recovered, this value reverts to `group:{emailid}` and the recovered
264	// group retains the role in the binding. * `domain:{domain}`: The G
265	// Suite domain (primary) that represents all the users of that domain.
266	// For example, `google.com` or `example.com`.
267	Members []string `json:"members,omitempty"`
268
269	// Role: Role that is assigned to `members`. For example,
270	// `roles/viewer`, `roles/editor`, or `roles/owner`.
271	Role string `json:"role,omitempty"`
272
273	// ForceSendFields is a list of field names (e.g. "Condition") to
274	// unconditionally include in API requests. By default, fields with
275	// empty values are omitted from API requests. However, any non-pointer,
276	// non-interface field appearing in ForceSendFields will be sent to the
277	// server regardless of whether the field is empty or not. This may be
278	// used to include empty fields in Patch requests.
279	ForceSendFields []string `json:"-"`
280
281	// NullFields is a list of field names (e.g. "Condition") to include in
282	// API requests with the JSON null value. By default, fields with empty
283	// values are omitted from API requests. However, any field with an
284	// empty value appearing in NullFields will be sent to the server as
285	// null. It is an error if a field in this list has a non-empty value.
286	// This may be used to include null fields in Patch requests.
287	NullFields []string `json:"-"`
288}
289
290func (s *Binding) MarshalJSON() ([]byte, error) {
291	type NoMethod Binding
292	raw := NoMethod(*s)
293	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
294}
295
296// CancelOperationRequest: The request message for
297// Operations.CancelOperation.
298type CancelOperationRequest struct {
299}
300
301// DailyCycle: Time window specified for daily operations.
302type DailyCycle struct {
303	// Duration: Output only. Duration of the time window, set by service
304	// producer.
305	Duration string `json:"duration,omitempty"`
306
307	// StartTime: Time within the day to start the operations.
308	StartTime *TimeOfDay `json:"startTime,omitempty"`
309
310	// ForceSendFields is a list of field names (e.g. "Duration") to
311	// unconditionally include in API requests. By default, fields with
312	// empty values are omitted from API requests. However, any non-pointer,
313	// non-interface field appearing in ForceSendFields will be sent to the
314	// server regardless of whether the field is empty or not. This may be
315	// used to include empty fields in Patch requests.
316	ForceSendFields []string `json:"-"`
317
318	// NullFields is a list of field names (e.g. "Duration") to include in
319	// API requests with the JSON null value. By default, fields with empty
320	// values are omitted from API requests. However, any field with an
321	// empty value appearing in NullFields will be sent to the server as
322	// null. It is an error if a field in this list has a non-empty value.
323	// This may be used to include null fields in Patch requests.
324	NullFields []string `json:"-"`
325}
326
327func (s *DailyCycle) MarshalJSON() ([]byte, error) {
328	type NoMethod DailyCycle
329	raw := NoMethod(*s)
330	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
331}
332
333// Date: Represents a whole or partial calendar date, such as a
334// birthday. The time of day and time zone are either specified
335// elsewhere or are insignificant. The date is relative to the Gregorian
336// Calendar. This can represent one of the following: * A full date,
337// with non-zero year, month, and day values * A month and day value,
338// with a zero year, such as an anniversary * A year on its own, with
339// zero month and day values * A year and month value, with a zero day,
340// such as a credit card expiration date Related types are
341// google.type.TimeOfDay and `google.protobuf.Timestamp`.
342type Date struct {
343	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
344	// month, or 0 to specify a year by itself or a year and month where the
345	// day isn't significant.
346	Day int64 `json:"day,omitempty"`
347
348	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
349	// without a month and day.
350	Month int64 `json:"month,omitempty"`
351
352	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
353	// date without a year.
354	Year int64 `json:"year,omitempty"`
355
356	// ForceSendFields is a list of field names (e.g. "Day") to
357	// unconditionally include in API requests. By default, fields with
358	// empty values are omitted from API requests. However, any non-pointer,
359	// non-interface field appearing in ForceSendFields will be sent to the
360	// server regardless of whether the field is empty or not. This may be
361	// used to include empty fields in Patch requests.
362	ForceSendFields []string `json:"-"`
363
364	// NullFields is a list of field names (e.g. "Day") to include in API
365	// requests with the JSON null value. By default, fields with empty
366	// values are omitted from API requests. However, any field with an
367	// empty value appearing in NullFields will be sent to the server as
368	// null. It is an error if a field in this list has a non-empty value.
369	// This may be used to include null fields in Patch requests.
370	NullFields []string `json:"-"`
371}
372
373func (s *Date) MarshalJSON() ([]byte, error) {
374	type NoMethod Date
375	raw := NoMethod(*s)
376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
377}
378
379// DenyMaintenancePeriod: DenyMaintenancePeriod definition. Maintenance
380// is forbidden within the deny period. The start_date must be less than
381// the end_date.
382type DenyMaintenancePeriod struct {
383	// EndDate: Deny period end date. This can be: * A full date, with
384	// non-zero year, month and day values. * A month and day value, with a
385	// zero year. Allows recurring deny periods each year. Date matching
386	// this period will have to be before the end.
387	EndDate *Date `json:"endDate,omitempty"`
388
389	// StartDate: Deny period start date. This can be: * A full date, with
390	// non-zero year, month and day values. * A month and day value, with a
391	// zero year. Allows recurring deny periods each year. Date matching
392	// this period will have to be the same or after the start.
393	StartDate *Date `json:"startDate,omitempty"`
394
395	// Time: Time in UTC when the Blackout period starts on start_date and
396	// ends on end_date. This can be: * Full time. * All zeros for 00:00:00
397	// UTC
398	Time *TimeOfDay `json:"time,omitempty"`
399
400	// ForceSendFields is a list of field names (e.g. "EndDate") to
401	// unconditionally include in API requests. By default, fields with
402	// empty values are omitted from API requests. However, any non-pointer,
403	// non-interface field appearing in ForceSendFields will be sent to the
404	// server regardless of whether the field is empty or not. This may be
405	// used to include empty fields in Patch requests.
406	ForceSendFields []string `json:"-"`
407
408	// NullFields is a list of field names (e.g. "EndDate") to include in
409	// API requests with the JSON null value. By default, fields with empty
410	// values are omitted from API requests. However, any field with an
411	// empty value appearing in NullFields will be sent to the server as
412	// null. It is an error if a field in this list has a non-empty value.
413	// This may be used to include null fields in Patch requests.
414	NullFields []string `json:"-"`
415}
416
417func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
418	type NoMethod DenyMaintenancePeriod
419	raw := NoMethod(*s)
420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
421}
422
423// DetachTrustRequest: Request message for DetachTrust
424type DetachTrustRequest struct {
425	// Trust: Required. The domain trust resource to removed.
426	Trust *Trust `json:"trust,omitempty"`
427
428	// ForceSendFields is a list of field names (e.g. "Trust") to
429	// unconditionally include in API requests. By default, fields with
430	// empty values are omitted from API requests. However, any non-pointer,
431	// non-interface field appearing in ForceSendFields will be sent to the
432	// server regardless of whether the field is empty or not. This may be
433	// used to include empty fields in Patch requests.
434	ForceSendFields []string `json:"-"`
435
436	// NullFields is a list of field names (e.g. "Trust") to include in API
437	// requests with the JSON null value. By default, fields with empty
438	// values are omitted from API requests. However, any field with an
439	// empty value appearing in NullFields will be sent to the server as
440	// null. It is an error if a field in this list has a non-empty value.
441	// This may be used to include null fields in Patch requests.
442	NullFields []string `json:"-"`
443}
444
445func (s *DetachTrustRequest) MarshalJSON() ([]byte, error) {
446	type NoMethod DetachTrustRequest
447	raw := NoMethod(*s)
448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
449}
450
451// Domain: Represents a managed Microsoft Active Directory domain. If
452// the domain is being changed, it will be placed into the UPDATING
453// state, which indicates that the resource is being reconciled. At this
454// point, Get will reflect an intermediate state.
455type Domain struct {
456	// Admin: Optional. The name of delegated administrator account used to
457	// perform Active Directory operations. If not specified, `setupadmin`
458	// will be used.
459	Admin string `json:"admin,omitempty"`
460
461	// AuthorizedNetworks: Optional. The full names of the Google Compute
462	// Engine networks (/compute/docs/networks-and-firewalls#networks) the
463	// domain instance is connected to. Networks can be added using
464	// UpdateDomain. The domain is only available on networks listed in
465	// `authorized_networks`. If CIDR subnets overlap between networks,
466	// domain creation will fail.
467	AuthorizedNetworks []string `json:"authorizedNetworks,omitempty"`
468
469	// CreateTime: Output only. The time the instance was created.
470	CreateTime string `json:"createTime,omitempty"`
471
472	// Fqdn: Output only. The fully-qualified domain name of the exposed
473	// domain used by clients to connect to the service. Similar to what
474	// would be chosen for an Active Directory set up on an internal
475	// network.
476	Fqdn string `json:"fqdn,omitempty"`
477
478	// Labels: Optional. Resource labels that can contain user-provided
479	// metadata.
480	Labels map[string]string `json:"labels,omitempty"`
481
482	// Locations: Required. Locations where domain needs to be provisioned.
483	// regions e.g. us-west1 or us-east4 Service supports up to 4 locations
484	// at once. Each location will use a /26 block.
485	Locations []string `json:"locations,omitempty"`
486
487	// Name: Required. The unique name of the domain using the form:
488	// `projects/{project_id}/locations/global/domains/{domain_name}`.
489	Name string `json:"name,omitempty"`
490
491	// ReservedIpRange: Required. The CIDR range of internal addresses that
492	// are reserved for this domain. Reserved networks must be /24 or
493	// larger. Ranges must be unique and non-overlapping with existing
494	// subnets in [Domain].[authorized_networks].
495	ReservedIpRange string `json:"reservedIpRange,omitempty"`
496
497	// State: Output only. The current state of this domain.
498	//
499	// Possible values:
500	//   "STATE_UNSPECIFIED" - Not set.
501	//   "CREATING" - The domain is being created.
502	//   "READY" - The domain has been created and is fully usable.
503	//   "UPDATING" - The domain's configuration is being updated.
504	//   "DELETING" - The domain is being deleted.
505	//   "REPAIRING" - The domain is being repaired and may be unusable.
506	// Details can be found in the `status_message` field.
507	//   "PERFORMING_MAINTENANCE" - The domain is undergoing maintenance.
508	//   "UNAVAILABLE" - The domain is not serving requests.
509	State string `json:"state,omitempty"`
510
511	// StatusMessage: Output only. Additional information about the current
512	// status of this domain, if available.
513	StatusMessage string `json:"statusMessage,omitempty"`
514
515	// Trusts: Output only. The current trusts associated with the domain.
516	Trusts []*Trust `json:"trusts,omitempty"`
517
518	// UpdateTime: Output only. The last update time.
519	UpdateTime string `json:"updateTime,omitempty"`
520
521	// ServerResponse contains the HTTP response code and headers from the
522	// server.
523	googleapi.ServerResponse `json:"-"`
524
525	// ForceSendFields is a list of field names (e.g. "Admin") to
526	// unconditionally include in API requests. By default, fields with
527	// empty values are omitted from API requests. However, any non-pointer,
528	// non-interface field appearing in ForceSendFields will be sent to the
529	// server regardless of whether the field is empty or not. This may be
530	// used to include empty fields in Patch requests.
531	ForceSendFields []string `json:"-"`
532
533	// NullFields is a list of field names (e.g. "Admin") to include in API
534	// requests with the JSON null value. By default, fields with empty
535	// values are omitted from API requests. However, any field with an
536	// empty value appearing in NullFields will be sent to the server as
537	// null. It is an error if a field in this list has a non-empty value.
538	// This may be used to include null fields in Patch requests.
539	NullFields []string `json:"-"`
540}
541
542func (s *Domain) MarshalJSON() ([]byte, error) {
543	type NoMethod Domain
544	raw := NoMethod(*s)
545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
546}
547
548// Empty: A generic empty message that you can re-use to avoid defining
549// duplicated empty messages in your APIs. A typical example is to use
550// it as the request or the response type of an API method. For
551// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
552// (google.protobuf.Empty); } The JSON representation for `Empty` is
553// empty JSON object `{}`.
554type Empty struct {
555	// ServerResponse contains the HTTP response code and headers from the
556	// server.
557	googleapi.ServerResponse `json:"-"`
558}
559
560// Expr: Represents a textual expression in the Common Expression
561// Language (CEL) syntax. CEL is a C-like expression language. The
562// syntax and semantics of CEL are documented at
563// https://github.com/google/cel-spec. Example (Comparison): title:
564// "Summary size limit" description: "Determines if a summary is less
565// than 100 chars" expression: "document.summary.size() < 100" Example
566// (Equality): title: "Requestor is owner" description: "Determines if
567// requestor is the document owner" expression: "document.owner ==
568// request.auth.claims.email" Example (Logic): title: "Public documents"
569// description: "Determine whether the document should be publicly
570// visible" expression: "document.type != 'private' && document.type !=
571// 'internal'" Example (Data Manipulation): title: "Notification string"
572// description: "Create a notification string with a timestamp."
573// expression: "'New message received at ' +
574// string(document.create_time)" The exact variables and functions that
575// may be referenced within an expression are determined by the service
576// that evaluates it. See the service documentation for additional
577// information.
578type Expr struct {
579	// Description: Optional. Description of the expression. This is a
580	// longer text which describes the expression, e.g. when hovered over it
581	// in a UI.
582	Description string `json:"description,omitempty"`
583
584	// Expression: Textual representation of an expression in Common
585	// Expression Language syntax.
586	Expression string `json:"expression,omitempty"`
587
588	// Location: Optional. String indicating the location of the expression
589	// for error reporting, e.g. a file name and a position in the file.
590	Location string `json:"location,omitempty"`
591
592	// Title: Optional. Title for the expression, i.e. a short string
593	// describing its purpose. This can be used e.g. in UIs which allow to
594	// enter the expression.
595	Title string `json:"title,omitempty"`
596
597	// ForceSendFields is a list of field names (e.g. "Description") to
598	// unconditionally include in API requests. By default, fields with
599	// empty values are omitted from API requests. However, any non-pointer,
600	// non-interface field appearing in ForceSendFields will be sent to the
601	// server regardless of whether the field is empty or not. This may be
602	// used to include empty fields in Patch requests.
603	ForceSendFields []string `json:"-"`
604
605	// NullFields is a list of field names (e.g. "Description") to include
606	// in API requests with the JSON null value. By default, fields with
607	// empty values are omitted from API requests. However, any field with
608	// an empty value appearing in NullFields will be sent to the server as
609	// null. It is an error if a field in this list has a non-empty value.
610	// This may be used to include null fields in Patch requests.
611	NullFields []string `json:"-"`
612}
613
614func (s *Expr) MarshalJSON() ([]byte, error) {
615	type NoMethod Expr
616	raw := NoMethod(*s)
617	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
618}
619
620// GoogleCloudManagedidentitiesV1OpMetadata: Represents the metadata of
621// the long-running operation.
622type GoogleCloudManagedidentitiesV1OpMetadata struct {
623	// ApiVersion: Output only. API version used to start the operation.
624	ApiVersion string `json:"apiVersion,omitempty"`
625
626	// CreateTime: Output only. The time the operation was created.
627	CreateTime string `json:"createTime,omitempty"`
628
629	// EndTime: Output only. The time the operation finished running.
630	EndTime string `json:"endTime,omitempty"`
631
632	// RequestedCancellation: Output only. Identifies whether the user has
633	// requested cancellation of the operation. Operations that have
634	// successfully been cancelled have Operation.error value with a
635	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
636	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
637
638	// Target: Output only. Server-defined resource path for the target of
639	// the operation.
640	Target string `json:"target,omitempty"`
641
642	// Verb: Output only. Name of the verb executed by the operation.
643	Verb string `json:"verb,omitempty"`
644
645	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
646	// unconditionally include in API requests. By default, fields with
647	// empty values are omitted from API requests. However, any non-pointer,
648	// non-interface field appearing in ForceSendFields will be sent to the
649	// server regardless of whether the field is empty or not. This may be
650	// used to include empty fields in Patch requests.
651	ForceSendFields []string `json:"-"`
652
653	// NullFields is a list of field names (e.g. "ApiVersion") to include in
654	// API requests with the JSON null value. By default, fields with empty
655	// values are omitted from API requests. However, any field with an
656	// empty value appearing in NullFields will be sent to the server as
657	// null. It is an error if a field in this list has a non-empty value.
658	// This may be used to include null fields in Patch requests.
659	NullFields []string `json:"-"`
660}
661
662func (s *GoogleCloudManagedidentitiesV1OpMetadata) MarshalJSON() ([]byte, error) {
663	type NoMethod GoogleCloudManagedidentitiesV1OpMetadata
664	raw := NoMethod(*s)
665	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
666}
667
668// GoogleCloudManagedidentitiesV1alpha1OpMetadata: Represents the
669// metadata of the long-running operation.
670type GoogleCloudManagedidentitiesV1alpha1OpMetadata struct {
671	// ApiVersion: Output only. API version used to start the operation.
672	ApiVersion string `json:"apiVersion,omitempty"`
673
674	// CreateTime: Output only. The time the operation was created.
675	CreateTime string `json:"createTime,omitempty"`
676
677	// EndTime: Output only. The time the operation finished running.
678	EndTime string `json:"endTime,omitempty"`
679
680	// RequestedCancellation: Output only. Identifies whether the user has
681	// requested cancellation of the operation. Operations that have
682	// successfully been cancelled have Operation.error value with a
683	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
684	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
685
686	// Target: Output only. Server-defined resource path for the target of
687	// the operation.
688	Target string `json:"target,omitempty"`
689
690	// Verb: Output only. Name of the verb executed by the operation.
691	Verb string `json:"verb,omitempty"`
692
693	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
694	// unconditionally include in API requests. By default, fields with
695	// empty values are omitted from API requests. However, any non-pointer,
696	// non-interface field appearing in ForceSendFields will be sent to the
697	// server regardless of whether the field is empty or not. This may be
698	// used to include empty fields in Patch requests.
699	ForceSendFields []string `json:"-"`
700
701	// NullFields is a list of field names (e.g. "ApiVersion") to include in
702	// API requests with the JSON null value. By default, fields with empty
703	// values are omitted from API requests. However, any field with an
704	// empty value appearing in NullFields will be sent to the server as
705	// null. It is an error if a field in this list has a non-empty value.
706	// This may be used to include null fields in Patch requests.
707	NullFields []string `json:"-"`
708}
709
710func (s *GoogleCloudManagedidentitiesV1alpha1OpMetadata) MarshalJSON() ([]byte, error) {
711	type NoMethod GoogleCloudManagedidentitiesV1alpha1OpMetadata
712	raw := NoMethod(*s)
713	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
714}
715
716// GoogleCloudManagedidentitiesV1beta1OpMetadata: Represents the
717// metadata of the long-running operation.
718type GoogleCloudManagedidentitiesV1beta1OpMetadata struct {
719	// ApiVersion: Output only. API version used to start the operation.
720	ApiVersion string `json:"apiVersion,omitempty"`
721
722	// CreateTime: Output only. The time the operation was created.
723	CreateTime string `json:"createTime,omitempty"`
724
725	// EndTime: Output only. The time the operation finished running.
726	EndTime string `json:"endTime,omitempty"`
727
728	// RequestedCancellation: Output only. Identifies whether the user has
729	// requested cancellation of the operation. Operations that have
730	// successfully been cancelled have Operation.error value with a
731	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
732	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
733
734	// Target: Output only. Server-defined resource path for the target of
735	// the operation.
736	Target string `json:"target,omitempty"`
737
738	// Verb: Output only. Name of the verb executed by the operation.
739	Verb string `json:"verb,omitempty"`
740
741	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
742	// unconditionally include in API requests. By default, fields with
743	// empty values are omitted from API requests. However, any non-pointer,
744	// non-interface field appearing in ForceSendFields will be sent to the
745	// server regardless of whether the field is empty or not. This may be
746	// used to include empty fields in Patch requests.
747	ForceSendFields []string `json:"-"`
748
749	// NullFields is a list of field names (e.g. "ApiVersion") to include in
750	// API requests with the JSON null value. By default, fields with empty
751	// values are omitted from API requests. However, any field with an
752	// empty value appearing in NullFields will be sent to the server as
753	// null. It is an error if a field in this list has a non-empty value.
754	// This may be used to include null fields in Patch requests.
755	NullFields []string `json:"-"`
756}
757
758func (s *GoogleCloudManagedidentitiesV1beta1OpMetadata) MarshalJSON() ([]byte, error) {
759	type NoMethod GoogleCloudManagedidentitiesV1beta1OpMetadata
760	raw := NoMethod(*s)
761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
762}
763
764type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct {
765	// ConsumerDefinedName: consumer_defined_name is the name that is set by
766	// the consumer. On the other hand Name field represents system-assigned
767	// id of an instance so consumers are not necessarily aware of it.
768	// consumer_defined_name is used for notification/UI purposes for
769	// consumer to recognize their instances.
770	ConsumerDefinedName string `json:"consumerDefinedName,omitempty"`
771
772	// CreateTime: Output only. Timestamp when the resource was created.
773	CreateTime string `json:"createTime,omitempty"`
774
775	// Labels: Optional. Resource labels to represent user provided
776	// metadata. Each label is a key-value pair, where both the key and the
777	// value are arbitrary strings provided by the user.
778	Labels map[string]string `json:"labels,omitempty"`
779
780	// MaintenancePolicyNames: Deprecated. The MaintenancePolicies that have
781	// been attached to the instance. The key must be of the type name of
782	// the oneof policy name defined in MaintenancePolicy, and the
783	// referenced policy must define the same policy type. For complete
784	// details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.
785	MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"`
786
787	// MaintenanceSchedules: The MaintenanceSchedule contains the scheduling
788	// information of published maintenance schedule with same key as
789	// software_versions.
790	MaintenanceSchedules map[string]GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule `json:"maintenanceSchedules,omitempty"`
791
792	// MaintenanceSettings: Optional. The MaintenanceSettings associated
793	// with instance.
794	MaintenanceSettings *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings `json:"maintenanceSettings,omitempty"`
795
796	// Name: Unique name of the resource. It uses the form:
797	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}
798	// `
799	Name string `json:"name,omitempty"`
800
801	// ProducerMetadata: Output only. Custom string attributes used
802	// primarily to expose producer-specific information in monitoring
803	// dashboards. See go/get-instance-metadata.
804	ProducerMetadata map[string]string `json:"producerMetadata,omitempty"`
805
806	// ProvisionedResources: Output only. The list of data plane resources
807	// provisioned for this instance, e.g. compute VMs. See
808	// go/get-instance-metadata.
809	ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"`
810
811	// SlmInstanceTemplate: Link to the SLM instance template. Only
812	// populated when updating SLM instances via SSA's Actuation service
813	// adaptor. Service producers with custom control plane (e.g. Cloud SQL)
814	// doesn't need to populate this field. Instead they should use
815	// software_versions.
816	SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"`
817
818	// SloMetadata: Output only. SLO metadata for instance classification in
819	// the Standardized dataplane SLO platform. See
820	// go/cloud-ssa-standard-slo for feature description.
821	SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"`
822
823	// SoftwareVersions: Software versions that are used to deploy this
824	// instance. This can be mutated by rollout services.
825	SoftwareVersions map[string]string `json:"softwareVersions,omitempty"`
826
827	// State: Output only. Current lifecycle state of the resource (e.g. if
828	// it's being created or ready to use).
829	//
830	// Possible values:
831	//   "STATE_UNSPECIFIED" - Unspecified state.
832	//   "CREATING" - Instance is being created.
833	//   "READY" - Instance has been created and is ready to use.
834	//   "UPDATING" - Instance is being updated.
835	//   "REPAIRING" - Instance is unheathy and under repair.
836	//   "DELETING" - Instance is being deleted.
837	//   "ERROR" - Instance encountered an error and is in indeterministic
838	// state.
839	State string `json:"state,omitempty"`
840
841	// TenantProjectId: Output only. ID of the associated GCP tenant
842	// project. See go/get-instance-metadata.
843	TenantProjectId string `json:"tenantProjectId,omitempty"`
844
845	// UpdateTime: Output only. Timestamp when the resource was last
846	// modified.
847	UpdateTime string `json:"updateTime,omitempty"`
848
849	// ForceSendFields is a list of field names (e.g. "ConsumerDefinedName")
850	// to unconditionally include in API requests. By default, fields with
851	// empty values are omitted from API requests. However, any non-pointer,
852	// non-interface field appearing in ForceSendFields will be sent to the
853	// server regardless of whether the field is empty or not. This may be
854	// used to include empty fields in Patch requests.
855	ForceSendFields []string `json:"-"`
856
857	// NullFields is a list of field names (e.g. "ConsumerDefinedName") to
858	// include in API requests with the JSON null value. By default, fields
859	// with empty values are omitted from API requests. However, any field
860	// with an empty value appearing in NullFields will be sent to the
861	// server as null. It is an error if a field in this list has a
862	// non-empty value. This may be used to include null fields in Patch
863	// requests.
864	NullFields []string `json:"-"`
865}
866
867func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) {
868	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance
869	raw := NoMethod(*s)
870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
871}
872
873// GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule:
874// Maintenance schedule which is exposed to customer and potentially end
875// user, indicating published upcoming future maintenance schedule
876type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule struct {
877	// CanReschedule: This field is deprecated, and will be always set to
878	// true since reschedule can happen multiple times now. This field
879	// should not be removed until all service producers remove this for
880	// their customers.
881	CanReschedule bool `json:"canReschedule,omitempty"`
882
883	// EndTime: The scheduled end time for the maintenance.
884	EndTime string `json:"endTime,omitempty"`
885
886	// RolloutManagementPolicy: The rollout management policy this
887	// maintenance schedule is associated with. When doing reschedule update
888	// request, the reschedule should be against this given policy.
889	RolloutManagementPolicy string `json:"rolloutManagementPolicy,omitempty"`
890
891	// ScheduleDeadlineTime: schedule_deadline_time is the time deadline any
892	// schedule start time cannot go beyond, including reschedule. It's
893	// normally the initial schedule start time plus maintenance window
894	// length (1 day or 1 week). Maintenance cannot be scheduled to start
895	// beyond this deadline.
896	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
897
898	// StartTime: The scheduled start time for the maintenance.
899	StartTime string `json:"startTime,omitempty"`
900
901	// ForceSendFields is a list of field names (e.g. "CanReschedule") to
902	// unconditionally include in API requests. By default, fields with
903	// empty values are omitted from API requests. However, any non-pointer,
904	// non-interface field appearing in ForceSendFields will be sent to the
905	// server regardless of whether the field is empty or not. This may be
906	// used to include empty fields in Patch requests.
907	ForceSendFields []string `json:"-"`
908
909	// NullFields is a list of field names (e.g. "CanReschedule") to include
910	// in API requests with the JSON null value. By default, fields with
911	// empty values are omitted from API requests. However, any field with
912	// an empty value appearing in NullFields will be sent to the server as
913	// null. It is an error if a field in this list has a non-empty value.
914	// This may be used to include null fields in Patch requests.
915	NullFields []string `json:"-"`
916}
917
918func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule) MarshalJSON() ([]byte, error) {
919	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule
920	raw := NoMethod(*s)
921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
922}
923
924// GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings:
925// Maintenance settings associated with instance. Allows service
926// producers and end users to assign settings that controls maintenance
927// on this instance.
928type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct {
929	// Exclude: Optional. Exclude instance from maintenance. When true,
930	// rollout service will not attempt maintenance on the instance. Rollout
931	// service will include the instance in reported rollout progress as not
932	// attempted.
933	Exclude bool `json:"exclude,omitempty"`
934
935	// IsRollback: Optional. If the update call is triggered from rollback,
936	// set the value as true.
937	IsRollback bool `json:"isRollback,omitempty"`
938
939	// MaintenancePolicies: Optional. The MaintenancePolicies that have been
940	// attached to the instance. The key must be of the type name of the
941	// oneof policy name defined in MaintenancePolicy, and the embedded
942	// policy must define the same policy type. For complete details of
943	// MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the
944	// name is needed (like in the deprecated
945	// Instance.maintenance_policy_names field) then only populate
946	// MaintenancePolicy.name.
947	MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"`
948
949	// ForceSendFields is a list of field names (e.g. "Exclude") to
950	// unconditionally include in API requests. By default, fields with
951	// empty values are omitted from API requests. However, any non-pointer,
952	// non-interface field appearing in ForceSendFields will be sent to the
953	// server regardless of whether the field is empty or not. This may be
954	// used to include empty fields in Patch requests.
955	ForceSendFields []string `json:"-"`
956
957	// NullFields is a list of field names (e.g. "Exclude") to include in
958	// API requests with the JSON null value. By default, fields with empty
959	// values are omitted from API requests. However, any field with an
960	// empty value appearing in NullFields will be sent to the server as
961	// null. It is an error if a field in this list has a non-empty value.
962	// This may be used to include null fields in Patch requests.
963	NullFields []string `json:"-"`
964}
965
966func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings) MarshalJSON() ([]byte, error) {
967	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings
968	raw := NoMethod(*s)
969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
970}
971
972// GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata: Node
973// information for custom per-node SLO implementations. SSA does not
974// support per-node SLO, but producers can populate per-node information
975// in SloMetadata for custom precomputations. SSA Eligibility Exporter
976// will emit per-node metric based on this information.
977type GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata struct {
978	// Exclusions: By default node is eligible if instance is eligible. But
979	// individual node might be excluded from SLO by adding entry here. For
980	// semantic see SloMetadata.exclusions. If both instance and node level
981	// exclusions are present for time period, the node level's reason will
982	// be reported by Eligibility Exporter.
983	Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"`
984
985	// Location: The location of the node, if different from instance
986	// location.
987	Location string `json:"location,omitempty"`
988
989	// NodeId: The id of the node. This should be equal to
990	// SaasInstanceNode.node_id.
991	NodeId string `json:"nodeId,omitempty"`
992
993	// ForceSendFields is a list of field names (e.g. "Exclusions") to
994	// unconditionally include in API requests. By default, fields with
995	// empty values are omitted from API requests. However, any non-pointer,
996	// non-interface field appearing in ForceSendFields will be sent to the
997	// server regardless of whether the field is empty or not. This may be
998	// used to include empty fields in Patch requests.
999	ForceSendFields []string `json:"-"`
1000
1001	// NullFields is a list of field names (e.g. "Exclusions") to include in
1002	// API requests with the JSON null value. By default, fields with empty
1003	// values are omitted from API requests. However, any field with an
1004	// empty value appearing in NullFields will be sent to the server as
1005	// null. It is an error if a field in this list has a non-empty value.
1006	// This may be used to include null fields in Patch requests.
1007	NullFields []string `json:"-"`
1008}
1009
1010func (s *GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata) MarshalJSON() ([]byte, error) {
1011	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata
1012	raw := NoMethod(*s)
1013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1014}
1015
1016// GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility:
1017// PerSliSloEligibility is a mapping from an SLI name to eligibility.
1018type GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility struct {
1019	// Eligibilities: An entry in the eligibilities map specifies an
1020	// eligibility for a particular SLI for the given instance. The SLI key
1021	// in the name must be a valid SLI name specified in the Eligibility
1022	// Exporter binary flags otherwise an error will be emitted by
1023	// Eligibility Exporter and the oncaller will be alerted. If an SLI has
1024	// been defined in the binary flags but the eligibilities map does not
1025	// contain it, the corresponding SLI time series will not be emitted by
1026	// the Eligibility Exporter. This ensures a smooth rollout and
1027	// compatibility between the data produced by different versions of the
1028	// Eligibility Exporters. If eligibilities map contains a key for an SLI
1029	// which has not been declared in the binary flags, there will be an
1030	// error message emitted in the Eligibility Exporter log and the metric
1031	// for the SLI in question will not be emitted.
1032	Eligibilities map[string]GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibilities,omitempty"`
1033
1034	// ForceSendFields is a list of field names (e.g. "Eligibilities") to
1035	// unconditionally include in API requests. By default, fields with
1036	// empty values are omitted from API requests. However, any non-pointer,
1037	// non-interface field appearing in ForceSendFields will be sent to the
1038	// server regardless of whether the field is empty or not. This may be
1039	// used to include empty fields in Patch requests.
1040	ForceSendFields []string `json:"-"`
1041
1042	// NullFields is a list of field names (e.g. "Eligibilities") to include
1043	// in API requests with the JSON null value. By default, fields with
1044	// empty values are omitted from API requests. However, any field with
1045	// an empty value appearing in NullFields will be sent to the server as
1046	// null. It is an error if a field in this list has a non-empty value.
1047	// This may be used to include null fields in Patch requests.
1048	NullFields []string `json:"-"`
1049}
1050
1051func (s *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility) MarshalJSON() ([]byte, error) {
1052	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility
1053	raw := NoMethod(*s)
1054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1055}
1056
1057// GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource:
1058// Describes provisioned dataplane resources.
1059type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct {
1060	// ResourceType: Type of the resource. This can be either a GCP resource
1061	// or a custom one (e.g. another cloud provider's VM). For GCP compute
1062	// resources use singular form of the names listed in GCP compute API
1063	// documentation
1064	// (https://cloud.google.com/compute/docs/reference/rest/v1/), prefixed
1065	// with 'compute-', for example: 'compute-instance', 'compute-disk',
1066	// 'compute-autoscaler'.
1067	ResourceType string `json:"resourceType,omitempty"`
1068
1069	// ResourceUrl: URL identifying the resource, e.g.
1070	// "https://www.googleapis.com/compute/v1/projects/...)".
1071	ResourceUrl string `json:"resourceUrl,omitempty"`
1072
1073	// ForceSendFields is a list of field names (e.g. "ResourceType") to
1074	// unconditionally include in API requests. By default, fields with
1075	// empty values are omitted from API requests. However, any non-pointer,
1076	// non-interface field appearing in ForceSendFields will be sent to the
1077	// server regardless of whether the field is empty or not. This may be
1078	// used to include empty fields in Patch requests.
1079	ForceSendFields []string `json:"-"`
1080
1081	// NullFields is a list of field names (e.g. "ResourceType") to include
1082	// in API requests with the JSON null value. By default, fields with
1083	// empty values are omitted from API requests. However, any field with
1084	// an empty value appearing in NullFields will be sent to the server as
1085	// null. It is an error if a field in this list has a non-empty value.
1086	// This may be used to include null fields in Patch requests.
1087	NullFields []string `json:"-"`
1088}
1089
1090func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) {
1091	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource
1092	raw := NoMethod(*s)
1093	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1094}
1095
1096// GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility:
1097// SloEligibility is a tuple containing eligibility value: true if an
1098// instance is eligible for SLO calculation or false if it should be
1099// excluded from all SLO-related calculations along with a user-defined
1100// reason.
1101type GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility struct {
1102	// Eligible: Whether an instance is eligible or ineligible.
1103	Eligible bool `json:"eligible,omitempty"`
1104
1105	// Reason: User-defined reason for the current value of instance
1106	// eligibility. Usually, this can be directly mapped to the internal
1107	// state. An empty reason is allowed.
1108	Reason string `json:"reason,omitempty"`
1109
1110	// ForceSendFields is a list of field names (e.g. "Eligible") to
1111	// unconditionally include in API requests. By default, fields with
1112	// empty values are omitted from API requests. However, any non-pointer,
1113	// non-interface field appearing in ForceSendFields will be sent to the
1114	// server regardless of whether the field is empty or not. This may be
1115	// used to include empty fields in Patch requests.
1116	ForceSendFields []string `json:"-"`
1117
1118	// NullFields is a list of field names (e.g. "Eligible") to include in
1119	// API requests with the JSON null value. By default, fields with empty
1120	// values are omitted from API requests. However, any field with an
1121	// empty value appearing in NullFields will be sent to the server as
1122	// null. It is an error if a field in this list has a non-empty value.
1123	// This may be used to include null fields in Patch requests.
1124	NullFields []string `json:"-"`
1125}
1126
1127func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility) MarshalJSON() ([]byte, error) {
1128	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility
1129	raw := NoMethod(*s)
1130	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1131}
1132
1133// GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion:
1134// SloExclusion represents an exclusion in SLI calculation applies to
1135// all SLOs.
1136type GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion struct {
1137	// Duration: Exclusion duration. No restrictions on the possible values.
1138	// When an ongoing operation is taking longer than initially expected,
1139	// an existing entry in the exclusion list can be updated by extending
1140	// the duration. This is supported by the subsystem exporting
1141	// eligibility data as long as such extension is committed at least 10
1142	// minutes before the original exclusion expiration - otherwise it is
1143	// possible that there will be "gaps" in the exclusion application in
1144	// the exported timeseries.
1145	Duration string `json:"duration,omitempty"`
1146
1147	// Reason: Human-readable reason for the exclusion. This should be a
1148	// static string (e.g. "Disruptive update in progress") and should not
1149	// contain dynamically generated data (e.g. instance name). Can be left
1150	// empty.
1151	Reason string `json:"reason,omitempty"`
1152
1153	// SliName: Name of an SLI that this exclusion applies to. Can be left
1154	// empty, signaling that the instance should be excluded from all SLIs.
1155	SliName string `json:"sliName,omitempty"`
1156
1157	// StartTime: Start time of the exclusion. No alignment (e.g. to a full
1158	// minute) needed.
1159	StartTime string `json:"startTime,omitempty"`
1160
1161	// ForceSendFields is a list of field names (e.g. "Duration") to
1162	// unconditionally include in API requests. By default, fields with
1163	// empty values are omitted from API requests. However, any non-pointer,
1164	// non-interface field appearing in ForceSendFields will be sent to the
1165	// server regardless of whether the field is empty or not. This may be
1166	// used to include empty fields in Patch requests.
1167	ForceSendFields []string `json:"-"`
1168
1169	// NullFields is a list of field names (e.g. "Duration") to include in
1170	// API requests with the JSON null value. By default, fields with empty
1171	// values are omitted from API requests. However, any field with an
1172	// empty value appearing in NullFields will be sent to the server as
1173	// null. It is an error if a field in this list has a non-empty value.
1174	// This may be used to include null fields in Patch requests.
1175	NullFields []string `json:"-"`
1176}
1177
1178func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion) MarshalJSON() ([]byte, error) {
1179	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion
1180	raw := NoMethod(*s)
1181	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1182}
1183
1184// GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata:
1185// SloMetadata contains resources required for proper SLO classification
1186// of the instance.
1187type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct {
1188	// Eligibility: Optional. Global per-instance SLI eligibility which
1189	// applies to all defined SLIs. Exactly one of 'eligibility' and
1190	// 'per_sli_eligibility' fields must be used.
1191	Eligibility *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibility,omitempty"`
1192
1193	// Exclusions: List of SLO exclusion windows. When multiple entries in
1194	// the list match (matching the exclusion time-window against current
1195	// time point) the exclusion reason used in the first matching entry
1196	// will be published. It is not needed to include expired exclusion in
1197	// this list, as only the currently applicable exclusions are taken into
1198	// account by the eligibility exporting subsystem (the historical state
1199	// of exclusions will be reflected in the historically produced
1200	// timeseries regardless of the current state). This field can be used
1201	// to mark the instance as temporary ineligible for the purpose of SLO
1202	// calculation. For permanent instance SLO exclusion, use of custom
1203	// instance eligibility is recommended. See 'eligibility' field below.
1204	Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"`
1205
1206	// Nodes: Optional. List of nodes. Some producers need to use per-node
1207	// metadata to calculate SLO. This field allows such producers to
1208	// publish per-node SLO meta data, which will be consumed by SSA
1209	// Eligibility Exporter and published in the form of per node metric to
1210	// Monarch.
1211	Nodes []*GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata `json:"nodes,omitempty"`
1212
1213	// PerSliEligibility: Optional. Multiple per-instance SLI eligibilities
1214	// which apply for individual SLIs. Exactly one of 'eligibility' and
1215	// 'per_sli_eligibility' fields must be used.
1216	PerSliEligibility *GoogleCloudSaasacceleratorManagementProvidersV1PerSliSloEligibility `json:"perSliEligibility,omitempty"`
1217
1218	// Tier: Name of the SLO tier the Instance belongs to. This name will be
1219	// expected to match the tiers specified in the service SLO
1220	// configuration. Field is mandatory and must not be empty.
1221	Tier string `json:"tier,omitempty"`
1222
1223	// ForceSendFields is a list of field names (e.g. "Eligibility") to
1224	// unconditionally include in API requests. By default, fields with
1225	// empty values are omitted from API requests. However, any non-pointer,
1226	// non-interface field appearing in ForceSendFields will be sent to the
1227	// server regardless of whether the field is empty or not. This may be
1228	// used to include empty fields in Patch requests.
1229	ForceSendFields []string `json:"-"`
1230
1231	// NullFields is a list of field names (e.g. "Eligibility") to include
1232	// in API requests with the JSON null value. By default, fields with
1233	// empty values are omitted from API requests. However, any field with
1234	// an empty value appearing in NullFields will be sent to the server as
1235	// null. It is an error if a field in this list has a non-empty value.
1236	// This may be used to include null fields in Patch requests.
1237	NullFields []string `json:"-"`
1238}
1239
1240func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) {
1241	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata
1242	raw := NoMethod(*s)
1243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1244}
1245
1246// ListDomainsResponse: Response message for ListDomains
1247type ListDomainsResponse struct {
1248	// Domains: A list of Managed Identities Service domains in the project.
1249	Domains []*Domain `json:"domains,omitempty"`
1250
1251	// NextPageToken: A token to retrieve the next page of results, or empty
1252	// if there are no more results in the list.
1253	NextPageToken string `json:"nextPageToken,omitempty"`
1254
1255	// Unreachable: A list of locations that could not be reached.
1256	Unreachable []string `json:"unreachable,omitempty"`
1257
1258	// ServerResponse contains the HTTP response code and headers from the
1259	// server.
1260	googleapi.ServerResponse `json:"-"`
1261
1262	// ForceSendFields is a list of field names (e.g. "Domains") to
1263	// unconditionally include in API requests. By default, fields with
1264	// empty values are omitted from API requests. However, any non-pointer,
1265	// non-interface field appearing in ForceSendFields will be sent to the
1266	// server regardless of whether the field is empty or not. This may be
1267	// used to include empty fields in Patch requests.
1268	ForceSendFields []string `json:"-"`
1269
1270	// NullFields is a list of field names (e.g. "Domains") to include in
1271	// API requests with the JSON null value. By default, fields with empty
1272	// values are omitted from API requests. However, any field with an
1273	// empty value appearing in NullFields will be sent to the server as
1274	// null. It is an error if a field in this list has a non-empty value.
1275	// This may be used to include null fields in Patch requests.
1276	NullFields []string `json:"-"`
1277}
1278
1279func (s *ListDomainsResponse) MarshalJSON() ([]byte, error) {
1280	type NoMethod ListDomainsResponse
1281	raw := NoMethod(*s)
1282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1283}
1284
1285// ListLocationsResponse: The response message for
1286// Locations.ListLocations.
1287type ListLocationsResponse struct {
1288	// Locations: A list of locations that matches the specified filter in
1289	// the request.
1290	Locations []*Location `json:"locations,omitempty"`
1291
1292	// NextPageToken: The standard List next-page token.
1293	NextPageToken string `json:"nextPageToken,omitempty"`
1294
1295	// ServerResponse contains the HTTP response code and headers from the
1296	// server.
1297	googleapi.ServerResponse `json:"-"`
1298
1299	// ForceSendFields is a list of field names (e.g. "Locations") to
1300	// unconditionally include in API requests. By default, fields with
1301	// empty values are omitted from API requests. However, any non-pointer,
1302	// non-interface field appearing in ForceSendFields will be sent to the
1303	// server regardless of whether the field is empty or not. This may be
1304	// used to include empty fields in Patch requests.
1305	ForceSendFields []string `json:"-"`
1306
1307	// NullFields is a list of field names (e.g. "Locations") to include in
1308	// API requests with the JSON null value. By default, fields with empty
1309	// values are omitted from API requests. However, any field with an
1310	// empty value appearing in NullFields will be sent to the server as
1311	// null. It is an error if a field in this list has a non-empty value.
1312	// This may be used to include null fields in Patch requests.
1313	NullFields []string `json:"-"`
1314}
1315
1316func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1317	type NoMethod ListLocationsResponse
1318	raw := NoMethod(*s)
1319	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1320}
1321
1322// ListOperationsResponse: The response message for
1323// Operations.ListOperations.
1324type ListOperationsResponse struct {
1325	// NextPageToken: The standard List next-page token.
1326	NextPageToken string `json:"nextPageToken,omitempty"`
1327
1328	// Operations: A list of operations that matches the specified filter in
1329	// the request.
1330	Operations []*Operation `json:"operations,omitempty"`
1331
1332	// ServerResponse contains the HTTP response code and headers from the
1333	// server.
1334	googleapi.ServerResponse `json:"-"`
1335
1336	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1337	// unconditionally include in API requests. By default, fields with
1338	// empty values are omitted from API requests. However, any non-pointer,
1339	// non-interface field appearing in ForceSendFields will be sent to the
1340	// server regardless of whether the field is empty or not. This may be
1341	// used to include empty fields in Patch requests.
1342	ForceSendFields []string `json:"-"`
1343
1344	// NullFields is a list of field names (e.g. "NextPageToken") to include
1345	// in API requests with the JSON null value. By default, fields with
1346	// empty values are omitted from API requests. However, any field with
1347	// an empty value appearing in NullFields will be sent to the server as
1348	// null. It is an error if a field in this list has a non-empty value.
1349	// This may be used to include null fields in Patch requests.
1350	NullFields []string `json:"-"`
1351}
1352
1353func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1354	type NoMethod ListOperationsResponse
1355	raw := NoMethod(*s)
1356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1357}
1358
1359// Location: A resource that represents Google Cloud Platform location.
1360type Location struct {
1361	// DisplayName: The friendly name for this location, typically a nearby
1362	// city name. For example, "Tokyo".
1363	DisplayName string `json:"displayName,omitempty"`
1364
1365	// Labels: Cross-service attributes for the location. For example
1366	// {"cloud.googleapis.com/region": "us-east1"}
1367	Labels map[string]string `json:"labels,omitempty"`
1368
1369	// LocationId: The canonical id for this location. For example:
1370	// "us-east1".
1371	LocationId string `json:"locationId,omitempty"`
1372
1373	// Metadata: Service-specific metadata. For example the available
1374	// capacity at the given location.
1375	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1376
1377	// Name: Resource name for the location, which may vary between
1378	// implementations. For example:
1379	// "projects/example-project/locations/us-east1"
1380	Name string `json:"name,omitempty"`
1381
1382	// ServerResponse contains the HTTP response code and headers from the
1383	// server.
1384	googleapi.ServerResponse `json:"-"`
1385
1386	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1387	// unconditionally include in API requests. By default, fields with
1388	// empty values are omitted from API requests. However, any non-pointer,
1389	// non-interface field appearing in ForceSendFields will be sent to the
1390	// server regardless of whether the field is empty or not. This may be
1391	// used to include empty fields in Patch requests.
1392	ForceSendFields []string `json:"-"`
1393
1394	// NullFields is a list of field names (e.g. "DisplayName") to include
1395	// in API requests with the JSON null value. By default, fields with
1396	// empty values are omitted from API requests. However, any field with
1397	// an empty value appearing in NullFields will be sent to the server as
1398	// null. It is an error if a field in this list has a non-empty value.
1399	// This may be used to include null fields in Patch requests.
1400	NullFields []string `json:"-"`
1401}
1402
1403func (s *Location) MarshalJSON() ([]byte, error) {
1404	type NoMethod Location
1405	raw := NoMethod(*s)
1406	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1407}
1408
1409// MaintenancePolicy: Defines policies to service maintenance events.
1410type MaintenancePolicy struct {
1411	// CreateTime: Output only. The time when the resource was created.
1412	CreateTime string `json:"createTime,omitempty"`
1413
1414	// Description: Optional. Description of what this policy is for.
1415	// Create/Update methods return INVALID_ARGUMENT if the length is
1416	// greater than 512.
1417	Description string `json:"description,omitempty"`
1418
1419	// Labels: Optional. Resource labels to represent user provided
1420	// metadata. Each label is a key-value pair, where both the key and the
1421	// value are arbitrary strings provided by the user.
1422	Labels map[string]string `json:"labels,omitempty"`
1423
1424	// Name: Required. MaintenancePolicy name using the form:
1425	// `projects/{project_id}/locations/{location_id}/maintenancePolicies/{ma
1426	// intenance_policy_id}` where {project_id} refers to a GCP consumer
1427	// project ID, {location_id} refers to a GCP region/zone,
1428	// {maintenance_policy_id} must be 1-63 characters long and match the
1429	// regular expression `[a-z0-9]([-a-z0-9]*[a-z0-9])?`.
1430	Name string `json:"name,omitempty"`
1431
1432	// State: Optional. The state of the policy.
1433	//
1434	// Possible values:
1435	//   "STATE_UNSPECIFIED" - Unspecified state.
1436	//   "READY" - Resource is ready to be used.
1437	//   "DELETING" - Resource is being deleted. It can no longer be
1438	// attached to instances.
1439	State string `json:"state,omitempty"`
1440
1441	// UpdatePolicy: Maintenance policy applicable to instance update.
1442	UpdatePolicy *UpdatePolicy `json:"updatePolicy,omitempty"`
1443
1444	// UpdateTime: Output only. The time when the resource was updated.
1445	UpdateTime string `json:"updateTime,omitempty"`
1446
1447	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1448	// unconditionally include in API requests. By default, fields with
1449	// empty values are omitted from API requests. However, any non-pointer,
1450	// non-interface field appearing in ForceSendFields will be sent to the
1451	// server regardless of whether the field is empty or not. This may be
1452	// used to include empty fields in Patch requests.
1453	ForceSendFields []string `json:"-"`
1454
1455	// NullFields is a list of field names (e.g. "CreateTime") to include in
1456	// API requests with the JSON null value. By default, fields with empty
1457	// values are omitted from API requests. However, any field with an
1458	// empty value appearing in NullFields will be sent to the server as
1459	// null. It is an error if a field in this list has a non-empty value.
1460	// This may be used to include null fields in Patch requests.
1461	NullFields []string `json:"-"`
1462}
1463
1464func (s *MaintenancePolicy) MarshalJSON() ([]byte, error) {
1465	type NoMethod MaintenancePolicy
1466	raw := NoMethod(*s)
1467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1468}
1469
1470// MaintenanceWindow: MaintenanceWindow definition.
1471type MaintenanceWindow struct {
1472	// DailyCycle: Daily cycle.
1473	DailyCycle *DailyCycle `json:"dailyCycle,omitempty"`
1474
1475	// WeeklyCycle: Weekly cycle.
1476	WeeklyCycle *WeeklyCycle `json:"weeklyCycle,omitempty"`
1477
1478	// ForceSendFields is a list of field names (e.g. "DailyCycle") to
1479	// unconditionally include in API requests. By default, fields with
1480	// empty values are omitted from API requests. However, any non-pointer,
1481	// non-interface field appearing in ForceSendFields will be sent to the
1482	// server regardless of whether the field is empty or not. This may be
1483	// used to include empty fields in Patch requests.
1484	ForceSendFields []string `json:"-"`
1485
1486	// NullFields is a list of field names (e.g. "DailyCycle") to include in
1487	// API requests with the JSON null value. By default, fields with empty
1488	// values are omitted from API requests. However, any field with an
1489	// empty value appearing in NullFields will be sent to the server as
1490	// null. It is an error if a field in this list has a non-empty value.
1491	// This may be used to include null fields in Patch requests.
1492	NullFields []string `json:"-"`
1493}
1494
1495func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
1496	type NoMethod MaintenanceWindow
1497	raw := NoMethod(*s)
1498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1499}
1500
1501// Operation: This resource represents a long-running operation that is
1502// the result of a network API call.
1503type Operation struct {
1504	// Done: If the value is `false`, it means the operation is still in
1505	// progress. If `true`, the operation is completed, and either `error`
1506	// or `response` is available.
1507	Done bool `json:"done,omitempty"`
1508
1509	// Error: The error result of the operation in case of failure or
1510	// cancellation.
1511	Error *Status `json:"error,omitempty"`
1512
1513	// Metadata: Service-specific metadata associated with the operation. It
1514	// typically contains progress information and common metadata such as
1515	// create time. Some services might not provide such metadata. Any
1516	// method that returns a long-running operation should document the
1517	// metadata type, if any.
1518	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1519
1520	// Name: The server-assigned name, which is only unique within the same
1521	// service that originally returns it. If you use the default HTTP
1522	// mapping, the `name` should be a resource name ending with
1523	// `operations/{unique_id}`.
1524	Name string `json:"name,omitempty"`
1525
1526	// Response: The normal response of the operation in case of success. If
1527	// the original method returns no data on success, such as `Delete`, the
1528	// response is `google.protobuf.Empty`. If the original method is
1529	// standard `Get`/`Create`/`Update`, the response should be the
1530	// resource. For other methods, the response should have the type
1531	// `XxxResponse`, where `Xxx` is the original method name. For example,
1532	// if the original method name is `TakeSnapshot()`, the inferred
1533	// response type is `TakeSnapshotResponse`.
1534	Response googleapi.RawMessage `json:"response,omitempty"`
1535
1536	// ServerResponse contains the HTTP response code and headers from the
1537	// server.
1538	googleapi.ServerResponse `json:"-"`
1539
1540	// ForceSendFields is a list of field names (e.g. "Done") to
1541	// unconditionally include in API requests. By default, fields with
1542	// empty values are omitted from API requests. However, any non-pointer,
1543	// non-interface field appearing in ForceSendFields will be sent to the
1544	// server regardless of whether the field is empty or not. This may be
1545	// used to include empty fields in Patch requests.
1546	ForceSendFields []string `json:"-"`
1547
1548	// NullFields is a list of field names (e.g. "Done") to include in API
1549	// requests with the JSON null value. By default, fields with empty
1550	// values are omitted from API requests. However, any field with an
1551	// empty value appearing in NullFields will be sent to the server as
1552	// null. It is an error if a field in this list has a non-empty value.
1553	// This may be used to include null fields in Patch requests.
1554	NullFields []string `json:"-"`
1555}
1556
1557func (s *Operation) MarshalJSON() ([]byte, error) {
1558	type NoMethod Operation
1559	raw := NoMethod(*s)
1560	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1561}
1562
1563// OperationMetadata: Represents the metadata of the long-running
1564// operation.
1565type OperationMetadata struct {
1566	// ApiVersion: [Output only] API version used to start the operation.
1567	ApiVersion string `json:"apiVersion,omitempty"`
1568
1569	// CancelRequested: [Output only] Identifies whether the user has
1570	// requested cancellation of the operation. Operations that have
1571	// successfully been cancelled have Operation.error value with a
1572	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1573	CancelRequested bool `json:"cancelRequested,omitempty"`
1574
1575	// CreateTime: [Output only] The time the operation was created.
1576	CreateTime string `json:"createTime,omitempty"`
1577
1578	// EndTime: [Output only] The time the operation finished running.
1579	EndTime string `json:"endTime,omitempty"`
1580
1581	// StatusDetail: [Output only] Human-readable status of the operation,
1582	// if any.
1583	StatusDetail string `json:"statusDetail,omitempty"`
1584
1585	// Target: [Output only] Server-defined resource path for the target of
1586	// the operation.
1587	Target string `json:"target,omitempty"`
1588
1589	// Verb: [Output only] Name of the verb executed by the operation.
1590	Verb string `json:"verb,omitempty"`
1591
1592	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1593	// unconditionally include in API requests. By default, fields with
1594	// empty values are omitted from API requests. However, any non-pointer,
1595	// non-interface field appearing in ForceSendFields will be sent to the
1596	// server regardless of whether the field is empty or not. This may be
1597	// used to include empty fields in Patch requests.
1598	ForceSendFields []string `json:"-"`
1599
1600	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1601	// API requests with the JSON null value. By default, fields with empty
1602	// values are omitted from API requests. However, any field with an
1603	// empty value appearing in NullFields will be sent to the server as
1604	// null. It is an error if a field in this list has a non-empty value.
1605	// This may be used to include null fields in Patch requests.
1606	NullFields []string `json:"-"`
1607}
1608
1609func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1610	type NoMethod OperationMetadata
1611	raw := NoMethod(*s)
1612	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1613}
1614
1615// Policy: An Identity and Access Management (IAM) policy, which
1616// specifies access controls for Google Cloud resources. A `Policy` is a
1617// collection of `bindings`. A `binding` binds one or more `members` to
1618// a single `role`. Members can be user accounts, service accounts,
1619// Google groups, and domains (such as G Suite). A `role` is a named
1620// list of permissions; each `role` can be an IAM predefined role or a
1621// user-created custom role. For some types of Google Cloud resources, a
1622// `binding` can also specify a `condition`, which is a logical
1623// expression that allows access to a resource only if the expression
1624// evaluates to `true`. A condition can add constraints based on
1625// attributes of the request, the resource, or both. To learn which
1626// resources support conditions in their IAM policies, see the IAM
1627// documentation
1628// (https://cloud.google.com/iam/help/conditions/resource-policies).
1629// **JSON example:** { "bindings": [ { "role":
1630// "roles/resourcemanager.organizationAdmin", "members": [
1631// "user:mike@example.com", "group:admins@example.com",
1632// "domain:google.com",
1633// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
1634// "role": "roles/resourcemanager.organizationViewer", "members": [
1635// "user:eve@example.com" ], "condition": { "title": "expirable access",
1636// "description": "Does not grant access after Sep 2020", "expression":
1637// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
1638// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
1639// members: - user:mike@example.com - group:admins@example.com -
1640// domain:google.com -
1641// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
1642// roles/resourcemanager.organizationAdmin - members: -
1643// user:eve@example.com role: roles/resourcemanager.organizationViewer
1644// condition: title: expirable access description: Does not grant access
1645// after Sep 2020 expression: request.time <
1646// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
1647// 3 For a description of IAM and its features, see the IAM
1648// documentation (https://cloud.google.com/iam/docs/).
1649type Policy struct {
1650	// Bindings: Associates a list of `members` to a `role`. Optionally, may
1651	// specify a `condition` that determines how and when the `bindings` are
1652	// applied. Each of the `bindings` must contain at least one member.
1653	Bindings []*Binding `json:"bindings,omitempty"`
1654
1655	// Etag: `etag` is used for optimistic concurrency control as a way to
1656	// help prevent simultaneous updates of a policy from overwriting each
1657	// other. It is strongly suggested that systems make use of the `etag`
1658	// in the read-modify-write cycle to perform policy updates in order to
1659	// avoid race conditions: An `etag` is returned in the response to
1660	// `getIamPolicy`, and systems are expected to put that etag in the
1661	// request to `setIamPolicy` to ensure that their change will be applied
1662	// to the same version of the policy. **Important:** If you use IAM
1663	// Conditions, you must include the `etag` field whenever you call
1664	// `setIamPolicy`. If you omit this field, then IAM allows you to
1665	// overwrite a version `3` policy with a version `1` policy, and all of
1666	// the conditions in the version `3` policy are lost.
1667	Etag string `json:"etag,omitempty"`
1668
1669	// Version: Specifies the format of the policy. Valid values are `0`,
1670	// `1`, and `3`. Requests that specify an invalid value are rejected.
1671	// Any operation that affects conditional role bindings must specify
1672	// version `3`. This requirement applies to the following operations: *
1673	// Getting a policy that includes a conditional role binding * Adding a
1674	// conditional role binding to a policy * Changing a conditional role
1675	// binding in a policy * Removing any role binding, with or without a
1676	// condition, from a policy that includes conditions **Important:** If
1677	// you use IAM Conditions, you must include the `etag` field whenever
1678	// you call `setIamPolicy`. If you omit this field, then IAM allows you
1679	// to overwrite a version `3` policy with a version `1` policy, and all
1680	// of the conditions in the version `3` policy are lost. If a policy
1681	// does not include any conditions, operations on that policy may
1682	// specify any valid version or leave the field unset. To learn which
1683	// resources support conditions in their IAM policies, see the IAM
1684	// documentation
1685	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1686	Version int64 `json:"version,omitempty"`
1687
1688	// ServerResponse contains the HTTP response code and headers from the
1689	// server.
1690	googleapi.ServerResponse `json:"-"`
1691
1692	// ForceSendFields is a list of field names (e.g. "Bindings") to
1693	// unconditionally include in API requests. By default, fields with
1694	// empty values are omitted from API requests. However, any non-pointer,
1695	// non-interface field appearing in ForceSendFields will be sent to the
1696	// server regardless of whether the field is empty or not. This may be
1697	// used to include empty fields in Patch requests.
1698	ForceSendFields []string `json:"-"`
1699
1700	// NullFields is a list of field names (e.g. "Bindings") to include in
1701	// API requests with the JSON null value. By default, fields with empty
1702	// values are omitted from API requests. However, any field with an
1703	// empty value appearing in NullFields will be sent to the server as
1704	// null. It is an error if a field in this list has a non-empty value.
1705	// This may be used to include null fields in Patch requests.
1706	NullFields []string `json:"-"`
1707}
1708
1709func (s *Policy) MarshalJSON() ([]byte, error) {
1710	type NoMethod Policy
1711	raw := NoMethod(*s)
1712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1713}
1714
1715// ReconfigureTrustRequest: Request message for ReconfigureTrust
1716type ReconfigureTrustRequest struct {
1717	// TargetDnsIpAddresses: Required. The target DNS server IP addresses to
1718	// resolve the remote domain involved in the trust.
1719	TargetDnsIpAddresses []string `json:"targetDnsIpAddresses,omitempty"`
1720
1721	// TargetDomainName: Required. The fully-qualified target domain name
1722	// which will be in trust with current domain.
1723	TargetDomainName string `json:"targetDomainName,omitempty"`
1724
1725	// ForceSendFields is a list of field names (e.g.
1726	// "TargetDnsIpAddresses") to unconditionally include in API requests.
1727	// By default, fields with empty values are omitted from API requests.
1728	// However, any non-pointer, non-interface field appearing in
1729	// ForceSendFields will be sent to the server regardless of whether the
1730	// field is empty or not. This may be used to include empty fields in
1731	// Patch requests.
1732	ForceSendFields []string `json:"-"`
1733
1734	// NullFields is a list of field names (e.g. "TargetDnsIpAddresses") to
1735	// include in API requests with the JSON null value. By default, fields
1736	// with empty values are omitted from API requests. However, any field
1737	// with an empty value appearing in NullFields will be sent to the
1738	// server as null. It is an error if a field in this list has a
1739	// non-empty value. This may be used to include null fields in Patch
1740	// requests.
1741	NullFields []string `json:"-"`
1742}
1743
1744func (s *ReconfigureTrustRequest) MarshalJSON() ([]byte, error) {
1745	type NoMethod ReconfigureTrustRequest
1746	raw := NoMethod(*s)
1747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1748}
1749
1750// ResetAdminPasswordRequest: Request message for ResetAdminPassword
1751type ResetAdminPasswordRequest struct {
1752}
1753
1754// ResetAdminPasswordResponse: Response message for ResetAdminPassword
1755type ResetAdminPasswordResponse struct {
1756	// Password: A random password. See admin for more information.
1757	Password string `json:"password,omitempty"`
1758
1759	// ServerResponse contains the HTTP response code and headers from the
1760	// server.
1761	googleapi.ServerResponse `json:"-"`
1762
1763	// ForceSendFields is a list of field names (e.g. "Password") to
1764	// unconditionally include in API requests. By default, fields with
1765	// empty values are omitted from API requests. However, any non-pointer,
1766	// non-interface field appearing in ForceSendFields will be sent to the
1767	// server regardless of whether the field is empty or not. This may be
1768	// used to include empty fields in Patch requests.
1769	ForceSendFields []string `json:"-"`
1770
1771	// NullFields is a list of field names (e.g. "Password") to include in
1772	// API requests with the JSON null value. By default, fields with empty
1773	// values are omitted from API requests. However, any field with an
1774	// empty value appearing in NullFields will be sent to the server as
1775	// null. It is an error if a field in this list has a non-empty value.
1776	// This may be used to include null fields in Patch requests.
1777	NullFields []string `json:"-"`
1778}
1779
1780func (s *ResetAdminPasswordResponse) MarshalJSON() ([]byte, error) {
1781	type NoMethod ResetAdminPasswordResponse
1782	raw := NoMethod(*s)
1783	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1784}
1785
1786// Schedule: Configure the schedule.
1787type Schedule struct {
1788	// Day: Allows to define schedule that runs specified day of the week.
1789	//
1790	// Possible values:
1791	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
1792	//   "MONDAY" - Monday
1793	//   "TUESDAY" - Tuesday
1794	//   "WEDNESDAY" - Wednesday
1795	//   "THURSDAY" - Thursday
1796	//   "FRIDAY" - Friday
1797	//   "SATURDAY" - Saturday
1798	//   "SUNDAY" - Sunday
1799	Day string `json:"day,omitempty"`
1800
1801	// Duration: Output only. Duration of the time window, set by service
1802	// producer.
1803	Duration string `json:"duration,omitempty"`
1804
1805	// StartTime: Time within the window to start the operations.
1806	StartTime *TimeOfDay `json:"startTime,omitempty"`
1807
1808	// ForceSendFields is a list of field names (e.g. "Day") to
1809	// unconditionally include in API requests. By default, fields with
1810	// empty values are omitted from API requests. However, any non-pointer,
1811	// non-interface field appearing in ForceSendFields will be sent to the
1812	// server regardless of whether the field is empty or not. This may be
1813	// used to include empty fields in Patch requests.
1814	ForceSendFields []string `json:"-"`
1815
1816	// NullFields is a list of field names (e.g. "Day") to include in API
1817	// requests with the JSON null value. By default, fields with empty
1818	// values are omitted from API requests. However, any field with an
1819	// empty value appearing in NullFields will be sent to the server as
1820	// null. It is an error if a field in this list has a non-empty value.
1821	// This may be used to include null fields in Patch requests.
1822	NullFields []string `json:"-"`
1823}
1824
1825func (s *Schedule) MarshalJSON() ([]byte, error) {
1826	type NoMethod Schedule
1827	raw := NoMethod(*s)
1828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1829}
1830
1831// SetIamPolicyRequest: Request message for `SetIamPolicy` method.
1832type SetIamPolicyRequest struct {
1833	// Policy: REQUIRED: The complete policy to be applied to the
1834	// `resource`. The size of the policy is limited to a few 10s of KB. An
1835	// empty policy is a valid policy but certain Cloud Platform services
1836	// (such as Projects) might reject them.
1837	Policy *Policy `json:"policy,omitempty"`
1838
1839	// ForceSendFields is a list of field names (e.g. "Policy") to
1840	// unconditionally include in API requests. By default, fields with
1841	// empty values are omitted from API requests. However, any non-pointer,
1842	// non-interface field appearing in ForceSendFields will be sent to the
1843	// server regardless of whether the field is empty or not. This may be
1844	// used to include empty fields in Patch requests.
1845	ForceSendFields []string `json:"-"`
1846
1847	// NullFields is a list of field names (e.g. "Policy") to include in API
1848	// requests with the JSON null value. By default, fields with empty
1849	// values are omitted from API requests. However, any field with an
1850	// empty value appearing in NullFields will be sent to the server as
1851	// null. It is an error if a field in this list has a non-empty value.
1852	// This may be used to include null fields in Patch requests.
1853	NullFields []string `json:"-"`
1854}
1855
1856func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1857	type NoMethod SetIamPolicyRequest
1858	raw := NoMethod(*s)
1859	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1860}
1861
1862// Status: The `Status` type defines a logical error model that is
1863// suitable for different programming environments, including REST APIs
1864// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1865// `Status` message contains three pieces of data: error code, error
1866// message, and error details. You can find out more about this error
1867// model and how to work with it in the API Design Guide
1868// (https://cloud.google.com/apis/design/errors).
1869type Status struct {
1870	// Code: The status code, which should be an enum value of
1871	// google.rpc.Code.
1872	Code int64 `json:"code,omitempty"`
1873
1874	// Details: A list of messages that carry the error details. There is a
1875	// common set of message types for APIs to use.
1876	Details []googleapi.RawMessage `json:"details,omitempty"`
1877
1878	// Message: A developer-facing error message, which should be in
1879	// English. Any user-facing error message should be localized and sent
1880	// in the google.rpc.Status.details field, or localized by the client.
1881	Message string `json:"message,omitempty"`
1882
1883	// ForceSendFields is a list of field names (e.g. "Code") to
1884	// unconditionally include in API requests. By default, fields with
1885	// empty values are omitted from API requests. However, any non-pointer,
1886	// non-interface field appearing in ForceSendFields will be sent to the
1887	// server regardless of whether the field is empty or not. This may be
1888	// used to include empty fields in Patch requests.
1889	ForceSendFields []string `json:"-"`
1890
1891	// NullFields is a list of field names (e.g. "Code") to include in API
1892	// requests with the JSON null value. By default, fields with empty
1893	// values are omitted from API requests. However, any field with an
1894	// empty value appearing in NullFields will be sent to the server as
1895	// null. It is an error if a field in this list has a non-empty value.
1896	// This may be used to include null fields in Patch requests.
1897	NullFields []string `json:"-"`
1898}
1899
1900func (s *Status) MarshalJSON() ([]byte, error) {
1901	type NoMethod Status
1902	raw := NoMethod(*s)
1903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1904}
1905
1906// TestIamPermissionsRequest: Request message for `TestIamPermissions`
1907// method.
1908type TestIamPermissionsRequest struct {
1909	// Permissions: The set of permissions to check for the `resource`.
1910	// Permissions with wildcards (such as '*' or 'storage.*') are not
1911	// allowed. For more information see IAM Overview
1912	// (https://cloud.google.com/iam/docs/overview#permissions).
1913	Permissions []string `json:"permissions,omitempty"`
1914
1915	// ForceSendFields is a list of field names (e.g. "Permissions") to
1916	// unconditionally include in API requests. By default, fields with
1917	// empty values are omitted from API requests. However, any non-pointer,
1918	// non-interface field appearing in ForceSendFields will be sent to the
1919	// server regardless of whether the field is empty or not. This may be
1920	// used to include empty fields in Patch requests.
1921	ForceSendFields []string `json:"-"`
1922
1923	// NullFields is a list of field names (e.g. "Permissions") to include
1924	// in API requests with the JSON null value. By default, fields with
1925	// empty values are omitted from API requests. However, any field with
1926	// an empty value appearing in NullFields will be sent to the server as
1927	// null. It is an error if a field in this list has a non-empty value.
1928	// This may be used to include null fields in Patch requests.
1929	NullFields []string `json:"-"`
1930}
1931
1932func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1933	type NoMethod TestIamPermissionsRequest
1934	raw := NoMethod(*s)
1935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1936}
1937
1938// TestIamPermissionsResponse: Response message for `TestIamPermissions`
1939// method.
1940type TestIamPermissionsResponse struct {
1941	// Permissions: A subset of `TestPermissionsRequest.permissions` that
1942	// the caller is allowed.
1943	Permissions []string `json:"permissions,omitempty"`
1944
1945	// ServerResponse contains the HTTP response code and headers from the
1946	// server.
1947	googleapi.ServerResponse `json:"-"`
1948
1949	// ForceSendFields is a list of field names (e.g. "Permissions") to
1950	// unconditionally include in API requests. By default, fields with
1951	// empty values are omitted from API requests. However, any non-pointer,
1952	// non-interface field appearing in ForceSendFields will be sent to the
1953	// server regardless of whether the field is empty or not. This may be
1954	// used to include empty fields in Patch requests.
1955	ForceSendFields []string `json:"-"`
1956
1957	// NullFields is a list of field names (e.g. "Permissions") to include
1958	// in API requests with the JSON null value. By default, fields with
1959	// empty values are omitted from API requests. However, any field with
1960	// an empty value appearing in NullFields will be sent to the server as
1961	// null. It is an error if a field in this list has a non-empty value.
1962	// This may be used to include null fields in Patch requests.
1963	NullFields []string `json:"-"`
1964}
1965
1966func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1967	type NoMethod TestIamPermissionsResponse
1968	raw := NoMethod(*s)
1969	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1970}
1971
1972// TimeOfDay: Represents a time of day. The date and time zone are
1973// either not significant or are specified elsewhere. An API may choose
1974// to allow leap seconds. Related types are google.type.Date and
1975// `google.protobuf.Timestamp`.
1976type TimeOfDay struct {
1977	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
1978	// may choose to allow the value "24:00:00" for scenarios like business
1979	// closing time.
1980	Hours int64 `json:"hours,omitempty"`
1981
1982	// Minutes: Minutes of hour of day. Must be from 0 to 59.
1983	Minutes int64 `json:"minutes,omitempty"`
1984
1985	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
1986	// 999,999,999.
1987	Nanos int64 `json:"nanos,omitempty"`
1988
1989	// Seconds: Seconds of minutes of the time. Must normally be from 0 to
1990	// 59. An API may allow the value 60 if it allows leap-seconds.
1991	Seconds int64 `json:"seconds,omitempty"`
1992
1993	// ForceSendFields is a list of field names (e.g. "Hours") to
1994	// unconditionally include in API requests. By default, fields with
1995	// empty values are omitted from API requests. However, any non-pointer,
1996	// non-interface field appearing in ForceSendFields will be sent to the
1997	// server regardless of whether the field is empty or not. This may be
1998	// used to include empty fields in Patch requests.
1999	ForceSendFields []string `json:"-"`
2000
2001	// NullFields is a list of field names (e.g. "Hours") to include in API
2002	// requests with the JSON null value. By default, fields with empty
2003	// values are omitted from API requests. However, any field with an
2004	// empty value appearing in NullFields will be sent to the server as
2005	// null. It is an error if a field in this list has a non-empty value.
2006	// This may be used to include null fields in Patch requests.
2007	NullFields []string `json:"-"`
2008}
2009
2010func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
2011	type NoMethod TimeOfDay
2012	raw := NoMethod(*s)
2013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2014}
2015
2016// Trust: Represents a relationship between two domains. This allows a
2017// controller in one domain to authenticate a user in another domain. If
2018// the trust is being changed, it will be placed into the UPDATING
2019// state, which indicates that the resource is being reconciled. At this
2020// point, Get will reflect an intermediate state.
2021type Trust struct {
2022	// CreateTime: Output only. The time the instance was created.
2023	CreateTime string `json:"createTime,omitempty"`
2024
2025	// LastTrustHeartbeatTime: Output only. The last heartbeat time when the
2026	// trust was known to be connected.
2027	LastTrustHeartbeatTime string `json:"lastTrustHeartbeatTime,omitempty"`
2028
2029	// SelectiveAuthentication: Optional. The trust authentication type,
2030	// which decides whether the trusted side has forest/domain wide access
2031	// or selective access to an approved set of resources.
2032	SelectiveAuthentication bool `json:"selectiveAuthentication,omitempty"`
2033
2034	// State: Output only. The current state of the trust.
2035	//
2036	// Possible values:
2037	//   "STATE_UNSPECIFIED" - Not set.
2038	//   "CREATING" - The domain trust is being created.
2039	//   "UPDATING" - The domain trust is being updated.
2040	//   "DELETING" - The domain trust is being deleted.
2041	//   "CONNECTED" - The domain trust is connected.
2042	//   "DISCONNECTED" - The domain trust is disconnected.
2043	State string `json:"state,omitempty"`
2044
2045	// StateDescription: Output only. Additional information about the
2046	// current state of the trust, if available.
2047	StateDescription string `json:"stateDescription,omitempty"`
2048
2049	// TargetDnsIpAddresses: Required. The target DNS server IP addresses
2050	// which can resolve the remote domain involved in the trust.
2051	TargetDnsIpAddresses []string `json:"targetDnsIpAddresses,omitempty"`
2052
2053	// TargetDomainName: Required. The fully qualified target domain name
2054	// which will be in trust with the current domain.
2055	TargetDomainName string `json:"targetDomainName,omitempty"`
2056
2057	// TrustDirection: Required. The trust direction, which decides if the
2058	// current domain is trusted, trusting, or both.
2059	//
2060	// Possible values:
2061	//   "TRUST_DIRECTION_UNSPECIFIED" - Not set.
2062	//   "INBOUND" - The inbound direction represents the trusting side.
2063	//   "OUTBOUND" - The outboud direction represents the trusted side.
2064	//   "BIDIRECTIONAL" - The bidirectional direction represents the
2065	// trusted / trusting side.
2066	TrustDirection string `json:"trustDirection,omitempty"`
2067
2068	// TrustHandshakeSecret: Required. The trust secret used for the
2069	// handshake with the target domain. This will not be stored.
2070	TrustHandshakeSecret string `json:"trustHandshakeSecret,omitempty"`
2071
2072	// TrustType: Required. The type of trust represented by the trust
2073	// resource.
2074	//
2075	// Possible values:
2076	//   "TRUST_TYPE_UNSPECIFIED" - Not set.
2077	//   "FOREST" - The forest trust.
2078	//   "EXTERNAL" - The external domain trust.
2079	TrustType string `json:"trustType,omitempty"`
2080
2081	// UpdateTime: Output only. The last update time.
2082	UpdateTime string `json:"updateTime,omitempty"`
2083
2084	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2085	// unconditionally include in API requests. By default, fields with
2086	// empty values are omitted from API requests. However, any non-pointer,
2087	// non-interface field appearing in ForceSendFields will be sent to the
2088	// server regardless of whether the field is empty or not. This may be
2089	// used to include empty fields in Patch requests.
2090	ForceSendFields []string `json:"-"`
2091
2092	// NullFields is a list of field names (e.g. "CreateTime") to include in
2093	// API requests with the JSON null value. By default, fields with empty
2094	// values are omitted from API requests. However, any field with an
2095	// empty value appearing in NullFields will be sent to the server as
2096	// null. It is an error if a field in this list has a non-empty value.
2097	// This may be used to include null fields in Patch requests.
2098	NullFields []string `json:"-"`
2099}
2100
2101func (s *Trust) MarshalJSON() ([]byte, error) {
2102	type NoMethod Trust
2103	raw := NoMethod(*s)
2104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2105}
2106
2107// UpdatePolicy: Maintenance policy applicable to instance updates.
2108type UpdatePolicy struct {
2109	// Channel: Optional. Relative scheduling channel applied to resource.
2110	//
2111	// Possible values:
2112	//   "UPDATE_CHANNEL_UNSPECIFIED" - Unspecified channel.
2113	//   "EARLIER" - Early channel within a customer project.
2114	//   "LATER" - Later channel within a customer project.
2115	Channel string `json:"channel,omitempty"`
2116
2117	// DenyMaintenancePeriods: Deny Maintenance Period that is applied to
2118	// resource to indicate when maintenance is forbidden. User can specify
2119	// zero or more non-overlapping deny periods. For V1, Maximum number of
2120	// deny_maintenance_periods is expected to be one.
2121	DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
2122
2123	// Window: Optional. Maintenance window that is applied to resources
2124	// covered by this policy.
2125	Window *MaintenanceWindow `json:"window,omitempty"`
2126
2127	// ForceSendFields is a list of field names (e.g. "Channel") to
2128	// unconditionally include in API requests. By default, fields with
2129	// empty values are omitted from API requests. However, any non-pointer,
2130	// non-interface field appearing in ForceSendFields will be sent to the
2131	// server regardless of whether the field is empty or not. This may be
2132	// used to include empty fields in Patch requests.
2133	ForceSendFields []string `json:"-"`
2134
2135	// NullFields is a list of field names (e.g. "Channel") to include in
2136	// API requests with the JSON null value. By default, fields with empty
2137	// values are omitted from API requests. However, any field with an
2138	// empty value appearing in NullFields will be sent to the server as
2139	// null. It is an error if a field in this list has a non-empty value.
2140	// This may be used to include null fields in Patch requests.
2141	NullFields []string `json:"-"`
2142}
2143
2144func (s *UpdatePolicy) MarshalJSON() ([]byte, error) {
2145	type NoMethod UpdatePolicy
2146	raw := NoMethod(*s)
2147	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2148}
2149
2150// ValidateTrustRequest: Request message for ValidateTrust
2151type ValidateTrustRequest struct {
2152	// Trust: Required. The domain trust to validate trust state for.
2153	Trust *Trust `json:"trust,omitempty"`
2154
2155	// ForceSendFields is a list of field names (e.g. "Trust") to
2156	// unconditionally include in API requests. By default, fields with
2157	// empty values are omitted from API requests. However, any non-pointer,
2158	// non-interface field appearing in ForceSendFields will be sent to the
2159	// server regardless of whether the field is empty or not. This may be
2160	// used to include empty fields in Patch requests.
2161	ForceSendFields []string `json:"-"`
2162
2163	// NullFields is a list of field names (e.g. "Trust") to include in API
2164	// requests with the JSON null value. By default, fields with empty
2165	// values are omitted from API requests. However, any field with an
2166	// empty value appearing in NullFields will be sent to the server as
2167	// null. It is an error if a field in this list has a non-empty value.
2168	// This may be used to include null fields in Patch requests.
2169	NullFields []string `json:"-"`
2170}
2171
2172func (s *ValidateTrustRequest) MarshalJSON() ([]byte, error) {
2173	type NoMethod ValidateTrustRequest
2174	raw := NoMethod(*s)
2175	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2176}
2177
2178// WeeklyCycle: Time window specified for weekly operations.
2179type WeeklyCycle struct {
2180	// Schedule: User can specify multiple windows in a week. Minimum of 1
2181	// window.
2182	Schedule []*Schedule `json:"schedule,omitempty"`
2183
2184	// ForceSendFields is a list of field names (e.g. "Schedule") to
2185	// unconditionally include in API requests. By default, fields with
2186	// empty values are omitted from API requests. However, any non-pointer,
2187	// non-interface field appearing in ForceSendFields will be sent to the
2188	// server regardless of whether the field is empty or not. This may be
2189	// used to include empty fields in Patch requests.
2190	ForceSendFields []string `json:"-"`
2191
2192	// NullFields is a list of field names (e.g. "Schedule") to include in
2193	// API requests with the JSON null value. By default, fields with empty
2194	// values are omitted from API requests. However, any field with an
2195	// empty value appearing in NullFields will be sent to the server as
2196	// null. It is an error if a field in this list has a non-empty value.
2197	// This may be used to include null fields in Patch requests.
2198	NullFields []string `json:"-"`
2199}
2200
2201func (s *WeeklyCycle) MarshalJSON() ([]byte, error) {
2202	type NoMethod WeeklyCycle
2203	raw := NoMethod(*s)
2204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2205}
2206
2207// method id "managedidentities.projects.locations.get":
2208
2209type ProjectsLocationsGetCall struct {
2210	s            *Service
2211	name         string
2212	urlParams_   gensupport.URLParams
2213	ifNoneMatch_ string
2214	ctx_         context.Context
2215	header_      http.Header
2216}
2217
2218// Get: Gets information about a location.
2219//
2220// - name: Resource name for the location.
2221func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2222	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2223	c.name = name
2224	return c
2225}
2226
2227// Fields allows partial responses to be retrieved. See
2228// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2229// for more information.
2230func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2231	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2232	return c
2233}
2234
2235// IfNoneMatch sets the optional parameter which makes the operation
2236// fail if the object's ETag matches the given value. This is useful for
2237// getting updates only after the object has changed since the last
2238// request. Use googleapi.IsNotModified to check whether the response
2239// error from Do is the result of In-None-Match.
2240func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2241	c.ifNoneMatch_ = entityTag
2242	return c
2243}
2244
2245// Context sets the context to be used in this call's Do method. Any
2246// pending HTTP request will be aborted if the provided context is
2247// canceled.
2248func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2249	c.ctx_ = ctx
2250	return c
2251}
2252
2253// Header returns an http.Header that can be modified by the caller to
2254// add HTTP headers to the request.
2255func (c *ProjectsLocationsGetCall) Header() http.Header {
2256	if c.header_ == nil {
2257		c.header_ = make(http.Header)
2258	}
2259	return c.header_
2260}
2261
2262func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2263	reqHeaders := make(http.Header)
2264	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2265	for k, v := range c.header_ {
2266		reqHeaders[k] = v
2267	}
2268	reqHeaders.Set("User-Agent", c.s.userAgent())
2269	if c.ifNoneMatch_ != "" {
2270		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2271	}
2272	var body io.Reader = nil
2273	c.urlParams_.Set("alt", alt)
2274	c.urlParams_.Set("prettyPrint", "false")
2275	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2276	urls += "?" + c.urlParams_.Encode()
2277	req, err := http.NewRequest("GET", urls, body)
2278	if err != nil {
2279		return nil, err
2280	}
2281	req.Header = reqHeaders
2282	googleapi.Expand(req.URL, map[string]string{
2283		"name": c.name,
2284	})
2285	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2286}
2287
2288// Do executes the "managedidentities.projects.locations.get" call.
2289// Exactly one of *Location or error will be non-nil. Any non-2xx status
2290// code is an error. Response headers are in either
2291// *Location.ServerResponse.Header or (if a response was returned at
2292// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2293// to check whether the returned error was because
2294// http.StatusNotModified was returned.
2295func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2296	gensupport.SetOptions(c.urlParams_, opts...)
2297	res, err := c.doRequest("json")
2298	if res != nil && res.StatusCode == http.StatusNotModified {
2299		if res.Body != nil {
2300			res.Body.Close()
2301		}
2302		return nil, &googleapi.Error{
2303			Code:   res.StatusCode,
2304			Header: res.Header,
2305		}
2306	}
2307	if err != nil {
2308		return nil, err
2309	}
2310	defer googleapi.CloseBody(res)
2311	if err := googleapi.CheckResponse(res); err != nil {
2312		return nil, err
2313	}
2314	ret := &Location{
2315		ServerResponse: googleapi.ServerResponse{
2316			Header:         res.Header,
2317			HTTPStatusCode: res.StatusCode,
2318		},
2319	}
2320	target := &ret
2321	if err := gensupport.DecodeResponse(target, res); err != nil {
2322		return nil, err
2323	}
2324	return ret, nil
2325	// {
2326	//   "description": "Gets information about a location.",
2327	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
2328	//   "httpMethod": "GET",
2329	//   "id": "managedidentities.projects.locations.get",
2330	//   "parameterOrder": [
2331	//     "name"
2332	//   ],
2333	//   "parameters": {
2334	//     "name": {
2335	//       "description": "Resource name for the location.",
2336	//       "location": "path",
2337	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2338	//       "required": true,
2339	//       "type": "string"
2340	//     }
2341	//   },
2342	//   "path": "v1/{+name}",
2343	//   "response": {
2344	//     "$ref": "Location"
2345	//   },
2346	//   "scopes": [
2347	//     "https://www.googleapis.com/auth/cloud-platform"
2348	//   ]
2349	// }
2350
2351}
2352
2353// method id "managedidentities.projects.locations.list":
2354
2355type ProjectsLocationsListCall struct {
2356	s            *Service
2357	name         string
2358	urlParams_   gensupport.URLParams
2359	ifNoneMatch_ string
2360	ctx_         context.Context
2361	header_      http.Header
2362}
2363
2364// List: Lists information about the supported locations for this
2365// service.
2366//
2367// - name: The resource that owns the locations collection, if
2368//   applicable.
2369func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2370	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2371	c.name = name
2372	return c
2373}
2374
2375// Filter sets the optional parameter "filter": A filter to narrow down
2376// results to a preferred subset. The filtering language accepts strings
2377// like "displayName=tokyo", and is documented in more detail in AIP-160
2378// (https://google.aip.dev/160).
2379func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2380	c.urlParams_.Set("filter", filter)
2381	return c
2382}
2383
2384// PageSize sets the optional parameter "pageSize": The maximum number
2385// of results to return. If not set, the service will select a default.
2386func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2387	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2388	return c
2389}
2390
2391// PageToken sets the optional parameter "pageToken": A page token
2392// received from the `next_page_token` field in the response. Send that
2393// page token to receive the subsequent page.
2394func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2395	c.urlParams_.Set("pageToken", pageToken)
2396	return c
2397}
2398
2399// Fields allows partial responses to be retrieved. See
2400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2401// for more information.
2402func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2403	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2404	return c
2405}
2406
2407// IfNoneMatch sets the optional parameter which makes the operation
2408// fail if the object's ETag matches the given value. This is useful for
2409// getting updates only after the object has changed since the last
2410// request. Use googleapi.IsNotModified to check whether the response
2411// error from Do is the result of In-None-Match.
2412func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2413	c.ifNoneMatch_ = entityTag
2414	return c
2415}
2416
2417// Context sets the context to be used in this call's Do method. Any
2418// pending HTTP request will be aborted if the provided context is
2419// canceled.
2420func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2421	c.ctx_ = ctx
2422	return c
2423}
2424
2425// Header returns an http.Header that can be modified by the caller to
2426// add HTTP headers to the request.
2427func (c *ProjectsLocationsListCall) Header() http.Header {
2428	if c.header_ == nil {
2429		c.header_ = make(http.Header)
2430	}
2431	return c.header_
2432}
2433
2434func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2435	reqHeaders := make(http.Header)
2436	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2437	for k, v := range c.header_ {
2438		reqHeaders[k] = v
2439	}
2440	reqHeaders.Set("User-Agent", c.s.userAgent())
2441	if c.ifNoneMatch_ != "" {
2442		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2443	}
2444	var body io.Reader = nil
2445	c.urlParams_.Set("alt", alt)
2446	c.urlParams_.Set("prettyPrint", "false")
2447	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2448	urls += "?" + c.urlParams_.Encode()
2449	req, err := http.NewRequest("GET", urls, body)
2450	if err != nil {
2451		return nil, err
2452	}
2453	req.Header = reqHeaders
2454	googleapi.Expand(req.URL, map[string]string{
2455		"name": c.name,
2456	})
2457	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2458}
2459
2460// Do executes the "managedidentities.projects.locations.list" call.
2461// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2462// non-2xx status code is an error. Response headers are in either
2463// *ListLocationsResponse.ServerResponse.Header or (if a response was
2464// returned at all) in error.(*googleapi.Error).Header. Use
2465// googleapi.IsNotModified to check whether the returned error was
2466// because http.StatusNotModified was returned.
2467func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2468	gensupport.SetOptions(c.urlParams_, opts...)
2469	res, err := c.doRequest("json")
2470	if res != nil && res.StatusCode == http.StatusNotModified {
2471		if res.Body != nil {
2472			res.Body.Close()
2473		}
2474		return nil, &googleapi.Error{
2475			Code:   res.StatusCode,
2476			Header: res.Header,
2477		}
2478	}
2479	if err != nil {
2480		return nil, err
2481	}
2482	defer googleapi.CloseBody(res)
2483	if err := googleapi.CheckResponse(res); err != nil {
2484		return nil, err
2485	}
2486	ret := &ListLocationsResponse{
2487		ServerResponse: googleapi.ServerResponse{
2488			Header:         res.Header,
2489			HTTPStatusCode: res.StatusCode,
2490		},
2491	}
2492	target := &ret
2493	if err := gensupport.DecodeResponse(target, res); err != nil {
2494		return nil, err
2495	}
2496	return ret, nil
2497	// {
2498	//   "description": "Lists information about the supported locations for this service.",
2499	//   "flatPath": "v1/projects/{projectsId}/locations",
2500	//   "httpMethod": "GET",
2501	//   "id": "managedidentities.projects.locations.list",
2502	//   "parameterOrder": [
2503	//     "name"
2504	//   ],
2505	//   "parameters": {
2506	//     "filter": {
2507	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).",
2508	//       "location": "query",
2509	//       "type": "string"
2510	//     },
2511	//     "name": {
2512	//       "description": "The resource that owns the locations collection, if applicable.",
2513	//       "location": "path",
2514	//       "pattern": "^projects/[^/]+$",
2515	//       "required": true,
2516	//       "type": "string"
2517	//     },
2518	//     "pageSize": {
2519	//       "description": "The maximum number of results to return. If not set, the service will select a default.",
2520	//       "format": "int32",
2521	//       "location": "query",
2522	//       "type": "integer"
2523	//     },
2524	//     "pageToken": {
2525	//       "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
2526	//       "location": "query",
2527	//       "type": "string"
2528	//     }
2529	//   },
2530	//   "path": "v1/{+name}/locations",
2531	//   "response": {
2532	//     "$ref": "ListLocationsResponse"
2533	//   },
2534	//   "scopes": [
2535	//     "https://www.googleapis.com/auth/cloud-platform"
2536	//   ]
2537	// }
2538
2539}
2540
2541// Pages invokes f for each page of results.
2542// A non-nil error returned from f will halt the iteration.
2543// The provided context supersedes any context provided to the Context method.
2544func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2545	c.ctx_ = ctx
2546	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2547	for {
2548		x, err := c.Do()
2549		if err != nil {
2550			return err
2551		}
2552		if err := f(x); err != nil {
2553			return err
2554		}
2555		if x.NextPageToken == "" {
2556			return nil
2557		}
2558		c.PageToken(x.NextPageToken)
2559	}
2560}
2561
2562// method id "managedidentities.projects.locations.global.domains.attachTrust":
2563
2564type ProjectsLocationsGlobalDomainsAttachTrustCall struct {
2565	s                  *Service
2566	name               string
2567	attachtrustrequest *AttachTrustRequest
2568	urlParams_         gensupport.URLParams
2569	ctx_               context.Context
2570	header_            http.Header
2571}
2572
2573// AttachTrust: Adds an AD trust to a domain.
2574//
2575// - name: The resource domain name, project name and location using the
2576//   form:
2577//   `projects/{project_id}/locations/global/domains/{domain_name}`.
2578func (r *ProjectsLocationsGlobalDomainsService) AttachTrust(name string, attachtrustrequest *AttachTrustRequest) *ProjectsLocationsGlobalDomainsAttachTrustCall {
2579	c := &ProjectsLocationsGlobalDomainsAttachTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2580	c.name = name
2581	c.attachtrustrequest = attachtrustrequest
2582	return c
2583}
2584
2585// Fields allows partial responses to be retrieved. See
2586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2587// for more information.
2588func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsAttachTrustCall {
2589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2590	return c
2591}
2592
2593// Context sets the context to be used in this call's Do method. Any
2594// pending HTTP request will be aborted if the provided context is
2595// canceled.
2596func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsAttachTrustCall {
2597	c.ctx_ = ctx
2598	return c
2599}
2600
2601// Header returns an http.Header that can be modified by the caller to
2602// add HTTP headers to the request.
2603func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Header() http.Header {
2604	if c.header_ == nil {
2605		c.header_ = make(http.Header)
2606	}
2607	return c.header_
2608}
2609
2610func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) doRequest(alt string) (*http.Response, error) {
2611	reqHeaders := make(http.Header)
2612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2613	for k, v := range c.header_ {
2614		reqHeaders[k] = v
2615	}
2616	reqHeaders.Set("User-Agent", c.s.userAgent())
2617	var body io.Reader = nil
2618	body, err := googleapi.WithoutDataWrapper.JSONReader(c.attachtrustrequest)
2619	if err != nil {
2620		return nil, err
2621	}
2622	reqHeaders.Set("Content-Type", "application/json")
2623	c.urlParams_.Set("alt", alt)
2624	c.urlParams_.Set("prettyPrint", "false")
2625	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:attachTrust")
2626	urls += "?" + c.urlParams_.Encode()
2627	req, err := http.NewRequest("POST", urls, body)
2628	if err != nil {
2629		return nil, err
2630	}
2631	req.Header = reqHeaders
2632	googleapi.Expand(req.URL, map[string]string{
2633		"name": c.name,
2634	})
2635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2636}
2637
2638// Do executes the "managedidentities.projects.locations.global.domains.attachTrust" call.
2639// Exactly one of *Operation or error will be non-nil. Any non-2xx
2640// status code is an error. Response headers are in either
2641// *Operation.ServerResponse.Header or (if a response was returned at
2642// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2643// to check whether the returned error was because
2644// http.StatusNotModified was returned.
2645func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2646	gensupport.SetOptions(c.urlParams_, opts...)
2647	res, err := c.doRequest("json")
2648	if res != nil && res.StatusCode == http.StatusNotModified {
2649		if res.Body != nil {
2650			res.Body.Close()
2651		}
2652		return nil, &googleapi.Error{
2653			Code:   res.StatusCode,
2654			Header: res.Header,
2655		}
2656	}
2657	if err != nil {
2658		return nil, err
2659	}
2660	defer googleapi.CloseBody(res)
2661	if err := googleapi.CheckResponse(res); err != nil {
2662		return nil, err
2663	}
2664	ret := &Operation{
2665		ServerResponse: googleapi.ServerResponse{
2666			Header:         res.Header,
2667			HTTPStatusCode: res.StatusCode,
2668		},
2669	}
2670	target := &ret
2671	if err := gensupport.DecodeResponse(target, res); err != nil {
2672		return nil, err
2673	}
2674	return ret, nil
2675	// {
2676	//   "description": "Adds an AD trust to a domain.",
2677	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:attachTrust",
2678	//   "httpMethod": "POST",
2679	//   "id": "managedidentities.projects.locations.global.domains.attachTrust",
2680	//   "parameterOrder": [
2681	//     "name"
2682	//   ],
2683	//   "parameters": {
2684	//     "name": {
2685	//       "description": "Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
2686	//       "location": "path",
2687	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
2688	//       "required": true,
2689	//       "type": "string"
2690	//     }
2691	//   },
2692	//   "path": "v1/{+name}:attachTrust",
2693	//   "request": {
2694	//     "$ref": "AttachTrustRequest"
2695	//   },
2696	//   "response": {
2697	//     "$ref": "Operation"
2698	//   },
2699	//   "scopes": [
2700	//     "https://www.googleapis.com/auth/cloud-platform"
2701	//   ]
2702	// }
2703
2704}
2705
2706// method id "managedidentities.projects.locations.global.domains.create":
2707
2708type ProjectsLocationsGlobalDomainsCreateCall struct {
2709	s          *Service
2710	parent     string
2711	domain     *Domain
2712	urlParams_ gensupport.URLParams
2713	ctx_       context.Context
2714	header_    http.Header
2715}
2716
2717// Create: Creates a Microsoft AD domain.
2718//
2719// - parent: The resource project name and location using the form:
2720//   `projects/{project_id}/locations/global`.
2721func (r *ProjectsLocationsGlobalDomainsService) Create(parent string, domain *Domain) *ProjectsLocationsGlobalDomainsCreateCall {
2722	c := &ProjectsLocationsGlobalDomainsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2723	c.parent = parent
2724	c.domain = domain
2725	return c
2726}
2727
2728// DomainName sets the optional parameter "domainName": Required. The
2729// fully qualified domain name. e.g. mydomain.myorganization.com, with
2730// the following restrictions: * Must contain only lowercase letters,
2731// numbers, periods and hyphens. * Must start with a letter. * Must
2732// contain between 2-64 characters. * Must end with a number or a
2733// letter. * Must not start with period. * First segement length
2734// (mydomain form example above) shouldn't exceed 15 chars. * The last
2735// segment cannot be fully numeric. * Must be unique within the customer
2736// project.
2737func (c *ProjectsLocationsGlobalDomainsCreateCall) DomainName(domainName string) *ProjectsLocationsGlobalDomainsCreateCall {
2738	c.urlParams_.Set("domainName", domainName)
2739	return c
2740}
2741
2742// Fields allows partial responses to be retrieved. See
2743// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2744// for more information.
2745func (c *ProjectsLocationsGlobalDomainsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsCreateCall {
2746	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2747	return c
2748}
2749
2750// Context sets the context to be used in this call's Do method. Any
2751// pending HTTP request will be aborted if the provided context is
2752// canceled.
2753func (c *ProjectsLocationsGlobalDomainsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsCreateCall {
2754	c.ctx_ = ctx
2755	return c
2756}
2757
2758// Header returns an http.Header that can be modified by the caller to
2759// add HTTP headers to the request.
2760func (c *ProjectsLocationsGlobalDomainsCreateCall) Header() http.Header {
2761	if c.header_ == nil {
2762		c.header_ = make(http.Header)
2763	}
2764	return c.header_
2765}
2766
2767func (c *ProjectsLocationsGlobalDomainsCreateCall) doRequest(alt string) (*http.Response, error) {
2768	reqHeaders := make(http.Header)
2769	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2770	for k, v := range c.header_ {
2771		reqHeaders[k] = v
2772	}
2773	reqHeaders.Set("User-Agent", c.s.userAgent())
2774	var body io.Reader = nil
2775	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
2776	if err != nil {
2777		return nil, err
2778	}
2779	reqHeaders.Set("Content-Type", "application/json")
2780	c.urlParams_.Set("alt", alt)
2781	c.urlParams_.Set("prettyPrint", "false")
2782	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/domains")
2783	urls += "?" + c.urlParams_.Encode()
2784	req, err := http.NewRequest("POST", urls, body)
2785	if err != nil {
2786		return nil, err
2787	}
2788	req.Header = reqHeaders
2789	googleapi.Expand(req.URL, map[string]string{
2790		"parent": c.parent,
2791	})
2792	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2793}
2794
2795// Do executes the "managedidentities.projects.locations.global.domains.create" call.
2796// Exactly one of *Operation or error will be non-nil. Any non-2xx
2797// status code is an error. Response headers are in either
2798// *Operation.ServerResponse.Header or (if a response was returned at
2799// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2800// to check whether the returned error was because
2801// http.StatusNotModified was returned.
2802func (c *ProjectsLocationsGlobalDomainsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2803	gensupport.SetOptions(c.urlParams_, opts...)
2804	res, err := c.doRequest("json")
2805	if res != nil && res.StatusCode == http.StatusNotModified {
2806		if res.Body != nil {
2807			res.Body.Close()
2808		}
2809		return nil, &googleapi.Error{
2810			Code:   res.StatusCode,
2811			Header: res.Header,
2812		}
2813	}
2814	if err != nil {
2815		return nil, err
2816	}
2817	defer googleapi.CloseBody(res)
2818	if err := googleapi.CheckResponse(res); err != nil {
2819		return nil, err
2820	}
2821	ret := &Operation{
2822		ServerResponse: googleapi.ServerResponse{
2823			Header:         res.Header,
2824			HTTPStatusCode: res.StatusCode,
2825		},
2826	}
2827	target := &ret
2828	if err := gensupport.DecodeResponse(target, res); err != nil {
2829		return nil, err
2830	}
2831	return ret, nil
2832	// {
2833	//   "description": "Creates a Microsoft AD domain.",
2834	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains",
2835	//   "httpMethod": "POST",
2836	//   "id": "managedidentities.projects.locations.global.domains.create",
2837	//   "parameterOrder": [
2838	//     "parent"
2839	//   ],
2840	//   "parameters": {
2841	//     "domainName": {
2842	//       "description": "Required. The fully qualified domain name. e.g. mydomain.myorganization.com, with the following restrictions: * Must contain only lowercase letters, numbers, periods and hyphens. * Must start with a letter. * Must contain between 2-64 characters. * Must end with a number or a letter. * Must not start with period. * First segement length (mydomain form example above) shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must be unique within the customer project.",
2843	//       "location": "query",
2844	//       "type": "string"
2845	//     },
2846	//     "parent": {
2847	//       "description": "Required. The resource project name and location using the form: `projects/{project_id}/locations/global`",
2848	//       "location": "path",
2849	//       "pattern": "^projects/[^/]+/locations/global$",
2850	//       "required": true,
2851	//       "type": "string"
2852	//     }
2853	//   },
2854	//   "path": "v1/{+parent}/domains",
2855	//   "request": {
2856	//     "$ref": "Domain"
2857	//   },
2858	//   "response": {
2859	//     "$ref": "Operation"
2860	//   },
2861	//   "scopes": [
2862	//     "https://www.googleapis.com/auth/cloud-platform"
2863	//   ]
2864	// }
2865
2866}
2867
2868// method id "managedidentities.projects.locations.global.domains.delete":
2869
2870type ProjectsLocationsGlobalDomainsDeleteCall struct {
2871	s          *Service
2872	name       string
2873	urlParams_ gensupport.URLParams
2874	ctx_       context.Context
2875	header_    http.Header
2876}
2877
2878// Delete: Deletes a domain.
2879//
2880// - name: The domain resource name using the form:
2881//   `projects/{project_id}/locations/global/domains/{domain_name}`.
2882func (r *ProjectsLocationsGlobalDomainsService) Delete(name string) *ProjectsLocationsGlobalDomainsDeleteCall {
2883	c := &ProjectsLocationsGlobalDomainsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2884	c.name = name
2885	return c
2886}
2887
2888// Fields allows partial responses to be retrieved. See
2889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2890// for more information.
2891func (c *ProjectsLocationsGlobalDomainsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDeleteCall {
2892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2893	return c
2894}
2895
2896// Context sets the context to be used in this call's Do method. Any
2897// pending HTTP request will be aborted if the provided context is
2898// canceled.
2899func (c *ProjectsLocationsGlobalDomainsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDeleteCall {
2900	c.ctx_ = ctx
2901	return c
2902}
2903
2904// Header returns an http.Header that can be modified by the caller to
2905// add HTTP headers to the request.
2906func (c *ProjectsLocationsGlobalDomainsDeleteCall) Header() http.Header {
2907	if c.header_ == nil {
2908		c.header_ = make(http.Header)
2909	}
2910	return c.header_
2911}
2912
2913func (c *ProjectsLocationsGlobalDomainsDeleteCall) doRequest(alt string) (*http.Response, error) {
2914	reqHeaders := make(http.Header)
2915	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
2916	for k, v := range c.header_ {
2917		reqHeaders[k] = v
2918	}
2919	reqHeaders.Set("User-Agent", c.s.userAgent())
2920	var body io.Reader = nil
2921	c.urlParams_.Set("alt", alt)
2922	c.urlParams_.Set("prettyPrint", "false")
2923	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2924	urls += "?" + c.urlParams_.Encode()
2925	req, err := http.NewRequest("DELETE", urls, body)
2926	if err != nil {
2927		return nil, err
2928	}
2929	req.Header = reqHeaders
2930	googleapi.Expand(req.URL, map[string]string{
2931		"name": c.name,
2932	})
2933	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2934}
2935
2936// Do executes the "managedidentities.projects.locations.global.domains.delete" call.
2937// Exactly one of *Operation or error will be non-nil. Any non-2xx
2938// status code is an error. Response headers are in either
2939// *Operation.ServerResponse.Header or (if a response was returned at
2940// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2941// to check whether the returned error was because
2942// http.StatusNotModified was returned.
2943func (c *ProjectsLocationsGlobalDomainsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2944	gensupport.SetOptions(c.urlParams_, opts...)
2945	res, err := c.doRequest("json")
2946	if res != nil && res.StatusCode == http.StatusNotModified {
2947		if res.Body != nil {
2948			res.Body.Close()
2949		}
2950		return nil, &googleapi.Error{
2951			Code:   res.StatusCode,
2952			Header: res.Header,
2953		}
2954	}
2955	if err != nil {
2956		return nil, err
2957	}
2958	defer googleapi.CloseBody(res)
2959	if err := googleapi.CheckResponse(res); err != nil {
2960		return nil, err
2961	}
2962	ret := &Operation{
2963		ServerResponse: googleapi.ServerResponse{
2964			Header:         res.Header,
2965			HTTPStatusCode: res.StatusCode,
2966		},
2967	}
2968	target := &ret
2969	if err := gensupport.DecodeResponse(target, res); err != nil {
2970		return nil, err
2971	}
2972	return ret, nil
2973	// {
2974	//   "description": "Deletes a domain.",
2975	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}",
2976	//   "httpMethod": "DELETE",
2977	//   "id": "managedidentities.projects.locations.global.domains.delete",
2978	//   "parameterOrder": [
2979	//     "name"
2980	//   ],
2981	//   "parameters": {
2982	//     "name": {
2983	//       "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
2984	//       "location": "path",
2985	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
2986	//       "required": true,
2987	//       "type": "string"
2988	//     }
2989	//   },
2990	//   "path": "v1/{+name}",
2991	//   "response": {
2992	//     "$ref": "Operation"
2993	//   },
2994	//   "scopes": [
2995	//     "https://www.googleapis.com/auth/cloud-platform"
2996	//   ]
2997	// }
2998
2999}
3000
3001// method id "managedidentities.projects.locations.global.domains.detachTrust":
3002
3003type ProjectsLocationsGlobalDomainsDetachTrustCall struct {
3004	s                  *Service
3005	name               string
3006	detachtrustrequest *DetachTrustRequest
3007	urlParams_         gensupport.URLParams
3008	ctx_               context.Context
3009	header_            http.Header
3010}
3011
3012// DetachTrust: Removes an AD trust.
3013//
3014// - name: The resource domain name, project name, and location using
3015//   the form:
3016//   `projects/{project_id}/locations/global/domains/{domain_name}`.
3017func (r *ProjectsLocationsGlobalDomainsService) DetachTrust(name string, detachtrustrequest *DetachTrustRequest) *ProjectsLocationsGlobalDomainsDetachTrustCall {
3018	c := &ProjectsLocationsGlobalDomainsDetachTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3019	c.name = name
3020	c.detachtrustrequest = detachtrustrequest
3021	return c
3022}
3023
3024// Fields allows partial responses to be retrieved. See
3025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3026// for more information.
3027func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDetachTrustCall {
3028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3029	return c
3030}
3031
3032// Context sets the context to be used in this call's Do method. Any
3033// pending HTTP request will be aborted if the provided context is
3034// canceled.
3035func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDetachTrustCall {
3036	c.ctx_ = ctx
3037	return c
3038}
3039
3040// Header returns an http.Header that can be modified by the caller to
3041// add HTTP headers to the request.
3042func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Header() http.Header {
3043	if c.header_ == nil {
3044		c.header_ = make(http.Header)
3045	}
3046	return c.header_
3047}
3048
3049func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) doRequest(alt string) (*http.Response, error) {
3050	reqHeaders := make(http.Header)
3051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3052	for k, v := range c.header_ {
3053		reqHeaders[k] = v
3054	}
3055	reqHeaders.Set("User-Agent", c.s.userAgent())
3056	var body io.Reader = nil
3057	body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachtrustrequest)
3058	if err != nil {
3059		return nil, err
3060	}
3061	reqHeaders.Set("Content-Type", "application/json")
3062	c.urlParams_.Set("alt", alt)
3063	c.urlParams_.Set("prettyPrint", "false")
3064	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:detachTrust")
3065	urls += "?" + c.urlParams_.Encode()
3066	req, err := http.NewRequest("POST", urls, body)
3067	if err != nil {
3068		return nil, err
3069	}
3070	req.Header = reqHeaders
3071	googleapi.Expand(req.URL, map[string]string{
3072		"name": c.name,
3073	})
3074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3075}
3076
3077// Do executes the "managedidentities.projects.locations.global.domains.detachTrust" call.
3078// Exactly one of *Operation or error will be non-nil. Any non-2xx
3079// status code is an error. Response headers are in either
3080// *Operation.ServerResponse.Header or (if a response was returned at
3081// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3082// to check whether the returned error was because
3083// http.StatusNotModified was returned.
3084func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3085	gensupport.SetOptions(c.urlParams_, opts...)
3086	res, err := c.doRequest("json")
3087	if res != nil && res.StatusCode == http.StatusNotModified {
3088		if res.Body != nil {
3089			res.Body.Close()
3090		}
3091		return nil, &googleapi.Error{
3092			Code:   res.StatusCode,
3093			Header: res.Header,
3094		}
3095	}
3096	if err != nil {
3097		return nil, err
3098	}
3099	defer googleapi.CloseBody(res)
3100	if err := googleapi.CheckResponse(res); err != nil {
3101		return nil, err
3102	}
3103	ret := &Operation{
3104		ServerResponse: googleapi.ServerResponse{
3105			Header:         res.Header,
3106			HTTPStatusCode: res.StatusCode,
3107		},
3108	}
3109	target := &ret
3110	if err := gensupport.DecodeResponse(target, res); err != nil {
3111		return nil, err
3112	}
3113	return ret, nil
3114	// {
3115	//   "description": "Removes an AD trust.",
3116	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:detachTrust",
3117	//   "httpMethod": "POST",
3118	//   "id": "managedidentities.projects.locations.global.domains.detachTrust",
3119	//   "parameterOrder": [
3120	//     "name"
3121	//   ],
3122	//   "parameters": {
3123	//     "name": {
3124	//       "description": "Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
3125	//       "location": "path",
3126	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
3127	//       "required": true,
3128	//       "type": "string"
3129	//     }
3130	//   },
3131	//   "path": "v1/{+name}:detachTrust",
3132	//   "request": {
3133	//     "$ref": "DetachTrustRequest"
3134	//   },
3135	//   "response": {
3136	//     "$ref": "Operation"
3137	//   },
3138	//   "scopes": [
3139	//     "https://www.googleapis.com/auth/cloud-platform"
3140	//   ]
3141	// }
3142
3143}
3144
3145// method id "managedidentities.projects.locations.global.domains.get":
3146
3147type ProjectsLocationsGlobalDomainsGetCall struct {
3148	s            *Service
3149	name         string
3150	urlParams_   gensupport.URLParams
3151	ifNoneMatch_ string
3152	ctx_         context.Context
3153	header_      http.Header
3154}
3155
3156// Get: Gets information about a domain.
3157//
3158// - name: The domain resource name using the form:
3159//   `projects/{project_id}/locations/global/domains/{domain_name}`.
3160func (r *ProjectsLocationsGlobalDomainsService) Get(name string) *ProjectsLocationsGlobalDomainsGetCall {
3161	c := &ProjectsLocationsGlobalDomainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3162	c.name = name
3163	return c
3164}
3165
3166// Fields allows partial responses to be retrieved. See
3167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3168// for more information.
3169func (c *ProjectsLocationsGlobalDomainsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsGetCall {
3170	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3171	return c
3172}
3173
3174// IfNoneMatch sets the optional parameter which makes the operation
3175// fail if the object's ETag matches the given value. This is useful for
3176// getting updates only after the object has changed since the last
3177// request. Use googleapi.IsNotModified to check whether the response
3178// error from Do is the result of In-None-Match.
3179func (c *ProjectsLocationsGlobalDomainsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsGetCall {
3180	c.ifNoneMatch_ = entityTag
3181	return c
3182}
3183
3184// Context sets the context to be used in this call's Do method. Any
3185// pending HTTP request will be aborted if the provided context is
3186// canceled.
3187func (c *ProjectsLocationsGlobalDomainsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsGetCall {
3188	c.ctx_ = ctx
3189	return c
3190}
3191
3192// Header returns an http.Header that can be modified by the caller to
3193// add HTTP headers to the request.
3194func (c *ProjectsLocationsGlobalDomainsGetCall) Header() http.Header {
3195	if c.header_ == nil {
3196		c.header_ = make(http.Header)
3197	}
3198	return c.header_
3199}
3200
3201func (c *ProjectsLocationsGlobalDomainsGetCall) doRequest(alt string) (*http.Response, error) {
3202	reqHeaders := make(http.Header)
3203	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3204	for k, v := range c.header_ {
3205		reqHeaders[k] = v
3206	}
3207	reqHeaders.Set("User-Agent", c.s.userAgent())
3208	if c.ifNoneMatch_ != "" {
3209		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3210	}
3211	var body io.Reader = nil
3212	c.urlParams_.Set("alt", alt)
3213	c.urlParams_.Set("prettyPrint", "false")
3214	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3215	urls += "?" + c.urlParams_.Encode()
3216	req, err := http.NewRequest("GET", urls, body)
3217	if err != nil {
3218		return nil, err
3219	}
3220	req.Header = reqHeaders
3221	googleapi.Expand(req.URL, map[string]string{
3222		"name": c.name,
3223	})
3224	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3225}
3226
3227// Do executes the "managedidentities.projects.locations.global.domains.get" call.
3228// Exactly one of *Domain or error will be non-nil. Any non-2xx status
3229// code is an error. Response headers are in either
3230// *Domain.ServerResponse.Header or (if a response was returned at all)
3231// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3232// check whether the returned error was because http.StatusNotModified
3233// was returned.
3234func (c *ProjectsLocationsGlobalDomainsGetCall) Do(opts ...googleapi.CallOption) (*Domain, error) {
3235	gensupport.SetOptions(c.urlParams_, opts...)
3236	res, err := c.doRequest("json")
3237	if res != nil && res.StatusCode == http.StatusNotModified {
3238		if res.Body != nil {
3239			res.Body.Close()
3240		}
3241		return nil, &googleapi.Error{
3242			Code:   res.StatusCode,
3243			Header: res.Header,
3244		}
3245	}
3246	if err != nil {
3247		return nil, err
3248	}
3249	defer googleapi.CloseBody(res)
3250	if err := googleapi.CheckResponse(res); err != nil {
3251		return nil, err
3252	}
3253	ret := &Domain{
3254		ServerResponse: googleapi.ServerResponse{
3255			Header:         res.Header,
3256			HTTPStatusCode: res.StatusCode,
3257		},
3258	}
3259	target := &ret
3260	if err := gensupport.DecodeResponse(target, res); err != nil {
3261		return nil, err
3262	}
3263	return ret, nil
3264	// {
3265	//   "description": "Gets information about a domain.",
3266	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}",
3267	//   "httpMethod": "GET",
3268	//   "id": "managedidentities.projects.locations.global.domains.get",
3269	//   "parameterOrder": [
3270	//     "name"
3271	//   ],
3272	//   "parameters": {
3273	//     "name": {
3274	//       "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
3275	//       "location": "path",
3276	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
3277	//       "required": true,
3278	//       "type": "string"
3279	//     }
3280	//   },
3281	//   "path": "v1/{+name}",
3282	//   "response": {
3283	//     "$ref": "Domain"
3284	//   },
3285	//   "scopes": [
3286	//     "https://www.googleapis.com/auth/cloud-platform"
3287	//   ]
3288	// }
3289
3290}
3291
3292// method id "managedidentities.projects.locations.global.domains.getIamPolicy":
3293
3294type ProjectsLocationsGlobalDomainsGetIamPolicyCall struct {
3295	s            *Service
3296	resource     string
3297	urlParams_   gensupport.URLParams
3298	ifNoneMatch_ string
3299	ctx_         context.Context
3300	header_      http.Header
3301}
3302
3303// GetIamPolicy: Gets the access control policy for a resource. Returns
3304// an empty policy if the resource exists and does not have a policy
3305// set.
3306//
3307// - resource: REQUIRED: The resource for which the policy is being
3308//   requested. See the operation documentation for the appropriate
3309//   value for this field.
3310func (r *ProjectsLocationsGlobalDomainsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalDomainsGetIamPolicyCall {
3311	c := &ProjectsLocationsGlobalDomainsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3312	c.resource = resource
3313	return c
3314}
3315
3316// OptionsRequestedPolicyVersion sets the optional parameter
3317// "options.requestedPolicyVersion": The policy format version to be
3318// returned. Valid values are 0, 1, and 3. Requests specifying an
3319// invalid value will be rejected. Requests for policies with any
3320// conditional bindings must specify version 3. Policies without any
3321// conditional bindings may specify any valid value or leave the field
3322// unset. To learn which resources support conditions in their IAM
3323// policies, see the IAM documentation
3324// (https://cloud.google.com/iam/help/conditions/resource-policies).
3325func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalDomainsGetIamPolicyCall {
3326	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3327	return c
3328}
3329
3330// Fields allows partial responses to be retrieved. See
3331// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3332// for more information.
3333func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsGetIamPolicyCall {
3334	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3335	return c
3336}
3337
3338// IfNoneMatch sets the optional parameter which makes the operation
3339// fail if the object's ETag matches the given value. This is useful for
3340// getting updates only after the object has changed since the last
3341// request. Use googleapi.IsNotModified to check whether the response
3342// error from Do is the result of In-None-Match.
3343func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsGetIamPolicyCall {
3344	c.ifNoneMatch_ = entityTag
3345	return c
3346}
3347
3348// Context sets the context to be used in this call's Do method. Any
3349// pending HTTP request will be aborted if the provided context is
3350// canceled.
3351func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsGetIamPolicyCall {
3352	c.ctx_ = ctx
3353	return c
3354}
3355
3356// Header returns an http.Header that can be modified by the caller to
3357// add HTTP headers to the request.
3358func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Header() http.Header {
3359	if c.header_ == nil {
3360		c.header_ = make(http.Header)
3361	}
3362	return c.header_
3363}
3364
3365func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3366	reqHeaders := make(http.Header)
3367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3368	for k, v := range c.header_ {
3369		reqHeaders[k] = v
3370	}
3371	reqHeaders.Set("User-Agent", c.s.userAgent())
3372	if c.ifNoneMatch_ != "" {
3373		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3374	}
3375	var body io.Reader = nil
3376	c.urlParams_.Set("alt", alt)
3377	c.urlParams_.Set("prettyPrint", "false")
3378	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
3379	urls += "?" + c.urlParams_.Encode()
3380	req, err := http.NewRequest("GET", urls, body)
3381	if err != nil {
3382		return nil, err
3383	}
3384	req.Header = reqHeaders
3385	googleapi.Expand(req.URL, map[string]string{
3386		"resource": c.resource,
3387	})
3388	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3389}
3390
3391// Do executes the "managedidentities.projects.locations.global.domains.getIamPolicy" call.
3392// Exactly one of *Policy or error will be non-nil. Any non-2xx status
3393// code is an error. Response headers are in either
3394// *Policy.ServerResponse.Header or (if a response was returned at all)
3395// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3396// check whether the returned error was because http.StatusNotModified
3397// was returned.
3398func (c *ProjectsLocationsGlobalDomainsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3399	gensupport.SetOptions(c.urlParams_, opts...)
3400	res, err := c.doRequest("json")
3401	if res != nil && res.StatusCode == http.StatusNotModified {
3402		if res.Body != nil {
3403			res.Body.Close()
3404		}
3405		return nil, &googleapi.Error{
3406			Code:   res.StatusCode,
3407			Header: res.Header,
3408		}
3409	}
3410	if err != nil {
3411		return nil, err
3412	}
3413	defer googleapi.CloseBody(res)
3414	if err := googleapi.CheckResponse(res); err != nil {
3415		return nil, err
3416	}
3417	ret := &Policy{
3418		ServerResponse: googleapi.ServerResponse{
3419			Header:         res.Header,
3420			HTTPStatusCode: res.StatusCode,
3421		},
3422	}
3423	target := &ret
3424	if err := gensupport.DecodeResponse(target, res); err != nil {
3425		return nil, err
3426	}
3427	return ret, nil
3428	// {
3429	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
3430	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:getIamPolicy",
3431	//   "httpMethod": "GET",
3432	//   "id": "managedidentities.projects.locations.global.domains.getIamPolicy",
3433	//   "parameterOrder": [
3434	//     "resource"
3435	//   ],
3436	//   "parameters": {
3437	//     "options.requestedPolicyVersion": {
3438	//       "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).",
3439	//       "format": "int32",
3440	//       "location": "query",
3441	//       "type": "integer"
3442	//     },
3443	//     "resource": {
3444	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
3445	//       "location": "path",
3446	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
3447	//       "required": true,
3448	//       "type": "string"
3449	//     }
3450	//   },
3451	//   "path": "v1/{+resource}:getIamPolicy",
3452	//   "response": {
3453	//     "$ref": "Policy"
3454	//   },
3455	//   "scopes": [
3456	//     "https://www.googleapis.com/auth/cloud-platform"
3457	//   ]
3458	// }
3459
3460}
3461
3462// method id "managedidentities.projects.locations.global.domains.list":
3463
3464type ProjectsLocationsGlobalDomainsListCall struct {
3465	s            *Service
3466	parent       string
3467	urlParams_   gensupport.URLParams
3468	ifNoneMatch_ string
3469	ctx_         context.Context
3470	header_      http.Header
3471}
3472
3473// List: Lists domains in a project.
3474//
3475// - parent: The resource name of the domain location using the form:
3476//   `projects/{project_id}/locations/global`.
3477func (r *ProjectsLocationsGlobalDomainsService) List(parent string) *ProjectsLocationsGlobalDomainsListCall {
3478	c := &ProjectsLocationsGlobalDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3479	c.parent = parent
3480	return c
3481}
3482
3483// Filter sets the optional parameter "filter": A filter specifying
3484// constraints of a list operation. For example,
3485// `Domain.fqdn="mydomain.myorginization".
3486func (c *ProjectsLocationsGlobalDomainsListCall) Filter(filter string) *ProjectsLocationsGlobalDomainsListCall {
3487	c.urlParams_.Set("filter", filter)
3488	return c
3489}
3490
3491// OrderBy sets the optional parameter "orderBy": Specifies the ordering
3492// of results. See Sorting order
3493// (https://cloud.google.com/apis/design/design_patterns#sorting_order)
3494// for more information.
3495func (c *ProjectsLocationsGlobalDomainsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalDomainsListCall {
3496	c.urlParams_.Set("orderBy", orderBy)
3497	return c
3498}
3499
3500// PageSize sets the optional parameter "pageSize": The maximum number
3501// of items to return. If not specified, a default value of 1000 will be
3502// used. Regardless of the page_size value, the response may include a
3503// partial list. Callers should rely on a response's next_page_token to
3504// determine if there are additional results to list.
3505func (c *ProjectsLocationsGlobalDomainsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalDomainsListCall {
3506	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3507	return c
3508}
3509
3510// PageToken sets the optional parameter "pageToken": The
3511// `next_page_token` value returned from a previous ListDomainsRequest
3512// request, if any.
3513func (c *ProjectsLocationsGlobalDomainsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalDomainsListCall {
3514	c.urlParams_.Set("pageToken", pageToken)
3515	return c
3516}
3517
3518// Fields allows partial responses to be retrieved. See
3519// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3520// for more information.
3521func (c *ProjectsLocationsGlobalDomainsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsListCall {
3522	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3523	return c
3524}
3525
3526// IfNoneMatch sets the optional parameter which makes the operation
3527// fail if the object's ETag matches the given value. This is useful for
3528// getting updates only after the object has changed since the last
3529// request. Use googleapi.IsNotModified to check whether the response
3530// error from Do is the result of In-None-Match.
3531func (c *ProjectsLocationsGlobalDomainsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalDomainsListCall {
3532	c.ifNoneMatch_ = entityTag
3533	return c
3534}
3535
3536// Context sets the context to be used in this call's Do method. Any
3537// pending HTTP request will be aborted if the provided context is
3538// canceled.
3539func (c *ProjectsLocationsGlobalDomainsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsListCall {
3540	c.ctx_ = ctx
3541	return c
3542}
3543
3544// Header returns an http.Header that can be modified by the caller to
3545// add HTTP headers to the request.
3546func (c *ProjectsLocationsGlobalDomainsListCall) Header() http.Header {
3547	if c.header_ == nil {
3548		c.header_ = make(http.Header)
3549	}
3550	return c.header_
3551}
3552
3553func (c *ProjectsLocationsGlobalDomainsListCall) doRequest(alt string) (*http.Response, error) {
3554	reqHeaders := make(http.Header)
3555	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3556	for k, v := range c.header_ {
3557		reqHeaders[k] = v
3558	}
3559	reqHeaders.Set("User-Agent", c.s.userAgent())
3560	if c.ifNoneMatch_ != "" {
3561		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3562	}
3563	var body io.Reader = nil
3564	c.urlParams_.Set("alt", alt)
3565	c.urlParams_.Set("prettyPrint", "false")
3566	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/domains")
3567	urls += "?" + c.urlParams_.Encode()
3568	req, err := http.NewRequest("GET", urls, body)
3569	if err != nil {
3570		return nil, err
3571	}
3572	req.Header = reqHeaders
3573	googleapi.Expand(req.URL, map[string]string{
3574		"parent": c.parent,
3575	})
3576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3577}
3578
3579// Do executes the "managedidentities.projects.locations.global.domains.list" call.
3580// Exactly one of *ListDomainsResponse or error will be non-nil. Any
3581// non-2xx status code is an error. Response headers are in either
3582// *ListDomainsResponse.ServerResponse.Header or (if a response was
3583// returned at all) in error.(*googleapi.Error).Header. Use
3584// googleapi.IsNotModified to check whether the returned error was
3585// because http.StatusNotModified was returned.
3586func (c *ProjectsLocationsGlobalDomainsListCall) Do(opts ...googleapi.CallOption) (*ListDomainsResponse, error) {
3587	gensupport.SetOptions(c.urlParams_, opts...)
3588	res, err := c.doRequest("json")
3589	if res != nil && res.StatusCode == http.StatusNotModified {
3590		if res.Body != nil {
3591			res.Body.Close()
3592		}
3593		return nil, &googleapi.Error{
3594			Code:   res.StatusCode,
3595			Header: res.Header,
3596		}
3597	}
3598	if err != nil {
3599		return nil, err
3600	}
3601	defer googleapi.CloseBody(res)
3602	if err := googleapi.CheckResponse(res); err != nil {
3603		return nil, err
3604	}
3605	ret := &ListDomainsResponse{
3606		ServerResponse: googleapi.ServerResponse{
3607			Header:         res.Header,
3608			HTTPStatusCode: res.StatusCode,
3609		},
3610	}
3611	target := &ret
3612	if err := gensupport.DecodeResponse(target, res); err != nil {
3613		return nil, err
3614	}
3615	return ret, nil
3616	// {
3617	//   "description": "Lists domains in a project.",
3618	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains",
3619	//   "httpMethod": "GET",
3620	//   "id": "managedidentities.projects.locations.global.domains.list",
3621	//   "parameterOrder": [
3622	//     "parent"
3623	//   ],
3624	//   "parameters": {
3625	//     "filter": {
3626	//       "description": "Optional. A filter specifying constraints of a list operation. For example, `Domain.fqdn=\"mydomain.myorginization\"`.",
3627	//       "location": "query",
3628	//       "type": "string"
3629	//     },
3630	//     "orderBy": {
3631	//       "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.",
3632	//       "location": "query",
3633	//       "type": "string"
3634	//     },
3635	//     "pageSize": {
3636	//       "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used. Regardless of the page_size value, the response may include a partial list. Callers should rely on a response's next_page_token to determine if there are additional results to list.",
3637	//       "format": "int32",
3638	//       "location": "query",
3639	//       "type": "integer"
3640	//     },
3641	//     "pageToken": {
3642	//       "description": "Optional. The `next_page_token` value returned from a previous ListDomainsRequest request, if any.",
3643	//       "location": "query",
3644	//       "type": "string"
3645	//     },
3646	//     "parent": {
3647	//       "description": "Required. The resource name of the domain location using the form: `projects/{project_id}/locations/global`",
3648	//       "location": "path",
3649	//       "pattern": "^projects/[^/]+/locations/global$",
3650	//       "required": true,
3651	//       "type": "string"
3652	//     }
3653	//   },
3654	//   "path": "v1/{+parent}/domains",
3655	//   "response": {
3656	//     "$ref": "ListDomainsResponse"
3657	//   },
3658	//   "scopes": [
3659	//     "https://www.googleapis.com/auth/cloud-platform"
3660	//   ]
3661	// }
3662
3663}
3664
3665// Pages invokes f for each page of results.
3666// A non-nil error returned from f will halt the iteration.
3667// The provided context supersedes any context provided to the Context method.
3668func (c *ProjectsLocationsGlobalDomainsListCall) Pages(ctx context.Context, f func(*ListDomainsResponse) error) error {
3669	c.ctx_ = ctx
3670	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3671	for {
3672		x, err := c.Do()
3673		if err != nil {
3674			return err
3675		}
3676		if err := f(x); err != nil {
3677			return err
3678		}
3679		if x.NextPageToken == "" {
3680			return nil
3681		}
3682		c.PageToken(x.NextPageToken)
3683	}
3684}
3685
3686// method id "managedidentities.projects.locations.global.domains.patch":
3687
3688type ProjectsLocationsGlobalDomainsPatchCall struct {
3689	s          *Service
3690	name       string
3691	domain     *Domain
3692	urlParams_ gensupport.URLParams
3693	ctx_       context.Context
3694	header_    http.Header
3695}
3696
3697// Patch: Updates the metadata and configuration of a domain.
3698//
3699// - name: The unique name of the domain using the form:
3700//   `projects/{project_id}/locations/global/domains/{domain_name}`.
3701func (r *ProjectsLocationsGlobalDomainsService) Patch(name string, domain *Domain) *ProjectsLocationsGlobalDomainsPatchCall {
3702	c := &ProjectsLocationsGlobalDomainsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3703	c.name = name
3704	c.domain = domain
3705	return c
3706}
3707
3708// UpdateMask sets the optional parameter "updateMask": Required. Mask
3709// of fields to update. At least one path must be supplied in this
3710// field. The elements of the repeated paths field may only include
3711// fields from Domain: * `labels` * `locations` * `authorized_networks`
3712func (c *ProjectsLocationsGlobalDomainsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalDomainsPatchCall {
3713	c.urlParams_.Set("updateMask", updateMask)
3714	return c
3715}
3716
3717// Fields allows partial responses to be retrieved. See
3718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3719// for more information.
3720func (c *ProjectsLocationsGlobalDomainsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsPatchCall {
3721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3722	return c
3723}
3724
3725// Context sets the context to be used in this call's Do method. Any
3726// pending HTTP request will be aborted if the provided context is
3727// canceled.
3728func (c *ProjectsLocationsGlobalDomainsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsPatchCall {
3729	c.ctx_ = ctx
3730	return c
3731}
3732
3733// Header returns an http.Header that can be modified by the caller to
3734// add HTTP headers to the request.
3735func (c *ProjectsLocationsGlobalDomainsPatchCall) Header() http.Header {
3736	if c.header_ == nil {
3737		c.header_ = make(http.Header)
3738	}
3739	return c.header_
3740}
3741
3742func (c *ProjectsLocationsGlobalDomainsPatchCall) doRequest(alt string) (*http.Response, error) {
3743	reqHeaders := make(http.Header)
3744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3745	for k, v := range c.header_ {
3746		reqHeaders[k] = v
3747	}
3748	reqHeaders.Set("User-Agent", c.s.userAgent())
3749	var body io.Reader = nil
3750	body, err := googleapi.WithoutDataWrapper.JSONReader(c.domain)
3751	if err != nil {
3752		return nil, err
3753	}
3754	reqHeaders.Set("Content-Type", "application/json")
3755	c.urlParams_.Set("alt", alt)
3756	c.urlParams_.Set("prettyPrint", "false")
3757	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3758	urls += "?" + c.urlParams_.Encode()
3759	req, err := http.NewRequest("PATCH", urls, body)
3760	if err != nil {
3761		return nil, err
3762	}
3763	req.Header = reqHeaders
3764	googleapi.Expand(req.URL, map[string]string{
3765		"name": c.name,
3766	})
3767	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3768}
3769
3770// Do executes the "managedidentities.projects.locations.global.domains.patch" call.
3771// Exactly one of *Operation or error will be non-nil. Any non-2xx
3772// status code is an error. Response headers are in either
3773// *Operation.ServerResponse.Header or (if a response was returned at
3774// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3775// to check whether the returned error was because
3776// http.StatusNotModified was returned.
3777func (c *ProjectsLocationsGlobalDomainsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3778	gensupport.SetOptions(c.urlParams_, opts...)
3779	res, err := c.doRequest("json")
3780	if res != nil && res.StatusCode == http.StatusNotModified {
3781		if res.Body != nil {
3782			res.Body.Close()
3783		}
3784		return nil, &googleapi.Error{
3785			Code:   res.StatusCode,
3786			Header: res.Header,
3787		}
3788	}
3789	if err != nil {
3790		return nil, err
3791	}
3792	defer googleapi.CloseBody(res)
3793	if err := googleapi.CheckResponse(res); err != nil {
3794		return nil, err
3795	}
3796	ret := &Operation{
3797		ServerResponse: googleapi.ServerResponse{
3798			Header:         res.Header,
3799			HTTPStatusCode: res.StatusCode,
3800		},
3801	}
3802	target := &ret
3803	if err := gensupport.DecodeResponse(target, res); err != nil {
3804		return nil, err
3805	}
3806	return ret, nil
3807	// {
3808	//   "description": "Updates the metadata and configuration of a domain.",
3809	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}",
3810	//   "httpMethod": "PATCH",
3811	//   "id": "managedidentities.projects.locations.global.domains.patch",
3812	//   "parameterOrder": [
3813	//     "name"
3814	//   ],
3815	//   "parameters": {
3816	//     "name": {
3817	//       "description": "Required. The unique name of the domain using the form: `projects/{project_id}/locations/global/domains/{domain_name}`.",
3818	//       "location": "path",
3819	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
3820	//       "required": true,
3821	//       "type": "string"
3822	//     },
3823	//     "updateMask": {
3824	//       "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include fields from Domain: * `labels` * `locations` * `authorized_networks`",
3825	//       "format": "google-fieldmask",
3826	//       "location": "query",
3827	//       "type": "string"
3828	//     }
3829	//   },
3830	//   "path": "v1/{+name}",
3831	//   "request": {
3832	//     "$ref": "Domain"
3833	//   },
3834	//   "response": {
3835	//     "$ref": "Operation"
3836	//   },
3837	//   "scopes": [
3838	//     "https://www.googleapis.com/auth/cloud-platform"
3839	//   ]
3840	// }
3841
3842}
3843
3844// method id "managedidentities.projects.locations.global.domains.reconfigureTrust":
3845
3846type ProjectsLocationsGlobalDomainsReconfigureTrustCall struct {
3847	s                       *Service
3848	name                    string
3849	reconfiguretrustrequest *ReconfigureTrustRequest
3850	urlParams_              gensupport.URLParams
3851	ctx_                    context.Context
3852	header_                 http.Header
3853}
3854
3855// ReconfigureTrust: Updates the DNS conditional forwarder.
3856//
3857// - name: The resource domain name, project name and location using the
3858//   form:
3859//   `projects/{project_id}/locations/global/domains/{domain_name}`.
3860func (r *ProjectsLocationsGlobalDomainsService) ReconfigureTrust(name string, reconfiguretrustrequest *ReconfigureTrustRequest) *ProjectsLocationsGlobalDomainsReconfigureTrustCall {
3861	c := &ProjectsLocationsGlobalDomainsReconfigureTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3862	c.name = name
3863	c.reconfiguretrustrequest = reconfiguretrustrequest
3864	return c
3865}
3866
3867// Fields allows partial responses to be retrieved. See
3868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3869// for more information.
3870func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsReconfigureTrustCall {
3871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3872	return c
3873}
3874
3875// Context sets the context to be used in this call's Do method. Any
3876// pending HTTP request will be aborted if the provided context is
3877// canceled.
3878func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsReconfigureTrustCall {
3879	c.ctx_ = ctx
3880	return c
3881}
3882
3883// Header returns an http.Header that can be modified by the caller to
3884// add HTTP headers to the request.
3885func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Header() http.Header {
3886	if c.header_ == nil {
3887		c.header_ = make(http.Header)
3888	}
3889	return c.header_
3890}
3891
3892func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) doRequest(alt string) (*http.Response, error) {
3893	reqHeaders := make(http.Header)
3894	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
3895	for k, v := range c.header_ {
3896		reqHeaders[k] = v
3897	}
3898	reqHeaders.Set("User-Agent", c.s.userAgent())
3899	var body io.Reader = nil
3900	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reconfiguretrustrequest)
3901	if err != nil {
3902		return nil, err
3903	}
3904	reqHeaders.Set("Content-Type", "application/json")
3905	c.urlParams_.Set("alt", alt)
3906	c.urlParams_.Set("prettyPrint", "false")
3907	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reconfigureTrust")
3908	urls += "?" + c.urlParams_.Encode()
3909	req, err := http.NewRequest("POST", urls, body)
3910	if err != nil {
3911		return nil, err
3912	}
3913	req.Header = reqHeaders
3914	googleapi.Expand(req.URL, map[string]string{
3915		"name": c.name,
3916	})
3917	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3918}
3919
3920// Do executes the "managedidentities.projects.locations.global.domains.reconfigureTrust" call.
3921// Exactly one of *Operation or error will be non-nil. Any non-2xx
3922// status code is an error. Response headers are in either
3923// *Operation.ServerResponse.Header or (if a response was returned at
3924// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3925// to check whether the returned error was because
3926// http.StatusNotModified was returned.
3927func (c *ProjectsLocationsGlobalDomainsReconfigureTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3928	gensupport.SetOptions(c.urlParams_, opts...)
3929	res, err := c.doRequest("json")
3930	if res != nil && res.StatusCode == http.StatusNotModified {
3931		if res.Body != nil {
3932			res.Body.Close()
3933		}
3934		return nil, &googleapi.Error{
3935			Code:   res.StatusCode,
3936			Header: res.Header,
3937		}
3938	}
3939	if err != nil {
3940		return nil, err
3941	}
3942	defer googleapi.CloseBody(res)
3943	if err := googleapi.CheckResponse(res); err != nil {
3944		return nil, err
3945	}
3946	ret := &Operation{
3947		ServerResponse: googleapi.ServerResponse{
3948			Header:         res.Header,
3949			HTTPStatusCode: res.StatusCode,
3950		},
3951	}
3952	target := &ret
3953	if err := gensupport.DecodeResponse(target, res); err != nil {
3954		return nil, err
3955	}
3956	return ret, nil
3957	// {
3958	//   "description": "Updates the DNS conditional forwarder.",
3959	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:reconfigureTrust",
3960	//   "httpMethod": "POST",
3961	//   "id": "managedidentities.projects.locations.global.domains.reconfigureTrust",
3962	//   "parameterOrder": [
3963	//     "name"
3964	//   ],
3965	//   "parameters": {
3966	//     "name": {
3967	//       "description": "Required. The resource domain name, project name and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
3968	//       "location": "path",
3969	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
3970	//       "required": true,
3971	//       "type": "string"
3972	//     }
3973	//   },
3974	//   "path": "v1/{+name}:reconfigureTrust",
3975	//   "request": {
3976	//     "$ref": "ReconfigureTrustRequest"
3977	//   },
3978	//   "response": {
3979	//     "$ref": "Operation"
3980	//   },
3981	//   "scopes": [
3982	//     "https://www.googleapis.com/auth/cloud-platform"
3983	//   ]
3984	// }
3985
3986}
3987
3988// method id "managedidentities.projects.locations.global.domains.resetAdminPassword":
3989
3990type ProjectsLocationsGlobalDomainsResetAdminPasswordCall struct {
3991	s                         *Service
3992	name                      string
3993	resetadminpasswordrequest *ResetAdminPasswordRequest
3994	urlParams_                gensupport.URLParams
3995	ctx_                      context.Context
3996	header_                   http.Header
3997}
3998
3999// ResetAdminPassword: Resets a domain's administrator password.
4000//
4001// - name: The domain resource name using the form:
4002//   `projects/{project_id}/locations/global/domains/{domain_name}`.
4003func (r *ProjectsLocationsGlobalDomainsService) ResetAdminPassword(name string, resetadminpasswordrequest *ResetAdminPasswordRequest) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall {
4004	c := &ProjectsLocationsGlobalDomainsResetAdminPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4005	c.name = name
4006	c.resetadminpasswordrequest = resetadminpasswordrequest
4007	return c
4008}
4009
4010// Fields allows partial responses to be retrieved. See
4011// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4012// for more information.
4013func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall {
4014	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4015	return c
4016}
4017
4018// Context sets the context to be used in this call's Do method. Any
4019// pending HTTP request will be aborted if the provided context is
4020// canceled.
4021func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsResetAdminPasswordCall {
4022	c.ctx_ = ctx
4023	return c
4024}
4025
4026// Header returns an http.Header that can be modified by the caller to
4027// add HTTP headers to the request.
4028func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Header() http.Header {
4029	if c.header_ == nil {
4030		c.header_ = make(http.Header)
4031	}
4032	return c.header_
4033}
4034
4035func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) doRequest(alt string) (*http.Response, error) {
4036	reqHeaders := make(http.Header)
4037	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4038	for k, v := range c.header_ {
4039		reqHeaders[k] = v
4040	}
4041	reqHeaders.Set("User-Agent", c.s.userAgent())
4042	var body io.Reader = nil
4043	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetadminpasswordrequest)
4044	if err != nil {
4045		return nil, err
4046	}
4047	reqHeaders.Set("Content-Type", "application/json")
4048	c.urlParams_.Set("alt", alt)
4049	c.urlParams_.Set("prettyPrint", "false")
4050	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resetAdminPassword")
4051	urls += "?" + c.urlParams_.Encode()
4052	req, err := http.NewRequest("POST", urls, body)
4053	if err != nil {
4054		return nil, err
4055	}
4056	req.Header = reqHeaders
4057	googleapi.Expand(req.URL, map[string]string{
4058		"name": c.name,
4059	})
4060	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4061}
4062
4063// Do executes the "managedidentities.projects.locations.global.domains.resetAdminPassword" call.
4064// Exactly one of *ResetAdminPasswordResponse or error will be non-nil.
4065// Any non-2xx status code is an error. Response headers are in either
4066// *ResetAdminPasswordResponse.ServerResponse.Header or (if a response
4067// was returned at all) in error.(*googleapi.Error).Header. Use
4068// googleapi.IsNotModified to check whether the returned error was
4069// because http.StatusNotModified was returned.
4070func (c *ProjectsLocationsGlobalDomainsResetAdminPasswordCall) Do(opts ...googleapi.CallOption) (*ResetAdminPasswordResponse, error) {
4071	gensupport.SetOptions(c.urlParams_, opts...)
4072	res, err := c.doRequest("json")
4073	if res != nil && res.StatusCode == http.StatusNotModified {
4074		if res.Body != nil {
4075			res.Body.Close()
4076		}
4077		return nil, &googleapi.Error{
4078			Code:   res.StatusCode,
4079			Header: res.Header,
4080		}
4081	}
4082	if err != nil {
4083		return nil, err
4084	}
4085	defer googleapi.CloseBody(res)
4086	if err := googleapi.CheckResponse(res); err != nil {
4087		return nil, err
4088	}
4089	ret := &ResetAdminPasswordResponse{
4090		ServerResponse: googleapi.ServerResponse{
4091			Header:         res.Header,
4092			HTTPStatusCode: res.StatusCode,
4093		},
4094	}
4095	target := &ret
4096	if err := gensupport.DecodeResponse(target, res); err != nil {
4097		return nil, err
4098	}
4099	return ret, nil
4100	// {
4101	//   "description": "Resets a domain's administrator password.",
4102	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:resetAdminPassword",
4103	//   "httpMethod": "POST",
4104	//   "id": "managedidentities.projects.locations.global.domains.resetAdminPassword",
4105	//   "parameterOrder": [
4106	//     "name"
4107	//   ],
4108	//   "parameters": {
4109	//     "name": {
4110	//       "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
4111	//       "location": "path",
4112	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
4113	//       "required": true,
4114	//       "type": "string"
4115	//     }
4116	//   },
4117	//   "path": "v1/{+name}:resetAdminPassword",
4118	//   "request": {
4119	//     "$ref": "ResetAdminPasswordRequest"
4120	//   },
4121	//   "response": {
4122	//     "$ref": "ResetAdminPasswordResponse"
4123	//   },
4124	//   "scopes": [
4125	//     "https://www.googleapis.com/auth/cloud-platform"
4126	//   ]
4127	// }
4128
4129}
4130
4131// method id "managedidentities.projects.locations.global.domains.setIamPolicy":
4132
4133type ProjectsLocationsGlobalDomainsSetIamPolicyCall struct {
4134	s                   *Service
4135	resource            string
4136	setiampolicyrequest *SetIamPolicyRequest
4137	urlParams_          gensupport.URLParams
4138	ctx_                context.Context
4139	header_             http.Header
4140}
4141
4142// SetIamPolicy: Sets the access control policy on the specified
4143// resource. Replaces any existing policy. Can return `NOT_FOUND`,
4144// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
4145//
4146// - resource: REQUIRED: The resource for which the policy is being
4147//   specified. See the operation documentation for the appropriate
4148//   value for this field.
4149func (r *ProjectsLocationsGlobalDomainsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalDomainsSetIamPolicyCall {
4150	c := &ProjectsLocationsGlobalDomainsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4151	c.resource = resource
4152	c.setiampolicyrequest = setiampolicyrequest
4153	return c
4154}
4155
4156// Fields allows partial responses to be retrieved. See
4157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4158// for more information.
4159func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsSetIamPolicyCall {
4160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4161	return c
4162}
4163
4164// Context sets the context to be used in this call's Do method. Any
4165// pending HTTP request will be aborted if the provided context is
4166// canceled.
4167func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsSetIamPolicyCall {
4168	c.ctx_ = ctx
4169	return c
4170}
4171
4172// Header returns an http.Header that can be modified by the caller to
4173// add HTTP headers to the request.
4174func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Header() http.Header {
4175	if c.header_ == nil {
4176		c.header_ = make(http.Header)
4177	}
4178	return c.header_
4179}
4180
4181func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4182	reqHeaders := make(http.Header)
4183	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4184	for k, v := range c.header_ {
4185		reqHeaders[k] = v
4186	}
4187	reqHeaders.Set("User-Agent", c.s.userAgent())
4188	var body io.Reader = nil
4189	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4190	if err != nil {
4191		return nil, err
4192	}
4193	reqHeaders.Set("Content-Type", "application/json")
4194	c.urlParams_.Set("alt", alt)
4195	c.urlParams_.Set("prettyPrint", "false")
4196	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
4197	urls += "?" + c.urlParams_.Encode()
4198	req, err := http.NewRequest("POST", urls, body)
4199	if err != nil {
4200		return nil, err
4201	}
4202	req.Header = reqHeaders
4203	googleapi.Expand(req.URL, map[string]string{
4204		"resource": c.resource,
4205	})
4206	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4207}
4208
4209// Do executes the "managedidentities.projects.locations.global.domains.setIamPolicy" call.
4210// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4211// code is an error. Response headers are in either
4212// *Policy.ServerResponse.Header or (if a response was returned at all)
4213// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4214// check whether the returned error was because http.StatusNotModified
4215// was returned.
4216func (c *ProjectsLocationsGlobalDomainsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4217	gensupport.SetOptions(c.urlParams_, opts...)
4218	res, err := c.doRequest("json")
4219	if res != nil && res.StatusCode == http.StatusNotModified {
4220		if res.Body != nil {
4221			res.Body.Close()
4222		}
4223		return nil, &googleapi.Error{
4224			Code:   res.StatusCode,
4225			Header: res.Header,
4226		}
4227	}
4228	if err != nil {
4229		return nil, err
4230	}
4231	defer googleapi.CloseBody(res)
4232	if err := googleapi.CheckResponse(res); err != nil {
4233		return nil, err
4234	}
4235	ret := &Policy{
4236		ServerResponse: googleapi.ServerResponse{
4237			Header:         res.Header,
4238			HTTPStatusCode: res.StatusCode,
4239		},
4240	}
4241	target := &ret
4242	if err := gensupport.DecodeResponse(target, res); err != nil {
4243		return nil, err
4244	}
4245	return ret, nil
4246	// {
4247	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.",
4248	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:setIamPolicy",
4249	//   "httpMethod": "POST",
4250	//   "id": "managedidentities.projects.locations.global.domains.setIamPolicy",
4251	//   "parameterOrder": [
4252	//     "resource"
4253	//   ],
4254	//   "parameters": {
4255	//     "resource": {
4256	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
4257	//       "location": "path",
4258	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
4259	//       "required": true,
4260	//       "type": "string"
4261	//     }
4262	//   },
4263	//   "path": "v1/{+resource}:setIamPolicy",
4264	//   "request": {
4265	//     "$ref": "SetIamPolicyRequest"
4266	//   },
4267	//   "response": {
4268	//     "$ref": "Policy"
4269	//   },
4270	//   "scopes": [
4271	//     "https://www.googleapis.com/auth/cloud-platform"
4272	//   ]
4273	// }
4274
4275}
4276
4277// method id "managedidentities.projects.locations.global.domains.testIamPermissions":
4278
4279type ProjectsLocationsGlobalDomainsTestIamPermissionsCall struct {
4280	s                         *Service
4281	resource                  string
4282	testiampermissionsrequest *TestIamPermissionsRequest
4283	urlParams_                gensupport.URLParams
4284	ctx_                      context.Context
4285	header_                   http.Header
4286}
4287
4288// TestIamPermissions: Returns permissions that a caller has on the
4289// specified resource. If the resource does not exist, this will return
4290// an empty set of permissions, not a `NOT_FOUND` error. Note: This
4291// operation is designed to be used for building permission-aware UIs
4292// and command-line tools, not for authorization checking. This
4293// operation may "fail open" without warning.
4294//
4295// - resource: REQUIRED: The resource for which the policy detail is
4296//   being requested. See the operation documentation for the
4297//   appropriate value for this field.
4298func (r *ProjectsLocationsGlobalDomainsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall {
4299	c := &ProjectsLocationsGlobalDomainsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4300	c.resource = resource
4301	c.testiampermissionsrequest = testiampermissionsrequest
4302	return c
4303}
4304
4305// Fields allows partial responses to be retrieved. See
4306// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4307// for more information.
4308func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall {
4309	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4310	return c
4311}
4312
4313// Context sets the context to be used in this call's Do method. Any
4314// pending HTTP request will be aborted if the provided context is
4315// canceled.
4316func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsTestIamPermissionsCall {
4317	c.ctx_ = ctx
4318	return c
4319}
4320
4321// Header returns an http.Header that can be modified by the caller to
4322// add HTTP headers to the request.
4323func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Header() http.Header {
4324	if c.header_ == nil {
4325		c.header_ = make(http.Header)
4326	}
4327	return c.header_
4328}
4329
4330func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4331	reqHeaders := make(http.Header)
4332	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4333	for k, v := range c.header_ {
4334		reqHeaders[k] = v
4335	}
4336	reqHeaders.Set("User-Agent", c.s.userAgent())
4337	var body io.Reader = nil
4338	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4339	if err != nil {
4340		return nil, err
4341	}
4342	reqHeaders.Set("Content-Type", "application/json")
4343	c.urlParams_.Set("alt", alt)
4344	c.urlParams_.Set("prettyPrint", "false")
4345	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
4346	urls += "?" + c.urlParams_.Encode()
4347	req, err := http.NewRequest("POST", urls, body)
4348	if err != nil {
4349		return nil, err
4350	}
4351	req.Header = reqHeaders
4352	googleapi.Expand(req.URL, map[string]string{
4353		"resource": c.resource,
4354	})
4355	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4356}
4357
4358// Do executes the "managedidentities.projects.locations.global.domains.testIamPermissions" call.
4359// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
4360// Any non-2xx status code is an error. Response headers are in either
4361// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
4362// was returned at all) in error.(*googleapi.Error).Header. Use
4363// googleapi.IsNotModified to check whether the returned error was
4364// because http.StatusNotModified was returned.
4365func (c *ProjectsLocationsGlobalDomainsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4366	gensupport.SetOptions(c.urlParams_, opts...)
4367	res, err := c.doRequest("json")
4368	if res != nil && res.StatusCode == http.StatusNotModified {
4369		if res.Body != nil {
4370			res.Body.Close()
4371		}
4372		return nil, &googleapi.Error{
4373			Code:   res.StatusCode,
4374			Header: res.Header,
4375		}
4376	}
4377	if err != nil {
4378		return nil, err
4379	}
4380	defer googleapi.CloseBody(res)
4381	if err := googleapi.CheckResponse(res); err != nil {
4382		return nil, err
4383	}
4384	ret := &TestIamPermissionsResponse{
4385		ServerResponse: googleapi.ServerResponse{
4386			Header:         res.Header,
4387			HTTPStatusCode: res.StatusCode,
4388		},
4389	}
4390	target := &ret
4391	if err := gensupport.DecodeResponse(target, res); err != nil {
4392		return nil, err
4393	}
4394	return ret, nil
4395	// {
4396	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
4397	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:testIamPermissions",
4398	//   "httpMethod": "POST",
4399	//   "id": "managedidentities.projects.locations.global.domains.testIamPermissions",
4400	//   "parameterOrder": [
4401	//     "resource"
4402	//   ],
4403	//   "parameters": {
4404	//     "resource": {
4405	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
4406	//       "location": "path",
4407	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
4408	//       "required": true,
4409	//       "type": "string"
4410	//     }
4411	//   },
4412	//   "path": "v1/{+resource}:testIamPermissions",
4413	//   "request": {
4414	//     "$ref": "TestIamPermissionsRequest"
4415	//   },
4416	//   "response": {
4417	//     "$ref": "TestIamPermissionsResponse"
4418	//   },
4419	//   "scopes": [
4420	//     "https://www.googleapis.com/auth/cloud-platform"
4421	//   ]
4422	// }
4423
4424}
4425
4426// method id "managedidentities.projects.locations.global.domains.validateTrust":
4427
4428type ProjectsLocationsGlobalDomainsValidateTrustCall struct {
4429	s                    *Service
4430	name                 string
4431	validatetrustrequest *ValidateTrustRequest
4432	urlParams_           gensupport.URLParams
4433	ctx_                 context.Context
4434	header_              http.Header
4435}
4436
4437// ValidateTrust: Validates a trust state, that the target domain is
4438// reachable, and that the target domain is able to accept incoming
4439// trust requests.
4440//
4441// - name: The resource domain name, project name, and location using
4442//   the form:
4443//   `projects/{project_id}/locations/global/domains/{domain_name}`.
4444func (r *ProjectsLocationsGlobalDomainsService) ValidateTrust(name string, validatetrustrequest *ValidateTrustRequest) *ProjectsLocationsGlobalDomainsValidateTrustCall {
4445	c := &ProjectsLocationsGlobalDomainsValidateTrustCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4446	c.name = name
4447	c.validatetrustrequest = validatetrustrequest
4448	return c
4449}
4450
4451// Fields allows partial responses to be retrieved. See
4452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4453// for more information.
4454func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsValidateTrustCall {
4455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4456	return c
4457}
4458
4459// Context sets the context to be used in this call's Do method. Any
4460// pending HTTP request will be aborted if the provided context is
4461// canceled.
4462func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsValidateTrustCall {
4463	c.ctx_ = ctx
4464	return c
4465}
4466
4467// Header returns an http.Header that can be modified by the caller to
4468// add HTTP headers to the request.
4469func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Header() http.Header {
4470	if c.header_ == nil {
4471		c.header_ = make(http.Header)
4472	}
4473	return c.header_
4474}
4475
4476func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) doRequest(alt string) (*http.Response, error) {
4477	reqHeaders := make(http.Header)
4478	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4479	for k, v := range c.header_ {
4480		reqHeaders[k] = v
4481	}
4482	reqHeaders.Set("User-Agent", c.s.userAgent())
4483	var body io.Reader = nil
4484	body, err := googleapi.WithoutDataWrapper.JSONReader(c.validatetrustrequest)
4485	if err != nil {
4486		return nil, err
4487	}
4488	reqHeaders.Set("Content-Type", "application/json")
4489	c.urlParams_.Set("alt", alt)
4490	c.urlParams_.Set("prettyPrint", "false")
4491	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:validateTrust")
4492	urls += "?" + c.urlParams_.Encode()
4493	req, err := http.NewRequest("POST", urls, body)
4494	if err != nil {
4495		return nil, err
4496	}
4497	req.Header = reqHeaders
4498	googleapi.Expand(req.URL, map[string]string{
4499		"name": c.name,
4500	})
4501	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4502}
4503
4504// Do executes the "managedidentities.projects.locations.global.domains.validateTrust" call.
4505// Exactly one of *Operation or error will be non-nil. Any non-2xx
4506// status code is an error. Response headers are in either
4507// *Operation.ServerResponse.Header or (if a response was returned at
4508// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4509// to check whether the returned error was because
4510// http.StatusNotModified was returned.
4511func (c *ProjectsLocationsGlobalDomainsValidateTrustCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4512	gensupport.SetOptions(c.urlParams_, opts...)
4513	res, err := c.doRequest("json")
4514	if res != nil && res.StatusCode == http.StatusNotModified {
4515		if res.Body != nil {
4516			res.Body.Close()
4517		}
4518		return nil, &googleapi.Error{
4519			Code:   res.StatusCode,
4520			Header: res.Header,
4521		}
4522	}
4523	if err != nil {
4524		return nil, err
4525	}
4526	defer googleapi.CloseBody(res)
4527	if err := googleapi.CheckResponse(res); err != nil {
4528		return nil, err
4529	}
4530	ret := &Operation{
4531		ServerResponse: googleapi.ServerResponse{
4532			Header:         res.Header,
4533			HTTPStatusCode: res.StatusCode,
4534		},
4535	}
4536	target := &ret
4537	if err := gensupport.DecodeResponse(target, res); err != nil {
4538		return nil, err
4539	}
4540	return ret, nil
4541	// {
4542	//   "description": "Validates a trust state, that the target domain is reachable, and that the target domain is able to accept incoming trust requests.",
4543	//   "flatPath": "v1/projects/{projectsId}/locations/global/domains/{domainsId}:validateTrust",
4544	//   "httpMethod": "POST",
4545	//   "id": "managedidentities.projects.locations.global.domains.validateTrust",
4546	//   "parameterOrder": [
4547	//     "name"
4548	//   ],
4549	//   "parameters": {
4550	//     "name": {
4551	//       "description": "Required. The resource domain name, project name, and location using the form: `projects/{project_id}/locations/global/domains/{domain_name}`",
4552	//       "location": "path",
4553	//       "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$",
4554	//       "required": true,
4555	//       "type": "string"
4556	//     }
4557	//   },
4558	//   "path": "v1/{+name}:validateTrust",
4559	//   "request": {
4560	//     "$ref": "ValidateTrustRequest"
4561	//   },
4562	//   "response": {
4563	//     "$ref": "Operation"
4564	//   },
4565	//   "scopes": [
4566	//     "https://www.googleapis.com/auth/cloud-platform"
4567	//   ]
4568	// }
4569
4570}
4571
4572// method id "managedidentities.projects.locations.global.operations.cancel":
4573
4574type ProjectsLocationsGlobalOperationsCancelCall struct {
4575	s                      *Service
4576	name                   string
4577	canceloperationrequest *CancelOperationRequest
4578	urlParams_             gensupport.URLParams
4579	ctx_                   context.Context
4580	header_                http.Header
4581}
4582
4583// Cancel: Starts asynchronous cancellation on a long-running operation.
4584// The server makes a best effort to cancel the operation, but success
4585// is not guaranteed. If the server doesn't support this method, it
4586// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
4587// Operations.GetOperation or other methods to check whether the
4588// cancellation succeeded or whether the operation completed despite
4589// cancellation. On successful cancellation, the operation is not
4590// deleted; instead, it becomes an operation with an Operation.error
4591// value with a google.rpc.Status.code of 1, corresponding to
4592// `Code.CANCELLED`.
4593//
4594// - name: The name of the operation resource to be cancelled.
4595func (r *ProjectsLocationsGlobalOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsGlobalOperationsCancelCall {
4596	c := &ProjectsLocationsGlobalOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4597	c.name = name
4598	c.canceloperationrequest = canceloperationrequest
4599	return c
4600}
4601
4602// Fields allows partial responses to be retrieved. See
4603// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4604// for more information.
4605func (c *ProjectsLocationsGlobalOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsCancelCall {
4606	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4607	return c
4608}
4609
4610// Context sets the context to be used in this call's Do method. Any
4611// pending HTTP request will be aborted if the provided context is
4612// canceled.
4613func (c *ProjectsLocationsGlobalOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsCancelCall {
4614	c.ctx_ = ctx
4615	return c
4616}
4617
4618// Header returns an http.Header that can be modified by the caller to
4619// add HTTP headers to the request.
4620func (c *ProjectsLocationsGlobalOperationsCancelCall) Header() http.Header {
4621	if c.header_ == nil {
4622		c.header_ = make(http.Header)
4623	}
4624	return c.header_
4625}
4626
4627func (c *ProjectsLocationsGlobalOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4628	reqHeaders := make(http.Header)
4629	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4630	for k, v := range c.header_ {
4631		reqHeaders[k] = v
4632	}
4633	reqHeaders.Set("User-Agent", c.s.userAgent())
4634	var body io.Reader = nil
4635	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4636	if err != nil {
4637		return nil, err
4638	}
4639	reqHeaders.Set("Content-Type", "application/json")
4640	c.urlParams_.Set("alt", alt)
4641	c.urlParams_.Set("prettyPrint", "false")
4642	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4643	urls += "?" + c.urlParams_.Encode()
4644	req, err := http.NewRequest("POST", urls, body)
4645	if err != nil {
4646		return nil, err
4647	}
4648	req.Header = reqHeaders
4649	googleapi.Expand(req.URL, map[string]string{
4650		"name": c.name,
4651	})
4652	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4653}
4654
4655// Do executes the "managedidentities.projects.locations.global.operations.cancel" call.
4656// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4657// code is an error. Response headers are in either
4658// *Empty.ServerResponse.Header or (if a response was returned at all)
4659// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4660// check whether the returned error was because http.StatusNotModified
4661// was returned.
4662func (c *ProjectsLocationsGlobalOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4663	gensupport.SetOptions(c.urlParams_, opts...)
4664	res, err := c.doRequest("json")
4665	if res != nil && res.StatusCode == http.StatusNotModified {
4666		if res.Body != nil {
4667			res.Body.Close()
4668		}
4669		return nil, &googleapi.Error{
4670			Code:   res.StatusCode,
4671			Header: res.Header,
4672		}
4673	}
4674	if err != nil {
4675		return nil, err
4676	}
4677	defer googleapi.CloseBody(res)
4678	if err := googleapi.CheckResponse(res); err != nil {
4679		return nil, err
4680	}
4681	ret := &Empty{
4682		ServerResponse: googleapi.ServerResponse{
4683			Header:         res.Header,
4684			HTTPStatusCode: res.StatusCode,
4685		},
4686	}
4687	target := &ret
4688	if err := gensupport.DecodeResponse(target, res); err != nil {
4689		return nil, err
4690	}
4691	return ret, nil
4692	// {
4693	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
4694	//   "flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel",
4695	//   "httpMethod": "POST",
4696	//   "id": "managedidentities.projects.locations.global.operations.cancel",
4697	//   "parameterOrder": [
4698	//     "name"
4699	//   ],
4700	//   "parameters": {
4701	//     "name": {
4702	//       "description": "The name of the operation resource to be cancelled.",
4703	//       "location": "path",
4704	//       "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$",
4705	//       "required": true,
4706	//       "type": "string"
4707	//     }
4708	//   },
4709	//   "path": "v1/{+name}:cancel",
4710	//   "request": {
4711	//     "$ref": "CancelOperationRequest"
4712	//   },
4713	//   "response": {
4714	//     "$ref": "Empty"
4715	//   },
4716	//   "scopes": [
4717	//     "https://www.googleapis.com/auth/cloud-platform"
4718	//   ]
4719	// }
4720
4721}
4722
4723// method id "managedidentities.projects.locations.global.operations.delete":
4724
4725type ProjectsLocationsGlobalOperationsDeleteCall struct {
4726	s          *Service
4727	name       string
4728	urlParams_ gensupport.URLParams
4729	ctx_       context.Context
4730	header_    http.Header
4731}
4732
4733// Delete: Deletes a long-running operation. This method indicates that
4734// the client is no longer interested in the operation result. It does
4735// not cancel the operation. If the server doesn't support this method,
4736// it returns `google.rpc.Code.UNIMPLEMENTED`.
4737//
4738// - name: The name of the operation resource to be deleted.
4739func (r *ProjectsLocationsGlobalOperationsService) Delete(name string) *ProjectsLocationsGlobalOperationsDeleteCall {
4740	c := &ProjectsLocationsGlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4741	c.name = name
4742	return c
4743}
4744
4745// Fields allows partial responses to be retrieved. See
4746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4747// for more information.
4748func (c *ProjectsLocationsGlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsDeleteCall {
4749	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4750	return c
4751}
4752
4753// Context sets the context to be used in this call's Do method. Any
4754// pending HTTP request will be aborted if the provided context is
4755// canceled.
4756func (c *ProjectsLocationsGlobalOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsDeleteCall {
4757	c.ctx_ = ctx
4758	return c
4759}
4760
4761// Header returns an http.Header that can be modified by the caller to
4762// add HTTP headers to the request.
4763func (c *ProjectsLocationsGlobalOperationsDeleteCall) Header() http.Header {
4764	if c.header_ == nil {
4765		c.header_ = make(http.Header)
4766	}
4767	return c.header_
4768}
4769
4770func (c *ProjectsLocationsGlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4771	reqHeaders := make(http.Header)
4772	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4773	for k, v := range c.header_ {
4774		reqHeaders[k] = v
4775	}
4776	reqHeaders.Set("User-Agent", c.s.userAgent())
4777	var body io.Reader = nil
4778	c.urlParams_.Set("alt", alt)
4779	c.urlParams_.Set("prettyPrint", "false")
4780	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4781	urls += "?" + c.urlParams_.Encode()
4782	req, err := http.NewRequest("DELETE", urls, body)
4783	if err != nil {
4784		return nil, err
4785	}
4786	req.Header = reqHeaders
4787	googleapi.Expand(req.URL, map[string]string{
4788		"name": c.name,
4789	})
4790	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4791}
4792
4793// Do executes the "managedidentities.projects.locations.global.operations.delete" call.
4794// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4795// code is an error. Response headers are in either
4796// *Empty.ServerResponse.Header or (if a response was returned at all)
4797// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4798// check whether the returned error was because http.StatusNotModified
4799// was returned.
4800func (c *ProjectsLocationsGlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4801	gensupport.SetOptions(c.urlParams_, opts...)
4802	res, err := c.doRequest("json")
4803	if res != nil && res.StatusCode == http.StatusNotModified {
4804		if res.Body != nil {
4805			res.Body.Close()
4806		}
4807		return nil, &googleapi.Error{
4808			Code:   res.StatusCode,
4809			Header: res.Header,
4810		}
4811	}
4812	if err != nil {
4813		return nil, err
4814	}
4815	defer googleapi.CloseBody(res)
4816	if err := googleapi.CheckResponse(res); err != nil {
4817		return nil, err
4818	}
4819	ret := &Empty{
4820		ServerResponse: googleapi.ServerResponse{
4821			Header:         res.Header,
4822			HTTPStatusCode: res.StatusCode,
4823		},
4824	}
4825	target := &ret
4826	if err := gensupport.DecodeResponse(target, res); err != nil {
4827		return nil, err
4828	}
4829	return ret, nil
4830	// {
4831	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
4832	//   "flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}",
4833	//   "httpMethod": "DELETE",
4834	//   "id": "managedidentities.projects.locations.global.operations.delete",
4835	//   "parameterOrder": [
4836	//     "name"
4837	//   ],
4838	//   "parameters": {
4839	//     "name": {
4840	//       "description": "The name of the operation resource to be deleted.",
4841	//       "location": "path",
4842	//       "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$",
4843	//       "required": true,
4844	//       "type": "string"
4845	//     }
4846	//   },
4847	//   "path": "v1/{+name}",
4848	//   "response": {
4849	//     "$ref": "Empty"
4850	//   },
4851	//   "scopes": [
4852	//     "https://www.googleapis.com/auth/cloud-platform"
4853	//   ]
4854	// }
4855
4856}
4857
4858// method id "managedidentities.projects.locations.global.operations.get":
4859
4860type ProjectsLocationsGlobalOperationsGetCall struct {
4861	s            *Service
4862	name         string
4863	urlParams_   gensupport.URLParams
4864	ifNoneMatch_ string
4865	ctx_         context.Context
4866	header_      http.Header
4867}
4868
4869// Get: Gets the latest state of a long-running operation. Clients can
4870// use this method to poll the operation result at intervals as
4871// recommended by the API service.
4872//
4873// - name: The name of the operation resource.
4874func (r *ProjectsLocationsGlobalOperationsService) Get(name string) *ProjectsLocationsGlobalOperationsGetCall {
4875	c := &ProjectsLocationsGlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4876	c.name = name
4877	return c
4878}
4879
4880// Fields allows partial responses to be retrieved. See
4881// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4882// for more information.
4883func (c *ProjectsLocationsGlobalOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsGetCall {
4884	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4885	return c
4886}
4887
4888// IfNoneMatch sets the optional parameter which makes the operation
4889// fail if the object's ETag matches the given value. This is useful for
4890// getting updates only after the object has changed since the last
4891// request. Use googleapi.IsNotModified to check whether the response
4892// error from Do is the result of In-None-Match.
4893func (c *ProjectsLocationsGlobalOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsGetCall {
4894	c.ifNoneMatch_ = entityTag
4895	return c
4896}
4897
4898// Context sets the context to be used in this call's Do method. Any
4899// pending HTTP request will be aborted if the provided context is
4900// canceled.
4901func (c *ProjectsLocationsGlobalOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsGetCall {
4902	c.ctx_ = ctx
4903	return c
4904}
4905
4906// Header returns an http.Header that can be modified by the caller to
4907// add HTTP headers to the request.
4908func (c *ProjectsLocationsGlobalOperationsGetCall) Header() http.Header {
4909	if c.header_ == nil {
4910		c.header_ = make(http.Header)
4911	}
4912	return c.header_
4913}
4914
4915func (c *ProjectsLocationsGlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4916	reqHeaders := make(http.Header)
4917	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
4918	for k, v := range c.header_ {
4919		reqHeaders[k] = v
4920	}
4921	reqHeaders.Set("User-Agent", c.s.userAgent())
4922	if c.ifNoneMatch_ != "" {
4923		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4924	}
4925	var body io.Reader = nil
4926	c.urlParams_.Set("alt", alt)
4927	c.urlParams_.Set("prettyPrint", "false")
4928	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4929	urls += "?" + c.urlParams_.Encode()
4930	req, err := http.NewRequest("GET", urls, body)
4931	if err != nil {
4932		return nil, err
4933	}
4934	req.Header = reqHeaders
4935	googleapi.Expand(req.URL, map[string]string{
4936		"name": c.name,
4937	})
4938	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4939}
4940
4941// Do executes the "managedidentities.projects.locations.global.operations.get" call.
4942// Exactly one of *Operation or error will be non-nil. Any non-2xx
4943// status code is an error. Response headers are in either
4944// *Operation.ServerResponse.Header or (if a response was returned at
4945// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4946// to check whether the returned error was because
4947// http.StatusNotModified was returned.
4948func (c *ProjectsLocationsGlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4949	gensupport.SetOptions(c.urlParams_, opts...)
4950	res, err := c.doRequest("json")
4951	if res != nil && res.StatusCode == http.StatusNotModified {
4952		if res.Body != nil {
4953			res.Body.Close()
4954		}
4955		return nil, &googleapi.Error{
4956			Code:   res.StatusCode,
4957			Header: res.Header,
4958		}
4959	}
4960	if err != nil {
4961		return nil, err
4962	}
4963	defer googleapi.CloseBody(res)
4964	if err := googleapi.CheckResponse(res); err != nil {
4965		return nil, err
4966	}
4967	ret := &Operation{
4968		ServerResponse: googleapi.ServerResponse{
4969			Header:         res.Header,
4970			HTTPStatusCode: res.StatusCode,
4971		},
4972	}
4973	target := &ret
4974	if err := gensupport.DecodeResponse(target, res); err != nil {
4975		return nil, err
4976	}
4977	return ret, nil
4978	// {
4979	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
4980	//   "flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}",
4981	//   "httpMethod": "GET",
4982	//   "id": "managedidentities.projects.locations.global.operations.get",
4983	//   "parameterOrder": [
4984	//     "name"
4985	//   ],
4986	//   "parameters": {
4987	//     "name": {
4988	//       "description": "The name of the operation resource.",
4989	//       "location": "path",
4990	//       "pattern": "^projects/[^/]+/locations/global/operations/[^/]+$",
4991	//       "required": true,
4992	//       "type": "string"
4993	//     }
4994	//   },
4995	//   "path": "v1/{+name}",
4996	//   "response": {
4997	//     "$ref": "Operation"
4998	//   },
4999	//   "scopes": [
5000	//     "https://www.googleapis.com/auth/cloud-platform"
5001	//   ]
5002	// }
5003
5004}
5005
5006// method id "managedidentities.projects.locations.global.operations.list":
5007
5008type ProjectsLocationsGlobalOperationsListCall struct {
5009	s            *Service
5010	name         string
5011	urlParams_   gensupport.URLParams
5012	ifNoneMatch_ string
5013	ctx_         context.Context
5014	header_      http.Header
5015}
5016
5017// List: Lists operations that match the specified filter in the
5018// request. If the server doesn't support this method, it returns
5019// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
5020// override the binding to use different resource name schemes, such as
5021// `users/*/operations`. To override the binding, API services can add a
5022// binding such as "/v1/{name=users/*}/operations" to their service
5023// configuration. For backwards compatibility, the default name includes
5024// the operations collection id, however overriding users must ensure
5025// the name binding is the parent resource, without the operations
5026// collection id.
5027//
5028// - name: The name of the operation's parent resource.
5029func (r *ProjectsLocationsGlobalOperationsService) List(name string) *ProjectsLocationsGlobalOperationsListCall {
5030	c := &ProjectsLocationsGlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5031	c.name = name
5032	return c
5033}
5034
5035// Filter sets the optional parameter "filter": The standard list
5036// filter.
5037func (c *ProjectsLocationsGlobalOperationsListCall) Filter(filter string) *ProjectsLocationsGlobalOperationsListCall {
5038	c.urlParams_.Set("filter", filter)
5039	return c
5040}
5041
5042// PageSize sets the optional parameter "pageSize": The standard list
5043// page size.
5044func (c *ProjectsLocationsGlobalOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalOperationsListCall {
5045	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5046	return c
5047}
5048
5049// PageToken sets the optional parameter "pageToken": The standard list
5050// page token.
5051func (c *ProjectsLocationsGlobalOperationsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalOperationsListCall {
5052	c.urlParams_.Set("pageToken", pageToken)
5053	return c
5054}
5055
5056// Fields allows partial responses to be retrieved. See
5057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5058// for more information.
5059func (c *ProjectsLocationsGlobalOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalOperationsListCall {
5060	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5061	return c
5062}
5063
5064// IfNoneMatch sets the optional parameter which makes the operation
5065// fail if the object's ETag matches the given value. This is useful for
5066// getting updates only after the object has changed since the last
5067// request. Use googleapi.IsNotModified to check whether the response
5068// error from Do is the result of In-None-Match.
5069func (c *ProjectsLocationsGlobalOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalOperationsListCall {
5070	c.ifNoneMatch_ = entityTag
5071	return c
5072}
5073
5074// Context sets the context to be used in this call's Do method. Any
5075// pending HTTP request will be aborted if the provided context is
5076// canceled.
5077func (c *ProjectsLocationsGlobalOperationsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalOperationsListCall {
5078	c.ctx_ = ctx
5079	return c
5080}
5081
5082// Header returns an http.Header that can be modified by the caller to
5083// add HTTP headers to the request.
5084func (c *ProjectsLocationsGlobalOperationsListCall) Header() http.Header {
5085	if c.header_ == nil {
5086		c.header_ = make(http.Header)
5087	}
5088	return c.header_
5089}
5090
5091func (c *ProjectsLocationsGlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
5092	reqHeaders := make(http.Header)
5093	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
5094	for k, v := range c.header_ {
5095		reqHeaders[k] = v
5096	}
5097	reqHeaders.Set("User-Agent", c.s.userAgent())
5098	if c.ifNoneMatch_ != "" {
5099		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5100	}
5101	var body io.Reader = nil
5102	c.urlParams_.Set("alt", alt)
5103	c.urlParams_.Set("prettyPrint", "false")
5104	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5105	urls += "?" + c.urlParams_.Encode()
5106	req, err := http.NewRequest("GET", urls, body)
5107	if err != nil {
5108		return nil, err
5109	}
5110	req.Header = reqHeaders
5111	googleapi.Expand(req.URL, map[string]string{
5112		"name": c.name,
5113	})
5114	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5115}
5116
5117// Do executes the "managedidentities.projects.locations.global.operations.list" call.
5118// Exactly one of *ListOperationsResponse or error will be non-nil. Any
5119// non-2xx status code is an error. Response headers are in either
5120// *ListOperationsResponse.ServerResponse.Header or (if a response was
5121// returned at all) in error.(*googleapi.Error).Header. Use
5122// googleapi.IsNotModified to check whether the returned error was
5123// because http.StatusNotModified was returned.
5124func (c *ProjectsLocationsGlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
5125	gensupport.SetOptions(c.urlParams_, opts...)
5126	res, err := c.doRequest("json")
5127	if res != nil && res.StatusCode == http.StatusNotModified {
5128		if res.Body != nil {
5129			res.Body.Close()
5130		}
5131		return nil, &googleapi.Error{
5132			Code:   res.StatusCode,
5133			Header: res.Header,
5134		}
5135	}
5136	if err != nil {
5137		return nil, err
5138	}
5139	defer googleapi.CloseBody(res)
5140	if err := googleapi.CheckResponse(res); err != nil {
5141		return nil, err
5142	}
5143	ret := &ListOperationsResponse{
5144		ServerResponse: googleapi.ServerResponse{
5145			Header:         res.Header,
5146			HTTPStatusCode: res.StatusCode,
5147		},
5148	}
5149	target := &ret
5150	if err := gensupport.DecodeResponse(target, res); err != nil {
5151		return nil, err
5152	}
5153	return ret, nil
5154	// {
5155	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
5156	//   "flatPath": "v1/projects/{projectsId}/locations/global/operations",
5157	//   "httpMethod": "GET",
5158	//   "id": "managedidentities.projects.locations.global.operations.list",
5159	//   "parameterOrder": [
5160	//     "name"
5161	//   ],
5162	//   "parameters": {
5163	//     "filter": {
5164	//       "description": "The standard list filter.",
5165	//       "location": "query",
5166	//       "type": "string"
5167	//     },
5168	//     "name": {
5169	//       "description": "The name of the operation's parent resource.",
5170	//       "location": "path",
5171	//       "pattern": "^projects/[^/]+/locations/global/operations$",
5172	//       "required": true,
5173	//       "type": "string"
5174	//     },
5175	//     "pageSize": {
5176	//       "description": "The standard list page size.",
5177	//       "format": "int32",
5178	//       "location": "query",
5179	//       "type": "integer"
5180	//     },
5181	//     "pageToken": {
5182	//       "description": "The standard list page token.",
5183	//       "location": "query",
5184	//       "type": "string"
5185	//     }
5186	//   },
5187	//   "path": "v1/{+name}",
5188	//   "response": {
5189	//     "$ref": "ListOperationsResponse"
5190	//   },
5191	//   "scopes": [
5192	//     "https://www.googleapis.com/auth/cloud-platform"
5193	//   ]
5194	// }
5195
5196}
5197
5198// Pages invokes f for each page of results.
5199// A non-nil error returned from f will halt the iteration.
5200// The provided context supersedes any context provided to the Context method.
5201func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
5202	c.ctx_ = ctx
5203	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5204	for {
5205		x, err := c.Do()
5206		if err != nil {
5207			return err
5208		}
5209		if err := f(x); err != nil {
5210			return err
5211		}
5212		if x.NextPageToken == "" {
5213			return nil
5214		}
5215		c.PageToken(x.NextPageToken)
5216	}
5217}
5218