1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package cloudresourcemanager provides access to the Cloud Resource Manager API.
8//
9// For product documentation, see: https://cloud.google.com/resource-manager
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/cloudresourcemanager/v1"
16//   ...
17//   ctx := context.Background()
18//   cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "cloudresourcemanager:v1"
79const apiName = "cloudresourcemanager"
80const apiVersion = "v1"
81const basePath = "https://cloudresourcemanager.googleapis.com/"
82const mtlsBasePath = "https://cloudresourcemanager.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// View and manage your data across Google Cloud Platform services
87	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
88
89	// View your data across Google Cloud Platform services
90	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
91)
92
93// NewService creates a new Service.
94func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
95	scopesOption := option.WithScopes(
96		"https://www.googleapis.com/auth/cloud-platform",
97		"https://www.googleapis.com/auth/cloud-platform.read-only",
98	)
99	// NOTE: prepend, so we don't override user-specified scopes.
100	opts = append([]option.ClientOption{scopesOption}, opts...)
101	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
102	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
103	client, endpoint, err := htransport.NewClient(ctx, opts...)
104	if err != nil {
105		return nil, err
106	}
107	s, err := New(client)
108	if err != nil {
109		return nil, err
110	}
111	if endpoint != "" {
112		s.BasePath = endpoint
113	}
114	return s, nil
115}
116
117// New creates a new Service. It uses the provided http.Client for requests.
118//
119// Deprecated: please use NewService instead.
120// To provide a custom HTTP client, use option.WithHTTPClient.
121// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
122func New(client *http.Client) (*Service, error) {
123	if client == nil {
124		return nil, errors.New("client is nil")
125	}
126	s := &Service{client: client, BasePath: basePath}
127	s.Folders = NewFoldersService(s)
128	s.Liens = NewLiensService(s)
129	s.Operations = NewOperationsService(s)
130	s.Organizations = NewOrganizationsService(s)
131	s.Projects = NewProjectsService(s)
132	return s, nil
133}
134
135type Service struct {
136	client    *http.Client
137	BasePath  string // API endpoint base URL
138	UserAgent string // optional additional User-Agent fragment
139
140	Folders *FoldersService
141
142	Liens *LiensService
143
144	Operations *OperationsService
145
146	Organizations *OrganizationsService
147
148	Projects *ProjectsService
149}
150
151func (s *Service) userAgent() string {
152	if s.UserAgent == "" {
153		return googleapi.UserAgent
154	}
155	return googleapi.UserAgent + " " + s.UserAgent
156}
157
158func NewFoldersService(s *Service) *FoldersService {
159	rs := &FoldersService{s: s}
160	return rs
161}
162
163type FoldersService struct {
164	s *Service
165}
166
167func NewLiensService(s *Service) *LiensService {
168	rs := &LiensService{s: s}
169	return rs
170}
171
172type LiensService struct {
173	s *Service
174}
175
176func NewOperationsService(s *Service) *OperationsService {
177	rs := &OperationsService{s: s}
178	return rs
179}
180
181type OperationsService struct {
182	s *Service
183}
184
185func NewOrganizationsService(s *Service) *OrganizationsService {
186	rs := &OrganizationsService{s: s}
187	return rs
188}
189
190type OrganizationsService struct {
191	s *Service
192}
193
194func NewProjectsService(s *Service) *ProjectsService {
195	rs := &ProjectsService{s: s}
196	return rs
197}
198
199type ProjectsService struct {
200	s *Service
201}
202
203// Ancestor: Identifying information for a single ancestor of a project.
204type Ancestor struct {
205	// ResourceId: Resource id of the ancestor.
206	ResourceId *ResourceId `json:"resourceId,omitempty"`
207
208	// ForceSendFields is a list of field names (e.g. "ResourceId") to
209	// unconditionally include in API requests. By default, fields with
210	// empty values are omitted from API requests. However, any non-pointer,
211	// non-interface field appearing in ForceSendFields will be sent to the
212	// server regardless of whether the field is empty or not. This may be
213	// used to include empty fields in Patch requests.
214	ForceSendFields []string `json:"-"`
215
216	// NullFields is a list of field names (e.g. "ResourceId") to include in
217	// API requests with the JSON null value. By default, fields with empty
218	// values are omitted from API requests. However, any field with an
219	// empty value appearing in NullFields will be sent to the server as
220	// null. It is an error if a field in this list has a non-empty value.
221	// This may be used to include null fields in Patch requests.
222	NullFields []string `json:"-"`
223}
224
225func (s *Ancestor) MarshalJSON() ([]byte, error) {
226	type NoMethod Ancestor
227	raw := NoMethod(*s)
228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
229}
230
231// AuditConfig: Specifies the audit configuration for a service. The
232// configuration determines which permission types are logged, and what
233// identities, if any, are exempted from logging. An AuditConfig must
234// have one or more AuditLogConfigs. If there are AuditConfigs for both
235// `allServices` and a specific service, the union of the two
236// AuditConfigs is used for that service: the log_types specified in
237// each AuditConfig are enabled, and the exempted_members in each
238// AuditLogConfig are exempted. Example Policy with multiple
239// AuditConfigs: { "audit_configs": [ { "service": "allServices",
240// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members":
241// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, {
242// "log_type": "ADMIN_READ" } ] }, { "service":
243// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type":
244// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [
245// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy
246// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts
247// jose@example.com from DATA_READ logging, and aliya@example.com from
248// DATA_WRITE logging.
249type AuditConfig struct {
250	// AuditLogConfigs: The configuration for logging of each type of
251	// permission.
252	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
253
254	// Service: Specifies a service that will be enabled for audit logging.
255	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
256	// `allServices` is a special value that covers all services.
257	Service string `json:"service,omitempty"`
258
259	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
260	// unconditionally include in API requests. By default, fields with
261	// empty values are omitted from API requests. However, any non-pointer,
262	// non-interface field appearing in ForceSendFields will be sent to the
263	// server regardless of whether the field is empty or not. This may be
264	// used to include empty fields in Patch requests.
265	ForceSendFields []string `json:"-"`
266
267	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
268	// include in API requests with the JSON null value. By default, fields
269	// with empty values are omitted from API requests. However, any field
270	// with an empty value appearing in NullFields will be sent to the
271	// server as null. It is an error if a field in this list has a
272	// non-empty value. This may be used to include null fields in Patch
273	// requests.
274	NullFields []string `json:"-"`
275}
276
277func (s *AuditConfig) MarshalJSON() ([]byte, error) {
278	type NoMethod AuditConfig
279	raw := NoMethod(*s)
280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
281}
282
283// AuditLogConfig: Provides the configuration for logging a type of
284// permissions. Example: { "audit_log_configs": [ { "log_type":
285// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, {
286// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and
287// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ
288// logging.
289type AuditLogConfig struct {
290	// ExemptedMembers: Specifies the identities that do not cause logging
291	// for this type of permission. Follows the same format of
292	// Binding.members.
293	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
294
295	// LogType: The log type that this config enables.
296	//
297	// Possible values:
298	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
299	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
300	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
301	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
302	LogType string `json:"logType,omitempty"`
303
304	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
305	// unconditionally include in API requests. By default, fields with
306	// empty values are omitted from API requests. However, any non-pointer,
307	// non-interface field appearing in ForceSendFields will be sent to the
308	// server regardless of whether the field is empty or not. This may be
309	// used to include empty fields in Patch requests.
310	ForceSendFields []string `json:"-"`
311
312	// NullFields is a list of field names (e.g. "ExemptedMembers") to
313	// include in API requests with the JSON null value. By default, fields
314	// with empty values are omitted from API requests. However, any field
315	// with an empty value appearing in NullFields will be sent to the
316	// server as null. It is an error if a field in this list has a
317	// non-empty value. This may be used to include null fields in Patch
318	// requests.
319	NullFields []string `json:"-"`
320}
321
322func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
323	type NoMethod AuditLogConfig
324	raw := NoMethod(*s)
325	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
326}
327
328// Binding: Associates `members` with a `role`.
329type Binding struct {
330	// BindingId: A client-specified ID for this binding. Expected to be
331	// globally unique to support the internal bindings-by-ID API.
332	BindingId string `json:"bindingId,omitempty"`
333
334	// Condition: The condition that is associated with this binding. If the
335	// condition evaluates to `true`, then this binding applies to the
336	// current request. If the condition evaluates to `false`, then this
337	// binding does not apply to the current request. However, a different
338	// role binding might grant the same role to one or more of the members
339	// in this binding. To learn which resources support conditions in their
340	// IAM policies, see the [IAM
341	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
342	// olicies).
343	Condition *Expr `json:"condition,omitempty"`
344
345	// Members: Specifies the identities requesting access for a Cloud
346	// Platform resource. `members` can have the following values: *
347	// `allUsers`: A special identifier that represents anyone who is on the
348	// internet; with or without a Google account. *
349	// `allAuthenticatedUsers`: A special identifier that represents anyone
350	// who is authenticated with a Google account or a service account. *
351	// `user:{emailid}`: An email address that represents a specific Google
352	// account. For example, `alice@example.com` . *
353	// `serviceAccount:{emailid}`: An email address that represents a
354	// service account. For example,
355	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
356	// email address that represents a Google group. For example,
357	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
358	// email address (plus unique identifier) representing a user that has
359	// been recently deleted. For example,
360	// `alice@example.com?uid=123456789012345678901`. If the user is
361	// recovered, this value reverts to `user:{emailid}` and the recovered
362	// user retains the role in the binding. *
363	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
364	// (plus unique identifier) representing a service account that has been
365	// recently deleted. For example,
366	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
367	// If the service account is undeleted, this value reverts to
368	// `serviceAccount:{emailid}` and the undeleted service account retains
369	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
370	// An email address (plus unique identifier) representing a Google group
371	// that has been recently deleted. For example,
372	// `admins@example.com?uid=123456789012345678901`. If the group is
373	// recovered, this value reverts to `group:{emailid}` and the recovered
374	// group retains the role in the binding. * `domain:{domain}`: The G
375	// Suite domain (primary) that represents all the users of that domain.
376	// For example, `google.com` or `example.com`.
377	Members []string `json:"members,omitempty"`
378
379	// Role: Role that is assigned to `members`. For example,
380	// `roles/viewer`, `roles/editor`, or `roles/owner`.
381	Role string `json:"role,omitempty"`
382
383	// ForceSendFields is a list of field names (e.g. "BindingId") to
384	// unconditionally include in API requests. By default, fields with
385	// empty values are omitted from API requests. However, any non-pointer,
386	// non-interface field appearing in ForceSendFields will be sent to the
387	// server regardless of whether the field is empty or not. This may be
388	// used to include empty fields in Patch requests.
389	ForceSendFields []string `json:"-"`
390
391	// NullFields is a list of field names (e.g. "BindingId") to include in
392	// API requests with the JSON null value. By default, fields with empty
393	// values are omitted from API requests. However, any field with an
394	// empty value appearing in NullFields will be sent to the server as
395	// null. It is an error if a field in this list has a non-empty value.
396	// This may be used to include null fields in Patch requests.
397	NullFields []string `json:"-"`
398}
399
400func (s *Binding) MarshalJSON() ([]byte, error) {
401	type NoMethod Binding
402	raw := NoMethod(*s)
403	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
404}
405
406// BooleanConstraint: A `Constraint` that is either enforced or not. For
407// example a constraint `constraints/compute.disableSerialPortAccess`.
408// If it is enforced on a VM instance, serial port connections will not
409// be opened to that instance.
410type BooleanConstraint struct {
411}
412
413// BooleanPolicy: Used in `policy_type` to specify how `boolean_policy`
414// will behave at this resource.
415type BooleanPolicy struct {
416	// Enforced: If `true`, then the `Policy` is enforced. If `false`, then
417	// any configuration is acceptable. Suppose you have a `Constraint`
418	// `constraints/compute.disableSerialPortAccess` with
419	// `constraint_default` set to `ALLOW`. A `Policy` for that `Constraint`
420	// exhibits the following behavior: - If the `Policy` at this resource
421	// has enforced set to `false`, serial port connection attempts will be
422	// allowed. - If the `Policy` at this resource has enforced set to
423	// `true`, serial port connection attempts will be refused. - If the
424	// `Policy` at this resource is `RestoreDefault`, serial port connection
425	// attempts will be allowed. - If no `Policy` is set at this resource or
426	// anywhere higher in the resource hierarchy, serial port connection
427	// attempts will be allowed. - If no `Policy` is set at this resource,
428	// but one exists higher in the resource hierarchy, the behavior is as
429	// if the`Policy` were set at this resource. The following examples
430	// demonstrate the different possible layerings: Example 1 (nearest
431	// `Constraint` wins): `organizations/foo` has a `Policy` with:
432	// {enforced: false} `projects/bar` has no `Policy` set. The constraint
433	// at `projects/bar` and `organizations/foo` will not be enforced.
434	// Example 2 (enforcement gets replaced): `organizations/foo` has a
435	// `Policy` with: {enforced: false} `projects/bar` has a `Policy` with:
436	// {enforced: true} The constraint at `organizations/foo` is not
437	// enforced. The constraint at `projects/bar` is enforced. Example 3
438	// (RestoreDefault): `organizations/foo` has a `Policy` with: {enforced:
439	// true} `projects/bar` has a `Policy` with: {RestoreDefault: {}} The
440	// constraint at `organizations/foo` is enforced. The constraint at
441	// `projects/bar` is not enforced, because `constraint_default` for the
442	// `Constraint` is `ALLOW`.
443	Enforced bool `json:"enforced,omitempty"`
444
445	// ForceSendFields is a list of field names (e.g. "Enforced") to
446	// unconditionally include in API requests. By default, fields with
447	// empty values are omitted from API requests. However, any non-pointer,
448	// non-interface field appearing in ForceSendFields will be sent to the
449	// server regardless of whether the field is empty or not. This may be
450	// used to include empty fields in Patch requests.
451	ForceSendFields []string `json:"-"`
452
453	// NullFields is a list of field names (e.g. "Enforced") to include in
454	// API requests with the JSON null value. By default, fields with empty
455	// values are omitted from API requests. However, any field with an
456	// empty value appearing in NullFields will be sent to the server as
457	// null. It is an error if a field in this list has a non-empty value.
458	// This may be used to include null fields in Patch requests.
459	NullFields []string `json:"-"`
460}
461
462func (s *BooleanPolicy) MarshalJSON() ([]byte, error) {
463	type NoMethod BooleanPolicy
464	raw := NoMethod(*s)
465	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
466}
467
468// ClearOrgPolicyRequest: The request sent to the ClearOrgPolicy method.
469type ClearOrgPolicyRequest struct {
470	// Constraint: Name of the `Constraint` of the `Policy` to clear.
471	Constraint string `json:"constraint,omitempty"`
472
473	// Etag: The current version, for concurrency control. Not sending an
474	// `etag` will cause the `Policy` to be cleared blindly.
475	Etag string `json:"etag,omitempty"`
476
477	// ForceSendFields is a list of field names (e.g. "Constraint") to
478	// unconditionally include in API requests. By default, fields with
479	// empty values are omitted from API requests. However, any non-pointer,
480	// non-interface field appearing in ForceSendFields will be sent to the
481	// server regardless of whether the field is empty or not. This may be
482	// used to include empty fields in Patch requests.
483	ForceSendFields []string `json:"-"`
484
485	// NullFields is a list of field names (e.g. "Constraint") to include in
486	// API requests with the JSON null value. By default, fields with empty
487	// values are omitted from API requests. However, any field with an
488	// empty value appearing in NullFields will be sent to the server as
489	// null. It is an error if a field in this list has a non-empty value.
490	// This may be used to include null fields in Patch requests.
491	NullFields []string `json:"-"`
492}
493
494func (s *ClearOrgPolicyRequest) MarshalJSON() ([]byte, error) {
495	type NoMethod ClearOrgPolicyRequest
496	raw := NoMethod(*s)
497	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
498}
499
500// Constraint: A `Constraint` describes a way in which a resource's
501// configuration can be restricted. For example, it controls which cloud
502// services can be activated across an organization, or whether a
503// Compute Engine instance can have serial port connections established.
504// `Constraints` can be configured by the organization's policy
505// administrator to fit the needs of the organzation by setting Policies
506// for `Constraints` at different locations in the organization's
507// resource hierarchy. Policies are inherited down the resource
508// hierarchy from higher levels, but can also be overridden. For details
509// about the inheritance rules please read about
510// [Policies](/resource-manager/reference/rest/v1/Policy). `Constraints`
511// have a default behavior determined by the `constraint_default` field,
512// which is the enforcement behavior that is used in the absence of a
513// `Policy` being defined or inherited for the resource in question.
514type Constraint struct {
515	// BooleanConstraint: Defines this constraint as being a
516	// BooleanConstraint.
517	BooleanConstraint *BooleanConstraint `json:"booleanConstraint,omitempty"`
518
519	// ConstraintDefault: The evaluation behavior of this constraint in the
520	// absence of 'Policy'.
521	//
522	// Possible values:
523	//   "CONSTRAINT_DEFAULT_UNSPECIFIED" - This is only used for
524	// distinguishing unset values and should never be used.
525	//   "ALLOW" - Indicate that all values are allowed for list
526	// constraints. Indicate that enforcement is off for boolean
527	// constraints.
528	//   "DENY" - Indicate that all values are denied for list constraints.
529	// Indicate that enforcement is on for boolean constraints.
530	ConstraintDefault string `json:"constraintDefault,omitempty"`
531
532	// Description: Detailed description of what this `Constraint` controls
533	// as well as how and where it is enforced. Mutable.
534	Description string `json:"description,omitempty"`
535
536	// DisplayName: The human readable name. Mutable.
537	DisplayName string `json:"displayName,omitempty"`
538
539	// ListConstraint: Defines this constraint as being a ListConstraint.
540	ListConstraint *ListConstraint `json:"listConstraint,omitempty"`
541
542	// Name: Immutable value, required to globally be unique. For example,
543	// `constraints/serviceuser.services`
544	Name string `json:"name,omitempty"`
545
546	// Version: Version of the `Constraint`. Default version is 0;
547	Version int64 `json:"version,omitempty"`
548
549	// ForceSendFields is a list of field names (e.g. "BooleanConstraint")
550	// to unconditionally include in API requests. By default, fields with
551	// empty values are omitted from API requests. However, any non-pointer,
552	// non-interface field appearing in ForceSendFields will be sent to the
553	// server regardless of whether the field is empty or not. This may be
554	// used to include empty fields in Patch requests.
555	ForceSendFields []string `json:"-"`
556
557	// NullFields is a list of field names (e.g. "BooleanConstraint") to
558	// include in API requests with the JSON null value. By default, fields
559	// with empty values are omitted from API requests. However, any field
560	// with an empty value appearing in NullFields will be sent to the
561	// server as null. It is an error if a field in this list has a
562	// non-empty value. This may be used to include null fields in Patch
563	// requests.
564	NullFields []string `json:"-"`
565}
566
567func (s *Constraint) MarshalJSON() ([]byte, error) {
568	type NoMethod Constraint
569	raw := NoMethod(*s)
570	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
571}
572
573// Empty: A generic empty message that you can re-use to avoid defining
574// duplicated empty messages in your APIs. A typical example is to use
575// it as the request or the response type of an API method. For
576// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
577// (google.protobuf.Empty); } The JSON representation for `Empty` is
578// empty JSON object `{}`.
579type Empty struct {
580	// ServerResponse contains the HTTP response code and headers from the
581	// server.
582	googleapi.ServerResponse `json:"-"`
583}
584
585// Expr: Represents a textual expression in the Common Expression
586// Language (CEL) syntax. CEL is a C-like expression language. The
587// syntax and semantics of CEL are documented at
588// https://github.com/google/cel-spec. Example (Comparison): title:
589// "Summary size limit" description: "Determines if a summary is less
590// than 100 chars" expression: "document.summary.size() < 100" Example
591// (Equality): title: "Requestor is owner" description: "Determines if
592// requestor is the document owner" expression: "document.owner ==
593// request.auth.claims.email" Example (Logic): title: "Public documents"
594// description: "Determine whether the document should be publicly
595// visible" expression: "document.type != 'private' && document.type !=
596// 'internal'" Example (Data Manipulation): title: "Notification string"
597// description: "Create a notification string with a timestamp."
598// expression: "'New message received at ' +
599// string(document.create_time)" The exact variables and functions that
600// may be referenced within an expression are determined by the service
601// that evaluates it. See the service documentation for additional
602// information.
603type Expr struct {
604	// Description: Optional. Description of the expression. This is a
605	// longer text which describes the expression, e.g. when hovered over it
606	// in a UI.
607	Description string `json:"description,omitempty"`
608
609	// Expression: Textual representation of an expression in Common
610	// Expression Language syntax.
611	Expression string `json:"expression,omitempty"`
612
613	// Location: Optional. String indicating the location of the expression
614	// for error reporting, e.g. a file name and a position in the file.
615	Location string `json:"location,omitempty"`
616
617	// Title: Optional. Title for the expression, i.e. a short string
618	// describing its purpose. This can be used e.g. in UIs which allow to
619	// enter the expression.
620	Title string `json:"title,omitempty"`
621
622	// ForceSendFields is a list of field names (e.g. "Description") to
623	// unconditionally include in API requests. By default, fields with
624	// empty values are omitted from API requests. However, any non-pointer,
625	// non-interface field appearing in ForceSendFields will be sent to the
626	// server regardless of whether the field is empty or not. This may be
627	// used to include empty fields in Patch requests.
628	ForceSendFields []string `json:"-"`
629
630	// NullFields is a list of field names (e.g. "Description") to include
631	// in API requests with the JSON null value. By default, fields with
632	// empty values are omitted from API requests. However, any field with
633	// an empty value appearing in NullFields will be sent to the server as
634	// null. It is an error if a field in this list has a non-empty value.
635	// This may be used to include null fields in Patch requests.
636	NullFields []string `json:"-"`
637}
638
639func (s *Expr) MarshalJSON() ([]byte, error) {
640	type NoMethod Expr
641	raw := NoMethod(*s)
642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
643}
644
645// FolderOperation: Metadata describing a long running folder operation
646type FolderOperation struct {
647	// DestinationParent: The resource name of the folder or organization we
648	// are either creating the folder under or moving the folder to.
649	DestinationParent string `json:"destinationParent,omitempty"`
650
651	// DisplayName: The display name of the folder.
652	DisplayName string `json:"displayName,omitempty"`
653
654	// OperationType: The type of this operation.
655	//
656	// Possible values:
657	//   "OPERATION_TYPE_UNSPECIFIED" - Operation type not specified.
658	//   "CREATE" - A create folder operation.
659	//   "MOVE" - A move folder operation.
660	OperationType string `json:"operationType,omitempty"`
661
662	// SourceParent: The resource name of the folder's parent. Only
663	// applicable when the operation_type is MOVE.
664	SourceParent string `json:"sourceParent,omitempty"`
665
666	// ForceSendFields is a list of field names (e.g. "DestinationParent")
667	// to unconditionally include in API requests. By default, fields with
668	// empty values are omitted from API requests. However, any non-pointer,
669	// non-interface field appearing in ForceSendFields will be sent to the
670	// server regardless of whether the field is empty or not. This may be
671	// used to include empty fields in Patch requests.
672	ForceSendFields []string `json:"-"`
673
674	// NullFields is a list of field names (e.g. "DestinationParent") to
675	// include in API requests with the JSON null value. By default, fields
676	// with empty values are omitted from API requests. However, any field
677	// with an empty value appearing in NullFields will be sent to the
678	// server as null. It is an error if a field in this list has a
679	// non-empty value. This may be used to include null fields in Patch
680	// requests.
681	NullFields []string `json:"-"`
682}
683
684func (s *FolderOperation) MarshalJSON() ([]byte, error) {
685	type NoMethod FolderOperation
686	raw := NoMethod(*s)
687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
688}
689
690// FolderOperationError: A classification of the Folder Operation error.
691type FolderOperationError struct {
692	// ErrorMessageId: The type of operation error experienced.
693	//
694	// Possible values:
695	//   "ERROR_TYPE_UNSPECIFIED" - The error type was unrecognized or
696	// unspecified.
697	//   "ACTIVE_FOLDER_HEIGHT_VIOLATION" - The attempted action would
698	// violate the max folder depth constraint.
699	//   "MAX_CHILD_FOLDERS_VIOLATION" - The attempted action would violate
700	// the max child folders constraint.
701	//   "FOLDER_NAME_UNIQUENESS_VIOLATION" - The attempted action would
702	// violate the locally-unique folder display_name constraint.
703	//   "RESOURCE_DELETED_VIOLATION" - The resource being moved has been
704	// deleted.
705	//   "PARENT_DELETED_VIOLATION" - The resource a folder was being added
706	// to has been deleted.
707	//   "CYCLE_INTRODUCED_VIOLATION" - The attempted action would introduce
708	// cycle in resource path.
709	//   "FOLDER_BEING_MOVED_VIOLATION" - The attempted action would move a
710	// folder that is already being moved.
711	//   "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION" - The folder the caller is
712	// trying to delete contains active resources.
713	//   "DELETED_FOLDER_HEIGHT_VIOLATION" - The attempted action would
714	// violate the max deleted folder depth constraint.
715	ErrorMessageId string `json:"errorMessageId,omitempty"`
716
717	// ForceSendFields is a list of field names (e.g. "ErrorMessageId") to
718	// unconditionally include in API requests. By default, fields with
719	// empty values are omitted from API requests. However, any non-pointer,
720	// non-interface field appearing in ForceSendFields will be sent to the
721	// server regardless of whether the field is empty or not. This may be
722	// used to include empty fields in Patch requests.
723	ForceSendFields []string `json:"-"`
724
725	// NullFields is a list of field names (e.g. "ErrorMessageId") to
726	// include in API requests with the JSON null value. By default, fields
727	// with empty values are omitted from API requests. However, any field
728	// with an empty value appearing in NullFields will be sent to the
729	// server as null. It is an error if a field in this list has a
730	// non-empty value. This may be used to include null fields in Patch
731	// requests.
732	NullFields []string `json:"-"`
733}
734
735func (s *FolderOperationError) MarshalJSON() ([]byte, error) {
736	type NoMethod FolderOperationError
737	raw := NoMethod(*s)
738	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
739}
740
741// GetAncestryRequest: The request sent to the GetAncestry method.
742type GetAncestryRequest struct {
743}
744
745// GetAncestryResponse: Response from the projects.getAncestry method.
746type GetAncestryResponse struct {
747	// Ancestor: Ancestors are ordered from bottom to top of the resource
748	// hierarchy. The first ancestor is the project itself, followed by the
749	// project's parent, etc..
750	Ancestor []*Ancestor `json:"ancestor,omitempty"`
751
752	// ServerResponse contains the HTTP response code and headers from the
753	// server.
754	googleapi.ServerResponse `json:"-"`
755
756	// ForceSendFields is a list of field names (e.g. "Ancestor") to
757	// unconditionally include in API requests. By default, fields with
758	// empty values are omitted from API requests. However, any non-pointer,
759	// non-interface field appearing in ForceSendFields will be sent to the
760	// server regardless of whether the field is empty or not. This may be
761	// used to include empty fields in Patch requests.
762	ForceSendFields []string `json:"-"`
763
764	// NullFields is a list of field names (e.g. "Ancestor") to include in
765	// API requests with the JSON null value. By default, fields with empty
766	// values are omitted from API requests. However, any field with an
767	// empty value appearing in NullFields will be sent to the server as
768	// null. It is an error if a field in this list has a non-empty value.
769	// This may be used to include null fields in Patch requests.
770	NullFields []string `json:"-"`
771}
772
773func (s *GetAncestryResponse) MarshalJSON() ([]byte, error) {
774	type NoMethod GetAncestryResponse
775	raw := NoMethod(*s)
776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
777}
778
779// GetEffectiveOrgPolicyRequest: The request sent to the
780// GetEffectiveOrgPolicy method.
781type GetEffectiveOrgPolicyRequest struct {
782	// Constraint: The name of the `Constraint` to compute the effective
783	// `Policy`.
784	Constraint string `json:"constraint,omitempty"`
785
786	// ForceSendFields is a list of field names (e.g. "Constraint") to
787	// unconditionally include in API requests. By default, fields with
788	// empty values are omitted from API requests. However, any non-pointer,
789	// non-interface field appearing in ForceSendFields will be sent to the
790	// server regardless of whether the field is empty or not. This may be
791	// used to include empty fields in Patch requests.
792	ForceSendFields []string `json:"-"`
793
794	// NullFields is a list of field names (e.g. "Constraint") to include in
795	// API requests with the JSON null value. By default, fields with empty
796	// values are omitted from API requests. However, any field with an
797	// empty value appearing in NullFields will be sent to the server as
798	// null. It is an error if a field in this list has a non-empty value.
799	// This may be used to include null fields in Patch requests.
800	NullFields []string `json:"-"`
801}
802
803func (s *GetEffectiveOrgPolicyRequest) MarshalJSON() ([]byte, error) {
804	type NoMethod GetEffectiveOrgPolicyRequest
805	raw := NoMethod(*s)
806	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
807}
808
809// GetIamPolicyRequest: Request message for `GetIamPolicy` method.
810type GetIamPolicyRequest struct {
811	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options
812	// to `GetIamPolicy`.
813	Options *GetPolicyOptions `json:"options,omitempty"`
814
815	// ForceSendFields is a list of field names (e.g. "Options") to
816	// unconditionally include in API requests. By default, fields with
817	// empty values are omitted from API requests. However, any non-pointer,
818	// non-interface field appearing in ForceSendFields will be sent to the
819	// server regardless of whether the field is empty or not. This may be
820	// used to include empty fields in Patch requests.
821	ForceSendFields []string `json:"-"`
822
823	// NullFields is a list of field names (e.g. "Options") to include in
824	// API requests with the JSON null value. By default, fields with empty
825	// values are omitted from API requests. However, any field with an
826	// empty value appearing in NullFields will be sent to the server as
827	// null. It is an error if a field in this list has a non-empty value.
828	// This may be used to include null fields in Patch requests.
829	NullFields []string `json:"-"`
830}
831
832func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
833	type NoMethod GetIamPolicyRequest
834	raw := NoMethod(*s)
835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
836}
837
838// GetOrgPolicyRequest: The request sent to the GetOrgPolicy method.
839type GetOrgPolicyRequest struct {
840	// Constraint: Name of the `Constraint` to get the `Policy`.
841	Constraint string `json:"constraint,omitempty"`
842
843	// ForceSendFields is a list of field names (e.g. "Constraint") to
844	// unconditionally include in API requests. By default, fields with
845	// empty values are omitted from API requests. However, any non-pointer,
846	// non-interface field appearing in ForceSendFields will be sent to the
847	// server regardless of whether the field is empty or not. This may be
848	// used to include empty fields in Patch requests.
849	ForceSendFields []string `json:"-"`
850
851	// NullFields is a list of field names (e.g. "Constraint") to include in
852	// API requests with the JSON null value. By default, fields with empty
853	// values are omitted from API requests. However, any field with an
854	// empty value appearing in NullFields will be sent to the server as
855	// null. It is an error if a field in this list has a non-empty value.
856	// This may be used to include null fields in Patch requests.
857	NullFields []string `json:"-"`
858}
859
860func (s *GetOrgPolicyRequest) MarshalJSON() ([]byte, error) {
861	type NoMethod GetOrgPolicyRequest
862	raw := NoMethod(*s)
863	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
864}
865
866// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
867type GetPolicyOptions struct {
868	// RequestedPolicyVersion: Optional. The policy format version to be
869	// returned. Valid values are 0, 1, and 3. Requests specifying an
870	// invalid value will be rejected. Requests for policies with any
871	// conditional bindings must specify version 3. Policies without any
872	// conditional bindings may specify any valid value or leave the field
873	// unset. To learn which resources support conditions in their IAM
874	// policies, see the [IAM
875	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
876	// olicies).
877	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
878
879	// ForceSendFields is a list of field names (e.g.
880	// "RequestedPolicyVersion") to unconditionally include in API requests.
881	// By default, fields with empty values are omitted from API requests.
882	// However, any non-pointer, non-interface field appearing in
883	// ForceSendFields will be sent to the server regardless of whether the
884	// field is empty or not. This may be used to include empty fields in
885	// Patch requests.
886	ForceSendFields []string `json:"-"`
887
888	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
889	// to include in API requests with the JSON null value. By default,
890	// fields with empty values are omitted from API requests. However, any
891	// field with an empty value appearing in NullFields will be sent to the
892	// server as null. It is an error if a field in this list has a
893	// non-empty value. This may be used to include null fields in Patch
894	// requests.
895	NullFields []string `json:"-"`
896}
897
898func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
899	type NoMethod GetPolicyOptions
900	raw := NoMethod(*s)
901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
902}
903
904// Lien: A Lien represents an encumbrance on the actions that can be
905// performed on a resource.
906type Lien struct {
907	// CreateTime: The creation time of this Lien.
908	CreateTime string `json:"createTime,omitempty"`
909
910	// Name: A system-generated unique identifier for this Lien. Example:
911	// `liens/1234abcd`
912	Name string `json:"name,omitempty"`
913
914	// Origin: A stable, user-visible/meaningful string identifying the
915	// origin of the Lien, intended to be inspected programmatically.
916	// Maximum length of 200 characters. Example: 'compute.googleapis.com'
917	Origin string `json:"origin,omitempty"`
918
919	// Parent: A reference to the resource this Lien is attached to. The
920	// server will validate the parent against those for which Liens are
921	// supported. Example: `projects/1234`
922	Parent string `json:"parent,omitempty"`
923
924	// Reason: Concise user-visible strings indicating why an action cannot
925	// be performed on a resource. Maximum length of 200 characters.
926	// Example: 'Holds production API key'
927	Reason string `json:"reason,omitempty"`
928
929	// Restrictions: The types of operations which should be blocked as a
930	// result of this Lien. Each value should correspond to an IAM
931	// permission. The server will validate the permissions against those
932	// for which Liens are supported. An empty list is meaningless and will
933	// be rejected. Example: ['resourcemanager.projects.delete']
934	Restrictions []string `json:"restrictions,omitempty"`
935
936	// ServerResponse contains the HTTP response code and headers from the
937	// server.
938	googleapi.ServerResponse `json:"-"`
939
940	// ForceSendFields is a list of field names (e.g. "CreateTime") to
941	// unconditionally include in API requests. By default, fields with
942	// empty values are omitted from API requests. However, any non-pointer,
943	// non-interface field appearing in ForceSendFields will be sent to the
944	// server regardless of whether the field is empty or not. This may be
945	// used to include empty fields in Patch requests.
946	ForceSendFields []string `json:"-"`
947
948	// NullFields is a list of field names (e.g. "CreateTime") to include in
949	// API requests with the JSON null value. By default, fields with empty
950	// values are omitted from API requests. However, any field with an
951	// empty value appearing in NullFields will be sent to the server as
952	// null. It is an error if a field in this list has a non-empty value.
953	// This may be used to include null fields in Patch requests.
954	NullFields []string `json:"-"`
955}
956
957func (s *Lien) MarshalJSON() ([]byte, error) {
958	type NoMethod Lien
959	raw := NoMethod(*s)
960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
961}
962
963// ListAvailableOrgPolicyConstraintsRequest: The request sent to the
964// `ListAvailableOrgPolicyConstraints` method on the project, folder, or
965// organization.
966type ListAvailableOrgPolicyConstraintsRequest struct {
967	// PageSize: Size of the pages to be returned. This is currently
968	// unsupported and will be ignored. The server may at any point start
969	// using this field to limit page size.
970	PageSize int64 `json:"pageSize,omitempty"`
971
972	// PageToken: Page token used to retrieve the next page. This is
973	// currently unsupported and will be ignored. The server may at any
974	// point start using this field.
975	PageToken string `json:"pageToken,omitempty"`
976
977	// ForceSendFields is a list of field names (e.g. "PageSize") to
978	// unconditionally include in API requests. By default, fields with
979	// empty values are omitted from API requests. However, any non-pointer,
980	// non-interface field appearing in ForceSendFields will be sent to the
981	// server regardless of whether the field is empty or not. This may be
982	// used to include empty fields in Patch requests.
983	ForceSendFields []string `json:"-"`
984
985	// NullFields is a list of field names (e.g. "PageSize") to include in
986	// API requests with the JSON null value. By default, fields with empty
987	// values are omitted from API requests. However, any field with an
988	// empty value appearing in NullFields will be sent to the server as
989	// null. It is an error if a field in this list has a non-empty value.
990	// This may be used to include null fields in Patch requests.
991	NullFields []string `json:"-"`
992}
993
994func (s *ListAvailableOrgPolicyConstraintsRequest) MarshalJSON() ([]byte, error) {
995	type NoMethod ListAvailableOrgPolicyConstraintsRequest
996	raw := NoMethod(*s)
997	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
998}
999
1000// ListAvailableOrgPolicyConstraintsResponse: The response returned from
1001// the `ListAvailableOrgPolicyConstraints` method. Returns all
1002// `Constraints` that could be set at this level of the hierarchy
1003// (contrast with the response from `ListPolicies`, which returns all
1004// policies which are set).
1005type ListAvailableOrgPolicyConstraintsResponse struct {
1006	// Constraints: The collection of constraints that are settable on the
1007	// request resource.
1008	Constraints []*Constraint `json:"constraints,omitempty"`
1009
1010	// NextPageToken: Page token used to retrieve the next page. This is
1011	// currently not used.
1012	NextPageToken string `json:"nextPageToken,omitempty"`
1013
1014	// ServerResponse contains the HTTP response code and headers from the
1015	// server.
1016	googleapi.ServerResponse `json:"-"`
1017
1018	// ForceSendFields is a list of field names (e.g. "Constraints") to
1019	// unconditionally include in API requests. By default, fields with
1020	// empty values are omitted from API requests. However, any non-pointer,
1021	// non-interface field appearing in ForceSendFields will be sent to the
1022	// server regardless of whether the field is empty or not. This may be
1023	// used to include empty fields in Patch requests.
1024	ForceSendFields []string `json:"-"`
1025
1026	// NullFields is a list of field names (e.g. "Constraints") to include
1027	// in API requests with the JSON null value. By default, fields with
1028	// empty values are omitted from API requests. However, any field with
1029	// an empty value appearing in NullFields will be sent to the server as
1030	// null. It is an error if a field in this list has a non-empty value.
1031	// This may be used to include null fields in Patch requests.
1032	NullFields []string `json:"-"`
1033}
1034
1035func (s *ListAvailableOrgPolicyConstraintsResponse) MarshalJSON() ([]byte, error) {
1036	type NoMethod ListAvailableOrgPolicyConstraintsResponse
1037	raw := NoMethod(*s)
1038	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1039}
1040
1041// ListConstraint: A `Constraint` that allows or disallows a list of
1042// string values, which are configured by an Organization's policy
1043// administrator with a `Policy`.
1044type ListConstraint struct {
1045	// SuggestedValue: Optional. The Google Cloud Console will try to
1046	// default to a configuration that matches the value specified in this
1047	// `Constraint`.
1048	SuggestedValue string `json:"suggestedValue,omitempty"`
1049
1050	// SupportsUnder: Indicates whether subtrees of Cloud Resource Manager
1051	// resource hierarchy can be used in `Policy.allowed_values` and
1052	// `Policy.denied_values`. For example, "under:folders/123" would
1053	// match any resource under the 'folders/123' folder.
1054	SupportsUnder bool `json:"supportsUnder,omitempty"`
1055
1056	// ForceSendFields is a list of field names (e.g. "SuggestedValue") to
1057	// unconditionally include in API requests. By default, fields with
1058	// empty values are omitted from API requests. However, any non-pointer,
1059	// non-interface field appearing in ForceSendFields will be sent to the
1060	// server regardless of whether the field is empty or not. This may be
1061	// used to include empty fields in Patch requests.
1062	ForceSendFields []string `json:"-"`
1063
1064	// NullFields is a list of field names (e.g. "SuggestedValue") to
1065	// include in API requests with the JSON null value. By default, fields
1066	// with empty values are omitted from API requests. However, any field
1067	// with an empty value appearing in NullFields will be sent to the
1068	// server as null. It is an error if a field in this list has a
1069	// non-empty value. This may be used to include null fields in Patch
1070	// requests.
1071	NullFields []string `json:"-"`
1072}
1073
1074func (s *ListConstraint) MarshalJSON() ([]byte, error) {
1075	type NoMethod ListConstraint
1076	raw := NoMethod(*s)
1077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1078}
1079
1080// ListLiensResponse: The response message for Liens.ListLiens.
1081type ListLiensResponse struct {
1082	// Liens: A list of Liens.
1083	Liens []*Lien `json:"liens,omitempty"`
1084
1085	// NextPageToken: Token to retrieve the next page of results, or empty
1086	// if there are no more results in the list.
1087	NextPageToken string `json:"nextPageToken,omitempty"`
1088
1089	// ServerResponse contains the HTTP response code and headers from the
1090	// server.
1091	googleapi.ServerResponse `json:"-"`
1092
1093	// ForceSendFields is a list of field names (e.g. "Liens") to
1094	// unconditionally include in API requests. By default, fields with
1095	// empty values are omitted from API requests. However, any non-pointer,
1096	// non-interface field appearing in ForceSendFields will be sent to the
1097	// server regardless of whether the field is empty or not. This may be
1098	// used to include empty fields in Patch requests.
1099	ForceSendFields []string `json:"-"`
1100
1101	// NullFields is a list of field names (e.g. "Liens") to include in API
1102	// requests with the JSON null value. By default, fields with empty
1103	// values are omitted from API requests. However, any field with an
1104	// empty value appearing in NullFields will be sent to the server as
1105	// null. It is an error if a field in this list has a non-empty value.
1106	// This may be used to include null fields in Patch requests.
1107	NullFields []string `json:"-"`
1108}
1109
1110func (s *ListLiensResponse) MarshalJSON() ([]byte, error) {
1111	type NoMethod ListLiensResponse
1112	raw := NoMethod(*s)
1113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1114}
1115
1116// ListOrgPoliciesRequest: The request sent to the ListOrgPolicies
1117// method.
1118type ListOrgPoliciesRequest struct {
1119	// PageSize: Size of the pages to be returned. This is currently
1120	// unsupported and will be ignored. The server may at any point start
1121	// using this field to limit page size.
1122	PageSize int64 `json:"pageSize,omitempty"`
1123
1124	// PageToken: Page token used to retrieve the next page. This is
1125	// currently unsupported and will be ignored. The server may at any
1126	// point start using this field.
1127	PageToken string `json:"pageToken,omitempty"`
1128
1129	// ForceSendFields is a list of field names (e.g. "PageSize") to
1130	// unconditionally include in API requests. By default, fields with
1131	// empty values are omitted from API requests. However, any non-pointer,
1132	// non-interface field appearing in ForceSendFields will be sent to the
1133	// server regardless of whether the field is empty or not. This may be
1134	// used to include empty fields in Patch requests.
1135	ForceSendFields []string `json:"-"`
1136
1137	// NullFields is a list of field names (e.g. "PageSize") to include in
1138	// API requests with the JSON null value. By default, fields with empty
1139	// values are omitted from API requests. However, any field with an
1140	// empty value appearing in NullFields will be sent to the server as
1141	// null. It is an error if a field in this list has a non-empty value.
1142	// This may be used to include null fields in Patch requests.
1143	NullFields []string `json:"-"`
1144}
1145
1146func (s *ListOrgPoliciesRequest) MarshalJSON() ([]byte, error) {
1147	type NoMethod ListOrgPoliciesRequest
1148	raw := NoMethod(*s)
1149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1150}
1151
1152// ListOrgPoliciesResponse: The response returned from the
1153// `ListOrgPolicies` method. It will be empty if no `Policies` are set
1154// on the resource.
1155type ListOrgPoliciesResponse struct {
1156	// NextPageToken: Page token used to retrieve the next page. This is
1157	// currently not used, but the server may at any point start supplying a
1158	// valid token.
1159	NextPageToken string `json:"nextPageToken,omitempty"`
1160
1161	// Policies: The `Policies` that are set on the resource. It will be
1162	// empty if no `Policies` are set.
1163	Policies []*OrgPolicy `json:"policies,omitempty"`
1164
1165	// ServerResponse contains the HTTP response code and headers from the
1166	// server.
1167	googleapi.ServerResponse `json:"-"`
1168
1169	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1170	// unconditionally include in API requests. By default, fields with
1171	// empty values are omitted from API requests. However, any non-pointer,
1172	// non-interface field appearing in ForceSendFields will be sent to the
1173	// server regardless of whether the field is empty or not. This may be
1174	// used to include empty fields in Patch requests.
1175	ForceSendFields []string `json:"-"`
1176
1177	// NullFields is a list of field names (e.g. "NextPageToken") to include
1178	// in API requests with the JSON null value. By default, fields with
1179	// empty values are omitted from API requests. However, any field with
1180	// an empty value appearing in NullFields will be sent to the server as
1181	// null. It is an error if a field in this list has a non-empty value.
1182	// This may be used to include null fields in Patch requests.
1183	NullFields []string `json:"-"`
1184}
1185
1186func (s *ListOrgPoliciesResponse) MarshalJSON() ([]byte, error) {
1187	type NoMethod ListOrgPoliciesResponse
1188	raw := NoMethod(*s)
1189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1190}
1191
1192// ListPolicy: Used in `policy_type` to specify how `list_policy`
1193// behaves at this resource. `ListPolicy` can define specific values and
1194// subtrees of Cloud Resource Manager resource hierarchy
1195// (`Organizations`, `Folders`, `Projects`) that are allowed or denied
1196// by setting the `allowed_values` and `denied_values` fields. This is
1197// achieved by using the `under:` and optional `is:` prefixes. The
1198// `under:` prefix is used to denote resource subtree values. The `is:`
1199// prefix is used to denote specific values, and is required only if the
1200// value contains a ":". Values prefixed with "is:" are treated the same
1201// as values with no prefix. Ancestry subtrees must be in one of the
1202// following formats: - "projects/", e.g. "projects/tokyo-rain-123" -
1203// "folders/", e.g. "folders/1234" - "organizations/", e.g.
1204// "organizations/1234" The `supports_under` field of the associated
1205// `Constraint` defines whether ancestry prefixes can be used. You can
1206// set `allowed_values` and `denied_values` in the same `Policy` if
1207// `all_values` is `ALL_VALUES_UNSPECIFIED`. `ALLOW` or `DENY` are used
1208// to allow or deny all values. If `all_values` is set to either `ALLOW`
1209// or `DENY`, `allowed_values` and `denied_values` must be unset.
1210type ListPolicy struct {
1211	// AllValues: The policy all_values state.
1212	//
1213	// Possible values:
1214	//   "ALL_VALUES_UNSPECIFIED" - Indicates that allowed_values or
1215	// denied_values must be set.
1216	//   "ALLOW" - A policy with this set allows all values.
1217	//   "DENY" - A policy with this set denies all values.
1218	AllValues string `json:"allValues,omitempty"`
1219
1220	// AllowedValues: List of values allowed at this resource. Can only be
1221	// set if `all_values` is set to `ALL_VALUES_UNSPECIFIED`.
1222	AllowedValues []string `json:"allowedValues,omitempty"`
1223
1224	// DeniedValues: List of values denied at this resource. Can only be set
1225	// if `all_values` is set to `ALL_VALUES_UNSPECIFIED`.
1226	DeniedValues []string `json:"deniedValues,omitempty"`
1227
1228	// InheritFromParent: Determines the inheritance behavior for this
1229	// `Policy`. By default, a `ListPolicy` set at a resource supersedes any
1230	// `Policy` set anywhere up the resource hierarchy. However, if
1231	// `inherit_from_parent` is set to `true`, then the values from the
1232	// effective `Policy` of the parent resource are inherited, meaning the
1233	// values set in this `Policy` are added to the values inherited up the
1234	// hierarchy. Setting `Policy` hierarchies that inherit both allowed
1235	// values and denied values isn't recommended in most circumstances to
1236	// keep the configuration simple and understandable. However, it is
1237	// possible to set a `Policy` with `allowed_values` set that inherits a
1238	// `Policy` with `denied_values` set. In this case, the values that are
1239	// allowed must be in `allowed_values` and not present in
1240	// `denied_values`. For example, suppose you have a `Constraint`
1241	// `constraints/serviceuser.services`, which has a `constraint_type` of
1242	// `list_constraint`, and with `constraint_default` set to `ALLOW`.
1243	// Suppose that at the Organization level, a `Policy` is applied that
1244	// restricts the allowed API activations to {`E1`, `E2`}. Then, if a
1245	// `Policy` is applied to a project below the Organization that has
1246	// `inherit_from_parent` set to `false` and field all_values set to
1247	// DENY, then an attempt to activate any API will be denied. The
1248	// following examples demonstrate different possible layerings for
1249	// `projects/bar` parented by `organizations/foo`: Example 1 (no
1250	// inherited values): `organizations/foo` has a `Policy` with values:
1251	// {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has
1252	// `inherit_from_parent` `false` and values: {allowed_values: "E3"
1253	// allowed_values: "E4"} The accepted values at `organizations/foo` are
1254	// `E1`, `E2`. The accepted values at `projects/bar` are `E3`, and `E4`.
1255	// Example 2 (inherited values): `organizations/foo` has a `Policy` with
1256	// values: {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has
1257	// a `Policy` with values: {value: "E3" value: "E4" inherit_from_parent:
1258	// true} The accepted values at `organizations/foo` are `E1`, `E2`. The
1259	// accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
1260	// Example 3 (inheriting both allowed and denied values):
1261	// `organizations/foo` has a `Policy` with values: {allowed_values: "E1"
1262	// allowed_values: "E2"} `projects/bar` has a `Policy` with:
1263	// {denied_values: "E1"} The accepted values at `organizations/foo` are
1264	// `E1`, `E2`. The value accepted at `projects/bar` is `E2`. Example 4
1265	// (RestoreDefault): `organizations/foo` has a `Policy` with values:
1266	// {allowed_values: "E1" allowed_values:"E2"} `projects/bar` has a
1267	// `Policy` with values: {RestoreDefault: {}} The accepted values at
1268	// `organizations/foo` are `E1`, `E2`. The accepted values at
1269	// `projects/bar` are either all or none depending on the value of
1270	// `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 5
1271	// (no policy inherits parent policy): `organizations/foo` has no
1272	// `Policy` set. `projects/bar` has no `Policy` set. The accepted values
1273	// at both levels are either all or none depending on the value of
1274	// `constraint_default` (if `ALLOW`, all; if `DENY`, none). Example 6
1275	// (ListConstraint allowing all): `organizations/foo` has a `Policy`
1276	// with values: {allowed_values: "E1" allowed_values: "E2"}
1277	// `projects/bar` has a `Policy` with: {all: ALLOW} The accepted values
1278	// at `organizations/foo` are `E1`, E2`. Any value is accepted at
1279	// `projects/bar`. Example 7 (ListConstraint allowing none):
1280	// `organizations/foo` has a `Policy` with values: {allowed_values: "E1"
1281	// allowed_values: "E2"} `projects/bar` has a `Policy` with: {all: DENY}
1282	// The accepted values at `organizations/foo` are `E1`, E2`. No value is
1283	// accepted at `projects/bar`. Example 10 (allowed and denied subtrees
1284	// of Resource Manager hierarchy): Given the following resource
1285	// hierarchy O1->{F1, F2}; F1->{P1}; F2->{P2, P3}, `organizations/foo`
1286	// has a `Policy` with values: {allowed_values:
1287	// "under:organizations/O1"} `projects/bar` has a `Policy` with:
1288	// {allowed_values: "under:projects/P3"} {denied_values:
1289	// "under:folders/F2"} The accepted values at `organizations/foo` are
1290	// `organizations/O1`, `folders/F1`, `folders/F2`, `projects/P1`,
1291	// `projects/P2`, `projects/P3`. The accepted values at `projects/bar`
1292	// are `organizations/O1`, `folders/F1`, `projects/P1`.
1293	InheritFromParent bool `json:"inheritFromParent,omitempty"`
1294
1295	// SuggestedValue: Optional. The Google Cloud Console will try to
1296	// default to a configuration that matches the value specified in this
1297	// `Policy`. If `suggested_value` is not set, it will inherit the value
1298	// specified higher in the hierarchy, unless `inherit_from_parent` is
1299	// `false`.
1300	SuggestedValue string `json:"suggestedValue,omitempty"`
1301
1302	// ForceSendFields is a list of field names (e.g. "AllValues") to
1303	// unconditionally include in API requests. By default, fields with
1304	// empty values are omitted from API requests. However, any non-pointer,
1305	// non-interface field appearing in ForceSendFields will be sent to the
1306	// server regardless of whether the field is empty or not. This may be
1307	// used to include empty fields in Patch requests.
1308	ForceSendFields []string `json:"-"`
1309
1310	// NullFields is a list of field names (e.g. "AllValues") to include in
1311	// API requests with the JSON null value. By default, fields with empty
1312	// values are omitted from API requests. However, any field with an
1313	// empty value appearing in NullFields will be sent to the server as
1314	// null. It is an error if a field in this list has a non-empty value.
1315	// This may be used to include null fields in Patch requests.
1316	NullFields []string `json:"-"`
1317}
1318
1319func (s *ListPolicy) MarshalJSON() ([]byte, error) {
1320	type NoMethod ListPolicy
1321	raw := NoMethod(*s)
1322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1323}
1324
1325// ListProjectsResponse: A page of the response received from the
1326// ListProjects method. A paginated response where more pages are
1327// available has `next_page_token` set. This token can be used in a
1328// subsequent request to retrieve the next request page.
1329type ListProjectsResponse struct {
1330	// NextPageToken: Pagination token. If the result set is too large to
1331	// fit in a single response, this token is returned. It encodes the
1332	// position of the current result cursor. Feeding this value into a new
1333	// list request with the `page_token` parameter gives the next page of
1334	// the results. When `next_page_token` is not filled in, there is no
1335	// next page and the list returned is the last page in the result set.
1336	// Pagination tokens have a limited lifetime.
1337	NextPageToken string `json:"nextPageToken,omitempty"`
1338
1339	// Projects: The list of Projects that matched the list filter. This
1340	// list can be paginated.
1341	Projects []*Project `json:"projects,omitempty"`
1342
1343	// ServerResponse contains the HTTP response code and headers from the
1344	// server.
1345	googleapi.ServerResponse `json:"-"`
1346
1347	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1348	// unconditionally include in API requests. By default, fields with
1349	// empty values are omitted from API requests. However, any non-pointer,
1350	// non-interface field appearing in ForceSendFields will be sent to the
1351	// server regardless of whether the field is empty or not. This may be
1352	// used to include empty fields in Patch requests.
1353	ForceSendFields []string `json:"-"`
1354
1355	// NullFields is a list of field names (e.g. "NextPageToken") to include
1356	// in API requests with the JSON null value. By default, fields with
1357	// empty values are omitted from API requests. However, any field with
1358	// an empty value appearing in NullFields will be sent to the server as
1359	// null. It is an error if a field in this list has a non-empty value.
1360	// This may be used to include null fields in Patch requests.
1361	NullFields []string `json:"-"`
1362}
1363
1364func (s *ListProjectsResponse) MarshalJSON() ([]byte, error) {
1365	type NoMethod ListProjectsResponse
1366	raw := NoMethod(*s)
1367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1368}
1369
1370// Operation: This resource represents a long-running operation that is
1371// the result of a network API call.
1372type Operation struct {
1373	// Done: If the value is `false`, it means the operation is still in
1374	// progress. If `true`, the operation is completed, and either `error`
1375	// or `response` is available.
1376	Done bool `json:"done,omitempty"`
1377
1378	// Error: The error result of the operation in case of failure or
1379	// cancellation.
1380	Error *Status `json:"error,omitempty"`
1381
1382	// Metadata: Service-specific metadata associated with the operation. It
1383	// typically contains progress information and common metadata such as
1384	// create time. Some services might not provide such metadata. Any
1385	// method that returns a long-running operation should document the
1386	// metadata type, if any.
1387	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1388
1389	// Name: The server-assigned name, which is only unique within the same
1390	// service that originally returns it. If you use the default HTTP
1391	// mapping, the `name` should be a resource name ending with
1392	// `operations/{unique_id}`.
1393	Name string `json:"name,omitempty"`
1394
1395	// Response: The normal response of the operation in case of success. If
1396	// the original method returns no data on success, such as `Delete`, the
1397	// response is `google.protobuf.Empty`. If the original method is
1398	// standard `Get`/`Create`/`Update`, the response should be the
1399	// resource. For other methods, the response should have the type
1400	// `XxxResponse`, where `Xxx` is the original method name. For example,
1401	// if the original method name is `TakeSnapshot()`, the inferred
1402	// response type is `TakeSnapshotResponse`.
1403	Response googleapi.RawMessage `json:"response,omitempty"`
1404
1405	// ServerResponse contains the HTTP response code and headers from the
1406	// server.
1407	googleapi.ServerResponse `json:"-"`
1408
1409	// ForceSendFields is a list of field names (e.g. "Done") to
1410	// unconditionally include in API requests. By default, fields with
1411	// empty values are omitted from API requests. However, any non-pointer,
1412	// non-interface field appearing in ForceSendFields will be sent to the
1413	// server regardless of whether the field is empty or not. This may be
1414	// used to include empty fields in Patch requests.
1415	ForceSendFields []string `json:"-"`
1416
1417	// NullFields is a list of field names (e.g. "Done") to include in API
1418	// requests with the JSON null value. By default, fields with empty
1419	// values are omitted from API requests. However, any field with an
1420	// empty value appearing in NullFields will be sent to the server as
1421	// null. It is an error if a field in this list has a non-empty value.
1422	// This may be used to include null fields in Patch requests.
1423	NullFields []string `json:"-"`
1424}
1425
1426func (s *Operation) MarshalJSON() ([]byte, error) {
1427	type NoMethod Operation
1428	raw := NoMethod(*s)
1429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1430}
1431
1432// OrgPolicy: Defines a Cloud Organization `Policy` which is used to
1433// specify `Constraints` for configurations of Cloud Platform resources.
1434type OrgPolicy struct {
1435	// BooleanPolicy: For boolean `Constraints`, whether to enforce the
1436	// `Constraint` or not.
1437	BooleanPolicy *BooleanPolicy `json:"booleanPolicy,omitempty"`
1438
1439	// Constraint: The name of the `Constraint` the `Policy` is configuring,
1440	// for example, `constraints/serviceuser.services`. A [list of available
1441	// constraints](/resource-manager/docs/organization-policy/org-policy-con
1442	// straints) is available. Immutable after creation.
1443	Constraint string `json:"constraint,omitempty"`
1444
1445	// Etag: An opaque tag indicating the current version of the `Policy`,
1446	// used for concurrency control. When the `Policy` is returned from
1447	// either a `GetPolicy` or a `ListOrgPolicy` request, this `etag`
1448	// indicates the version of the current `Policy` to use when executing a
1449	// read-modify-write loop. When the `Policy` is returned from a
1450	// `GetEffectivePolicy` request, the `etag` will be unset. When the
1451	// `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
1452	// that was returned from a `GetOrgPolicy` request as part of a
1453	// read-modify-write loop for concurrency control. Not setting the
1454	// `etag`in a `SetOrgPolicy` request will result in an unconditional
1455	// write of the `Policy`.
1456	Etag string `json:"etag,omitempty"`
1457
1458	// ListPolicy: List of values either allowed or disallowed.
1459	ListPolicy *ListPolicy `json:"listPolicy,omitempty"`
1460
1461	// RestoreDefault: Restores the default behavior of the constraint;
1462	// independent of `Constraint` type.
1463	RestoreDefault *RestoreDefault `json:"restoreDefault,omitempty"`
1464
1465	// UpdateTime: The time stamp the `Policy` was previously updated. This
1466	// is set by the server, not specified by the caller, and represents the
1467	// last time a call to `SetOrgPolicy` was made for that `Policy`. Any
1468	// value set by the client will be ignored.
1469	UpdateTime string `json:"updateTime,omitempty"`
1470
1471	// Version: Version of the `Policy`. Default version is 0;
1472	Version int64 `json:"version,omitempty"`
1473
1474	// ServerResponse contains the HTTP response code and headers from the
1475	// server.
1476	googleapi.ServerResponse `json:"-"`
1477
1478	// ForceSendFields is a list of field names (e.g. "BooleanPolicy") 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. "BooleanPolicy") to include
1487	// in API requests with the JSON null value. By default, fields with
1488	// empty values are omitted from API requests. However, any field with
1489	// an 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 *OrgPolicy) MarshalJSON() ([]byte, error) {
1496	type NoMethod OrgPolicy
1497	raw := NoMethod(*s)
1498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1499}
1500
1501// Organization: The root node in the resource hierarchy to which a
1502// particular entity's (e.g., company) resources belong.
1503type Organization struct {
1504	// CreationTime: Timestamp when the Organization was created. Assigned
1505	// by the server.
1506	CreationTime string `json:"creationTime,omitempty"`
1507
1508	// DisplayName: A human-readable string that refers to the Organization
1509	// in the GCP Console UI. This string is set by the server and cannot be
1510	// changed. The string will be set to the primary domain (for example,
1511	// "google.com") of the G Suite customer that owns the organization.
1512	DisplayName string `json:"displayName,omitempty"`
1513
1514	// LifecycleState: The organization's current lifecycle state. Assigned
1515	// by the server.
1516	//
1517	// Possible values:
1518	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state. This is only
1519	// useful for distinguishing unset values.
1520	//   "ACTIVE" - The normal and active state.
1521	//   "DELETE_REQUESTED" - The organization has been marked for deletion
1522	// by the user.
1523	LifecycleState string `json:"lifecycleState,omitempty"`
1524
1525	// Name: Output only. The resource name of the organization. This is the
1526	// organization's relative path in the API. Its format is
1527	// "organizations/[organization_id]". For example, "organizations/1234".
1528	Name string `json:"name,omitempty"`
1529
1530	// Owner: The owner of this Organization. The owner should be specified
1531	// on creation. Once set, it cannot be changed. This field is required.
1532	Owner *OrganizationOwner `json:"owner,omitempty"`
1533
1534	// ServerResponse contains the HTTP response code and headers from the
1535	// server.
1536	googleapi.ServerResponse `json:"-"`
1537
1538	// ForceSendFields is a list of field names (e.g. "CreationTime") to
1539	// unconditionally include in API requests. By default, fields with
1540	// empty values are omitted from API requests. However, any non-pointer,
1541	// non-interface field appearing in ForceSendFields will be sent to the
1542	// server regardless of whether the field is empty or not. This may be
1543	// used to include empty fields in Patch requests.
1544	ForceSendFields []string `json:"-"`
1545
1546	// NullFields is a list of field names (e.g. "CreationTime") to include
1547	// in API requests with the JSON null value. By default, fields with
1548	// empty values are omitted from API requests. However, any field with
1549	// an empty value appearing in NullFields will be sent to the server as
1550	// null. It is an error if a field in this list has a non-empty value.
1551	// This may be used to include null fields in Patch requests.
1552	NullFields []string `json:"-"`
1553}
1554
1555func (s *Organization) MarshalJSON() ([]byte, error) {
1556	type NoMethod Organization
1557	raw := NoMethod(*s)
1558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1559}
1560
1561// OrganizationOwner: The entity that owns an Organization. The lifetime
1562// of the Organization and all of its descendants are bound to the
1563// `OrganizationOwner`. If the `OrganizationOwner` is deleted, the
1564// Organization and all its descendants will be deleted.
1565type OrganizationOwner struct {
1566	// DirectoryCustomerId: The G Suite customer id used in the Directory
1567	// API.
1568	DirectoryCustomerId string `json:"directoryCustomerId,omitempty"`
1569
1570	// ForceSendFields is a list of field names (e.g. "DirectoryCustomerId")
1571	// to unconditionally include in API requests. By default, fields with
1572	// empty values are omitted from API requests. However, any non-pointer,
1573	// non-interface field appearing in ForceSendFields will be sent to the
1574	// server regardless of whether the field is empty or not. This may be
1575	// used to include empty fields in Patch requests.
1576	ForceSendFields []string `json:"-"`
1577
1578	// NullFields is a list of field names (e.g. "DirectoryCustomerId") to
1579	// include in API requests with the JSON null value. By default, fields
1580	// with empty values are omitted from API requests. However, any field
1581	// with an empty value appearing in NullFields will be sent to the
1582	// server as null. It is an error if a field in this list has a
1583	// non-empty value. This may be used to include null fields in Patch
1584	// requests.
1585	NullFields []string `json:"-"`
1586}
1587
1588func (s *OrganizationOwner) MarshalJSON() ([]byte, error) {
1589	type NoMethod OrganizationOwner
1590	raw := NoMethod(*s)
1591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1592}
1593
1594// Policy: An Identity and Access Management (IAM) policy, which
1595// specifies access controls for Google Cloud resources. A `Policy` is a
1596// collection of `bindings`. A `binding` binds one or more `members` to
1597// a single `role`. Members can be user accounts, service accounts,
1598// Google groups, and domains (such as G Suite). A `role` is a named
1599// list of permissions; each `role` can be an IAM predefined role or a
1600// user-created custom role. For some types of Google Cloud resources, a
1601// `binding` can also specify a `condition`, which is a logical
1602// expression that allows access to a resource only if the expression
1603// evaluates to `true`. A condition can add constraints based on
1604// attributes of the request, the resource, or both. To learn which
1605// resources support conditions in their IAM policies, see the [IAM
1606// documentation](https://cloud.google.com/iam/help/conditions/resource-p
1607// olicies). **JSON example:** { "bindings": [ { "role":
1608// "roles/resourcemanager.organizationAdmin", "members": [
1609// "user:mike@example.com", "group:admins@example.com",
1610// "domain:google.com",
1611// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
1612// "role": "roles/resourcemanager.organizationViewer", "members": [
1613// "user:eve@example.com" ], "condition": { "title": "expirable access",
1614// "description": "Does not grant access after Sep 2020", "expression":
1615// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
1616// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
1617// members: - user:mike@example.com - group:admins@example.com -
1618// domain:google.com -
1619// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
1620// roles/resourcemanager.organizationAdmin - members: -
1621// user:eve@example.com role: roles/resourcemanager.organizationViewer
1622// condition: title: expirable access description: Does not grant access
1623// after Sep 2020 expression: request.time <
1624// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
1625// 3 For a description of IAM and its features, see the [IAM
1626// documentation](https://cloud.google.com/iam/docs/).
1627type Policy struct {
1628	// AuditConfigs: Specifies cloud audit logging configuration for this
1629	// policy.
1630	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1631
1632	// Bindings: Associates a list of `members` to a `role`. Optionally, may
1633	// specify a `condition` that determines how and when the `bindings` are
1634	// applied. Each of the `bindings` must contain at least one member.
1635	Bindings []*Binding `json:"bindings,omitempty"`
1636
1637	// Etag: `etag` is used for optimistic concurrency control as a way to
1638	// help prevent simultaneous updates of a policy from overwriting each
1639	// other. It is strongly suggested that systems make use of the `etag`
1640	// in the read-modify-write cycle to perform policy updates in order to
1641	// avoid race conditions: An `etag` is returned in the response to
1642	// `getIamPolicy`, and systems are expected to put that etag in the
1643	// request to `setIamPolicy` to ensure that their change will be applied
1644	// to the same version of the policy. **Important:** If you use IAM
1645	// Conditions, you must include the `etag` field whenever you call
1646	// `setIamPolicy`. If you omit this field, then IAM allows you to
1647	// overwrite a version `3` policy with a version `1` policy, and all of
1648	// the conditions in the version `3` policy are lost.
1649	Etag string `json:"etag,omitempty"`
1650
1651	// Version: Specifies the format of the policy. Valid values are `0`,
1652	// `1`, and `3`. Requests that specify an invalid value are rejected.
1653	// Any operation that affects conditional role bindings must specify
1654	// version `3`. This requirement applies to the following operations: *
1655	// Getting a policy that includes a conditional role binding * Adding a
1656	// conditional role binding to a policy * Changing a conditional role
1657	// binding in a policy * Removing any role binding, with or without a
1658	// condition, from a policy that includes conditions **Important:** If
1659	// you use IAM Conditions, you must include the `etag` field whenever
1660	// you call `setIamPolicy`. If you omit this field, then IAM allows you
1661	// to overwrite a version `3` policy with a version `1` policy, and all
1662	// of the conditions in the version `3` policy are lost. If a policy
1663	// does not include any conditions, operations on that policy may
1664	// specify any valid version or leave the field unset. To learn which
1665	// resources support conditions in their IAM policies, see the [IAM
1666	// documentation](https://cloud.google.com/iam/help/conditions/resource-p
1667	// olicies).
1668	Version int64 `json:"version,omitempty"`
1669
1670	// ServerResponse contains the HTTP response code and headers from the
1671	// server.
1672	googleapi.ServerResponse `json:"-"`
1673
1674	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
1675	// unconditionally include in API requests. By default, fields with
1676	// empty values are omitted from API requests. However, any non-pointer,
1677	// non-interface field appearing in ForceSendFields will be sent to the
1678	// server regardless of whether the field is empty or not. This may be
1679	// used to include empty fields in Patch requests.
1680	ForceSendFields []string `json:"-"`
1681
1682	// NullFields is a list of field names (e.g. "AuditConfigs") to include
1683	// in API requests with the JSON null value. By default, fields with
1684	// empty values are omitted from API requests. However, any field with
1685	// an empty value appearing in NullFields will be sent to the server as
1686	// null. It is an error if a field in this list has a non-empty value.
1687	// This may be used to include null fields in Patch requests.
1688	NullFields []string `json:"-"`
1689}
1690
1691func (s *Policy) MarshalJSON() ([]byte, error) {
1692	type NoMethod Policy
1693	raw := NoMethod(*s)
1694	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1695}
1696
1697// Project: A Project is a high-level Google Cloud Platform entity. It
1698// is a container for ACLs, APIs, App Engine Apps, VMs, and other Google
1699// Cloud Platform resources.
1700type Project struct {
1701	// CreateTime: Creation time. Read-only.
1702	CreateTime string `json:"createTime,omitempty"`
1703
1704	// Labels: The labels associated with this Project. Label keys must be
1705	// between 1 and 63 characters long and must conform to the following
1706	// regular expression: a-z{0,62}. Label values must be between 0 and 63
1707	// characters long and must conform to the regular expression
1708	// [a-z0-9_-]{0,63}. A label value can be empty. No more than 256 labels
1709	// can be associated with a given resource. Clients should store labels
1710	// in a representation such as JSON that does not depend on specific
1711	// characters being disallowed. Example: "environment" : "dev"
1712	// Read-write.
1713	Labels map[string]string `json:"labels,omitempty"`
1714
1715	// LifecycleState: The Project lifecycle state. Read-only.
1716	//
1717	// Possible values:
1718	//   "LIFECYCLE_STATE_UNSPECIFIED" - Unspecified state. This is only
1719	// used/useful for distinguishing unset values.
1720	//   "ACTIVE" - The normal and active state.
1721	//   "DELETE_REQUESTED" - The project has been marked for deletion by
1722	// the user (by invoking DeleteProject) or by the system (Google Cloud
1723	// Platform). This can generally be reversed by invoking
1724	// UndeleteProject.
1725	//   "DELETE_IN_PROGRESS" - This lifecycle state is no longer used and
1726	// not returned by the API.
1727	LifecycleState string `json:"lifecycleState,omitempty"`
1728
1729	// Name: The optional user-assigned display name of the Project. When
1730	// present it must be between 4 to 30 characters. Allowed characters
1731	// are: lowercase and uppercase letters, numbers, hyphen, single-quote,
1732	// double-quote, space, and exclamation point. Example: `My Project`
1733	// Read-write.
1734	Name string `json:"name,omitempty"`
1735
1736	// Parent: An optional reference to a parent Resource. Supported parent
1737	// types include "organization" and "folder". Once set, the parent
1738	// cannot be cleared. The `parent` can be set on creation or using the
1739	// `UpdateProject` method; the end user must have the
1740	// `resourcemanager.projects.create` permission on the parent.
1741	Parent *ResourceId `json:"parent,omitempty"`
1742
1743	// ProjectId: The unique, user-assigned ID of the Project. It must be 6
1744	// to 30 lowercase letters, digits, or hyphens. It must start with a
1745	// letter. Trailing hyphens are prohibited. Example: `tokyo-rain-123`
1746	// Read-only after creation.
1747	ProjectId string `json:"projectId,omitempty"`
1748
1749	// ProjectNumber: The number uniquely identifying the project. Example:
1750	// `415104041262` Read-only.
1751	ProjectNumber int64 `json:"projectNumber,omitempty,string"`
1752
1753	// ServerResponse contains the HTTP response code and headers from the
1754	// server.
1755	googleapi.ServerResponse `json:"-"`
1756
1757	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1758	// unconditionally include in API requests. By default, fields with
1759	// empty values are omitted from API requests. However, any non-pointer,
1760	// non-interface field appearing in ForceSendFields will be sent to the
1761	// server regardless of whether the field is empty or not. This may be
1762	// used to include empty fields in Patch requests.
1763	ForceSendFields []string `json:"-"`
1764
1765	// NullFields is a list of field names (e.g. "CreateTime") to include in
1766	// API requests with the JSON null value. By default, fields with empty
1767	// values are omitted from API requests. However, any field with an
1768	// empty value appearing in NullFields will be sent to the server as
1769	// null. It is an error if a field in this list has a non-empty value.
1770	// This may be used to include null fields in Patch requests.
1771	NullFields []string `json:"-"`
1772}
1773
1774func (s *Project) MarshalJSON() ([]byte, error) {
1775	type NoMethod Project
1776	raw := NoMethod(*s)
1777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1778}
1779
1780// ProjectCreationStatus: A status object which is used as the
1781// `metadata` field for the Operation returned by CreateProject. It
1782// provides insight for when significant phases of Project creation have
1783// completed.
1784type ProjectCreationStatus struct {
1785	// CreateTime: Creation time of the project creation workflow.
1786	CreateTime string `json:"createTime,omitempty"`
1787
1788	// Gettable: True if the project can be retrieved using GetProject. No
1789	// other operations on the project are guaranteed to work until the
1790	// project creation is complete.
1791	Gettable bool `json:"gettable,omitempty"`
1792
1793	// Ready: True if the project creation process is complete.
1794	Ready bool `json:"ready,omitempty"`
1795
1796	// ForceSendFields is a list of field names (e.g. "CreateTime") to
1797	// unconditionally include in API requests. By default, fields with
1798	// empty values are omitted from API requests. However, any non-pointer,
1799	// non-interface field appearing in ForceSendFields will be sent to the
1800	// server regardless of whether the field is empty or not. This may be
1801	// used to include empty fields in Patch requests.
1802	ForceSendFields []string `json:"-"`
1803
1804	// NullFields is a list of field names (e.g. "CreateTime") to include in
1805	// API requests with the JSON null value. By default, fields with empty
1806	// values are omitted from API requests. However, any field with an
1807	// empty value appearing in NullFields will be sent to the server as
1808	// null. It is an error if a field in this list has a non-empty value.
1809	// This may be used to include null fields in Patch requests.
1810	NullFields []string `json:"-"`
1811}
1812
1813func (s *ProjectCreationStatus) MarshalJSON() ([]byte, error) {
1814	type NoMethod ProjectCreationStatus
1815	raw := NoMethod(*s)
1816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1817}
1818
1819// ResourceId: A container to reference an id for any resource type. A
1820// `resource` in Google Cloud Platform is a generic term for something
1821// you (a developer) may want to interact with through one of our API's.
1822// Some examples are an App Engine app, a Compute Engine instance, a
1823// Cloud SQL database, and so on.
1824type ResourceId struct {
1825	// Id: The type-specific id. This should correspond to the id used in
1826	// the type-specific API's.
1827	Id string `json:"id,omitempty"`
1828
1829	// Type: The resource type this id is for. At present, the valid types
1830	// are: "organization", "folder", and "project".
1831	Type string `json:"type,omitempty"`
1832
1833	// ForceSendFields is a list of field names (e.g. "Id") to
1834	// unconditionally include in API requests. By default, fields with
1835	// empty values are omitted from API requests. However, any non-pointer,
1836	// non-interface field appearing in ForceSendFields will be sent to the
1837	// server regardless of whether the field is empty or not. This may be
1838	// used to include empty fields in Patch requests.
1839	ForceSendFields []string `json:"-"`
1840
1841	// NullFields is a list of field names (e.g. "Id") to include in API
1842	// requests with the JSON null value. By default, fields with empty
1843	// values are omitted from API requests. However, any field with an
1844	// empty value appearing in NullFields will be sent to the server as
1845	// null. It is an error if a field in this list has a non-empty value.
1846	// This may be used to include null fields in Patch requests.
1847	NullFields []string `json:"-"`
1848}
1849
1850func (s *ResourceId) MarshalJSON() ([]byte, error) {
1851	type NoMethod ResourceId
1852	raw := NoMethod(*s)
1853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1854}
1855
1856// RestoreDefault: Ignores policies set above this resource and restores
1857// the `constraint_default` enforcement behavior of the specific
1858// `Constraint` at this resource. Suppose that `constraint_default` is
1859// set to `ALLOW` for the `Constraint`
1860// `constraints/serviceuser.services`. Suppose that organization foo.com
1861// sets a `Policy` at their Organization resource node that restricts
1862// the allowed service activations to deny all service activations. They
1863// could then set a `Policy` with the `policy_type` `restore_default` on
1864// several experimental projects, restoring the `constraint_default`
1865// enforcement of the `Constraint` for only those projects, allowing
1866// those projects to have all services activated.
1867type RestoreDefault struct {
1868}
1869
1870// SearchOrganizationsRequest: The request sent to the
1871// `SearchOrganizations` method.
1872type SearchOrganizationsRequest struct {
1873	// Filter: An optional query string used to filter the Organizations to
1874	// return in the response. Filter rules are case-insensitive.
1875	// Organizations may be filtered by `owner.directoryCustomerId` or by
1876	// `domain`, where the domain is a G Suite domain, for example: * Filter
1877	// `owner.directorycustomerid:123456789` returns Organization resources
1878	// with `owner.directory_customer_id` equal to `123456789`. * Filter
1879	// `domain:google.com` returns Organization resources corresponding to
1880	// the domain `google.com`. This field is optional.
1881	Filter string `json:"filter,omitempty"`
1882
1883	// PageSize: The maximum number of Organizations to return in the
1884	// response. This field is optional.
1885	PageSize int64 `json:"pageSize,omitempty"`
1886
1887	// PageToken: A pagination token returned from a previous call to
1888	// `SearchOrganizations` that indicates from where listing should
1889	// continue. This field is optional.
1890	PageToken string `json:"pageToken,omitempty"`
1891
1892	// ForceSendFields is a list of field names (e.g. "Filter") to
1893	// unconditionally include in API requests. By default, fields with
1894	// empty values are omitted from API requests. However, any non-pointer,
1895	// non-interface field appearing in ForceSendFields will be sent to the
1896	// server regardless of whether the field is empty or not. This may be
1897	// used to include empty fields in Patch requests.
1898	ForceSendFields []string `json:"-"`
1899
1900	// NullFields is a list of field names (e.g. "Filter") to include in API
1901	// requests with the JSON null value. By default, fields with empty
1902	// values are omitted from API requests. However, any field with an
1903	// empty value appearing in NullFields will be sent to the server as
1904	// null. It is an error if a field in this list has a non-empty value.
1905	// This may be used to include null fields in Patch requests.
1906	NullFields []string `json:"-"`
1907}
1908
1909func (s *SearchOrganizationsRequest) MarshalJSON() ([]byte, error) {
1910	type NoMethod SearchOrganizationsRequest
1911	raw := NoMethod(*s)
1912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1913}
1914
1915// SearchOrganizationsResponse: The response returned from the
1916// `SearchOrganizations` method.
1917type SearchOrganizationsResponse struct {
1918	// NextPageToken: A pagination token to be used to retrieve the next
1919	// page of results. If the result is too large to fit within the page
1920	// size specified in the request, this field will be set with a token
1921	// that can be used to fetch the next page of results. If this field is
1922	// empty, it indicates that this response contains the last page of
1923	// results.
1924	NextPageToken string `json:"nextPageToken,omitempty"`
1925
1926	// Organizations: The list of Organizations that matched the search
1927	// query, possibly paginated.
1928	Organizations []*Organization `json:"organizations,omitempty"`
1929
1930	// ServerResponse contains the HTTP response code and headers from the
1931	// server.
1932	googleapi.ServerResponse `json:"-"`
1933
1934	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1935	// unconditionally include in API requests. By default, fields with
1936	// empty values are omitted from API requests. However, any non-pointer,
1937	// non-interface field appearing in ForceSendFields will be sent to the
1938	// server regardless of whether the field is empty or not. This may be
1939	// used to include empty fields in Patch requests.
1940	ForceSendFields []string `json:"-"`
1941
1942	// NullFields is a list of field names (e.g. "NextPageToken") to include
1943	// in API requests with the JSON null value. By default, fields with
1944	// empty values are omitted from API requests. However, any field with
1945	// an empty value appearing in NullFields will be sent to the server as
1946	// null. It is an error if a field in this list has a non-empty value.
1947	// This may be used to include null fields in Patch requests.
1948	NullFields []string `json:"-"`
1949}
1950
1951func (s *SearchOrganizationsResponse) MarshalJSON() ([]byte, error) {
1952	type NoMethod SearchOrganizationsResponse
1953	raw := NoMethod(*s)
1954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1955}
1956
1957// SetIamPolicyRequest: Request message for `SetIamPolicy` method.
1958type SetIamPolicyRequest struct {
1959	// Policy: REQUIRED: The complete policy to be applied to the
1960	// `resource`. The size of the policy is limited to a few 10s of KB. An
1961	// empty policy is a valid policy but certain Cloud Platform services
1962	// (such as Projects) might reject them.
1963	Policy *Policy `json:"policy,omitempty"`
1964
1965	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the
1966	// policy to modify. Only the fields in the mask will be modified. If no
1967	// mask is provided, the following default mask is used: `paths:
1968	// "bindings, etag"
1969	UpdateMask string `json:"updateMask,omitempty"`
1970
1971	// ForceSendFields is a list of field names (e.g. "Policy") to
1972	// unconditionally include in API requests. By default, fields with
1973	// empty values are omitted from API requests. However, any non-pointer,
1974	// non-interface field appearing in ForceSendFields will be sent to the
1975	// server regardless of whether the field is empty or not. This may be
1976	// used to include empty fields in Patch requests.
1977	ForceSendFields []string `json:"-"`
1978
1979	// NullFields is a list of field names (e.g. "Policy") to include in API
1980	// requests with the JSON null value. By default, fields with empty
1981	// values are omitted from API requests. However, any field with an
1982	// empty value appearing in NullFields will be sent to the server as
1983	// null. It is an error if a field in this list has a non-empty value.
1984	// This may be used to include null fields in Patch requests.
1985	NullFields []string `json:"-"`
1986}
1987
1988func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1989	type NoMethod SetIamPolicyRequest
1990	raw := NoMethod(*s)
1991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1992}
1993
1994// SetOrgPolicyRequest: The request sent to the SetOrgPolicyRequest
1995// method.
1996type SetOrgPolicyRequest struct {
1997	// Policy: `Policy` to set on the resource.
1998	Policy *OrgPolicy `json:"policy,omitempty"`
1999
2000	// ForceSendFields is a list of field names (e.g. "Policy") to
2001	// unconditionally include in API requests. By default, fields with
2002	// empty values are omitted from API requests. However, any non-pointer,
2003	// non-interface field appearing in ForceSendFields will be sent to the
2004	// server regardless of whether the field is empty or not. This may be
2005	// used to include empty fields in Patch requests.
2006	ForceSendFields []string `json:"-"`
2007
2008	// NullFields is a list of field names (e.g. "Policy") to include in API
2009	// requests with the JSON null value. By default, fields with empty
2010	// values are omitted from API requests. However, any field with an
2011	// empty value appearing in NullFields will be sent to the server as
2012	// null. It is an error if a field in this list has a non-empty value.
2013	// This may be used to include null fields in Patch requests.
2014	NullFields []string `json:"-"`
2015}
2016
2017func (s *SetOrgPolicyRequest) MarshalJSON() ([]byte, error) {
2018	type NoMethod SetOrgPolicyRequest
2019	raw := NoMethod(*s)
2020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2021}
2022
2023// Status: The `Status` type defines a logical error model that is
2024// suitable for different programming environments, including REST APIs
2025// and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each
2026// `Status` message contains three pieces of data: error code, error
2027// message, and error details. You can find out more about this error
2028// model and how to work with it in the [API Design
2029// Guide](https://cloud.google.com/apis/design/errors).
2030type Status struct {
2031	// Code: The status code, which should be an enum value of
2032	// google.rpc.Code.
2033	Code int64 `json:"code,omitempty"`
2034
2035	// Details: A list of messages that carry the error details. There is a
2036	// common set of message types for APIs to use.
2037	Details []googleapi.RawMessage `json:"details,omitempty"`
2038
2039	// Message: A developer-facing error message, which should be in
2040	// English. Any user-facing error message should be localized and sent
2041	// in the google.rpc.Status.details field, or localized by the client.
2042	Message string `json:"message,omitempty"`
2043
2044	// ForceSendFields is a list of field names (e.g. "Code") to
2045	// unconditionally include in API requests. By default, fields with
2046	// empty values are omitted from API requests. However, any non-pointer,
2047	// non-interface field appearing in ForceSendFields will be sent to the
2048	// server regardless of whether the field is empty or not. This may be
2049	// used to include empty fields in Patch requests.
2050	ForceSendFields []string `json:"-"`
2051
2052	// NullFields is a list of field names (e.g. "Code") to include in API
2053	// requests with the JSON null value. By default, fields with empty
2054	// values are omitted from API requests. However, any field with an
2055	// empty value appearing in NullFields will be sent to the server as
2056	// null. It is an error if a field in this list has a non-empty value.
2057	// This may be used to include null fields in Patch requests.
2058	NullFields []string `json:"-"`
2059}
2060
2061func (s *Status) MarshalJSON() ([]byte, error) {
2062	type NoMethod Status
2063	raw := NoMethod(*s)
2064	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2065}
2066
2067// TestIamPermissionsRequest: Request message for `TestIamPermissions`
2068// method.
2069type TestIamPermissionsRequest struct {
2070	// Permissions: The set of permissions to check for the `resource`.
2071	// Permissions with wildcards (such as '*' or 'storage.*') are not
2072	// allowed. For more information see [IAM
2073	// Overview](https://cloud.google.com/iam/docs/overview#permissions).
2074	Permissions []string `json:"permissions,omitempty"`
2075
2076	// ForceSendFields is a list of field names (e.g. "Permissions") to
2077	// unconditionally include in API requests. By default, fields with
2078	// empty values are omitted from API requests. However, any non-pointer,
2079	// non-interface field appearing in ForceSendFields will be sent to the
2080	// server regardless of whether the field is empty or not. This may be
2081	// used to include empty fields in Patch requests.
2082	ForceSendFields []string `json:"-"`
2083
2084	// NullFields is a list of field names (e.g. "Permissions") to include
2085	// in API requests with the JSON null value. By default, fields with
2086	// empty values are omitted from API requests. However, any field with
2087	// an empty value appearing in NullFields will be sent to the server as
2088	// null. It is an error if a field in this list has a non-empty value.
2089	// This may be used to include null fields in Patch requests.
2090	NullFields []string `json:"-"`
2091}
2092
2093func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2094	type NoMethod TestIamPermissionsRequest
2095	raw := NoMethod(*s)
2096	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2097}
2098
2099// TestIamPermissionsResponse: Response message for `TestIamPermissions`
2100// method.
2101type TestIamPermissionsResponse struct {
2102	// Permissions: A subset of `TestPermissionsRequest.permissions` that
2103	// the caller is allowed.
2104	Permissions []string `json:"permissions,omitempty"`
2105
2106	// ServerResponse contains the HTTP response code and headers from the
2107	// server.
2108	googleapi.ServerResponse `json:"-"`
2109
2110	// ForceSendFields is a list of field names (e.g. "Permissions") to
2111	// unconditionally include in API requests. By default, fields with
2112	// empty values are omitted from API requests. However, any non-pointer,
2113	// non-interface field appearing in ForceSendFields will be sent to the
2114	// server regardless of whether the field is empty or not. This may be
2115	// used to include empty fields in Patch requests.
2116	ForceSendFields []string `json:"-"`
2117
2118	// NullFields is a list of field names (e.g. "Permissions") to include
2119	// in API requests with the JSON null value. By default, fields with
2120	// empty values are omitted from API requests. However, any field with
2121	// an empty value appearing in NullFields will be sent to the server as
2122	// null. It is an error if a field in this list has a non-empty value.
2123	// This may be used to include null fields in Patch requests.
2124	NullFields []string `json:"-"`
2125}
2126
2127func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2128	type NoMethod TestIamPermissionsResponse
2129	raw := NoMethod(*s)
2130	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2131}
2132
2133// UndeleteProjectRequest: The request sent to the UndeleteProject
2134// method.
2135type UndeleteProjectRequest struct {
2136}
2137
2138// method id "cloudresourcemanager.folders.clearOrgPolicy":
2139
2140type FoldersClearOrgPolicyCall struct {
2141	s                     *Service
2142	resource              string
2143	clearorgpolicyrequest *ClearOrgPolicyRequest
2144	urlParams_            gensupport.URLParams
2145	ctx_                  context.Context
2146	header_               http.Header
2147}
2148
2149// ClearOrgPolicy: Clears a `Policy` from a resource.
2150func (r *FoldersService) ClearOrgPolicy(resource string, clearorgpolicyrequest *ClearOrgPolicyRequest) *FoldersClearOrgPolicyCall {
2151	c := &FoldersClearOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2152	c.resource = resource
2153	c.clearorgpolicyrequest = clearorgpolicyrequest
2154	return c
2155}
2156
2157// Fields allows partial responses to be retrieved. See
2158// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2159// for more information.
2160func (c *FoldersClearOrgPolicyCall) Fields(s ...googleapi.Field) *FoldersClearOrgPolicyCall {
2161	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2162	return c
2163}
2164
2165// Context sets the context to be used in this call's Do method. Any
2166// pending HTTP request will be aborted if the provided context is
2167// canceled.
2168func (c *FoldersClearOrgPolicyCall) Context(ctx context.Context) *FoldersClearOrgPolicyCall {
2169	c.ctx_ = ctx
2170	return c
2171}
2172
2173// Header returns an http.Header that can be modified by the caller to
2174// add HTTP headers to the request.
2175func (c *FoldersClearOrgPolicyCall) Header() http.Header {
2176	if c.header_ == nil {
2177		c.header_ = make(http.Header)
2178	}
2179	return c.header_
2180}
2181
2182func (c *FoldersClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
2183	reqHeaders := make(http.Header)
2184	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2185	for k, v := range c.header_ {
2186		reqHeaders[k] = v
2187	}
2188	reqHeaders.Set("User-Agent", c.s.userAgent())
2189	var body io.Reader = nil
2190	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearorgpolicyrequest)
2191	if err != nil {
2192		return nil, err
2193	}
2194	reqHeaders.Set("Content-Type", "application/json")
2195	c.urlParams_.Set("alt", alt)
2196	c.urlParams_.Set("prettyPrint", "false")
2197	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:clearOrgPolicy")
2198	urls += "?" + c.urlParams_.Encode()
2199	req, err := http.NewRequest("POST", urls, body)
2200	if err != nil {
2201		return nil, err
2202	}
2203	req.Header = reqHeaders
2204	googleapi.Expand(req.URL, map[string]string{
2205		"resource": c.resource,
2206	})
2207	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2208}
2209
2210// Do executes the "cloudresourcemanager.folders.clearOrgPolicy" call.
2211// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2212// code is an error. Response headers are in either
2213// *Empty.ServerResponse.Header or (if a response was returned at all)
2214// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2215// check whether the returned error was because http.StatusNotModified
2216// was returned.
2217func (c *FoldersClearOrgPolicyCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2218	gensupport.SetOptions(c.urlParams_, opts...)
2219	res, err := c.doRequest("json")
2220	if res != nil && res.StatusCode == http.StatusNotModified {
2221		if res.Body != nil {
2222			res.Body.Close()
2223		}
2224		return nil, &googleapi.Error{
2225			Code:   res.StatusCode,
2226			Header: res.Header,
2227		}
2228	}
2229	if err != nil {
2230		return nil, err
2231	}
2232	defer googleapi.CloseBody(res)
2233	if err := googleapi.CheckResponse(res); err != nil {
2234		return nil, err
2235	}
2236	ret := &Empty{
2237		ServerResponse: googleapi.ServerResponse{
2238			Header:         res.Header,
2239			HTTPStatusCode: res.StatusCode,
2240		},
2241	}
2242	target := &ret
2243	if err := gensupport.DecodeResponse(target, res); err != nil {
2244		return nil, err
2245	}
2246	return ret, nil
2247	// {
2248	//   "description": "Clears a `Policy` from a resource.",
2249	//   "flatPath": "v1/folders/{foldersId}:clearOrgPolicy",
2250	//   "httpMethod": "POST",
2251	//   "id": "cloudresourcemanager.folders.clearOrgPolicy",
2252	//   "parameterOrder": [
2253	//     "resource"
2254	//   ],
2255	//   "parameters": {
2256	//     "resource": {
2257	//       "description": "Name of the resource for the `Policy` to clear.",
2258	//       "location": "path",
2259	//       "pattern": "^folders/[^/]+$",
2260	//       "required": true,
2261	//       "type": "string"
2262	//     }
2263	//   },
2264	//   "path": "v1/{+resource}:clearOrgPolicy",
2265	//   "request": {
2266	//     "$ref": "ClearOrgPolicyRequest"
2267	//   },
2268	//   "response": {
2269	//     "$ref": "Empty"
2270	//   },
2271	//   "scopes": [
2272	//     "https://www.googleapis.com/auth/cloud-platform"
2273	//   ]
2274	// }
2275
2276}
2277
2278// method id "cloudresourcemanager.folders.getEffectiveOrgPolicy":
2279
2280type FoldersGetEffectiveOrgPolicyCall struct {
2281	s                            *Service
2282	resource                     string
2283	geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest
2284	urlParams_                   gensupport.URLParams
2285	ctx_                         context.Context
2286	header_                      http.Header
2287}
2288
2289// GetEffectiveOrgPolicy: Gets the effective `Policy` on a resource.
2290// This is the result of merging `Policies` in the resource hierarchy.
2291// The returned `Policy` will not have an `etag`set because it is a
2292// computed `Policy` across multiple resources. Subtrees of Resource
2293// Manager resource hierarchy with 'under:' prefix will not be expanded.
2294func (r *FoldersService) GetEffectiveOrgPolicy(resource string, geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest) *FoldersGetEffectiveOrgPolicyCall {
2295	c := &FoldersGetEffectiveOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2296	c.resource = resource
2297	c.geteffectiveorgpolicyrequest = geteffectiveorgpolicyrequest
2298	return c
2299}
2300
2301// Fields allows partial responses to be retrieved. See
2302// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2303// for more information.
2304func (c *FoldersGetEffectiveOrgPolicyCall) Fields(s ...googleapi.Field) *FoldersGetEffectiveOrgPolicyCall {
2305	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2306	return c
2307}
2308
2309// Context sets the context to be used in this call's Do method. Any
2310// pending HTTP request will be aborted if the provided context is
2311// canceled.
2312func (c *FoldersGetEffectiveOrgPolicyCall) Context(ctx context.Context) *FoldersGetEffectiveOrgPolicyCall {
2313	c.ctx_ = ctx
2314	return c
2315}
2316
2317// Header returns an http.Header that can be modified by the caller to
2318// add HTTP headers to the request.
2319func (c *FoldersGetEffectiveOrgPolicyCall) Header() http.Header {
2320	if c.header_ == nil {
2321		c.header_ = make(http.Header)
2322	}
2323	return c.header_
2324}
2325
2326func (c *FoldersGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
2327	reqHeaders := make(http.Header)
2328	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2329	for k, v := range c.header_ {
2330		reqHeaders[k] = v
2331	}
2332	reqHeaders.Set("User-Agent", c.s.userAgent())
2333	var body io.Reader = nil
2334	body, err := googleapi.WithoutDataWrapper.JSONReader(c.geteffectiveorgpolicyrequest)
2335	if err != nil {
2336		return nil, err
2337	}
2338	reqHeaders.Set("Content-Type", "application/json")
2339	c.urlParams_.Set("alt", alt)
2340	c.urlParams_.Set("prettyPrint", "false")
2341	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy")
2342	urls += "?" + c.urlParams_.Encode()
2343	req, err := http.NewRequest("POST", urls, body)
2344	if err != nil {
2345		return nil, err
2346	}
2347	req.Header = reqHeaders
2348	googleapi.Expand(req.URL, map[string]string{
2349		"resource": c.resource,
2350	})
2351	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2352}
2353
2354// Do executes the "cloudresourcemanager.folders.getEffectiveOrgPolicy" call.
2355// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
2356// status code is an error. Response headers are in either
2357// *OrgPolicy.ServerResponse.Header or (if a response was returned at
2358// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2359// to check whether the returned error was because
2360// http.StatusNotModified was returned.
2361func (c *FoldersGetEffectiveOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
2362	gensupport.SetOptions(c.urlParams_, opts...)
2363	res, err := c.doRequest("json")
2364	if res != nil && res.StatusCode == http.StatusNotModified {
2365		if res.Body != nil {
2366			res.Body.Close()
2367		}
2368		return nil, &googleapi.Error{
2369			Code:   res.StatusCode,
2370			Header: res.Header,
2371		}
2372	}
2373	if err != nil {
2374		return nil, err
2375	}
2376	defer googleapi.CloseBody(res)
2377	if err := googleapi.CheckResponse(res); err != nil {
2378		return nil, err
2379	}
2380	ret := &OrgPolicy{
2381		ServerResponse: googleapi.ServerResponse{
2382			Header:         res.Header,
2383			HTTPStatusCode: res.StatusCode,
2384		},
2385	}
2386	target := &ret
2387	if err := gensupport.DecodeResponse(target, res); err != nil {
2388		return nil, err
2389	}
2390	return ret, nil
2391	// {
2392	//   "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.",
2393	//   "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy",
2394	//   "httpMethod": "POST",
2395	//   "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy",
2396	//   "parameterOrder": [
2397	//     "resource"
2398	//   ],
2399	//   "parameters": {
2400	//     "resource": {
2401	//       "description": "The name of the resource to start computing the effective `Policy`.",
2402	//       "location": "path",
2403	//       "pattern": "^folders/[^/]+$",
2404	//       "required": true,
2405	//       "type": "string"
2406	//     }
2407	//   },
2408	//   "path": "v1/{+resource}:getEffectiveOrgPolicy",
2409	//   "request": {
2410	//     "$ref": "GetEffectiveOrgPolicyRequest"
2411	//   },
2412	//   "response": {
2413	//     "$ref": "OrgPolicy"
2414	//   },
2415	//   "scopes": [
2416	//     "https://www.googleapis.com/auth/cloud-platform",
2417	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
2418	//   ]
2419	// }
2420
2421}
2422
2423// method id "cloudresourcemanager.folders.getOrgPolicy":
2424
2425type FoldersGetOrgPolicyCall struct {
2426	s                   *Service
2427	resource            string
2428	getorgpolicyrequest *GetOrgPolicyRequest
2429	urlParams_          gensupport.URLParams
2430	ctx_                context.Context
2431	header_             http.Header
2432}
2433
2434// GetOrgPolicy: Gets a `Policy` on a resource. If no `Policy` is set on
2435// the resource, a `Policy` is returned with default values including
2436// `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value
2437// can be used with `SetOrgPolicy()` to create or update a `Policy`
2438// during read-modify-write.
2439func (r *FoldersService) GetOrgPolicy(resource string, getorgpolicyrequest *GetOrgPolicyRequest) *FoldersGetOrgPolicyCall {
2440	c := &FoldersGetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2441	c.resource = resource
2442	c.getorgpolicyrequest = getorgpolicyrequest
2443	return c
2444}
2445
2446// Fields allows partial responses to be retrieved. See
2447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2448// for more information.
2449func (c *FoldersGetOrgPolicyCall) Fields(s ...googleapi.Field) *FoldersGetOrgPolicyCall {
2450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2451	return c
2452}
2453
2454// Context sets the context to be used in this call's Do method. Any
2455// pending HTTP request will be aborted if the provided context is
2456// canceled.
2457func (c *FoldersGetOrgPolicyCall) Context(ctx context.Context) *FoldersGetOrgPolicyCall {
2458	c.ctx_ = ctx
2459	return c
2460}
2461
2462// Header returns an http.Header that can be modified by the caller to
2463// add HTTP headers to the request.
2464func (c *FoldersGetOrgPolicyCall) Header() http.Header {
2465	if c.header_ == nil {
2466		c.header_ = make(http.Header)
2467	}
2468	return c.header_
2469}
2470
2471func (c *FoldersGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
2472	reqHeaders := make(http.Header)
2473	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2474	for k, v := range c.header_ {
2475		reqHeaders[k] = v
2476	}
2477	reqHeaders.Set("User-Agent", c.s.userAgent())
2478	var body io.Reader = nil
2479	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getorgpolicyrequest)
2480	if err != nil {
2481		return nil, err
2482	}
2483	reqHeaders.Set("Content-Type", "application/json")
2484	c.urlParams_.Set("alt", alt)
2485	c.urlParams_.Set("prettyPrint", "false")
2486	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy")
2487	urls += "?" + c.urlParams_.Encode()
2488	req, err := http.NewRequest("POST", urls, body)
2489	if err != nil {
2490		return nil, err
2491	}
2492	req.Header = reqHeaders
2493	googleapi.Expand(req.URL, map[string]string{
2494		"resource": c.resource,
2495	})
2496	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2497}
2498
2499// Do executes the "cloudresourcemanager.folders.getOrgPolicy" call.
2500// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
2501// status code is an error. Response headers are in either
2502// *OrgPolicy.ServerResponse.Header or (if a response was returned at
2503// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2504// to check whether the returned error was because
2505// http.StatusNotModified was returned.
2506func (c *FoldersGetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
2507	gensupport.SetOptions(c.urlParams_, opts...)
2508	res, err := c.doRequest("json")
2509	if res != nil && res.StatusCode == http.StatusNotModified {
2510		if res.Body != nil {
2511			res.Body.Close()
2512		}
2513		return nil, &googleapi.Error{
2514			Code:   res.StatusCode,
2515			Header: res.Header,
2516		}
2517	}
2518	if err != nil {
2519		return nil, err
2520	}
2521	defer googleapi.CloseBody(res)
2522	if err := googleapi.CheckResponse(res); err != nil {
2523		return nil, err
2524	}
2525	ret := &OrgPolicy{
2526		ServerResponse: googleapi.ServerResponse{
2527			Header:         res.Header,
2528			HTTPStatusCode: res.StatusCode,
2529		},
2530	}
2531	target := &ret
2532	if err := gensupport.DecodeResponse(target, res); err != nil {
2533		return nil, err
2534	}
2535	return ret, nil
2536	// {
2537	//   "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.",
2538	//   "flatPath": "v1/folders/{foldersId}:getOrgPolicy",
2539	//   "httpMethod": "POST",
2540	//   "id": "cloudresourcemanager.folders.getOrgPolicy",
2541	//   "parameterOrder": [
2542	//     "resource"
2543	//   ],
2544	//   "parameters": {
2545	//     "resource": {
2546	//       "description": "Name of the resource the `Policy` is set on.",
2547	//       "location": "path",
2548	//       "pattern": "^folders/[^/]+$",
2549	//       "required": true,
2550	//       "type": "string"
2551	//     }
2552	//   },
2553	//   "path": "v1/{+resource}:getOrgPolicy",
2554	//   "request": {
2555	//     "$ref": "GetOrgPolicyRequest"
2556	//   },
2557	//   "response": {
2558	//     "$ref": "OrgPolicy"
2559	//   },
2560	//   "scopes": [
2561	//     "https://www.googleapis.com/auth/cloud-platform",
2562	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
2563	//   ]
2564	// }
2565
2566}
2567
2568// method id "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints":
2569
2570type FoldersListAvailableOrgPolicyConstraintsCall struct {
2571	s                                        *Service
2572	resource                                 string
2573	listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest
2574	urlParams_                               gensupport.URLParams
2575	ctx_                                     context.Context
2576	header_                                  http.Header
2577}
2578
2579// ListAvailableOrgPolicyConstraints: Lists `Constraints` that could be
2580// applied on the specified resource.
2581func (r *FoldersService) ListAvailableOrgPolicyConstraints(resource string, listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest) *FoldersListAvailableOrgPolicyConstraintsCall {
2582	c := &FoldersListAvailableOrgPolicyConstraintsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2583	c.resource = resource
2584	c.listavailableorgpolicyconstraintsrequest = listavailableorgpolicyconstraintsrequest
2585	return c
2586}
2587
2588// Fields allows partial responses to be retrieved. See
2589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2590// for more information.
2591func (c *FoldersListAvailableOrgPolicyConstraintsCall) Fields(s ...googleapi.Field) *FoldersListAvailableOrgPolicyConstraintsCall {
2592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2593	return c
2594}
2595
2596// Context sets the context to be used in this call's Do method. Any
2597// pending HTTP request will be aborted if the provided context is
2598// canceled.
2599func (c *FoldersListAvailableOrgPolicyConstraintsCall) Context(ctx context.Context) *FoldersListAvailableOrgPolicyConstraintsCall {
2600	c.ctx_ = ctx
2601	return c
2602}
2603
2604// Header returns an http.Header that can be modified by the caller to
2605// add HTTP headers to the request.
2606func (c *FoldersListAvailableOrgPolicyConstraintsCall) Header() http.Header {
2607	if c.header_ == nil {
2608		c.header_ = make(http.Header)
2609	}
2610	return c.header_
2611}
2612
2613func (c *FoldersListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) {
2614	reqHeaders := make(http.Header)
2615	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2616	for k, v := range c.header_ {
2617		reqHeaders[k] = v
2618	}
2619	reqHeaders.Set("User-Agent", c.s.userAgent())
2620	var body io.Reader = nil
2621	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listavailableorgpolicyconstraintsrequest)
2622	if err != nil {
2623		return nil, err
2624	}
2625	reqHeaders.Set("Content-Type", "application/json")
2626	c.urlParams_.Set("alt", alt)
2627	c.urlParams_.Set("prettyPrint", "false")
2628	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints")
2629	urls += "?" + c.urlParams_.Encode()
2630	req, err := http.NewRequest("POST", urls, body)
2631	if err != nil {
2632		return nil, err
2633	}
2634	req.Header = reqHeaders
2635	googleapi.Expand(req.URL, map[string]string{
2636		"resource": c.resource,
2637	})
2638	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2639}
2640
2641// Do executes the "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints" call.
2642// Exactly one of *ListAvailableOrgPolicyConstraintsResponse or error
2643// will be non-nil. Any non-2xx status code is an error. Response
2644// headers are in either
2645// *ListAvailableOrgPolicyConstraintsResponse.ServerResponse.Header or
2646// (if a response was returned at all) in
2647// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
2648// whether the returned error was because http.StatusNotModified was
2649// returned.
2650func (c *FoldersListAvailableOrgPolicyConstraintsCall) Do(opts ...googleapi.CallOption) (*ListAvailableOrgPolicyConstraintsResponse, error) {
2651	gensupport.SetOptions(c.urlParams_, opts...)
2652	res, err := c.doRequest("json")
2653	if res != nil && res.StatusCode == http.StatusNotModified {
2654		if res.Body != nil {
2655			res.Body.Close()
2656		}
2657		return nil, &googleapi.Error{
2658			Code:   res.StatusCode,
2659			Header: res.Header,
2660		}
2661	}
2662	if err != nil {
2663		return nil, err
2664	}
2665	defer googleapi.CloseBody(res)
2666	if err := googleapi.CheckResponse(res); err != nil {
2667		return nil, err
2668	}
2669	ret := &ListAvailableOrgPolicyConstraintsResponse{
2670		ServerResponse: googleapi.ServerResponse{
2671			Header:         res.Header,
2672			HTTPStatusCode: res.StatusCode,
2673		},
2674	}
2675	target := &ret
2676	if err := gensupport.DecodeResponse(target, res); err != nil {
2677		return nil, err
2678	}
2679	return ret, nil
2680	// {
2681	//   "description": "Lists `Constraints` that could be applied on the specified resource.",
2682	//   "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints",
2683	//   "httpMethod": "POST",
2684	//   "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints",
2685	//   "parameterOrder": [
2686	//     "resource"
2687	//   ],
2688	//   "parameters": {
2689	//     "resource": {
2690	//       "description": "Name of the resource to list `Constraints` for.",
2691	//       "location": "path",
2692	//       "pattern": "^folders/[^/]+$",
2693	//       "required": true,
2694	//       "type": "string"
2695	//     }
2696	//   },
2697	//   "path": "v1/{+resource}:listAvailableOrgPolicyConstraints",
2698	//   "request": {
2699	//     "$ref": "ListAvailableOrgPolicyConstraintsRequest"
2700	//   },
2701	//   "response": {
2702	//     "$ref": "ListAvailableOrgPolicyConstraintsResponse"
2703	//   },
2704	//   "scopes": [
2705	//     "https://www.googleapis.com/auth/cloud-platform",
2706	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
2707	//   ]
2708	// }
2709
2710}
2711
2712// Pages invokes f for each page of results.
2713// A non-nil error returned from f will halt the iteration.
2714// The provided context supersedes any context provided to the Context method.
2715func (c *FoldersListAvailableOrgPolicyConstraintsCall) Pages(ctx context.Context, f func(*ListAvailableOrgPolicyConstraintsResponse) error) error {
2716	c.ctx_ = ctx
2717	defer func(pt string) { c.listavailableorgpolicyconstraintsrequest.PageToken = pt }(c.listavailableorgpolicyconstraintsrequest.PageToken) // reset paging to original point
2718	for {
2719		x, err := c.Do()
2720		if err != nil {
2721			return err
2722		}
2723		if err := f(x); err != nil {
2724			return err
2725		}
2726		if x.NextPageToken == "" {
2727			return nil
2728		}
2729		c.listavailableorgpolicyconstraintsrequest.PageToken = x.NextPageToken
2730	}
2731}
2732
2733// method id "cloudresourcemanager.folders.listOrgPolicies":
2734
2735type FoldersListOrgPoliciesCall struct {
2736	s                      *Service
2737	resource               string
2738	listorgpoliciesrequest *ListOrgPoliciesRequest
2739	urlParams_             gensupport.URLParams
2740	ctx_                   context.Context
2741	header_                http.Header
2742}
2743
2744// ListOrgPolicies: Lists all the `Policies` set for a particular
2745// resource.
2746func (r *FoldersService) ListOrgPolicies(resource string, listorgpoliciesrequest *ListOrgPoliciesRequest) *FoldersListOrgPoliciesCall {
2747	c := &FoldersListOrgPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2748	c.resource = resource
2749	c.listorgpoliciesrequest = listorgpoliciesrequest
2750	return c
2751}
2752
2753// Fields allows partial responses to be retrieved. See
2754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2755// for more information.
2756func (c *FoldersListOrgPoliciesCall) Fields(s ...googleapi.Field) *FoldersListOrgPoliciesCall {
2757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2758	return c
2759}
2760
2761// Context sets the context to be used in this call's Do method. Any
2762// pending HTTP request will be aborted if the provided context is
2763// canceled.
2764func (c *FoldersListOrgPoliciesCall) Context(ctx context.Context) *FoldersListOrgPoliciesCall {
2765	c.ctx_ = ctx
2766	return c
2767}
2768
2769// Header returns an http.Header that can be modified by the caller to
2770// add HTTP headers to the request.
2771func (c *FoldersListOrgPoliciesCall) Header() http.Header {
2772	if c.header_ == nil {
2773		c.header_ = make(http.Header)
2774	}
2775	return c.header_
2776}
2777
2778func (c *FoldersListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) {
2779	reqHeaders := make(http.Header)
2780	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2781	for k, v := range c.header_ {
2782		reqHeaders[k] = v
2783	}
2784	reqHeaders.Set("User-Agent", c.s.userAgent())
2785	var body io.Reader = nil
2786	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listorgpoliciesrequest)
2787	if err != nil {
2788		return nil, err
2789	}
2790	reqHeaders.Set("Content-Type", "application/json")
2791	c.urlParams_.Set("alt", alt)
2792	c.urlParams_.Set("prettyPrint", "false")
2793	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listOrgPolicies")
2794	urls += "?" + c.urlParams_.Encode()
2795	req, err := http.NewRequest("POST", urls, body)
2796	if err != nil {
2797		return nil, err
2798	}
2799	req.Header = reqHeaders
2800	googleapi.Expand(req.URL, map[string]string{
2801		"resource": c.resource,
2802	})
2803	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2804}
2805
2806// Do executes the "cloudresourcemanager.folders.listOrgPolicies" call.
2807// Exactly one of *ListOrgPoliciesResponse or error will be non-nil. Any
2808// non-2xx status code is an error. Response headers are in either
2809// *ListOrgPoliciesResponse.ServerResponse.Header or (if a response was
2810// returned at all) in error.(*googleapi.Error).Header. Use
2811// googleapi.IsNotModified to check whether the returned error was
2812// because http.StatusNotModified was returned.
2813func (c *FoldersListOrgPoliciesCall) Do(opts ...googleapi.CallOption) (*ListOrgPoliciesResponse, error) {
2814	gensupport.SetOptions(c.urlParams_, opts...)
2815	res, err := c.doRequest("json")
2816	if res != nil && res.StatusCode == http.StatusNotModified {
2817		if res.Body != nil {
2818			res.Body.Close()
2819		}
2820		return nil, &googleapi.Error{
2821			Code:   res.StatusCode,
2822			Header: res.Header,
2823		}
2824	}
2825	if err != nil {
2826		return nil, err
2827	}
2828	defer googleapi.CloseBody(res)
2829	if err := googleapi.CheckResponse(res); err != nil {
2830		return nil, err
2831	}
2832	ret := &ListOrgPoliciesResponse{
2833		ServerResponse: googleapi.ServerResponse{
2834			Header:         res.Header,
2835			HTTPStatusCode: res.StatusCode,
2836		},
2837	}
2838	target := &ret
2839	if err := gensupport.DecodeResponse(target, res); err != nil {
2840		return nil, err
2841	}
2842	return ret, nil
2843	// {
2844	//   "description": "Lists all the `Policies` set for a particular resource.",
2845	//   "flatPath": "v1/folders/{foldersId}:listOrgPolicies",
2846	//   "httpMethod": "POST",
2847	//   "id": "cloudresourcemanager.folders.listOrgPolicies",
2848	//   "parameterOrder": [
2849	//     "resource"
2850	//   ],
2851	//   "parameters": {
2852	//     "resource": {
2853	//       "description": "Name of the resource to list Policies for.",
2854	//       "location": "path",
2855	//       "pattern": "^folders/[^/]+$",
2856	//       "required": true,
2857	//       "type": "string"
2858	//     }
2859	//   },
2860	//   "path": "v1/{+resource}:listOrgPolicies",
2861	//   "request": {
2862	//     "$ref": "ListOrgPoliciesRequest"
2863	//   },
2864	//   "response": {
2865	//     "$ref": "ListOrgPoliciesResponse"
2866	//   },
2867	//   "scopes": [
2868	//     "https://www.googleapis.com/auth/cloud-platform",
2869	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
2870	//   ]
2871	// }
2872
2873}
2874
2875// Pages invokes f for each page of results.
2876// A non-nil error returned from f will halt the iteration.
2877// The provided context supersedes any context provided to the Context method.
2878func (c *FoldersListOrgPoliciesCall) Pages(ctx context.Context, f func(*ListOrgPoliciesResponse) error) error {
2879	c.ctx_ = ctx
2880	defer func(pt string) { c.listorgpoliciesrequest.PageToken = pt }(c.listorgpoliciesrequest.PageToken) // reset paging to original point
2881	for {
2882		x, err := c.Do()
2883		if err != nil {
2884			return err
2885		}
2886		if err := f(x); err != nil {
2887			return err
2888		}
2889		if x.NextPageToken == "" {
2890			return nil
2891		}
2892		c.listorgpoliciesrequest.PageToken = x.NextPageToken
2893	}
2894}
2895
2896// method id "cloudresourcemanager.folders.setOrgPolicy":
2897
2898type FoldersSetOrgPolicyCall struct {
2899	s                   *Service
2900	resource            string
2901	setorgpolicyrequest *SetOrgPolicyRequest
2902	urlParams_          gensupport.URLParams
2903	ctx_                context.Context
2904	header_             http.Header
2905}
2906
2907// SetOrgPolicy: Updates the specified `Policy` on the resource. Creates
2908// a new `Policy` for that `Constraint` on the resource if one does not
2909// exist. Not supplying an `etag` on the request `Policy` results in an
2910// unconditional write of the `Policy`.
2911func (r *FoldersService) SetOrgPolicy(resource string, setorgpolicyrequest *SetOrgPolicyRequest) *FoldersSetOrgPolicyCall {
2912	c := &FoldersSetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2913	c.resource = resource
2914	c.setorgpolicyrequest = setorgpolicyrequest
2915	return c
2916}
2917
2918// Fields allows partial responses to be retrieved. See
2919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2920// for more information.
2921func (c *FoldersSetOrgPolicyCall) Fields(s ...googleapi.Field) *FoldersSetOrgPolicyCall {
2922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2923	return c
2924}
2925
2926// Context sets the context to be used in this call's Do method. Any
2927// pending HTTP request will be aborted if the provided context is
2928// canceled.
2929func (c *FoldersSetOrgPolicyCall) Context(ctx context.Context) *FoldersSetOrgPolicyCall {
2930	c.ctx_ = ctx
2931	return c
2932}
2933
2934// Header returns an http.Header that can be modified by the caller to
2935// add HTTP headers to the request.
2936func (c *FoldersSetOrgPolicyCall) Header() http.Header {
2937	if c.header_ == nil {
2938		c.header_ = make(http.Header)
2939	}
2940	return c.header_
2941}
2942
2943func (c *FoldersSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
2944	reqHeaders := make(http.Header)
2945	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2946	for k, v := range c.header_ {
2947		reqHeaders[k] = v
2948	}
2949	reqHeaders.Set("User-Agent", c.s.userAgent())
2950	var body io.Reader = nil
2951	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setorgpolicyrequest)
2952	if err != nil {
2953		return nil, err
2954	}
2955	reqHeaders.Set("Content-Type", "application/json")
2956	c.urlParams_.Set("alt", alt)
2957	c.urlParams_.Set("prettyPrint", "false")
2958	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy")
2959	urls += "?" + c.urlParams_.Encode()
2960	req, err := http.NewRequest("POST", urls, body)
2961	if err != nil {
2962		return nil, err
2963	}
2964	req.Header = reqHeaders
2965	googleapi.Expand(req.URL, map[string]string{
2966		"resource": c.resource,
2967	})
2968	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2969}
2970
2971// Do executes the "cloudresourcemanager.folders.setOrgPolicy" call.
2972// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
2973// status code is an error. Response headers are in either
2974// *OrgPolicy.ServerResponse.Header or (if a response was returned at
2975// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2976// to check whether the returned error was because
2977// http.StatusNotModified was returned.
2978func (c *FoldersSetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
2979	gensupport.SetOptions(c.urlParams_, opts...)
2980	res, err := c.doRequest("json")
2981	if res != nil && res.StatusCode == http.StatusNotModified {
2982		if res.Body != nil {
2983			res.Body.Close()
2984		}
2985		return nil, &googleapi.Error{
2986			Code:   res.StatusCode,
2987			Header: res.Header,
2988		}
2989	}
2990	if err != nil {
2991		return nil, err
2992	}
2993	defer googleapi.CloseBody(res)
2994	if err := googleapi.CheckResponse(res); err != nil {
2995		return nil, err
2996	}
2997	ret := &OrgPolicy{
2998		ServerResponse: googleapi.ServerResponse{
2999			Header:         res.Header,
3000			HTTPStatusCode: res.StatusCode,
3001		},
3002	}
3003	target := &ret
3004	if err := gensupport.DecodeResponse(target, res); err != nil {
3005		return nil, err
3006	}
3007	return ret, nil
3008	// {
3009	//   "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.",
3010	//   "flatPath": "v1/folders/{foldersId}:setOrgPolicy",
3011	//   "httpMethod": "POST",
3012	//   "id": "cloudresourcemanager.folders.setOrgPolicy",
3013	//   "parameterOrder": [
3014	//     "resource"
3015	//   ],
3016	//   "parameters": {
3017	//     "resource": {
3018	//       "description": "Resource name of the resource to attach the `Policy`.",
3019	//       "location": "path",
3020	//       "pattern": "^folders/[^/]+$",
3021	//       "required": true,
3022	//       "type": "string"
3023	//     }
3024	//   },
3025	//   "path": "v1/{+resource}:setOrgPolicy",
3026	//   "request": {
3027	//     "$ref": "SetOrgPolicyRequest"
3028	//   },
3029	//   "response": {
3030	//     "$ref": "OrgPolicy"
3031	//   },
3032	//   "scopes": [
3033	//     "https://www.googleapis.com/auth/cloud-platform"
3034	//   ]
3035	// }
3036
3037}
3038
3039// method id "cloudresourcemanager.liens.create":
3040
3041type LiensCreateCall struct {
3042	s          *Service
3043	lien       *Lien
3044	urlParams_ gensupport.URLParams
3045	ctx_       context.Context
3046	header_    http.Header
3047}
3048
3049// Create: Create a Lien which applies to the resource denoted by the
3050// `parent` field. Callers of this method will require permission on the
3051// `parent` resource. For example, applying to `projects/1234` requires
3052// permission `resourcemanager.projects.updateLiens`. NOTE: Some
3053// resources may limit the number of Liens which may be applied.
3054func (r *LiensService) Create(lien *Lien) *LiensCreateCall {
3055	c := &LiensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3056	c.lien = lien
3057	return c
3058}
3059
3060// Fields allows partial responses to be retrieved. See
3061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3062// for more information.
3063func (c *LiensCreateCall) Fields(s ...googleapi.Field) *LiensCreateCall {
3064	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3065	return c
3066}
3067
3068// Context sets the context to be used in this call's Do method. Any
3069// pending HTTP request will be aborted if the provided context is
3070// canceled.
3071func (c *LiensCreateCall) Context(ctx context.Context) *LiensCreateCall {
3072	c.ctx_ = ctx
3073	return c
3074}
3075
3076// Header returns an http.Header that can be modified by the caller to
3077// add HTTP headers to the request.
3078func (c *LiensCreateCall) Header() http.Header {
3079	if c.header_ == nil {
3080		c.header_ = make(http.Header)
3081	}
3082	return c.header_
3083}
3084
3085func (c *LiensCreateCall) doRequest(alt string) (*http.Response, error) {
3086	reqHeaders := make(http.Header)
3087	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3088	for k, v := range c.header_ {
3089		reqHeaders[k] = v
3090	}
3091	reqHeaders.Set("User-Agent", c.s.userAgent())
3092	var body io.Reader = nil
3093	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lien)
3094	if err != nil {
3095		return nil, err
3096	}
3097	reqHeaders.Set("Content-Type", "application/json")
3098	c.urlParams_.Set("alt", alt)
3099	c.urlParams_.Set("prettyPrint", "false")
3100	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/liens")
3101	urls += "?" + c.urlParams_.Encode()
3102	req, err := http.NewRequest("POST", urls, body)
3103	if err != nil {
3104		return nil, err
3105	}
3106	req.Header = reqHeaders
3107	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3108}
3109
3110// Do executes the "cloudresourcemanager.liens.create" call.
3111// Exactly one of *Lien or error will be non-nil. Any non-2xx status
3112// code is an error. Response headers are in either
3113// *Lien.ServerResponse.Header or (if a response was returned at all) in
3114// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3115// whether the returned error was because http.StatusNotModified was
3116// returned.
3117func (c *LiensCreateCall) Do(opts ...googleapi.CallOption) (*Lien, error) {
3118	gensupport.SetOptions(c.urlParams_, opts...)
3119	res, err := c.doRequest("json")
3120	if res != nil && res.StatusCode == http.StatusNotModified {
3121		if res.Body != nil {
3122			res.Body.Close()
3123		}
3124		return nil, &googleapi.Error{
3125			Code:   res.StatusCode,
3126			Header: res.Header,
3127		}
3128	}
3129	if err != nil {
3130		return nil, err
3131	}
3132	defer googleapi.CloseBody(res)
3133	if err := googleapi.CheckResponse(res); err != nil {
3134		return nil, err
3135	}
3136	ret := &Lien{
3137		ServerResponse: googleapi.ServerResponse{
3138			Header:         res.Header,
3139			HTTPStatusCode: res.StatusCode,
3140		},
3141	}
3142	target := &ret
3143	if err := gensupport.DecodeResponse(target, res); err != nil {
3144		return nil, err
3145	}
3146	return ret, nil
3147	// {
3148	//   "description": "Create a Lien which applies to the resource denoted by the `parent` field. Callers of this method will require permission on the `parent` resource. For example, applying to `projects/1234` requires permission `resourcemanager.projects.updateLiens`. NOTE: Some resources may limit the number of Liens which may be applied.",
3149	//   "flatPath": "v1/liens",
3150	//   "httpMethod": "POST",
3151	//   "id": "cloudresourcemanager.liens.create",
3152	//   "parameterOrder": [],
3153	//   "parameters": {},
3154	//   "path": "v1/liens",
3155	//   "request": {
3156	//     "$ref": "Lien"
3157	//   },
3158	//   "response": {
3159	//     "$ref": "Lien"
3160	//   },
3161	//   "scopes": [
3162	//     "https://www.googleapis.com/auth/cloud-platform",
3163	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
3164	//   ]
3165	// }
3166
3167}
3168
3169// method id "cloudresourcemanager.liens.delete":
3170
3171type LiensDeleteCall struct {
3172	s          *Service
3173	nameid     string
3174	urlParams_ gensupport.URLParams
3175	ctx_       context.Context
3176	header_    http.Header
3177}
3178
3179// Delete: Delete a Lien by `name`. Callers of this method will require
3180// permission on the `parent` resource. For example, a Lien with a
3181// `parent` of `projects/1234` requires permission
3182// `resourcemanager.projects.updateLiens`.
3183func (r *LiensService) Delete(nameid string) *LiensDeleteCall {
3184	c := &LiensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3185	c.nameid = nameid
3186	return c
3187}
3188
3189// Fields allows partial responses to be retrieved. See
3190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3191// for more information.
3192func (c *LiensDeleteCall) Fields(s ...googleapi.Field) *LiensDeleteCall {
3193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3194	return c
3195}
3196
3197// Context sets the context to be used in this call's Do method. Any
3198// pending HTTP request will be aborted if the provided context is
3199// canceled.
3200func (c *LiensDeleteCall) Context(ctx context.Context) *LiensDeleteCall {
3201	c.ctx_ = ctx
3202	return c
3203}
3204
3205// Header returns an http.Header that can be modified by the caller to
3206// add HTTP headers to the request.
3207func (c *LiensDeleteCall) Header() http.Header {
3208	if c.header_ == nil {
3209		c.header_ = make(http.Header)
3210	}
3211	return c.header_
3212}
3213
3214func (c *LiensDeleteCall) doRequest(alt string) (*http.Response, error) {
3215	reqHeaders := make(http.Header)
3216	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3217	for k, v := range c.header_ {
3218		reqHeaders[k] = v
3219	}
3220	reqHeaders.Set("User-Agent", c.s.userAgent())
3221	var body io.Reader = nil
3222	c.urlParams_.Set("alt", alt)
3223	c.urlParams_.Set("prettyPrint", "false")
3224	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3225	urls += "?" + c.urlParams_.Encode()
3226	req, err := http.NewRequest("DELETE", urls, body)
3227	if err != nil {
3228		return nil, err
3229	}
3230	req.Header = reqHeaders
3231	googleapi.Expand(req.URL, map[string]string{
3232		"name": c.nameid,
3233	})
3234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3235}
3236
3237// Do executes the "cloudresourcemanager.liens.delete" call.
3238// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3239// code is an error. Response headers are in either
3240// *Empty.ServerResponse.Header or (if a response was returned at all)
3241// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3242// check whether the returned error was because http.StatusNotModified
3243// was returned.
3244func (c *LiensDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3245	gensupport.SetOptions(c.urlParams_, opts...)
3246	res, err := c.doRequest("json")
3247	if res != nil && res.StatusCode == http.StatusNotModified {
3248		if res.Body != nil {
3249			res.Body.Close()
3250		}
3251		return nil, &googleapi.Error{
3252			Code:   res.StatusCode,
3253			Header: res.Header,
3254		}
3255	}
3256	if err != nil {
3257		return nil, err
3258	}
3259	defer googleapi.CloseBody(res)
3260	if err := googleapi.CheckResponse(res); err != nil {
3261		return nil, err
3262	}
3263	ret := &Empty{
3264		ServerResponse: googleapi.ServerResponse{
3265			Header:         res.Header,
3266			HTTPStatusCode: res.StatusCode,
3267		},
3268	}
3269	target := &ret
3270	if err := gensupport.DecodeResponse(target, res); err != nil {
3271		return nil, err
3272	}
3273	return ret, nil
3274	// {
3275	//   "description": "Delete a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.updateLiens`.",
3276	//   "flatPath": "v1/liens/{liensId}",
3277	//   "httpMethod": "DELETE",
3278	//   "id": "cloudresourcemanager.liens.delete",
3279	//   "parameterOrder": [
3280	//     "name"
3281	//   ],
3282	//   "parameters": {
3283	//     "name": {
3284	//       "description": "Required. The name/identifier of the Lien to delete.",
3285	//       "location": "path",
3286	//       "pattern": "^liens/.*$",
3287	//       "required": true,
3288	//       "type": "string"
3289	//     }
3290	//   },
3291	//   "path": "v1/{+name}",
3292	//   "response": {
3293	//     "$ref": "Empty"
3294	//   },
3295	//   "scopes": [
3296	//     "https://www.googleapis.com/auth/cloud-platform",
3297	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
3298	//   ]
3299	// }
3300
3301}
3302
3303// method id "cloudresourcemanager.liens.get":
3304
3305type LiensGetCall struct {
3306	s            *Service
3307	nameid       string
3308	urlParams_   gensupport.URLParams
3309	ifNoneMatch_ string
3310	ctx_         context.Context
3311	header_      http.Header
3312}
3313
3314// Get: Retrieve a Lien by `name`. Callers of this method will require
3315// permission on the `parent` resource. For example, a Lien with a
3316// `parent` of `projects/1234` requires permission requires permission
3317// `resourcemanager.projects.get` or
3318// `resourcemanager.projects.updateLiens`.
3319func (r *LiensService) Get(nameid string) *LiensGetCall {
3320	c := &LiensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3321	c.nameid = nameid
3322	return c
3323}
3324
3325// Fields allows partial responses to be retrieved. See
3326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3327// for more information.
3328func (c *LiensGetCall) Fields(s ...googleapi.Field) *LiensGetCall {
3329	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3330	return c
3331}
3332
3333// IfNoneMatch sets the optional parameter which makes the operation
3334// fail if the object's ETag matches the given value. This is useful for
3335// getting updates only after the object has changed since the last
3336// request. Use googleapi.IsNotModified to check whether the response
3337// error from Do is the result of In-None-Match.
3338func (c *LiensGetCall) IfNoneMatch(entityTag string) *LiensGetCall {
3339	c.ifNoneMatch_ = entityTag
3340	return c
3341}
3342
3343// Context sets the context to be used in this call's Do method. Any
3344// pending HTTP request will be aborted if the provided context is
3345// canceled.
3346func (c *LiensGetCall) Context(ctx context.Context) *LiensGetCall {
3347	c.ctx_ = ctx
3348	return c
3349}
3350
3351// Header returns an http.Header that can be modified by the caller to
3352// add HTTP headers to the request.
3353func (c *LiensGetCall) Header() http.Header {
3354	if c.header_ == nil {
3355		c.header_ = make(http.Header)
3356	}
3357	return c.header_
3358}
3359
3360func (c *LiensGetCall) doRequest(alt string) (*http.Response, error) {
3361	reqHeaders := make(http.Header)
3362	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3363	for k, v := range c.header_ {
3364		reqHeaders[k] = v
3365	}
3366	reqHeaders.Set("User-Agent", c.s.userAgent())
3367	if c.ifNoneMatch_ != "" {
3368		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3369	}
3370	var body io.Reader = nil
3371	c.urlParams_.Set("alt", alt)
3372	c.urlParams_.Set("prettyPrint", "false")
3373	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3374	urls += "?" + c.urlParams_.Encode()
3375	req, err := http.NewRequest("GET", urls, body)
3376	if err != nil {
3377		return nil, err
3378	}
3379	req.Header = reqHeaders
3380	googleapi.Expand(req.URL, map[string]string{
3381		"name": c.nameid,
3382	})
3383	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3384}
3385
3386// Do executes the "cloudresourcemanager.liens.get" call.
3387// Exactly one of *Lien or error will be non-nil. Any non-2xx status
3388// code is an error. Response headers are in either
3389// *Lien.ServerResponse.Header or (if a response was returned at all) in
3390// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3391// whether the returned error was because http.StatusNotModified was
3392// returned.
3393func (c *LiensGetCall) Do(opts ...googleapi.CallOption) (*Lien, error) {
3394	gensupport.SetOptions(c.urlParams_, opts...)
3395	res, err := c.doRequest("json")
3396	if res != nil && res.StatusCode == http.StatusNotModified {
3397		if res.Body != nil {
3398			res.Body.Close()
3399		}
3400		return nil, &googleapi.Error{
3401			Code:   res.StatusCode,
3402			Header: res.Header,
3403		}
3404	}
3405	if err != nil {
3406		return nil, err
3407	}
3408	defer googleapi.CloseBody(res)
3409	if err := googleapi.CheckResponse(res); err != nil {
3410		return nil, err
3411	}
3412	ret := &Lien{
3413		ServerResponse: googleapi.ServerResponse{
3414			Header:         res.Header,
3415			HTTPStatusCode: res.StatusCode,
3416		},
3417	}
3418	target := &ret
3419	if err := gensupport.DecodeResponse(target, res); err != nil {
3420		return nil, err
3421	}
3422	return ret, nil
3423	// {
3424	//   "description": "Retrieve a Lien by `name`. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission requires permission `resourcemanager.projects.get` or `resourcemanager.projects.updateLiens`.",
3425	//   "flatPath": "v1/liens/{liensId}",
3426	//   "httpMethod": "GET",
3427	//   "id": "cloudresourcemanager.liens.get",
3428	//   "parameterOrder": [
3429	//     "name"
3430	//   ],
3431	//   "parameters": {
3432	//     "name": {
3433	//       "description": "Required. The name/identifier of the Lien.",
3434	//       "location": "path",
3435	//       "pattern": "^liens/.*$",
3436	//       "required": true,
3437	//       "type": "string"
3438	//     }
3439	//   },
3440	//   "path": "v1/{+name}",
3441	//   "response": {
3442	//     "$ref": "Lien"
3443	//   },
3444	//   "scopes": [
3445	//     "https://www.googleapis.com/auth/cloud-platform",
3446	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
3447	//   ]
3448	// }
3449
3450}
3451
3452// method id "cloudresourcemanager.liens.list":
3453
3454type LiensListCall struct {
3455	s            *Service
3456	urlParams_   gensupport.URLParams
3457	ifNoneMatch_ string
3458	ctx_         context.Context
3459	header_      http.Header
3460}
3461
3462// List: List all Liens applied to the `parent` resource. Callers of
3463// this method will require permission on the `parent` resource. For
3464// example, a Lien with a `parent` of `projects/1234` requires
3465// permission `resourcemanager.projects.get`.
3466func (r *LiensService) List() *LiensListCall {
3467	c := &LiensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3468	return c
3469}
3470
3471// PageSize sets the optional parameter "pageSize": The maximum number
3472// of items to return. This is a suggestion for the server.
3473func (c *LiensListCall) PageSize(pageSize int64) *LiensListCall {
3474	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3475	return c
3476}
3477
3478// PageToken sets the optional parameter "pageToken": The
3479// `next_page_token` value returned from a previous List request, if
3480// any.
3481func (c *LiensListCall) PageToken(pageToken string) *LiensListCall {
3482	c.urlParams_.Set("pageToken", pageToken)
3483	return c
3484}
3485
3486// Parent sets the optional parameter "parent": Required. The name of
3487// the resource to list all attached Liens. For example,
3488// `projects/1234`. (google.api.field_policy).resource_type annotation
3489// is not set since the parent depends on the meta api implementation.
3490// This field could be a project or other sub project resources.
3491func (c *LiensListCall) Parent(parent string) *LiensListCall {
3492	c.urlParams_.Set("parent", parent)
3493	return c
3494}
3495
3496// Fields allows partial responses to be retrieved. See
3497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3498// for more information.
3499func (c *LiensListCall) Fields(s ...googleapi.Field) *LiensListCall {
3500	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3501	return c
3502}
3503
3504// IfNoneMatch sets the optional parameter which makes the operation
3505// fail if the object's ETag matches the given value. This is useful for
3506// getting updates only after the object has changed since the last
3507// request. Use googleapi.IsNotModified to check whether the response
3508// error from Do is the result of In-None-Match.
3509func (c *LiensListCall) IfNoneMatch(entityTag string) *LiensListCall {
3510	c.ifNoneMatch_ = entityTag
3511	return c
3512}
3513
3514// Context sets the context to be used in this call's Do method. Any
3515// pending HTTP request will be aborted if the provided context is
3516// canceled.
3517func (c *LiensListCall) Context(ctx context.Context) *LiensListCall {
3518	c.ctx_ = ctx
3519	return c
3520}
3521
3522// Header returns an http.Header that can be modified by the caller to
3523// add HTTP headers to the request.
3524func (c *LiensListCall) Header() http.Header {
3525	if c.header_ == nil {
3526		c.header_ = make(http.Header)
3527	}
3528	return c.header_
3529}
3530
3531func (c *LiensListCall) doRequest(alt string) (*http.Response, error) {
3532	reqHeaders := make(http.Header)
3533	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3534	for k, v := range c.header_ {
3535		reqHeaders[k] = v
3536	}
3537	reqHeaders.Set("User-Agent", c.s.userAgent())
3538	if c.ifNoneMatch_ != "" {
3539		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3540	}
3541	var body io.Reader = nil
3542	c.urlParams_.Set("alt", alt)
3543	c.urlParams_.Set("prettyPrint", "false")
3544	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/liens")
3545	urls += "?" + c.urlParams_.Encode()
3546	req, err := http.NewRequest("GET", urls, body)
3547	if err != nil {
3548		return nil, err
3549	}
3550	req.Header = reqHeaders
3551	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3552}
3553
3554// Do executes the "cloudresourcemanager.liens.list" call.
3555// Exactly one of *ListLiensResponse or error will be non-nil. Any
3556// non-2xx status code is an error. Response headers are in either
3557// *ListLiensResponse.ServerResponse.Header or (if a response was
3558// returned at all) in error.(*googleapi.Error).Header. Use
3559// googleapi.IsNotModified to check whether the returned error was
3560// because http.StatusNotModified was returned.
3561func (c *LiensListCall) Do(opts ...googleapi.CallOption) (*ListLiensResponse, error) {
3562	gensupport.SetOptions(c.urlParams_, opts...)
3563	res, err := c.doRequest("json")
3564	if res != nil && res.StatusCode == http.StatusNotModified {
3565		if res.Body != nil {
3566			res.Body.Close()
3567		}
3568		return nil, &googleapi.Error{
3569			Code:   res.StatusCode,
3570			Header: res.Header,
3571		}
3572	}
3573	if err != nil {
3574		return nil, err
3575	}
3576	defer googleapi.CloseBody(res)
3577	if err := googleapi.CheckResponse(res); err != nil {
3578		return nil, err
3579	}
3580	ret := &ListLiensResponse{
3581		ServerResponse: googleapi.ServerResponse{
3582			Header:         res.Header,
3583			HTTPStatusCode: res.StatusCode,
3584		},
3585	}
3586	target := &ret
3587	if err := gensupport.DecodeResponse(target, res); err != nil {
3588		return nil, err
3589	}
3590	return ret, nil
3591	// {
3592	//   "description": "List all Liens applied to the `parent` resource. Callers of this method will require permission on the `parent` resource. For example, a Lien with a `parent` of `projects/1234` requires permission `resourcemanager.projects.get`.",
3593	//   "flatPath": "v1/liens",
3594	//   "httpMethod": "GET",
3595	//   "id": "cloudresourcemanager.liens.list",
3596	//   "parameterOrder": [],
3597	//   "parameters": {
3598	//     "pageSize": {
3599	//       "description": "The maximum number of items to return. This is a suggestion for the server.",
3600	//       "format": "int32",
3601	//       "location": "query",
3602	//       "type": "integer"
3603	//     },
3604	//     "pageToken": {
3605	//       "description": "The `next_page_token` value returned from a previous List request, if any.",
3606	//       "location": "query",
3607	//       "type": "string"
3608	//     },
3609	//     "parent": {
3610	//       "description": "Required. The name of the resource to list all attached Liens. For example, `projects/1234`. (google.api.field_policy).resource_type annotation is not set since the parent depends on the meta api implementation. This field could be a project or other sub project resources.",
3611	//       "location": "query",
3612	//       "type": "string"
3613	//     }
3614	//   },
3615	//   "path": "v1/liens",
3616	//   "response": {
3617	//     "$ref": "ListLiensResponse"
3618	//   },
3619	//   "scopes": [
3620	//     "https://www.googleapis.com/auth/cloud-platform",
3621	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
3622	//   ]
3623	// }
3624
3625}
3626
3627// Pages invokes f for each page of results.
3628// A non-nil error returned from f will halt the iteration.
3629// The provided context supersedes any context provided to the Context method.
3630func (c *LiensListCall) Pages(ctx context.Context, f func(*ListLiensResponse) error) error {
3631	c.ctx_ = ctx
3632	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3633	for {
3634		x, err := c.Do()
3635		if err != nil {
3636			return err
3637		}
3638		if err := f(x); err != nil {
3639			return err
3640		}
3641		if x.NextPageToken == "" {
3642			return nil
3643		}
3644		c.PageToken(x.NextPageToken)
3645	}
3646}
3647
3648// method id "cloudresourcemanager.operations.get":
3649
3650type OperationsGetCall struct {
3651	s            *Service
3652	name         string
3653	urlParams_   gensupport.URLParams
3654	ifNoneMatch_ string
3655	ctx_         context.Context
3656	header_      http.Header
3657}
3658
3659// Get: Gets the latest state of a long-running operation. Clients can
3660// use this method to poll the operation result at intervals as
3661// recommended by the API service.
3662func (r *OperationsService) Get(name string) *OperationsGetCall {
3663	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3664	c.name = name
3665	return c
3666}
3667
3668// Fields allows partial responses to be retrieved. See
3669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3670// for more information.
3671func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
3672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3673	return c
3674}
3675
3676// IfNoneMatch sets the optional parameter which makes the operation
3677// fail if the object's ETag matches the given value. This is useful for
3678// getting updates only after the object has changed since the last
3679// request. Use googleapi.IsNotModified to check whether the response
3680// error from Do is the result of In-None-Match.
3681func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
3682	c.ifNoneMatch_ = entityTag
3683	return c
3684}
3685
3686// Context sets the context to be used in this call's Do method. Any
3687// pending HTTP request will be aborted if the provided context is
3688// canceled.
3689func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
3690	c.ctx_ = ctx
3691	return c
3692}
3693
3694// Header returns an http.Header that can be modified by the caller to
3695// add HTTP headers to the request.
3696func (c *OperationsGetCall) Header() http.Header {
3697	if c.header_ == nil {
3698		c.header_ = make(http.Header)
3699	}
3700	return c.header_
3701}
3702
3703func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
3704	reqHeaders := make(http.Header)
3705	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3706	for k, v := range c.header_ {
3707		reqHeaders[k] = v
3708	}
3709	reqHeaders.Set("User-Agent", c.s.userAgent())
3710	if c.ifNoneMatch_ != "" {
3711		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3712	}
3713	var body io.Reader = nil
3714	c.urlParams_.Set("alt", alt)
3715	c.urlParams_.Set("prettyPrint", "false")
3716	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3717	urls += "?" + c.urlParams_.Encode()
3718	req, err := http.NewRequest("GET", urls, body)
3719	if err != nil {
3720		return nil, err
3721	}
3722	req.Header = reqHeaders
3723	googleapi.Expand(req.URL, map[string]string{
3724		"name": c.name,
3725	})
3726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3727}
3728
3729// Do executes the "cloudresourcemanager.operations.get" call.
3730// Exactly one of *Operation or error will be non-nil. Any non-2xx
3731// status code is an error. Response headers are in either
3732// *Operation.ServerResponse.Header or (if a response was returned at
3733// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3734// to check whether the returned error was because
3735// http.StatusNotModified was returned.
3736func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3737	gensupport.SetOptions(c.urlParams_, opts...)
3738	res, err := c.doRequest("json")
3739	if res != nil && res.StatusCode == http.StatusNotModified {
3740		if res.Body != nil {
3741			res.Body.Close()
3742		}
3743		return nil, &googleapi.Error{
3744			Code:   res.StatusCode,
3745			Header: res.Header,
3746		}
3747	}
3748	if err != nil {
3749		return nil, err
3750	}
3751	defer googleapi.CloseBody(res)
3752	if err := googleapi.CheckResponse(res); err != nil {
3753		return nil, err
3754	}
3755	ret := &Operation{
3756		ServerResponse: googleapi.ServerResponse{
3757			Header:         res.Header,
3758			HTTPStatusCode: res.StatusCode,
3759		},
3760	}
3761	target := &ret
3762	if err := gensupport.DecodeResponse(target, res); err != nil {
3763		return nil, err
3764	}
3765	return ret, nil
3766	// {
3767	//   "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.",
3768	//   "flatPath": "v1/operations/{operationsId}",
3769	//   "httpMethod": "GET",
3770	//   "id": "cloudresourcemanager.operations.get",
3771	//   "parameterOrder": [
3772	//     "name"
3773	//   ],
3774	//   "parameters": {
3775	//     "name": {
3776	//       "description": "The name of the operation resource.",
3777	//       "location": "path",
3778	//       "pattern": "^operations/.*$",
3779	//       "required": true,
3780	//       "type": "string"
3781	//     }
3782	//   },
3783	//   "path": "v1/{+name}",
3784	//   "response": {
3785	//     "$ref": "Operation"
3786	//   },
3787	//   "scopes": [
3788	//     "https://www.googleapis.com/auth/cloud-platform",
3789	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
3790	//   ]
3791	// }
3792
3793}
3794
3795// method id "cloudresourcemanager.organizations.clearOrgPolicy":
3796
3797type OrganizationsClearOrgPolicyCall struct {
3798	s                     *Service
3799	resource              string
3800	clearorgpolicyrequest *ClearOrgPolicyRequest
3801	urlParams_            gensupport.URLParams
3802	ctx_                  context.Context
3803	header_               http.Header
3804}
3805
3806// ClearOrgPolicy: Clears a `Policy` from a resource.
3807func (r *OrganizationsService) ClearOrgPolicy(resource string, clearorgpolicyrequest *ClearOrgPolicyRequest) *OrganizationsClearOrgPolicyCall {
3808	c := &OrganizationsClearOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3809	c.resource = resource
3810	c.clearorgpolicyrequest = clearorgpolicyrequest
3811	return c
3812}
3813
3814// Fields allows partial responses to be retrieved. See
3815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3816// for more information.
3817func (c *OrganizationsClearOrgPolicyCall) Fields(s ...googleapi.Field) *OrganizationsClearOrgPolicyCall {
3818	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3819	return c
3820}
3821
3822// Context sets the context to be used in this call's Do method. Any
3823// pending HTTP request will be aborted if the provided context is
3824// canceled.
3825func (c *OrganizationsClearOrgPolicyCall) Context(ctx context.Context) *OrganizationsClearOrgPolicyCall {
3826	c.ctx_ = ctx
3827	return c
3828}
3829
3830// Header returns an http.Header that can be modified by the caller to
3831// add HTTP headers to the request.
3832func (c *OrganizationsClearOrgPolicyCall) Header() http.Header {
3833	if c.header_ == nil {
3834		c.header_ = make(http.Header)
3835	}
3836	return c.header_
3837}
3838
3839func (c *OrganizationsClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
3840	reqHeaders := make(http.Header)
3841	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3842	for k, v := range c.header_ {
3843		reqHeaders[k] = v
3844	}
3845	reqHeaders.Set("User-Agent", c.s.userAgent())
3846	var body io.Reader = nil
3847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearorgpolicyrequest)
3848	if err != nil {
3849		return nil, err
3850	}
3851	reqHeaders.Set("Content-Type", "application/json")
3852	c.urlParams_.Set("alt", alt)
3853	c.urlParams_.Set("prettyPrint", "false")
3854	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:clearOrgPolicy")
3855	urls += "?" + c.urlParams_.Encode()
3856	req, err := http.NewRequest("POST", urls, body)
3857	if err != nil {
3858		return nil, err
3859	}
3860	req.Header = reqHeaders
3861	googleapi.Expand(req.URL, map[string]string{
3862		"resource": c.resource,
3863	})
3864	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3865}
3866
3867// Do executes the "cloudresourcemanager.organizations.clearOrgPolicy" call.
3868// Exactly one of *Empty or error will be non-nil. Any non-2xx status
3869// code is an error. Response headers are in either
3870// *Empty.ServerResponse.Header or (if a response was returned at all)
3871// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3872// check whether the returned error was because http.StatusNotModified
3873// was returned.
3874func (c *OrganizationsClearOrgPolicyCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3875	gensupport.SetOptions(c.urlParams_, opts...)
3876	res, err := c.doRequest("json")
3877	if res != nil && res.StatusCode == http.StatusNotModified {
3878		if res.Body != nil {
3879			res.Body.Close()
3880		}
3881		return nil, &googleapi.Error{
3882			Code:   res.StatusCode,
3883			Header: res.Header,
3884		}
3885	}
3886	if err != nil {
3887		return nil, err
3888	}
3889	defer googleapi.CloseBody(res)
3890	if err := googleapi.CheckResponse(res); err != nil {
3891		return nil, err
3892	}
3893	ret := &Empty{
3894		ServerResponse: googleapi.ServerResponse{
3895			Header:         res.Header,
3896			HTTPStatusCode: res.StatusCode,
3897		},
3898	}
3899	target := &ret
3900	if err := gensupport.DecodeResponse(target, res); err != nil {
3901		return nil, err
3902	}
3903	return ret, nil
3904	// {
3905	//   "description": "Clears a `Policy` from a resource.",
3906	//   "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy",
3907	//   "httpMethod": "POST",
3908	//   "id": "cloudresourcemanager.organizations.clearOrgPolicy",
3909	//   "parameterOrder": [
3910	//     "resource"
3911	//   ],
3912	//   "parameters": {
3913	//     "resource": {
3914	//       "description": "Name of the resource for the `Policy` to clear.",
3915	//       "location": "path",
3916	//       "pattern": "^organizations/[^/]+$",
3917	//       "required": true,
3918	//       "type": "string"
3919	//     }
3920	//   },
3921	//   "path": "v1/{+resource}:clearOrgPolicy",
3922	//   "request": {
3923	//     "$ref": "ClearOrgPolicyRequest"
3924	//   },
3925	//   "response": {
3926	//     "$ref": "Empty"
3927	//   },
3928	//   "scopes": [
3929	//     "https://www.googleapis.com/auth/cloud-platform"
3930	//   ]
3931	// }
3932
3933}
3934
3935// method id "cloudresourcemanager.organizations.get":
3936
3937type OrganizationsGetCall struct {
3938	s            *Service
3939	name         string
3940	urlParams_   gensupport.URLParams
3941	ifNoneMatch_ string
3942	ctx_         context.Context
3943	header_      http.Header
3944}
3945
3946// Get: Fetches an Organization resource identified by the specified
3947// resource name.
3948func (r *OrganizationsService) Get(name string) *OrganizationsGetCall {
3949	c := &OrganizationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3950	c.name = name
3951	return c
3952}
3953
3954// Fields allows partial responses to be retrieved. See
3955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3956// for more information.
3957func (c *OrganizationsGetCall) Fields(s ...googleapi.Field) *OrganizationsGetCall {
3958	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3959	return c
3960}
3961
3962// IfNoneMatch sets the optional parameter which makes the operation
3963// fail if the object's ETag matches the given value. This is useful for
3964// getting updates only after the object has changed since the last
3965// request. Use googleapi.IsNotModified to check whether the response
3966// error from Do is the result of In-None-Match.
3967func (c *OrganizationsGetCall) IfNoneMatch(entityTag string) *OrganizationsGetCall {
3968	c.ifNoneMatch_ = entityTag
3969	return c
3970}
3971
3972// Context sets the context to be used in this call's Do method. Any
3973// pending HTTP request will be aborted if the provided context is
3974// canceled.
3975func (c *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall {
3976	c.ctx_ = ctx
3977	return c
3978}
3979
3980// Header returns an http.Header that can be modified by the caller to
3981// add HTTP headers to the request.
3982func (c *OrganizationsGetCall) Header() http.Header {
3983	if c.header_ == nil {
3984		c.header_ = make(http.Header)
3985	}
3986	return c.header_
3987}
3988
3989func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) {
3990	reqHeaders := make(http.Header)
3991	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
3992	for k, v := range c.header_ {
3993		reqHeaders[k] = v
3994	}
3995	reqHeaders.Set("User-Agent", c.s.userAgent())
3996	if c.ifNoneMatch_ != "" {
3997		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3998	}
3999	var body io.Reader = nil
4000	c.urlParams_.Set("alt", alt)
4001	c.urlParams_.Set("prettyPrint", "false")
4002	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4003	urls += "?" + c.urlParams_.Encode()
4004	req, err := http.NewRequest("GET", urls, body)
4005	if err != nil {
4006		return nil, err
4007	}
4008	req.Header = reqHeaders
4009	googleapi.Expand(req.URL, map[string]string{
4010		"name": c.name,
4011	})
4012	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4013}
4014
4015// Do executes the "cloudresourcemanager.organizations.get" call.
4016// Exactly one of *Organization or error will be non-nil. Any non-2xx
4017// status code is an error. Response headers are in either
4018// *Organization.ServerResponse.Header or (if a response was returned at
4019// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4020// to check whether the returned error was because
4021// http.StatusNotModified was returned.
4022func (c *OrganizationsGetCall) Do(opts ...googleapi.CallOption) (*Organization, error) {
4023	gensupport.SetOptions(c.urlParams_, opts...)
4024	res, err := c.doRequest("json")
4025	if res != nil && res.StatusCode == http.StatusNotModified {
4026		if res.Body != nil {
4027			res.Body.Close()
4028		}
4029		return nil, &googleapi.Error{
4030			Code:   res.StatusCode,
4031			Header: res.Header,
4032		}
4033	}
4034	if err != nil {
4035		return nil, err
4036	}
4037	defer googleapi.CloseBody(res)
4038	if err := googleapi.CheckResponse(res); err != nil {
4039		return nil, err
4040	}
4041	ret := &Organization{
4042		ServerResponse: googleapi.ServerResponse{
4043			Header:         res.Header,
4044			HTTPStatusCode: res.StatusCode,
4045		},
4046	}
4047	target := &ret
4048	if err := gensupport.DecodeResponse(target, res); err != nil {
4049		return nil, err
4050	}
4051	return ret, nil
4052	// {
4053	//   "description": "Fetches an Organization resource identified by the specified resource name.",
4054	//   "flatPath": "v1/organizations/{organizationsId}",
4055	//   "httpMethod": "GET",
4056	//   "id": "cloudresourcemanager.organizations.get",
4057	//   "parameterOrder": [
4058	//     "name"
4059	//   ],
4060	//   "parameters": {
4061	//     "name": {
4062	//       "description": "The resource name of the Organization to fetch. This is the organization's relative path in the API, formatted as \"organizations/[organizationId]\". For example, \"organizations/1234\".",
4063	//       "location": "path",
4064	//       "pattern": "^organizations/[^/]+$",
4065	//       "required": true,
4066	//       "type": "string"
4067	//     }
4068	//   },
4069	//   "path": "v1/{+name}",
4070	//   "response": {
4071	//     "$ref": "Organization"
4072	//   },
4073	//   "scopes": [
4074	//     "https://www.googleapis.com/auth/cloud-platform",
4075	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4076	//   ]
4077	// }
4078
4079}
4080
4081// method id "cloudresourcemanager.organizations.getEffectiveOrgPolicy":
4082
4083type OrganizationsGetEffectiveOrgPolicyCall struct {
4084	s                            *Service
4085	resource                     string
4086	geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest
4087	urlParams_                   gensupport.URLParams
4088	ctx_                         context.Context
4089	header_                      http.Header
4090}
4091
4092// GetEffectiveOrgPolicy: Gets the effective `Policy` on a resource.
4093// This is the result of merging `Policies` in the resource hierarchy.
4094// The returned `Policy` will not have an `etag`set because it is a
4095// computed `Policy` across multiple resources. Subtrees of Resource
4096// Manager resource hierarchy with 'under:' prefix will not be expanded.
4097func (r *OrganizationsService) GetEffectiveOrgPolicy(resource string, geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest) *OrganizationsGetEffectiveOrgPolicyCall {
4098	c := &OrganizationsGetEffectiveOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4099	c.resource = resource
4100	c.geteffectiveorgpolicyrequest = geteffectiveorgpolicyrequest
4101	return c
4102}
4103
4104// Fields allows partial responses to be retrieved. See
4105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4106// for more information.
4107func (c *OrganizationsGetEffectiveOrgPolicyCall) Fields(s ...googleapi.Field) *OrganizationsGetEffectiveOrgPolicyCall {
4108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4109	return c
4110}
4111
4112// Context sets the context to be used in this call's Do method. Any
4113// pending HTTP request will be aborted if the provided context is
4114// canceled.
4115func (c *OrganizationsGetEffectiveOrgPolicyCall) Context(ctx context.Context) *OrganizationsGetEffectiveOrgPolicyCall {
4116	c.ctx_ = ctx
4117	return c
4118}
4119
4120// Header returns an http.Header that can be modified by the caller to
4121// add HTTP headers to the request.
4122func (c *OrganizationsGetEffectiveOrgPolicyCall) Header() http.Header {
4123	if c.header_ == nil {
4124		c.header_ = make(http.Header)
4125	}
4126	return c.header_
4127}
4128
4129func (c *OrganizationsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
4130	reqHeaders := make(http.Header)
4131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4132	for k, v := range c.header_ {
4133		reqHeaders[k] = v
4134	}
4135	reqHeaders.Set("User-Agent", c.s.userAgent())
4136	var body io.Reader = nil
4137	body, err := googleapi.WithoutDataWrapper.JSONReader(c.geteffectiveorgpolicyrequest)
4138	if err != nil {
4139		return nil, err
4140	}
4141	reqHeaders.Set("Content-Type", "application/json")
4142	c.urlParams_.Set("alt", alt)
4143	c.urlParams_.Set("prettyPrint", "false")
4144	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy")
4145	urls += "?" + c.urlParams_.Encode()
4146	req, err := http.NewRequest("POST", urls, body)
4147	if err != nil {
4148		return nil, err
4149	}
4150	req.Header = reqHeaders
4151	googleapi.Expand(req.URL, map[string]string{
4152		"resource": c.resource,
4153	})
4154	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4155}
4156
4157// Do executes the "cloudresourcemanager.organizations.getEffectiveOrgPolicy" call.
4158// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
4159// status code is an error. Response headers are in either
4160// *OrgPolicy.ServerResponse.Header or (if a response was returned at
4161// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4162// to check whether the returned error was because
4163// http.StatusNotModified was returned.
4164func (c *OrganizationsGetEffectiveOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
4165	gensupport.SetOptions(c.urlParams_, opts...)
4166	res, err := c.doRequest("json")
4167	if res != nil && res.StatusCode == http.StatusNotModified {
4168		if res.Body != nil {
4169			res.Body.Close()
4170		}
4171		return nil, &googleapi.Error{
4172			Code:   res.StatusCode,
4173			Header: res.Header,
4174		}
4175	}
4176	if err != nil {
4177		return nil, err
4178	}
4179	defer googleapi.CloseBody(res)
4180	if err := googleapi.CheckResponse(res); err != nil {
4181		return nil, err
4182	}
4183	ret := &OrgPolicy{
4184		ServerResponse: googleapi.ServerResponse{
4185			Header:         res.Header,
4186			HTTPStatusCode: res.StatusCode,
4187		},
4188	}
4189	target := &ret
4190	if err := gensupport.DecodeResponse(target, res); err != nil {
4191		return nil, err
4192	}
4193	return ret, nil
4194	// {
4195	//   "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.",
4196	//   "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy",
4197	//   "httpMethod": "POST",
4198	//   "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy",
4199	//   "parameterOrder": [
4200	//     "resource"
4201	//   ],
4202	//   "parameters": {
4203	//     "resource": {
4204	//       "description": "The name of the resource to start computing the effective `Policy`.",
4205	//       "location": "path",
4206	//       "pattern": "^organizations/[^/]+$",
4207	//       "required": true,
4208	//       "type": "string"
4209	//     }
4210	//   },
4211	//   "path": "v1/{+resource}:getEffectiveOrgPolicy",
4212	//   "request": {
4213	//     "$ref": "GetEffectiveOrgPolicyRequest"
4214	//   },
4215	//   "response": {
4216	//     "$ref": "OrgPolicy"
4217	//   },
4218	//   "scopes": [
4219	//     "https://www.googleapis.com/auth/cloud-platform",
4220	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4221	//   ]
4222	// }
4223
4224}
4225
4226// method id "cloudresourcemanager.organizations.getIamPolicy":
4227
4228type OrganizationsGetIamPolicyCall struct {
4229	s                   *Service
4230	resource            string
4231	getiampolicyrequest *GetIamPolicyRequest
4232	urlParams_          gensupport.URLParams
4233	ctx_                context.Context
4234	header_             http.Header
4235}
4236
4237// GetIamPolicy: Gets the access control policy for an Organization
4238// resource. May be empty if no such policy or resource exists. The
4239// `resource` field should be the organization's resource name, e.g.
4240// "organizations/123". Authorization requires the Google IAM permission
4241// `resourcemanager.organizations.getIamPolicy` on the specified
4242// organization
4243func (r *OrganizationsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsGetIamPolicyCall {
4244	c := &OrganizationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4245	c.resource = resource
4246	c.getiampolicyrequest = getiampolicyrequest
4247	return c
4248}
4249
4250// Fields allows partial responses to be retrieved. See
4251// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4252// for more information.
4253func (c *OrganizationsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsGetIamPolicyCall {
4254	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4255	return c
4256}
4257
4258// Context sets the context to be used in this call's Do method. Any
4259// pending HTTP request will be aborted if the provided context is
4260// canceled.
4261func (c *OrganizationsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsGetIamPolicyCall {
4262	c.ctx_ = ctx
4263	return c
4264}
4265
4266// Header returns an http.Header that can be modified by the caller to
4267// add HTTP headers to the request.
4268func (c *OrganizationsGetIamPolicyCall) Header() http.Header {
4269	if c.header_ == nil {
4270		c.header_ = make(http.Header)
4271	}
4272	return c.header_
4273}
4274
4275func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4276	reqHeaders := make(http.Header)
4277	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4278	for k, v := range c.header_ {
4279		reqHeaders[k] = v
4280	}
4281	reqHeaders.Set("User-Agent", c.s.userAgent())
4282	var body io.Reader = nil
4283	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
4284	if err != nil {
4285		return nil, err
4286	}
4287	reqHeaders.Set("Content-Type", "application/json")
4288	c.urlParams_.Set("alt", alt)
4289	c.urlParams_.Set("prettyPrint", "false")
4290	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
4291	urls += "?" + c.urlParams_.Encode()
4292	req, err := http.NewRequest("POST", urls, body)
4293	if err != nil {
4294		return nil, err
4295	}
4296	req.Header = reqHeaders
4297	googleapi.Expand(req.URL, map[string]string{
4298		"resource": c.resource,
4299	})
4300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4301}
4302
4303// Do executes the "cloudresourcemanager.organizations.getIamPolicy" call.
4304// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4305// code is an error. Response headers are in either
4306// *Policy.ServerResponse.Header or (if a response was returned at all)
4307// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4308// check whether the returned error was because http.StatusNotModified
4309// was returned.
4310func (c *OrganizationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4311	gensupport.SetOptions(c.urlParams_, opts...)
4312	res, err := c.doRequest("json")
4313	if res != nil && res.StatusCode == http.StatusNotModified {
4314		if res.Body != nil {
4315			res.Body.Close()
4316		}
4317		return nil, &googleapi.Error{
4318			Code:   res.StatusCode,
4319			Header: res.Header,
4320		}
4321	}
4322	if err != nil {
4323		return nil, err
4324	}
4325	defer googleapi.CloseBody(res)
4326	if err := googleapi.CheckResponse(res); err != nil {
4327		return nil, err
4328	}
4329	ret := &Policy{
4330		ServerResponse: googleapi.ServerResponse{
4331			Header:         res.Header,
4332			HTTPStatusCode: res.StatusCode,
4333		},
4334	}
4335	target := &ret
4336	if err := gensupport.DecodeResponse(target, res); err != nil {
4337		return nil, err
4338	}
4339	return ret, nil
4340	// {
4341	//   "description": "Gets the access control policy for an Organization resource. May be empty if no such policy or resource exists. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". Authorization requires the Google IAM permission `resourcemanager.organizations.getIamPolicy` on the specified organization",
4342	//   "flatPath": "v1/organizations/{organizationsId}:getIamPolicy",
4343	//   "httpMethod": "POST",
4344	//   "id": "cloudresourcemanager.organizations.getIamPolicy",
4345	//   "parameterOrder": [
4346	//     "resource"
4347	//   ],
4348	//   "parameters": {
4349	//     "resource": {
4350	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
4351	//       "location": "path",
4352	//       "pattern": "^organizations/[^/]+$",
4353	//       "required": true,
4354	//       "type": "string"
4355	//     }
4356	//   },
4357	//   "path": "v1/{+resource}:getIamPolicy",
4358	//   "request": {
4359	//     "$ref": "GetIamPolicyRequest"
4360	//   },
4361	//   "response": {
4362	//     "$ref": "Policy"
4363	//   },
4364	//   "scopes": [
4365	//     "https://www.googleapis.com/auth/cloud-platform",
4366	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4367	//   ]
4368	// }
4369
4370}
4371
4372// method id "cloudresourcemanager.organizations.getOrgPolicy":
4373
4374type OrganizationsGetOrgPolicyCall struct {
4375	s                   *Service
4376	resource            string
4377	getorgpolicyrequest *GetOrgPolicyRequest
4378	urlParams_          gensupport.URLParams
4379	ctx_                context.Context
4380	header_             http.Header
4381}
4382
4383// GetOrgPolicy: Gets a `Policy` on a resource. If no `Policy` is set on
4384// the resource, a `Policy` is returned with default values including
4385// `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value
4386// can be used with `SetOrgPolicy()` to create or update a `Policy`
4387// during read-modify-write.
4388func (r *OrganizationsService) GetOrgPolicy(resource string, getorgpolicyrequest *GetOrgPolicyRequest) *OrganizationsGetOrgPolicyCall {
4389	c := &OrganizationsGetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4390	c.resource = resource
4391	c.getorgpolicyrequest = getorgpolicyrequest
4392	return c
4393}
4394
4395// Fields allows partial responses to be retrieved. See
4396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4397// for more information.
4398func (c *OrganizationsGetOrgPolicyCall) Fields(s ...googleapi.Field) *OrganizationsGetOrgPolicyCall {
4399	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4400	return c
4401}
4402
4403// Context sets the context to be used in this call's Do method. Any
4404// pending HTTP request will be aborted if the provided context is
4405// canceled.
4406func (c *OrganizationsGetOrgPolicyCall) Context(ctx context.Context) *OrganizationsGetOrgPolicyCall {
4407	c.ctx_ = ctx
4408	return c
4409}
4410
4411// Header returns an http.Header that can be modified by the caller to
4412// add HTTP headers to the request.
4413func (c *OrganizationsGetOrgPolicyCall) Header() http.Header {
4414	if c.header_ == nil {
4415		c.header_ = make(http.Header)
4416	}
4417	return c.header_
4418}
4419
4420func (c *OrganizationsGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
4421	reqHeaders := make(http.Header)
4422	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4423	for k, v := range c.header_ {
4424		reqHeaders[k] = v
4425	}
4426	reqHeaders.Set("User-Agent", c.s.userAgent())
4427	var body io.Reader = nil
4428	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getorgpolicyrequest)
4429	if err != nil {
4430		return nil, err
4431	}
4432	reqHeaders.Set("Content-Type", "application/json")
4433	c.urlParams_.Set("alt", alt)
4434	c.urlParams_.Set("prettyPrint", "false")
4435	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy")
4436	urls += "?" + c.urlParams_.Encode()
4437	req, err := http.NewRequest("POST", urls, body)
4438	if err != nil {
4439		return nil, err
4440	}
4441	req.Header = reqHeaders
4442	googleapi.Expand(req.URL, map[string]string{
4443		"resource": c.resource,
4444	})
4445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4446}
4447
4448// Do executes the "cloudresourcemanager.organizations.getOrgPolicy" call.
4449// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
4450// status code is an error. Response headers are in either
4451// *OrgPolicy.ServerResponse.Header or (if a response was returned at
4452// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4453// to check whether the returned error was because
4454// http.StatusNotModified was returned.
4455func (c *OrganizationsGetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
4456	gensupport.SetOptions(c.urlParams_, opts...)
4457	res, err := c.doRequest("json")
4458	if res != nil && res.StatusCode == http.StatusNotModified {
4459		if res.Body != nil {
4460			res.Body.Close()
4461		}
4462		return nil, &googleapi.Error{
4463			Code:   res.StatusCode,
4464			Header: res.Header,
4465		}
4466	}
4467	if err != nil {
4468		return nil, err
4469	}
4470	defer googleapi.CloseBody(res)
4471	if err := googleapi.CheckResponse(res); err != nil {
4472		return nil, err
4473	}
4474	ret := &OrgPolicy{
4475		ServerResponse: googleapi.ServerResponse{
4476			Header:         res.Header,
4477			HTTPStatusCode: res.StatusCode,
4478		},
4479	}
4480	target := &ret
4481	if err := gensupport.DecodeResponse(target, res); err != nil {
4482		return nil, err
4483	}
4484	return ret, nil
4485	// {
4486	//   "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.",
4487	//   "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy",
4488	//   "httpMethod": "POST",
4489	//   "id": "cloudresourcemanager.organizations.getOrgPolicy",
4490	//   "parameterOrder": [
4491	//     "resource"
4492	//   ],
4493	//   "parameters": {
4494	//     "resource": {
4495	//       "description": "Name of the resource the `Policy` is set on.",
4496	//       "location": "path",
4497	//       "pattern": "^organizations/[^/]+$",
4498	//       "required": true,
4499	//       "type": "string"
4500	//     }
4501	//   },
4502	//   "path": "v1/{+resource}:getOrgPolicy",
4503	//   "request": {
4504	//     "$ref": "GetOrgPolicyRequest"
4505	//   },
4506	//   "response": {
4507	//     "$ref": "OrgPolicy"
4508	//   },
4509	//   "scopes": [
4510	//     "https://www.googleapis.com/auth/cloud-platform",
4511	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4512	//   ]
4513	// }
4514
4515}
4516
4517// method id "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints":
4518
4519type OrganizationsListAvailableOrgPolicyConstraintsCall struct {
4520	s                                        *Service
4521	resource                                 string
4522	listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest
4523	urlParams_                               gensupport.URLParams
4524	ctx_                                     context.Context
4525	header_                                  http.Header
4526}
4527
4528// ListAvailableOrgPolicyConstraints: Lists `Constraints` that could be
4529// applied on the specified resource.
4530func (r *OrganizationsService) ListAvailableOrgPolicyConstraints(resource string, listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest) *OrganizationsListAvailableOrgPolicyConstraintsCall {
4531	c := &OrganizationsListAvailableOrgPolicyConstraintsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4532	c.resource = resource
4533	c.listavailableorgpolicyconstraintsrequest = listavailableorgpolicyconstraintsrequest
4534	return c
4535}
4536
4537// Fields allows partial responses to be retrieved. See
4538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4539// for more information.
4540func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Fields(s ...googleapi.Field) *OrganizationsListAvailableOrgPolicyConstraintsCall {
4541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4542	return c
4543}
4544
4545// Context sets the context to be used in this call's Do method. Any
4546// pending HTTP request will be aborted if the provided context is
4547// canceled.
4548func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Context(ctx context.Context) *OrganizationsListAvailableOrgPolicyConstraintsCall {
4549	c.ctx_ = ctx
4550	return c
4551}
4552
4553// Header returns an http.Header that can be modified by the caller to
4554// add HTTP headers to the request.
4555func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Header() http.Header {
4556	if c.header_ == nil {
4557		c.header_ = make(http.Header)
4558	}
4559	return c.header_
4560}
4561
4562func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) {
4563	reqHeaders := make(http.Header)
4564	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4565	for k, v := range c.header_ {
4566		reqHeaders[k] = v
4567	}
4568	reqHeaders.Set("User-Agent", c.s.userAgent())
4569	var body io.Reader = nil
4570	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listavailableorgpolicyconstraintsrequest)
4571	if err != nil {
4572		return nil, err
4573	}
4574	reqHeaders.Set("Content-Type", "application/json")
4575	c.urlParams_.Set("alt", alt)
4576	c.urlParams_.Set("prettyPrint", "false")
4577	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints")
4578	urls += "?" + c.urlParams_.Encode()
4579	req, err := http.NewRequest("POST", urls, body)
4580	if err != nil {
4581		return nil, err
4582	}
4583	req.Header = reqHeaders
4584	googleapi.Expand(req.URL, map[string]string{
4585		"resource": c.resource,
4586	})
4587	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4588}
4589
4590// Do executes the "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints" call.
4591// Exactly one of *ListAvailableOrgPolicyConstraintsResponse or error
4592// will be non-nil. Any non-2xx status code is an error. Response
4593// headers are in either
4594// *ListAvailableOrgPolicyConstraintsResponse.ServerResponse.Header or
4595// (if a response was returned at all) in
4596// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4597// whether the returned error was because http.StatusNotModified was
4598// returned.
4599func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Do(opts ...googleapi.CallOption) (*ListAvailableOrgPolicyConstraintsResponse, error) {
4600	gensupport.SetOptions(c.urlParams_, opts...)
4601	res, err := c.doRequest("json")
4602	if res != nil && res.StatusCode == http.StatusNotModified {
4603		if res.Body != nil {
4604			res.Body.Close()
4605		}
4606		return nil, &googleapi.Error{
4607			Code:   res.StatusCode,
4608			Header: res.Header,
4609		}
4610	}
4611	if err != nil {
4612		return nil, err
4613	}
4614	defer googleapi.CloseBody(res)
4615	if err := googleapi.CheckResponse(res); err != nil {
4616		return nil, err
4617	}
4618	ret := &ListAvailableOrgPolicyConstraintsResponse{
4619		ServerResponse: googleapi.ServerResponse{
4620			Header:         res.Header,
4621			HTTPStatusCode: res.StatusCode,
4622		},
4623	}
4624	target := &ret
4625	if err := gensupport.DecodeResponse(target, res); err != nil {
4626		return nil, err
4627	}
4628	return ret, nil
4629	// {
4630	//   "description": "Lists `Constraints` that could be applied on the specified resource.",
4631	//   "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints",
4632	//   "httpMethod": "POST",
4633	//   "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints",
4634	//   "parameterOrder": [
4635	//     "resource"
4636	//   ],
4637	//   "parameters": {
4638	//     "resource": {
4639	//       "description": "Name of the resource to list `Constraints` for.",
4640	//       "location": "path",
4641	//       "pattern": "^organizations/[^/]+$",
4642	//       "required": true,
4643	//       "type": "string"
4644	//     }
4645	//   },
4646	//   "path": "v1/{+resource}:listAvailableOrgPolicyConstraints",
4647	//   "request": {
4648	//     "$ref": "ListAvailableOrgPolicyConstraintsRequest"
4649	//   },
4650	//   "response": {
4651	//     "$ref": "ListAvailableOrgPolicyConstraintsResponse"
4652	//   },
4653	//   "scopes": [
4654	//     "https://www.googleapis.com/auth/cloud-platform",
4655	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4656	//   ]
4657	// }
4658
4659}
4660
4661// Pages invokes f for each page of results.
4662// A non-nil error returned from f will halt the iteration.
4663// The provided context supersedes any context provided to the Context method.
4664func (c *OrganizationsListAvailableOrgPolicyConstraintsCall) Pages(ctx context.Context, f func(*ListAvailableOrgPolicyConstraintsResponse) error) error {
4665	c.ctx_ = ctx
4666	defer func(pt string) { c.listavailableorgpolicyconstraintsrequest.PageToken = pt }(c.listavailableorgpolicyconstraintsrequest.PageToken) // reset paging to original point
4667	for {
4668		x, err := c.Do()
4669		if err != nil {
4670			return err
4671		}
4672		if err := f(x); err != nil {
4673			return err
4674		}
4675		if x.NextPageToken == "" {
4676			return nil
4677		}
4678		c.listavailableorgpolicyconstraintsrequest.PageToken = x.NextPageToken
4679	}
4680}
4681
4682// method id "cloudresourcemanager.organizations.listOrgPolicies":
4683
4684type OrganizationsListOrgPoliciesCall struct {
4685	s                      *Service
4686	resource               string
4687	listorgpoliciesrequest *ListOrgPoliciesRequest
4688	urlParams_             gensupport.URLParams
4689	ctx_                   context.Context
4690	header_                http.Header
4691}
4692
4693// ListOrgPolicies: Lists all the `Policies` set for a particular
4694// resource.
4695func (r *OrganizationsService) ListOrgPolicies(resource string, listorgpoliciesrequest *ListOrgPoliciesRequest) *OrganizationsListOrgPoliciesCall {
4696	c := &OrganizationsListOrgPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4697	c.resource = resource
4698	c.listorgpoliciesrequest = listorgpoliciesrequest
4699	return c
4700}
4701
4702// Fields allows partial responses to be retrieved. See
4703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4704// for more information.
4705func (c *OrganizationsListOrgPoliciesCall) Fields(s ...googleapi.Field) *OrganizationsListOrgPoliciesCall {
4706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4707	return c
4708}
4709
4710// Context sets the context to be used in this call's Do method. Any
4711// pending HTTP request will be aborted if the provided context is
4712// canceled.
4713func (c *OrganizationsListOrgPoliciesCall) Context(ctx context.Context) *OrganizationsListOrgPoliciesCall {
4714	c.ctx_ = ctx
4715	return c
4716}
4717
4718// Header returns an http.Header that can be modified by the caller to
4719// add HTTP headers to the request.
4720func (c *OrganizationsListOrgPoliciesCall) Header() http.Header {
4721	if c.header_ == nil {
4722		c.header_ = make(http.Header)
4723	}
4724	return c.header_
4725}
4726
4727func (c *OrganizationsListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) {
4728	reqHeaders := make(http.Header)
4729	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4730	for k, v := range c.header_ {
4731		reqHeaders[k] = v
4732	}
4733	reqHeaders.Set("User-Agent", c.s.userAgent())
4734	var body io.Reader = nil
4735	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listorgpoliciesrequest)
4736	if err != nil {
4737		return nil, err
4738	}
4739	reqHeaders.Set("Content-Type", "application/json")
4740	c.urlParams_.Set("alt", alt)
4741	c.urlParams_.Set("prettyPrint", "false")
4742	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listOrgPolicies")
4743	urls += "?" + c.urlParams_.Encode()
4744	req, err := http.NewRequest("POST", urls, body)
4745	if err != nil {
4746		return nil, err
4747	}
4748	req.Header = reqHeaders
4749	googleapi.Expand(req.URL, map[string]string{
4750		"resource": c.resource,
4751	})
4752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4753}
4754
4755// Do executes the "cloudresourcemanager.organizations.listOrgPolicies" call.
4756// Exactly one of *ListOrgPoliciesResponse or error will be non-nil. Any
4757// non-2xx status code is an error. Response headers are in either
4758// *ListOrgPoliciesResponse.ServerResponse.Header or (if a response was
4759// returned at all) in error.(*googleapi.Error).Header. Use
4760// googleapi.IsNotModified to check whether the returned error was
4761// because http.StatusNotModified was returned.
4762func (c *OrganizationsListOrgPoliciesCall) Do(opts ...googleapi.CallOption) (*ListOrgPoliciesResponse, error) {
4763	gensupport.SetOptions(c.urlParams_, opts...)
4764	res, err := c.doRequest("json")
4765	if res != nil && res.StatusCode == http.StatusNotModified {
4766		if res.Body != nil {
4767			res.Body.Close()
4768		}
4769		return nil, &googleapi.Error{
4770			Code:   res.StatusCode,
4771			Header: res.Header,
4772		}
4773	}
4774	if err != nil {
4775		return nil, err
4776	}
4777	defer googleapi.CloseBody(res)
4778	if err := googleapi.CheckResponse(res); err != nil {
4779		return nil, err
4780	}
4781	ret := &ListOrgPoliciesResponse{
4782		ServerResponse: googleapi.ServerResponse{
4783			Header:         res.Header,
4784			HTTPStatusCode: res.StatusCode,
4785		},
4786	}
4787	target := &ret
4788	if err := gensupport.DecodeResponse(target, res); err != nil {
4789		return nil, err
4790	}
4791	return ret, nil
4792	// {
4793	//   "description": "Lists all the `Policies` set for a particular resource.",
4794	//   "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies",
4795	//   "httpMethod": "POST",
4796	//   "id": "cloudresourcemanager.organizations.listOrgPolicies",
4797	//   "parameterOrder": [
4798	//     "resource"
4799	//   ],
4800	//   "parameters": {
4801	//     "resource": {
4802	//       "description": "Name of the resource to list Policies for.",
4803	//       "location": "path",
4804	//       "pattern": "^organizations/[^/]+$",
4805	//       "required": true,
4806	//       "type": "string"
4807	//     }
4808	//   },
4809	//   "path": "v1/{+resource}:listOrgPolicies",
4810	//   "request": {
4811	//     "$ref": "ListOrgPoliciesRequest"
4812	//   },
4813	//   "response": {
4814	//     "$ref": "ListOrgPoliciesResponse"
4815	//   },
4816	//   "scopes": [
4817	//     "https://www.googleapis.com/auth/cloud-platform",
4818	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4819	//   ]
4820	// }
4821
4822}
4823
4824// Pages invokes f for each page of results.
4825// A non-nil error returned from f will halt the iteration.
4826// The provided context supersedes any context provided to the Context method.
4827func (c *OrganizationsListOrgPoliciesCall) Pages(ctx context.Context, f func(*ListOrgPoliciesResponse) error) error {
4828	c.ctx_ = ctx
4829	defer func(pt string) { c.listorgpoliciesrequest.PageToken = pt }(c.listorgpoliciesrequest.PageToken) // reset paging to original point
4830	for {
4831		x, err := c.Do()
4832		if err != nil {
4833			return err
4834		}
4835		if err := f(x); err != nil {
4836			return err
4837		}
4838		if x.NextPageToken == "" {
4839			return nil
4840		}
4841		c.listorgpoliciesrequest.PageToken = x.NextPageToken
4842	}
4843}
4844
4845// method id "cloudresourcemanager.organizations.search":
4846
4847type OrganizationsSearchCall struct {
4848	s                          *Service
4849	searchorganizationsrequest *SearchOrganizationsRequest
4850	urlParams_                 gensupport.URLParams
4851	ctx_                       context.Context
4852	header_                    http.Header
4853}
4854
4855// Search: Searches Organization resources that are visible to the user
4856// and satisfy the specified filter. This method returns Organizations
4857// in an unspecified order. New Organizations do not necessarily appear
4858// at the end of the results. Search will only return organizations on
4859// which the user has the permission `resourcemanager.organizations.get`
4860func (r *OrganizationsService) Search(searchorganizationsrequest *SearchOrganizationsRequest) *OrganizationsSearchCall {
4861	c := &OrganizationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4862	c.searchorganizationsrequest = searchorganizationsrequest
4863	return c
4864}
4865
4866// Fields allows partial responses to be retrieved. See
4867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4868// for more information.
4869func (c *OrganizationsSearchCall) Fields(s ...googleapi.Field) *OrganizationsSearchCall {
4870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4871	return c
4872}
4873
4874// Context sets the context to be used in this call's Do method. Any
4875// pending HTTP request will be aborted if the provided context is
4876// canceled.
4877func (c *OrganizationsSearchCall) Context(ctx context.Context) *OrganizationsSearchCall {
4878	c.ctx_ = ctx
4879	return c
4880}
4881
4882// Header returns an http.Header that can be modified by the caller to
4883// add HTTP headers to the request.
4884func (c *OrganizationsSearchCall) Header() http.Header {
4885	if c.header_ == nil {
4886		c.header_ = make(http.Header)
4887	}
4888	return c.header_
4889}
4890
4891func (c *OrganizationsSearchCall) doRequest(alt string) (*http.Response, error) {
4892	reqHeaders := make(http.Header)
4893	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
4894	for k, v := range c.header_ {
4895		reqHeaders[k] = v
4896	}
4897	reqHeaders.Set("User-Agent", c.s.userAgent())
4898	var body io.Reader = nil
4899	body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchorganizationsrequest)
4900	if err != nil {
4901		return nil, err
4902	}
4903	reqHeaders.Set("Content-Type", "application/json")
4904	c.urlParams_.Set("alt", alt)
4905	c.urlParams_.Set("prettyPrint", "false")
4906	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/organizations:search")
4907	urls += "?" + c.urlParams_.Encode()
4908	req, err := http.NewRequest("POST", urls, body)
4909	if err != nil {
4910		return nil, err
4911	}
4912	req.Header = reqHeaders
4913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4914}
4915
4916// Do executes the "cloudresourcemanager.organizations.search" call.
4917// Exactly one of *SearchOrganizationsResponse or error will be non-nil.
4918// Any non-2xx status code is an error. Response headers are in either
4919// *SearchOrganizationsResponse.ServerResponse.Header or (if a response
4920// was returned at all) in error.(*googleapi.Error).Header. Use
4921// googleapi.IsNotModified to check whether the returned error was
4922// because http.StatusNotModified was returned.
4923func (c *OrganizationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchOrganizationsResponse, error) {
4924	gensupport.SetOptions(c.urlParams_, opts...)
4925	res, err := c.doRequest("json")
4926	if res != nil && res.StatusCode == http.StatusNotModified {
4927		if res.Body != nil {
4928			res.Body.Close()
4929		}
4930		return nil, &googleapi.Error{
4931			Code:   res.StatusCode,
4932			Header: res.Header,
4933		}
4934	}
4935	if err != nil {
4936		return nil, err
4937	}
4938	defer googleapi.CloseBody(res)
4939	if err := googleapi.CheckResponse(res); err != nil {
4940		return nil, err
4941	}
4942	ret := &SearchOrganizationsResponse{
4943		ServerResponse: googleapi.ServerResponse{
4944			Header:         res.Header,
4945			HTTPStatusCode: res.StatusCode,
4946		},
4947	}
4948	target := &ret
4949	if err := gensupport.DecodeResponse(target, res); err != nil {
4950		return nil, err
4951	}
4952	return ret, nil
4953	// {
4954	//   "description": "Searches Organization resources that are visible to the user and satisfy the specified filter. This method returns Organizations in an unspecified order. New Organizations do not necessarily appear at the end of the results. Search will only return organizations on which the user has the permission `resourcemanager.organizations.get`",
4955	//   "flatPath": "v1/organizations:search",
4956	//   "httpMethod": "POST",
4957	//   "id": "cloudresourcemanager.organizations.search",
4958	//   "parameterOrder": [],
4959	//   "parameters": {},
4960	//   "path": "v1/organizations:search",
4961	//   "request": {
4962	//     "$ref": "SearchOrganizationsRequest"
4963	//   },
4964	//   "response": {
4965	//     "$ref": "SearchOrganizationsResponse"
4966	//   },
4967	//   "scopes": [
4968	//     "https://www.googleapis.com/auth/cloud-platform",
4969	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
4970	//   ]
4971	// }
4972
4973}
4974
4975// Pages invokes f for each page of results.
4976// A non-nil error returned from f will halt the iteration.
4977// The provided context supersedes any context provided to the Context method.
4978func (c *OrganizationsSearchCall) Pages(ctx context.Context, f func(*SearchOrganizationsResponse) error) error {
4979	c.ctx_ = ctx
4980	defer func(pt string) { c.searchorganizationsrequest.PageToken = pt }(c.searchorganizationsrequest.PageToken) // reset paging to original point
4981	for {
4982		x, err := c.Do()
4983		if err != nil {
4984			return err
4985		}
4986		if err := f(x); err != nil {
4987			return err
4988		}
4989		if x.NextPageToken == "" {
4990			return nil
4991		}
4992		c.searchorganizationsrequest.PageToken = x.NextPageToken
4993	}
4994}
4995
4996// method id "cloudresourcemanager.organizations.setIamPolicy":
4997
4998type OrganizationsSetIamPolicyCall struct {
4999	s                   *Service
5000	resource            string
5001	setiampolicyrequest *SetIamPolicyRequest
5002	urlParams_          gensupport.URLParams
5003	ctx_                context.Context
5004	header_             http.Header
5005}
5006
5007// SetIamPolicy: Sets the access control policy on an Organization
5008// resource. Replaces any existing policy. The `resource` field should
5009// be the organization's resource name, e.g. "organizations/123".
5010// Authorization requires the Google IAM permission
5011// `resourcemanager.organizations.setIamPolicy` on the specified
5012// organization
5013func (r *OrganizationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsSetIamPolicyCall {
5014	c := &OrganizationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5015	c.resource = resource
5016	c.setiampolicyrequest = setiampolicyrequest
5017	return c
5018}
5019
5020// Fields allows partial responses to be retrieved. See
5021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5022// for more information.
5023func (c *OrganizationsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSetIamPolicyCall {
5024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5025	return c
5026}
5027
5028// Context sets the context to be used in this call's Do method. Any
5029// pending HTTP request will be aborted if the provided context is
5030// canceled.
5031func (c *OrganizationsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSetIamPolicyCall {
5032	c.ctx_ = ctx
5033	return c
5034}
5035
5036// Header returns an http.Header that can be modified by the caller to
5037// add HTTP headers to the request.
5038func (c *OrganizationsSetIamPolicyCall) Header() http.Header {
5039	if c.header_ == nil {
5040		c.header_ = make(http.Header)
5041	}
5042	return c.header_
5043}
5044
5045func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5046	reqHeaders := make(http.Header)
5047	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5048	for k, v := range c.header_ {
5049		reqHeaders[k] = v
5050	}
5051	reqHeaders.Set("User-Agent", c.s.userAgent())
5052	var body io.Reader = nil
5053	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5054	if err != nil {
5055		return nil, err
5056	}
5057	reqHeaders.Set("Content-Type", "application/json")
5058	c.urlParams_.Set("alt", alt)
5059	c.urlParams_.Set("prettyPrint", "false")
5060	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
5061	urls += "?" + c.urlParams_.Encode()
5062	req, err := http.NewRequest("POST", urls, body)
5063	if err != nil {
5064		return nil, err
5065	}
5066	req.Header = reqHeaders
5067	googleapi.Expand(req.URL, map[string]string{
5068		"resource": c.resource,
5069	})
5070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5071}
5072
5073// Do executes the "cloudresourcemanager.organizations.setIamPolicy" call.
5074// Exactly one of *Policy or error will be non-nil. Any non-2xx status
5075// code is an error. Response headers are in either
5076// *Policy.ServerResponse.Header or (if a response was returned at all)
5077// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5078// check whether the returned error was because http.StatusNotModified
5079// was returned.
5080func (c *OrganizationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5081	gensupport.SetOptions(c.urlParams_, opts...)
5082	res, err := c.doRequest("json")
5083	if res != nil && res.StatusCode == http.StatusNotModified {
5084		if res.Body != nil {
5085			res.Body.Close()
5086		}
5087		return nil, &googleapi.Error{
5088			Code:   res.StatusCode,
5089			Header: res.Header,
5090		}
5091	}
5092	if err != nil {
5093		return nil, err
5094	}
5095	defer googleapi.CloseBody(res)
5096	if err := googleapi.CheckResponse(res); err != nil {
5097		return nil, err
5098	}
5099	ret := &Policy{
5100		ServerResponse: googleapi.ServerResponse{
5101			Header:         res.Header,
5102			HTTPStatusCode: res.StatusCode,
5103		},
5104	}
5105	target := &ret
5106	if err := gensupport.DecodeResponse(target, res); err != nil {
5107		return nil, err
5108	}
5109	return ret, nil
5110	// {
5111	//   "description": "Sets the access control policy on an Organization resource. Replaces any existing policy. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". Authorization requires the Google IAM permission `resourcemanager.organizations.setIamPolicy` on the specified organization",
5112	//   "flatPath": "v1/organizations/{organizationsId}:setIamPolicy",
5113	//   "httpMethod": "POST",
5114	//   "id": "cloudresourcemanager.organizations.setIamPolicy",
5115	//   "parameterOrder": [
5116	//     "resource"
5117	//   ],
5118	//   "parameters": {
5119	//     "resource": {
5120	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
5121	//       "location": "path",
5122	//       "pattern": "^organizations/[^/]+$",
5123	//       "required": true,
5124	//       "type": "string"
5125	//     }
5126	//   },
5127	//   "path": "v1/{+resource}:setIamPolicy",
5128	//   "request": {
5129	//     "$ref": "SetIamPolicyRequest"
5130	//   },
5131	//   "response": {
5132	//     "$ref": "Policy"
5133	//   },
5134	//   "scopes": [
5135	//     "https://www.googleapis.com/auth/cloud-platform"
5136	//   ]
5137	// }
5138
5139}
5140
5141// method id "cloudresourcemanager.organizations.setOrgPolicy":
5142
5143type OrganizationsSetOrgPolicyCall struct {
5144	s                   *Service
5145	resource            string
5146	setorgpolicyrequest *SetOrgPolicyRequest
5147	urlParams_          gensupport.URLParams
5148	ctx_                context.Context
5149	header_             http.Header
5150}
5151
5152// SetOrgPolicy: Updates the specified `Policy` on the resource. Creates
5153// a new `Policy` for that `Constraint` on the resource if one does not
5154// exist. Not supplying an `etag` on the request `Policy` results in an
5155// unconditional write of the `Policy`.
5156func (r *OrganizationsService) SetOrgPolicy(resource string, setorgpolicyrequest *SetOrgPolicyRequest) *OrganizationsSetOrgPolicyCall {
5157	c := &OrganizationsSetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5158	c.resource = resource
5159	c.setorgpolicyrequest = setorgpolicyrequest
5160	return c
5161}
5162
5163// Fields allows partial responses to be retrieved. See
5164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5165// for more information.
5166func (c *OrganizationsSetOrgPolicyCall) Fields(s ...googleapi.Field) *OrganizationsSetOrgPolicyCall {
5167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5168	return c
5169}
5170
5171// Context sets the context to be used in this call's Do method. Any
5172// pending HTTP request will be aborted if the provided context is
5173// canceled.
5174func (c *OrganizationsSetOrgPolicyCall) Context(ctx context.Context) *OrganizationsSetOrgPolicyCall {
5175	c.ctx_ = ctx
5176	return c
5177}
5178
5179// Header returns an http.Header that can be modified by the caller to
5180// add HTTP headers to the request.
5181func (c *OrganizationsSetOrgPolicyCall) Header() http.Header {
5182	if c.header_ == nil {
5183		c.header_ = make(http.Header)
5184	}
5185	return c.header_
5186}
5187
5188func (c *OrganizationsSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
5189	reqHeaders := make(http.Header)
5190	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5191	for k, v := range c.header_ {
5192		reqHeaders[k] = v
5193	}
5194	reqHeaders.Set("User-Agent", c.s.userAgent())
5195	var body io.Reader = nil
5196	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setorgpolicyrequest)
5197	if err != nil {
5198		return nil, err
5199	}
5200	reqHeaders.Set("Content-Type", "application/json")
5201	c.urlParams_.Set("alt", alt)
5202	c.urlParams_.Set("prettyPrint", "false")
5203	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy")
5204	urls += "?" + c.urlParams_.Encode()
5205	req, err := http.NewRequest("POST", urls, body)
5206	if err != nil {
5207		return nil, err
5208	}
5209	req.Header = reqHeaders
5210	googleapi.Expand(req.URL, map[string]string{
5211		"resource": c.resource,
5212	})
5213	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5214}
5215
5216// Do executes the "cloudresourcemanager.organizations.setOrgPolicy" call.
5217// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
5218// status code is an error. Response headers are in either
5219// *OrgPolicy.ServerResponse.Header or (if a response was returned at
5220// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5221// to check whether the returned error was because
5222// http.StatusNotModified was returned.
5223func (c *OrganizationsSetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
5224	gensupport.SetOptions(c.urlParams_, opts...)
5225	res, err := c.doRequest("json")
5226	if res != nil && res.StatusCode == http.StatusNotModified {
5227		if res.Body != nil {
5228			res.Body.Close()
5229		}
5230		return nil, &googleapi.Error{
5231			Code:   res.StatusCode,
5232			Header: res.Header,
5233		}
5234	}
5235	if err != nil {
5236		return nil, err
5237	}
5238	defer googleapi.CloseBody(res)
5239	if err := googleapi.CheckResponse(res); err != nil {
5240		return nil, err
5241	}
5242	ret := &OrgPolicy{
5243		ServerResponse: googleapi.ServerResponse{
5244			Header:         res.Header,
5245			HTTPStatusCode: res.StatusCode,
5246		},
5247	}
5248	target := &ret
5249	if err := gensupport.DecodeResponse(target, res); err != nil {
5250		return nil, err
5251	}
5252	return ret, nil
5253	// {
5254	//   "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.",
5255	//   "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy",
5256	//   "httpMethod": "POST",
5257	//   "id": "cloudresourcemanager.organizations.setOrgPolicy",
5258	//   "parameterOrder": [
5259	//     "resource"
5260	//   ],
5261	//   "parameters": {
5262	//     "resource": {
5263	//       "description": "Resource name of the resource to attach the `Policy`.",
5264	//       "location": "path",
5265	//       "pattern": "^organizations/[^/]+$",
5266	//       "required": true,
5267	//       "type": "string"
5268	//     }
5269	//   },
5270	//   "path": "v1/{+resource}:setOrgPolicy",
5271	//   "request": {
5272	//     "$ref": "SetOrgPolicyRequest"
5273	//   },
5274	//   "response": {
5275	//     "$ref": "OrgPolicy"
5276	//   },
5277	//   "scopes": [
5278	//     "https://www.googleapis.com/auth/cloud-platform"
5279	//   ]
5280	// }
5281
5282}
5283
5284// method id "cloudresourcemanager.organizations.testIamPermissions":
5285
5286type OrganizationsTestIamPermissionsCall struct {
5287	s                         *Service
5288	resource                  string
5289	testiampermissionsrequest *TestIamPermissionsRequest
5290	urlParams_                gensupport.URLParams
5291	ctx_                      context.Context
5292	header_                   http.Header
5293}
5294
5295// TestIamPermissions: Returns permissions that a caller has on the
5296// specified Organization. The `resource` field should be the
5297// organization's resource name, e.g. "organizations/123". There are no
5298// permissions required for making this API call.
5299func (r *OrganizationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsTestIamPermissionsCall {
5300	c := &OrganizationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5301	c.resource = resource
5302	c.testiampermissionsrequest = testiampermissionsrequest
5303	return c
5304}
5305
5306// Fields allows partial responses to be retrieved. See
5307// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5308// for more information.
5309func (c *OrganizationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsTestIamPermissionsCall {
5310	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5311	return c
5312}
5313
5314// Context sets the context to be used in this call's Do method. Any
5315// pending HTTP request will be aborted if the provided context is
5316// canceled.
5317func (c *OrganizationsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsTestIamPermissionsCall {
5318	c.ctx_ = ctx
5319	return c
5320}
5321
5322// Header returns an http.Header that can be modified by the caller to
5323// add HTTP headers to the request.
5324func (c *OrganizationsTestIamPermissionsCall) Header() http.Header {
5325	if c.header_ == nil {
5326		c.header_ = make(http.Header)
5327	}
5328	return c.header_
5329}
5330
5331func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5332	reqHeaders := make(http.Header)
5333	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5334	for k, v := range c.header_ {
5335		reqHeaders[k] = v
5336	}
5337	reqHeaders.Set("User-Agent", c.s.userAgent())
5338	var body io.Reader = nil
5339	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5340	if err != nil {
5341		return nil, err
5342	}
5343	reqHeaders.Set("Content-Type", "application/json")
5344	c.urlParams_.Set("alt", alt)
5345	c.urlParams_.Set("prettyPrint", "false")
5346	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
5347	urls += "?" + c.urlParams_.Encode()
5348	req, err := http.NewRequest("POST", urls, body)
5349	if err != nil {
5350		return nil, err
5351	}
5352	req.Header = reqHeaders
5353	googleapi.Expand(req.URL, map[string]string{
5354		"resource": c.resource,
5355	})
5356	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5357}
5358
5359// Do executes the "cloudresourcemanager.organizations.testIamPermissions" call.
5360// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
5361// Any non-2xx status code is an error. Response headers are in either
5362// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
5363// was returned at all) in error.(*googleapi.Error).Header. Use
5364// googleapi.IsNotModified to check whether the returned error was
5365// because http.StatusNotModified was returned.
5366func (c *OrganizationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5367	gensupport.SetOptions(c.urlParams_, opts...)
5368	res, err := c.doRequest("json")
5369	if res != nil && res.StatusCode == http.StatusNotModified {
5370		if res.Body != nil {
5371			res.Body.Close()
5372		}
5373		return nil, &googleapi.Error{
5374			Code:   res.StatusCode,
5375			Header: res.Header,
5376		}
5377	}
5378	if err != nil {
5379		return nil, err
5380	}
5381	defer googleapi.CloseBody(res)
5382	if err := googleapi.CheckResponse(res); err != nil {
5383		return nil, err
5384	}
5385	ret := &TestIamPermissionsResponse{
5386		ServerResponse: googleapi.ServerResponse{
5387			Header:         res.Header,
5388			HTTPStatusCode: res.StatusCode,
5389		},
5390	}
5391	target := &ret
5392	if err := gensupport.DecodeResponse(target, res); err != nil {
5393		return nil, err
5394	}
5395	return ret, nil
5396	// {
5397	//   "description": "Returns permissions that a caller has on the specified Organization. The `resource` field should be the organization's resource name, e.g. \"organizations/123\". There are no permissions required for making this API call.",
5398	//   "flatPath": "v1/organizations/{organizationsId}:testIamPermissions",
5399	//   "httpMethod": "POST",
5400	//   "id": "cloudresourcemanager.organizations.testIamPermissions",
5401	//   "parameterOrder": [
5402	//     "resource"
5403	//   ],
5404	//   "parameters": {
5405	//     "resource": {
5406	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
5407	//       "location": "path",
5408	//       "pattern": "^organizations/[^/]+$",
5409	//       "required": true,
5410	//       "type": "string"
5411	//     }
5412	//   },
5413	//   "path": "v1/{+resource}:testIamPermissions",
5414	//   "request": {
5415	//     "$ref": "TestIamPermissionsRequest"
5416	//   },
5417	//   "response": {
5418	//     "$ref": "TestIamPermissionsResponse"
5419	//   },
5420	//   "scopes": [
5421	//     "https://www.googleapis.com/auth/cloud-platform",
5422	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
5423	//   ]
5424	// }
5425
5426}
5427
5428// method id "cloudresourcemanager.projects.clearOrgPolicy":
5429
5430type ProjectsClearOrgPolicyCall struct {
5431	s                     *Service
5432	resource              string
5433	clearorgpolicyrequest *ClearOrgPolicyRequest
5434	urlParams_            gensupport.URLParams
5435	ctx_                  context.Context
5436	header_               http.Header
5437}
5438
5439// ClearOrgPolicy: Clears a `Policy` from a resource.
5440func (r *ProjectsService) ClearOrgPolicy(resource string, clearorgpolicyrequest *ClearOrgPolicyRequest) *ProjectsClearOrgPolicyCall {
5441	c := &ProjectsClearOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5442	c.resource = resource
5443	c.clearorgpolicyrequest = clearorgpolicyrequest
5444	return c
5445}
5446
5447// Fields allows partial responses to be retrieved. See
5448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5449// for more information.
5450func (c *ProjectsClearOrgPolicyCall) Fields(s ...googleapi.Field) *ProjectsClearOrgPolicyCall {
5451	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5452	return c
5453}
5454
5455// Context sets the context to be used in this call's Do method. Any
5456// pending HTTP request will be aborted if the provided context is
5457// canceled.
5458func (c *ProjectsClearOrgPolicyCall) Context(ctx context.Context) *ProjectsClearOrgPolicyCall {
5459	c.ctx_ = ctx
5460	return c
5461}
5462
5463// Header returns an http.Header that can be modified by the caller to
5464// add HTTP headers to the request.
5465func (c *ProjectsClearOrgPolicyCall) Header() http.Header {
5466	if c.header_ == nil {
5467		c.header_ = make(http.Header)
5468	}
5469	return c.header_
5470}
5471
5472func (c *ProjectsClearOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
5473	reqHeaders := make(http.Header)
5474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5475	for k, v := range c.header_ {
5476		reqHeaders[k] = v
5477	}
5478	reqHeaders.Set("User-Agent", c.s.userAgent())
5479	var body io.Reader = nil
5480	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearorgpolicyrequest)
5481	if err != nil {
5482		return nil, err
5483	}
5484	reqHeaders.Set("Content-Type", "application/json")
5485	c.urlParams_.Set("alt", alt)
5486	c.urlParams_.Set("prettyPrint", "false")
5487	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:clearOrgPolicy")
5488	urls += "?" + c.urlParams_.Encode()
5489	req, err := http.NewRequest("POST", urls, body)
5490	if err != nil {
5491		return nil, err
5492	}
5493	req.Header = reqHeaders
5494	googleapi.Expand(req.URL, map[string]string{
5495		"resource": c.resource,
5496	})
5497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5498}
5499
5500// Do executes the "cloudresourcemanager.projects.clearOrgPolicy" call.
5501// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5502// code is an error. Response headers are in either
5503// *Empty.ServerResponse.Header or (if a response was returned at all)
5504// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5505// check whether the returned error was because http.StatusNotModified
5506// was returned.
5507func (c *ProjectsClearOrgPolicyCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5508	gensupport.SetOptions(c.urlParams_, opts...)
5509	res, err := c.doRequest("json")
5510	if res != nil && res.StatusCode == http.StatusNotModified {
5511		if res.Body != nil {
5512			res.Body.Close()
5513		}
5514		return nil, &googleapi.Error{
5515			Code:   res.StatusCode,
5516			Header: res.Header,
5517		}
5518	}
5519	if err != nil {
5520		return nil, err
5521	}
5522	defer googleapi.CloseBody(res)
5523	if err := googleapi.CheckResponse(res); err != nil {
5524		return nil, err
5525	}
5526	ret := &Empty{
5527		ServerResponse: googleapi.ServerResponse{
5528			Header:         res.Header,
5529			HTTPStatusCode: res.StatusCode,
5530		},
5531	}
5532	target := &ret
5533	if err := gensupport.DecodeResponse(target, res); err != nil {
5534		return nil, err
5535	}
5536	return ret, nil
5537	// {
5538	//   "description": "Clears a `Policy` from a resource.",
5539	//   "flatPath": "v1/projects/{projectsId}:clearOrgPolicy",
5540	//   "httpMethod": "POST",
5541	//   "id": "cloudresourcemanager.projects.clearOrgPolicy",
5542	//   "parameterOrder": [
5543	//     "resource"
5544	//   ],
5545	//   "parameters": {
5546	//     "resource": {
5547	//       "description": "Name of the resource for the `Policy` to clear.",
5548	//       "location": "path",
5549	//       "pattern": "^projects/[^/]+$",
5550	//       "required": true,
5551	//       "type": "string"
5552	//     }
5553	//   },
5554	//   "path": "v1/{+resource}:clearOrgPolicy",
5555	//   "request": {
5556	//     "$ref": "ClearOrgPolicyRequest"
5557	//   },
5558	//   "response": {
5559	//     "$ref": "Empty"
5560	//   },
5561	//   "scopes": [
5562	//     "https://www.googleapis.com/auth/cloud-platform"
5563	//   ]
5564	// }
5565
5566}
5567
5568// method id "cloudresourcemanager.projects.create":
5569
5570type ProjectsCreateCall struct {
5571	s          *Service
5572	project    *Project
5573	urlParams_ gensupport.URLParams
5574	ctx_       context.Context
5575	header_    http.Header
5576}
5577
5578// Create: Request that a new Project be created. The result is an
5579// Operation which can be used to track the creation process. This
5580// process usually takes a few seconds, but can sometimes take much
5581// longer. The tracking Operation is automatically deleted after a few
5582// hours, so there is no need to call DeleteOperation. Authorization
5583// requires the Google IAM permission `resourcemanager.projects.create`
5584// on the specified parent for the new project. The parent is identified
5585// by a specified ResourceId, which must include both an ID and a type,
5586// such as organization. This method does not associate the new project
5587// with a billing account. You can set or update the billing account
5588// associated with a project using the [`projects.updateBillingInfo`]
5589// (/billing/reference/rest/v1/projects/updateBillingInfo) method.
5590func (r *ProjectsService) Create(project *Project) *ProjectsCreateCall {
5591	c := &ProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5592	c.project = project
5593	return c
5594}
5595
5596// Fields allows partial responses to be retrieved. See
5597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5598// for more information.
5599func (c *ProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsCreateCall {
5600	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5601	return c
5602}
5603
5604// Context sets the context to be used in this call's Do method. Any
5605// pending HTTP request will be aborted if the provided context is
5606// canceled.
5607func (c *ProjectsCreateCall) Context(ctx context.Context) *ProjectsCreateCall {
5608	c.ctx_ = ctx
5609	return c
5610}
5611
5612// Header returns an http.Header that can be modified by the caller to
5613// add HTTP headers to the request.
5614func (c *ProjectsCreateCall) Header() http.Header {
5615	if c.header_ == nil {
5616		c.header_ = make(http.Header)
5617	}
5618	return c.header_
5619}
5620
5621func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
5622	reqHeaders := make(http.Header)
5623	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5624	for k, v := range c.header_ {
5625		reqHeaders[k] = v
5626	}
5627	reqHeaders.Set("User-Agent", c.s.userAgent())
5628	var body io.Reader = nil
5629	body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
5630	if err != nil {
5631		return nil, err
5632	}
5633	reqHeaders.Set("Content-Type", "application/json")
5634	c.urlParams_.Set("alt", alt)
5635	c.urlParams_.Set("prettyPrint", "false")
5636	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects")
5637	urls += "?" + c.urlParams_.Encode()
5638	req, err := http.NewRequest("POST", urls, body)
5639	if err != nil {
5640		return nil, err
5641	}
5642	req.Header = reqHeaders
5643	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5644}
5645
5646// Do executes the "cloudresourcemanager.projects.create" call.
5647// Exactly one of *Operation or error will be non-nil. Any non-2xx
5648// status code is an error. Response headers are in either
5649// *Operation.ServerResponse.Header or (if a response was returned at
5650// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5651// to check whether the returned error was because
5652// http.StatusNotModified was returned.
5653func (c *ProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5654	gensupport.SetOptions(c.urlParams_, opts...)
5655	res, err := c.doRequest("json")
5656	if res != nil && res.StatusCode == http.StatusNotModified {
5657		if res.Body != nil {
5658			res.Body.Close()
5659		}
5660		return nil, &googleapi.Error{
5661			Code:   res.StatusCode,
5662			Header: res.Header,
5663		}
5664	}
5665	if err != nil {
5666		return nil, err
5667	}
5668	defer googleapi.CloseBody(res)
5669	if err := googleapi.CheckResponse(res); err != nil {
5670		return nil, err
5671	}
5672	ret := &Operation{
5673		ServerResponse: googleapi.ServerResponse{
5674			Header:         res.Header,
5675			HTTPStatusCode: res.StatusCode,
5676		},
5677	}
5678	target := &ret
5679	if err := gensupport.DecodeResponse(target, res); err != nil {
5680		return nil, err
5681	}
5682	return ret, nil
5683	// {
5684	//   "description": "Request that a new Project be created. The result is an Operation which can be used to track the creation process. This process usually takes a few seconds, but can sometimes take much longer. The tracking Operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. Authorization requires the Google IAM permission `resourcemanager.projects.create` on the specified parent for the new project. The parent is identified by a specified ResourceId, which must include both an ID and a type, such as organization. This method does not associate the new project with a billing account. You can set or update the billing account associated with a project using the [`projects.updateBillingInfo`] (/billing/reference/rest/v1/projects/updateBillingInfo) method.",
5685	//   "flatPath": "v1/projects",
5686	//   "httpMethod": "POST",
5687	//   "id": "cloudresourcemanager.projects.create",
5688	//   "parameterOrder": [],
5689	//   "parameters": {},
5690	//   "path": "v1/projects",
5691	//   "request": {
5692	//     "$ref": "Project"
5693	//   },
5694	//   "response": {
5695	//     "$ref": "Operation"
5696	//   },
5697	//   "scopes": [
5698	//     "https://www.googleapis.com/auth/cloud-platform"
5699	//   ]
5700	// }
5701
5702}
5703
5704// method id "cloudresourcemanager.projects.delete":
5705
5706type ProjectsDeleteCall struct {
5707	s          *Service
5708	projectId  string
5709	urlParams_ gensupport.URLParams
5710	ctx_       context.Context
5711	header_    http.Header
5712}
5713
5714// Delete: Marks the Project identified by the specified `project_id`
5715// (for example, `my-project-123`) for deletion. This method will only
5716// affect the Project if it has a lifecycle state of ACTIVE. This method
5717// changes the Project's lifecycle state from ACTIVE to
5718// DELETE_REQUESTED. The deletion starts at an unspecified time, at
5719// which point the Project is no longer accessible. Until the deletion
5720// completes, you can check the lifecycle state checked by retrieving
5721// the Project with GetProject, and the Project remains visible to
5722// ListProjects. However, you cannot update the project. After the
5723// deletion completes, the Project is not retrievable by the GetProject
5724// and ListProjects methods. The caller must have delete permissions for
5725// this Project.
5726func (r *ProjectsService) Delete(projectId string) *ProjectsDeleteCall {
5727	c := &ProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5728	c.projectId = projectId
5729	return c
5730}
5731
5732// Fields allows partial responses to be retrieved. See
5733// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5734// for more information.
5735func (c *ProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeleteCall {
5736	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5737	return c
5738}
5739
5740// Context sets the context to be used in this call's Do method. Any
5741// pending HTTP request will be aborted if the provided context is
5742// canceled.
5743func (c *ProjectsDeleteCall) Context(ctx context.Context) *ProjectsDeleteCall {
5744	c.ctx_ = ctx
5745	return c
5746}
5747
5748// Header returns an http.Header that can be modified by the caller to
5749// add HTTP headers to the request.
5750func (c *ProjectsDeleteCall) Header() http.Header {
5751	if c.header_ == nil {
5752		c.header_ = make(http.Header)
5753	}
5754	return c.header_
5755}
5756
5757func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
5758	reqHeaders := make(http.Header)
5759	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5760	for k, v := range c.header_ {
5761		reqHeaders[k] = v
5762	}
5763	reqHeaders.Set("User-Agent", c.s.userAgent())
5764	var body io.Reader = nil
5765	c.urlParams_.Set("alt", alt)
5766	c.urlParams_.Set("prettyPrint", "false")
5767	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}")
5768	urls += "?" + c.urlParams_.Encode()
5769	req, err := http.NewRequest("DELETE", urls, body)
5770	if err != nil {
5771		return nil, err
5772	}
5773	req.Header = reqHeaders
5774	googleapi.Expand(req.URL, map[string]string{
5775		"projectId": c.projectId,
5776	})
5777	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5778}
5779
5780// Do executes the "cloudresourcemanager.projects.delete" call.
5781// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5782// code is an error. Response headers are in either
5783// *Empty.ServerResponse.Header or (if a response was returned at all)
5784// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5785// check whether the returned error was because http.StatusNotModified
5786// was returned.
5787func (c *ProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5788	gensupport.SetOptions(c.urlParams_, opts...)
5789	res, err := c.doRequest("json")
5790	if res != nil && res.StatusCode == http.StatusNotModified {
5791		if res.Body != nil {
5792			res.Body.Close()
5793		}
5794		return nil, &googleapi.Error{
5795			Code:   res.StatusCode,
5796			Header: res.Header,
5797		}
5798	}
5799	if err != nil {
5800		return nil, err
5801	}
5802	defer googleapi.CloseBody(res)
5803	if err := googleapi.CheckResponse(res); err != nil {
5804		return nil, err
5805	}
5806	ret := &Empty{
5807		ServerResponse: googleapi.ServerResponse{
5808			Header:         res.Header,
5809			HTTPStatusCode: res.StatusCode,
5810		},
5811	}
5812	target := &ret
5813	if err := gensupport.DecodeResponse(target, res); err != nil {
5814		return nil, err
5815	}
5816	return ret, nil
5817	// {
5818	//   "description": "Marks the Project identified by the specified `project_id` (for example, `my-project-123`) for deletion. This method will only affect the Project if it has a lifecycle state of ACTIVE. This method changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the Project with GetProject, and the Project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the Project is not retrievable by the GetProject and ListProjects methods. The caller must have delete permissions for this Project.",
5819	//   "flatPath": "v1/projects/{projectId}",
5820	//   "httpMethod": "DELETE",
5821	//   "id": "cloudresourcemanager.projects.delete",
5822	//   "parameterOrder": [
5823	//     "projectId"
5824	//   ],
5825	//   "parameters": {
5826	//     "projectId": {
5827	//       "description": "The Project ID (for example, `foo-bar-123`). Required.",
5828	//       "location": "path",
5829	//       "required": true,
5830	//       "type": "string"
5831	//     }
5832	//   },
5833	//   "path": "v1/projects/{projectId}",
5834	//   "response": {
5835	//     "$ref": "Empty"
5836	//   },
5837	//   "scopes": [
5838	//     "https://www.googleapis.com/auth/cloud-platform"
5839	//   ]
5840	// }
5841
5842}
5843
5844// method id "cloudresourcemanager.projects.get":
5845
5846type ProjectsGetCall struct {
5847	s            *Service
5848	projectId    string
5849	urlParams_   gensupport.URLParams
5850	ifNoneMatch_ string
5851	ctx_         context.Context
5852	header_      http.Header
5853}
5854
5855// Get: Retrieves the Project identified by the specified `project_id`
5856// (for example, `my-project-123`). The caller must have read
5857// permissions for this Project.
5858func (r *ProjectsService) Get(projectId string) *ProjectsGetCall {
5859	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5860	c.projectId = projectId
5861	return c
5862}
5863
5864// Fields allows partial responses to be retrieved. See
5865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5866// for more information.
5867func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
5868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5869	return c
5870}
5871
5872// IfNoneMatch sets the optional parameter which makes the operation
5873// fail if the object's ETag matches the given value. This is useful for
5874// getting updates only after the object has changed since the last
5875// request. Use googleapi.IsNotModified to check whether the response
5876// error from Do is the result of In-None-Match.
5877func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
5878	c.ifNoneMatch_ = entityTag
5879	return c
5880}
5881
5882// Context sets the context to be used in this call's Do method. Any
5883// pending HTTP request will be aborted if the provided context is
5884// canceled.
5885func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
5886	c.ctx_ = ctx
5887	return c
5888}
5889
5890// Header returns an http.Header that can be modified by the caller to
5891// add HTTP headers to the request.
5892func (c *ProjectsGetCall) Header() http.Header {
5893	if c.header_ == nil {
5894		c.header_ = make(http.Header)
5895	}
5896	return c.header_
5897}
5898
5899func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
5900	reqHeaders := make(http.Header)
5901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
5902	for k, v := range c.header_ {
5903		reqHeaders[k] = v
5904	}
5905	reqHeaders.Set("User-Agent", c.s.userAgent())
5906	if c.ifNoneMatch_ != "" {
5907		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5908	}
5909	var body io.Reader = nil
5910	c.urlParams_.Set("alt", alt)
5911	c.urlParams_.Set("prettyPrint", "false")
5912	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}")
5913	urls += "?" + c.urlParams_.Encode()
5914	req, err := http.NewRequest("GET", urls, body)
5915	if err != nil {
5916		return nil, err
5917	}
5918	req.Header = reqHeaders
5919	googleapi.Expand(req.URL, map[string]string{
5920		"projectId": c.projectId,
5921	})
5922	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5923}
5924
5925// Do executes the "cloudresourcemanager.projects.get" call.
5926// Exactly one of *Project or error will be non-nil. Any non-2xx status
5927// code is an error. Response headers are in either
5928// *Project.ServerResponse.Header or (if a response was returned at all)
5929// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5930// check whether the returned error was because http.StatusNotModified
5931// was returned.
5932func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
5933	gensupport.SetOptions(c.urlParams_, opts...)
5934	res, err := c.doRequest("json")
5935	if res != nil && res.StatusCode == http.StatusNotModified {
5936		if res.Body != nil {
5937			res.Body.Close()
5938		}
5939		return nil, &googleapi.Error{
5940			Code:   res.StatusCode,
5941			Header: res.Header,
5942		}
5943	}
5944	if err != nil {
5945		return nil, err
5946	}
5947	defer googleapi.CloseBody(res)
5948	if err := googleapi.CheckResponse(res); err != nil {
5949		return nil, err
5950	}
5951	ret := &Project{
5952		ServerResponse: googleapi.ServerResponse{
5953			Header:         res.Header,
5954			HTTPStatusCode: res.StatusCode,
5955		},
5956	}
5957	target := &ret
5958	if err := gensupport.DecodeResponse(target, res); err != nil {
5959		return nil, err
5960	}
5961	return ret, nil
5962	// {
5963	//   "description": "Retrieves the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.",
5964	//   "flatPath": "v1/projects/{projectId}",
5965	//   "httpMethod": "GET",
5966	//   "id": "cloudresourcemanager.projects.get",
5967	//   "parameterOrder": [
5968	//     "projectId"
5969	//   ],
5970	//   "parameters": {
5971	//     "projectId": {
5972	//       "description": "Required. The Project ID (for example, `my-project-123`).",
5973	//       "location": "path",
5974	//       "required": true,
5975	//       "type": "string"
5976	//     }
5977	//   },
5978	//   "path": "v1/projects/{projectId}",
5979	//   "response": {
5980	//     "$ref": "Project"
5981	//   },
5982	//   "scopes": [
5983	//     "https://www.googleapis.com/auth/cloud-platform",
5984	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
5985	//   ]
5986	// }
5987
5988}
5989
5990// method id "cloudresourcemanager.projects.getAncestry":
5991
5992type ProjectsGetAncestryCall struct {
5993	s                  *Service
5994	projectId          string
5995	getancestryrequest *GetAncestryRequest
5996	urlParams_         gensupport.URLParams
5997	ctx_               context.Context
5998	header_            http.Header
5999}
6000
6001// GetAncestry: Gets a list of ancestors in the resource hierarchy for
6002// the Project identified by the specified `project_id` (for example,
6003// `my-project-123`). The caller must have read permissions for this
6004// Project.
6005func (r *ProjectsService) GetAncestry(projectId string, getancestryrequest *GetAncestryRequest) *ProjectsGetAncestryCall {
6006	c := &ProjectsGetAncestryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6007	c.projectId = projectId
6008	c.getancestryrequest = getancestryrequest
6009	return c
6010}
6011
6012// Fields allows partial responses to be retrieved. See
6013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6014// for more information.
6015func (c *ProjectsGetAncestryCall) Fields(s ...googleapi.Field) *ProjectsGetAncestryCall {
6016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6017	return c
6018}
6019
6020// Context sets the context to be used in this call's Do method. Any
6021// pending HTTP request will be aborted if the provided context is
6022// canceled.
6023func (c *ProjectsGetAncestryCall) Context(ctx context.Context) *ProjectsGetAncestryCall {
6024	c.ctx_ = ctx
6025	return c
6026}
6027
6028// Header returns an http.Header that can be modified by the caller to
6029// add HTTP headers to the request.
6030func (c *ProjectsGetAncestryCall) Header() http.Header {
6031	if c.header_ == nil {
6032		c.header_ = make(http.Header)
6033	}
6034	return c.header_
6035}
6036
6037func (c *ProjectsGetAncestryCall) doRequest(alt string) (*http.Response, error) {
6038	reqHeaders := make(http.Header)
6039	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6040	for k, v := range c.header_ {
6041		reqHeaders[k] = v
6042	}
6043	reqHeaders.Set("User-Agent", c.s.userAgent())
6044	var body io.Reader = nil
6045	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getancestryrequest)
6046	if err != nil {
6047		return nil, err
6048	}
6049	reqHeaders.Set("Content-Type", "application/json")
6050	c.urlParams_.Set("alt", alt)
6051	c.urlParams_.Set("prettyPrint", "false")
6052	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:getAncestry")
6053	urls += "?" + c.urlParams_.Encode()
6054	req, err := http.NewRequest("POST", urls, body)
6055	if err != nil {
6056		return nil, err
6057	}
6058	req.Header = reqHeaders
6059	googleapi.Expand(req.URL, map[string]string{
6060		"projectId": c.projectId,
6061	})
6062	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6063}
6064
6065// Do executes the "cloudresourcemanager.projects.getAncestry" call.
6066// Exactly one of *GetAncestryResponse or error will be non-nil. Any
6067// non-2xx status code is an error. Response headers are in either
6068// *GetAncestryResponse.ServerResponse.Header or (if a response was
6069// returned at all) in error.(*googleapi.Error).Header. Use
6070// googleapi.IsNotModified to check whether the returned error was
6071// because http.StatusNotModified was returned.
6072func (c *ProjectsGetAncestryCall) Do(opts ...googleapi.CallOption) (*GetAncestryResponse, error) {
6073	gensupport.SetOptions(c.urlParams_, opts...)
6074	res, err := c.doRequest("json")
6075	if res != nil && res.StatusCode == http.StatusNotModified {
6076		if res.Body != nil {
6077			res.Body.Close()
6078		}
6079		return nil, &googleapi.Error{
6080			Code:   res.StatusCode,
6081			Header: res.Header,
6082		}
6083	}
6084	if err != nil {
6085		return nil, err
6086	}
6087	defer googleapi.CloseBody(res)
6088	if err := googleapi.CheckResponse(res); err != nil {
6089		return nil, err
6090	}
6091	ret := &GetAncestryResponse{
6092		ServerResponse: googleapi.ServerResponse{
6093			Header:         res.Header,
6094			HTTPStatusCode: res.StatusCode,
6095		},
6096	}
6097	target := &ret
6098	if err := gensupport.DecodeResponse(target, res); err != nil {
6099		return nil, err
6100	}
6101	return ret, nil
6102	// {
6103	//   "description": "Gets a list of ancestors in the resource hierarchy for the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have read permissions for this Project.",
6104	//   "flatPath": "v1/projects/{projectId}:getAncestry",
6105	//   "httpMethod": "POST",
6106	//   "id": "cloudresourcemanager.projects.getAncestry",
6107	//   "parameterOrder": [
6108	//     "projectId"
6109	//   ],
6110	//   "parameters": {
6111	//     "projectId": {
6112	//       "description": "Required. The Project ID (for example, `my-project-123`).",
6113	//       "location": "path",
6114	//       "required": true,
6115	//       "type": "string"
6116	//     }
6117	//   },
6118	//   "path": "v1/projects/{projectId}:getAncestry",
6119	//   "request": {
6120	//     "$ref": "GetAncestryRequest"
6121	//   },
6122	//   "response": {
6123	//     "$ref": "GetAncestryResponse"
6124	//   },
6125	//   "scopes": [
6126	//     "https://www.googleapis.com/auth/cloud-platform",
6127	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6128	//   ]
6129	// }
6130
6131}
6132
6133// method id "cloudresourcemanager.projects.getEffectiveOrgPolicy":
6134
6135type ProjectsGetEffectiveOrgPolicyCall struct {
6136	s                            *Service
6137	resource                     string
6138	geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest
6139	urlParams_                   gensupport.URLParams
6140	ctx_                         context.Context
6141	header_                      http.Header
6142}
6143
6144// GetEffectiveOrgPolicy: Gets the effective `Policy` on a resource.
6145// This is the result of merging `Policies` in the resource hierarchy.
6146// The returned `Policy` will not have an `etag`set because it is a
6147// computed `Policy` across multiple resources. Subtrees of Resource
6148// Manager resource hierarchy with 'under:' prefix will not be expanded.
6149func (r *ProjectsService) GetEffectiveOrgPolicy(resource string, geteffectiveorgpolicyrequest *GetEffectiveOrgPolicyRequest) *ProjectsGetEffectiveOrgPolicyCall {
6150	c := &ProjectsGetEffectiveOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6151	c.resource = resource
6152	c.geteffectiveorgpolicyrequest = geteffectiveorgpolicyrequest
6153	return c
6154}
6155
6156// Fields allows partial responses to be retrieved. See
6157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6158// for more information.
6159func (c *ProjectsGetEffectiveOrgPolicyCall) Fields(s ...googleapi.Field) *ProjectsGetEffectiveOrgPolicyCall {
6160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6161	return c
6162}
6163
6164// Context sets the context to be used in this call's Do method. Any
6165// pending HTTP request will be aborted if the provided context is
6166// canceled.
6167func (c *ProjectsGetEffectiveOrgPolicyCall) Context(ctx context.Context) *ProjectsGetEffectiveOrgPolicyCall {
6168	c.ctx_ = ctx
6169	return c
6170}
6171
6172// Header returns an http.Header that can be modified by the caller to
6173// add HTTP headers to the request.
6174func (c *ProjectsGetEffectiveOrgPolicyCall) Header() http.Header {
6175	if c.header_ == nil {
6176		c.header_ = make(http.Header)
6177	}
6178	return c.header_
6179}
6180
6181func (c *ProjectsGetEffectiveOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
6182	reqHeaders := make(http.Header)
6183	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6184	for k, v := range c.header_ {
6185		reqHeaders[k] = v
6186	}
6187	reqHeaders.Set("User-Agent", c.s.userAgent())
6188	var body io.Reader = nil
6189	body, err := googleapi.WithoutDataWrapper.JSONReader(c.geteffectiveorgpolicyrequest)
6190	if err != nil {
6191		return nil, err
6192	}
6193	reqHeaders.Set("Content-Type", "application/json")
6194	c.urlParams_.Set("alt", alt)
6195	c.urlParams_.Set("prettyPrint", "false")
6196	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getEffectiveOrgPolicy")
6197	urls += "?" + c.urlParams_.Encode()
6198	req, err := http.NewRequest("POST", urls, body)
6199	if err != nil {
6200		return nil, err
6201	}
6202	req.Header = reqHeaders
6203	googleapi.Expand(req.URL, map[string]string{
6204		"resource": c.resource,
6205	})
6206	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6207}
6208
6209// Do executes the "cloudresourcemanager.projects.getEffectiveOrgPolicy" call.
6210// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
6211// status code is an error. Response headers are in either
6212// *OrgPolicy.ServerResponse.Header or (if a response was returned at
6213// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6214// to check whether the returned error was because
6215// http.StatusNotModified was returned.
6216func (c *ProjectsGetEffectiveOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
6217	gensupport.SetOptions(c.urlParams_, opts...)
6218	res, err := c.doRequest("json")
6219	if res != nil && res.StatusCode == http.StatusNotModified {
6220		if res.Body != nil {
6221			res.Body.Close()
6222		}
6223		return nil, &googleapi.Error{
6224			Code:   res.StatusCode,
6225			Header: res.Header,
6226		}
6227	}
6228	if err != nil {
6229		return nil, err
6230	}
6231	defer googleapi.CloseBody(res)
6232	if err := googleapi.CheckResponse(res); err != nil {
6233		return nil, err
6234	}
6235	ret := &OrgPolicy{
6236		ServerResponse: googleapi.ServerResponse{
6237			Header:         res.Header,
6238			HTTPStatusCode: res.StatusCode,
6239		},
6240	}
6241	target := &ret
6242	if err := gensupport.DecodeResponse(target, res); err != nil {
6243		return nil, err
6244	}
6245	return ret, nil
6246	// {
6247	//   "description": "Gets the effective `Policy` on a resource. This is the result of merging `Policies` in the resource hierarchy. The returned `Policy` will not have an `etag`set because it is a computed `Policy` across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.",
6248	//   "flatPath": "v1/projects/{projectsId}:getEffectiveOrgPolicy",
6249	//   "httpMethod": "POST",
6250	//   "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy",
6251	//   "parameterOrder": [
6252	//     "resource"
6253	//   ],
6254	//   "parameters": {
6255	//     "resource": {
6256	//       "description": "The name of the resource to start computing the effective `Policy`.",
6257	//       "location": "path",
6258	//       "pattern": "^projects/[^/]+$",
6259	//       "required": true,
6260	//       "type": "string"
6261	//     }
6262	//   },
6263	//   "path": "v1/{+resource}:getEffectiveOrgPolicy",
6264	//   "request": {
6265	//     "$ref": "GetEffectiveOrgPolicyRequest"
6266	//   },
6267	//   "response": {
6268	//     "$ref": "OrgPolicy"
6269	//   },
6270	//   "scopes": [
6271	//     "https://www.googleapis.com/auth/cloud-platform",
6272	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6273	//   ]
6274	// }
6275
6276}
6277
6278// method id "cloudresourcemanager.projects.getIamPolicy":
6279
6280type ProjectsGetIamPolicyCall struct {
6281	s                   *Service
6282	resource            string
6283	getiampolicyrequest *GetIamPolicyRequest
6284	urlParams_          gensupport.URLParams
6285	ctx_                context.Context
6286	header_             http.Header
6287}
6288
6289// GetIamPolicy: Returns the IAM access control policy for the specified
6290// Project. Permission is denied if the policy or the resource does not
6291// exist. Authorization requires the Google IAM permission
6292// `resourcemanager.projects.getIamPolicy` on the project. For
6293// additional information about `resource` (e.g. my-project-id)
6294// structure and identification, see [Resource
6295// Names](https://cloud.google.com/apis/design/resource_names).
6296func (r *ProjectsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsGetIamPolicyCall {
6297	c := &ProjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6298	c.resource = resource
6299	c.getiampolicyrequest = getiampolicyrequest
6300	return c
6301}
6302
6303// Fields allows partial responses to be retrieved. See
6304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6305// for more information.
6306func (c *ProjectsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsGetIamPolicyCall {
6307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6308	return c
6309}
6310
6311// Context sets the context to be used in this call's Do method. Any
6312// pending HTTP request will be aborted if the provided context is
6313// canceled.
6314func (c *ProjectsGetIamPolicyCall) Context(ctx context.Context) *ProjectsGetIamPolicyCall {
6315	c.ctx_ = ctx
6316	return c
6317}
6318
6319// Header returns an http.Header that can be modified by the caller to
6320// add HTTP headers to the request.
6321func (c *ProjectsGetIamPolicyCall) Header() http.Header {
6322	if c.header_ == nil {
6323		c.header_ = make(http.Header)
6324	}
6325	return c.header_
6326}
6327
6328func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6329	reqHeaders := make(http.Header)
6330	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6331	for k, v := range c.header_ {
6332		reqHeaders[k] = v
6333	}
6334	reqHeaders.Set("User-Agent", c.s.userAgent())
6335	var body io.Reader = nil
6336	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
6337	if err != nil {
6338		return nil, err
6339	}
6340	reqHeaders.Set("Content-Type", "application/json")
6341	c.urlParams_.Set("alt", alt)
6342	c.urlParams_.Set("prettyPrint", "false")
6343	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:getIamPolicy")
6344	urls += "?" + c.urlParams_.Encode()
6345	req, err := http.NewRequest("POST", urls, body)
6346	if err != nil {
6347		return nil, err
6348	}
6349	req.Header = reqHeaders
6350	googleapi.Expand(req.URL, map[string]string{
6351		"resource": c.resource,
6352	})
6353	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6354}
6355
6356// Do executes the "cloudresourcemanager.projects.getIamPolicy" call.
6357// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6358// code is an error. Response headers are in either
6359// *Policy.ServerResponse.Header or (if a response was returned at all)
6360// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6361// check whether the returned error was because http.StatusNotModified
6362// was returned.
6363func (c *ProjectsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6364	gensupport.SetOptions(c.urlParams_, opts...)
6365	res, err := c.doRequest("json")
6366	if res != nil && res.StatusCode == http.StatusNotModified {
6367		if res.Body != nil {
6368			res.Body.Close()
6369		}
6370		return nil, &googleapi.Error{
6371			Code:   res.StatusCode,
6372			Header: res.Header,
6373		}
6374	}
6375	if err != nil {
6376		return nil, err
6377	}
6378	defer googleapi.CloseBody(res)
6379	if err := googleapi.CheckResponse(res); err != nil {
6380		return nil, err
6381	}
6382	ret := &Policy{
6383		ServerResponse: googleapi.ServerResponse{
6384			Header:         res.Header,
6385			HTTPStatusCode: res.StatusCode,
6386		},
6387	}
6388	target := &ret
6389	if err := gensupport.DecodeResponse(target, res); err != nil {
6390		return nil, err
6391	}
6392	return ret, nil
6393	// {
6394	//   "description": "Returns the IAM access control policy for the specified Project. Permission is denied if the policy or the resource does not exist. Authorization requires the Google IAM permission `resourcemanager.projects.getIamPolicy` on the project. For additional information about `resource` (e.g. my-project-id) structure and identification, see [Resource Names](https://cloud.google.com/apis/design/resource_names).",
6395	//   "flatPath": "v1/projects/{resource}:getIamPolicy",
6396	//   "httpMethod": "POST",
6397	//   "id": "cloudresourcemanager.projects.getIamPolicy",
6398	//   "parameterOrder": [
6399	//     "resource"
6400	//   ],
6401	//   "parameters": {
6402	//     "resource": {
6403	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
6404	//       "location": "path",
6405	//       "required": true,
6406	//       "type": "string"
6407	//     }
6408	//   },
6409	//   "path": "v1/projects/{resource}:getIamPolicy",
6410	//   "request": {
6411	//     "$ref": "GetIamPolicyRequest"
6412	//   },
6413	//   "response": {
6414	//     "$ref": "Policy"
6415	//   },
6416	//   "scopes": [
6417	//     "https://www.googleapis.com/auth/cloud-platform",
6418	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6419	//   ]
6420	// }
6421
6422}
6423
6424// method id "cloudresourcemanager.projects.getOrgPolicy":
6425
6426type ProjectsGetOrgPolicyCall struct {
6427	s                   *Service
6428	resource            string
6429	getorgpolicyrequest *GetOrgPolicyRequest
6430	urlParams_          gensupport.URLParams
6431	ctx_                context.Context
6432	header_             http.Header
6433}
6434
6435// GetOrgPolicy: Gets a `Policy` on a resource. If no `Policy` is set on
6436// the resource, a `Policy` is returned with default values including
6437// `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value
6438// can be used with `SetOrgPolicy()` to create or update a `Policy`
6439// during read-modify-write.
6440func (r *ProjectsService) GetOrgPolicy(resource string, getorgpolicyrequest *GetOrgPolicyRequest) *ProjectsGetOrgPolicyCall {
6441	c := &ProjectsGetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6442	c.resource = resource
6443	c.getorgpolicyrequest = getorgpolicyrequest
6444	return c
6445}
6446
6447// Fields allows partial responses to be retrieved. See
6448// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6449// for more information.
6450func (c *ProjectsGetOrgPolicyCall) Fields(s ...googleapi.Field) *ProjectsGetOrgPolicyCall {
6451	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6452	return c
6453}
6454
6455// Context sets the context to be used in this call's Do method. Any
6456// pending HTTP request will be aborted if the provided context is
6457// canceled.
6458func (c *ProjectsGetOrgPolicyCall) Context(ctx context.Context) *ProjectsGetOrgPolicyCall {
6459	c.ctx_ = ctx
6460	return c
6461}
6462
6463// Header returns an http.Header that can be modified by the caller to
6464// add HTTP headers to the request.
6465func (c *ProjectsGetOrgPolicyCall) Header() http.Header {
6466	if c.header_ == nil {
6467		c.header_ = make(http.Header)
6468	}
6469	return c.header_
6470}
6471
6472func (c *ProjectsGetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
6473	reqHeaders := make(http.Header)
6474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6475	for k, v := range c.header_ {
6476		reqHeaders[k] = v
6477	}
6478	reqHeaders.Set("User-Agent", c.s.userAgent())
6479	var body io.Reader = nil
6480	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getorgpolicyrequest)
6481	if err != nil {
6482		return nil, err
6483	}
6484	reqHeaders.Set("Content-Type", "application/json")
6485	c.urlParams_.Set("alt", alt)
6486	c.urlParams_.Set("prettyPrint", "false")
6487	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getOrgPolicy")
6488	urls += "?" + c.urlParams_.Encode()
6489	req, err := http.NewRequest("POST", urls, body)
6490	if err != nil {
6491		return nil, err
6492	}
6493	req.Header = reqHeaders
6494	googleapi.Expand(req.URL, map[string]string{
6495		"resource": c.resource,
6496	})
6497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6498}
6499
6500// Do executes the "cloudresourcemanager.projects.getOrgPolicy" call.
6501// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
6502// status code is an error. Response headers are in either
6503// *OrgPolicy.ServerResponse.Header or (if a response was returned at
6504// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6505// to check whether the returned error was because
6506// http.StatusNotModified was returned.
6507func (c *ProjectsGetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
6508	gensupport.SetOptions(c.urlParams_, opts...)
6509	res, err := c.doRequest("json")
6510	if res != nil && res.StatusCode == http.StatusNotModified {
6511		if res.Body != nil {
6512			res.Body.Close()
6513		}
6514		return nil, &googleapi.Error{
6515			Code:   res.StatusCode,
6516			Header: res.Header,
6517		}
6518	}
6519	if err != nil {
6520		return nil, err
6521	}
6522	defer googleapi.CloseBody(res)
6523	if err := googleapi.CheckResponse(res); err != nil {
6524		return nil, err
6525	}
6526	ret := &OrgPolicy{
6527		ServerResponse: googleapi.ServerResponse{
6528			Header:         res.Header,
6529			HTTPStatusCode: res.StatusCode,
6530		},
6531	}
6532	target := &ret
6533	if err := gensupport.DecodeResponse(target, res); err != nil {
6534		return nil, err
6535	}
6536	return ret, nil
6537	// {
6538	//   "description": "Gets a `Policy` on a resource. If no `Policy` is set on the resource, a `Policy` is returned with default values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The `etag` value can be used with `SetOrgPolicy()` to create or update a `Policy` during read-modify-write.",
6539	//   "flatPath": "v1/projects/{projectsId}:getOrgPolicy",
6540	//   "httpMethod": "POST",
6541	//   "id": "cloudresourcemanager.projects.getOrgPolicy",
6542	//   "parameterOrder": [
6543	//     "resource"
6544	//   ],
6545	//   "parameters": {
6546	//     "resource": {
6547	//       "description": "Name of the resource the `Policy` is set on.",
6548	//       "location": "path",
6549	//       "pattern": "^projects/[^/]+$",
6550	//       "required": true,
6551	//       "type": "string"
6552	//     }
6553	//   },
6554	//   "path": "v1/{+resource}:getOrgPolicy",
6555	//   "request": {
6556	//     "$ref": "GetOrgPolicyRequest"
6557	//   },
6558	//   "response": {
6559	//     "$ref": "OrgPolicy"
6560	//   },
6561	//   "scopes": [
6562	//     "https://www.googleapis.com/auth/cloud-platform",
6563	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6564	//   ]
6565	// }
6566
6567}
6568
6569// method id "cloudresourcemanager.projects.list":
6570
6571type ProjectsListCall struct {
6572	s            *Service
6573	urlParams_   gensupport.URLParams
6574	ifNoneMatch_ string
6575	ctx_         context.Context
6576	header_      http.Header
6577}
6578
6579// List: Lists Projects that the caller has the
6580// `resourcemanager.projects.get` permission on and satisfy the
6581// specified filter. This method returns Projects in an unspecified
6582// order. This method is eventually consistent with project mutations;
6583// this means that a newly created project may not appear in the results
6584// or recent updates to an existing project may not be reflected in the
6585// results. To retrieve the latest state of a project, use the
6586// GetProject method. NOTE: If the request filter contains a
6587// `parent.type` and `parent.id` and the caller has the
6588// `resourcemanager.projects.list` permission on the parent, the results
6589// will be drawn from an alternate index which provides more consistent
6590// results. In future versions of this API, this List method will be
6591// split into List and Search to properly capture the behavioral
6592// difference.
6593func (r *ProjectsService) List() *ProjectsListCall {
6594	c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6595	return c
6596}
6597
6598// Filter sets the optional parameter "filter": An expression for
6599// filtering the results of the request. Filter rules are case
6600// insensitive. If multiple fields are included in a filter query, the
6601// query will return results that match any of the fields. Some eligible
6602// fields for filtering are: + `name` + `id` + `labels.` (where *key* is
6603// the name of a label) + `parent.type` + `parent.id` + `lifecycleState`
6604// Some examples of filter strings: | Filter | Description |
6605// |------------------|--------------------------------------------------
6606// ---| | name:how* | The project's name starts with "how". | |
6607// name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL |
6608// Equivalent to above. | | NAME:howl | Equivalent to above. | |
6609// labels.color:* | The project has the label `color`. | |
6610// labels.color:red | The project's label `color` has the value `red`. |
6611// | labels.color:red labels.size:big | The project's label `color` | :
6612// : has the value `red` and its : : : label`size` has the value : : :
6613// `big`. : | lifecycleState:DELETE_REQUESTED | Only show projects that
6614// are | : : pending deletion. : If no filter is specified, the call
6615// will return projects for which the user has the
6616// `resourcemanager.projects.get` permission. NOTE: To perform a
6617// by-parent query (eg., what projects are directly in a Folder), the
6618// caller must have the `resourcemanager.projects.list` permission on
6619// the parent and the filter must contain both a `parent.type` and a
6620// `parent.id` restriction (example: "parent.type:folder
6621// parent.id:123"). In this case an alternate search index is used which
6622// provides more consistent results.
6623func (c *ProjectsListCall) Filter(filter string) *ProjectsListCall {
6624	c.urlParams_.Set("filter", filter)
6625	return c
6626}
6627
6628// PageSize sets the optional parameter "pageSize": The maximum number
6629// of Projects to return in the response. The server can return fewer
6630// Projects than requested. If unspecified, server picks an appropriate
6631// default.
6632func (c *ProjectsListCall) PageSize(pageSize int64) *ProjectsListCall {
6633	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6634	return c
6635}
6636
6637// PageToken sets the optional parameter "pageToken": A pagination token
6638// returned from a previous call to ListProjects that indicates from
6639// where listing should continue.
6640func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
6641	c.urlParams_.Set("pageToken", pageToken)
6642	return c
6643}
6644
6645// Fields allows partial responses to be retrieved. See
6646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6647// for more information.
6648func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
6649	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6650	return c
6651}
6652
6653// IfNoneMatch sets the optional parameter which makes the operation
6654// fail if the object's ETag matches the given value. This is useful for
6655// getting updates only after the object has changed since the last
6656// request. Use googleapi.IsNotModified to check whether the response
6657// error from Do is the result of In-None-Match.
6658func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
6659	c.ifNoneMatch_ = entityTag
6660	return c
6661}
6662
6663// Context sets the context to be used in this call's Do method. Any
6664// pending HTTP request will be aborted if the provided context is
6665// canceled.
6666func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
6667	c.ctx_ = ctx
6668	return c
6669}
6670
6671// Header returns an http.Header that can be modified by the caller to
6672// add HTTP headers to the request.
6673func (c *ProjectsListCall) Header() http.Header {
6674	if c.header_ == nil {
6675		c.header_ = make(http.Header)
6676	}
6677	return c.header_
6678}
6679
6680func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
6681	reqHeaders := make(http.Header)
6682	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6683	for k, v := range c.header_ {
6684		reqHeaders[k] = v
6685	}
6686	reqHeaders.Set("User-Agent", c.s.userAgent())
6687	if c.ifNoneMatch_ != "" {
6688		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6689	}
6690	var body io.Reader = nil
6691	c.urlParams_.Set("alt", alt)
6692	c.urlParams_.Set("prettyPrint", "false")
6693	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects")
6694	urls += "?" + c.urlParams_.Encode()
6695	req, err := http.NewRequest("GET", urls, body)
6696	if err != nil {
6697		return nil, err
6698	}
6699	req.Header = reqHeaders
6700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6701}
6702
6703// Do executes the "cloudresourcemanager.projects.list" call.
6704// Exactly one of *ListProjectsResponse or error will be non-nil. Any
6705// non-2xx status code is an error. Response headers are in either
6706// *ListProjectsResponse.ServerResponse.Header or (if a response was
6707// returned at all) in error.(*googleapi.Error).Header. Use
6708// googleapi.IsNotModified to check whether the returned error was
6709// because http.StatusNotModified was returned.
6710func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListProjectsResponse, error) {
6711	gensupport.SetOptions(c.urlParams_, opts...)
6712	res, err := c.doRequest("json")
6713	if res != nil && res.StatusCode == http.StatusNotModified {
6714		if res.Body != nil {
6715			res.Body.Close()
6716		}
6717		return nil, &googleapi.Error{
6718			Code:   res.StatusCode,
6719			Header: res.Header,
6720		}
6721	}
6722	if err != nil {
6723		return nil, err
6724	}
6725	defer googleapi.CloseBody(res)
6726	if err := googleapi.CheckResponse(res); err != nil {
6727		return nil, err
6728	}
6729	ret := &ListProjectsResponse{
6730		ServerResponse: googleapi.ServerResponse{
6731			Header:         res.Header,
6732			HTTPStatusCode: res.StatusCode,
6733		},
6734	}
6735	target := &ret
6736	if err := gensupport.DecodeResponse(target, res); err != nil {
6737		return nil, err
6738	}
6739	return ret, nil
6740	// {
6741	//   "description": "Lists Projects that the caller has the `resourcemanager.projects.get` permission on and satisfy the specified filter. This method returns Projects in an unspecified order. This method is eventually consistent with project mutations; this means that a newly created project may not appear in the results or recent updates to an existing project may not be reflected in the results. To retrieve the latest state of a project, use the GetProject method. NOTE: If the request filter contains a `parent.type` and `parent.id` and the caller has the `resourcemanager.projects.list` permission on the parent, the results will be drawn from an alternate index which provides more consistent results. In future versions of this API, this List method will be split into List and Search to properly capture the behavioral difference.",
6742	//   "flatPath": "v1/projects",
6743	//   "httpMethod": "GET",
6744	//   "id": "cloudresourcemanager.projects.list",
6745	//   "parameterOrder": [],
6746	//   "parameters": {
6747	//     "filter": {
6748	//       "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. If multiple fields are included in a filter query, the query will return results that match any of the fields. Some eligible fields for filtering are: + `name` + `id` + `labels.` (where *key* is the name of a label) + `parent.type` + `parent.id` + `lifecycleState` Some examples of filter strings: | Filter | Description | |------------------|-----------------------------------------------------| | name:how* | The project's name starts with \"how\". | | name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL | Equivalent to above. | | NAME:howl | Equivalent to above. | | labels.color:* | The project has the label `color`. | | labels.color:red | The project's label `color` has the value `red`. | | labels.color:red labels.size:big | The project's label `color` | : : has the value `red` and its : : : label`size` has the value : : : `big`. : | lifecycleState:DELETE_REQUESTED | Only show projects that are | : : pending deletion. : If no filter is specified, the call will return projects for which the user has the `resourcemanager.projects.get` permission. NOTE: To perform a by-parent query (eg., what projects are directly in a Folder), the caller must have the `resourcemanager.projects.list` permission on the parent and the filter must contain both a `parent.type` and a `parent.id` restriction (example: \"parent.type:folder parent.id:123\"). In this case an alternate search index is used which provides more consistent results.",
6749	//       "location": "query",
6750	//       "type": "string"
6751	//     },
6752	//     "pageSize": {
6753	//       "description": "Optional. The maximum number of Projects to return in the response. The server can return fewer Projects than requested. If unspecified, server picks an appropriate default.",
6754	//       "format": "int32",
6755	//       "location": "query",
6756	//       "type": "integer"
6757	//     },
6758	//     "pageToken": {
6759	//       "description": "Optional. A pagination token returned from a previous call to ListProjects that indicates from where listing should continue.",
6760	//       "location": "query",
6761	//       "type": "string"
6762	//     }
6763	//   },
6764	//   "path": "v1/projects",
6765	//   "response": {
6766	//     "$ref": "ListProjectsResponse"
6767	//   },
6768	//   "scopes": [
6769	//     "https://www.googleapis.com/auth/cloud-platform",
6770	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6771	//   ]
6772	// }
6773
6774}
6775
6776// Pages invokes f for each page of results.
6777// A non-nil error returned from f will halt the iteration.
6778// The provided context supersedes any context provided to the Context method.
6779func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ListProjectsResponse) error) error {
6780	c.ctx_ = ctx
6781	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6782	for {
6783		x, err := c.Do()
6784		if err != nil {
6785			return err
6786		}
6787		if err := f(x); err != nil {
6788			return err
6789		}
6790		if x.NextPageToken == "" {
6791			return nil
6792		}
6793		c.PageToken(x.NextPageToken)
6794	}
6795}
6796
6797// method id "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints":
6798
6799type ProjectsListAvailableOrgPolicyConstraintsCall struct {
6800	s                                        *Service
6801	resource                                 string
6802	listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest
6803	urlParams_                               gensupport.URLParams
6804	ctx_                                     context.Context
6805	header_                                  http.Header
6806}
6807
6808// ListAvailableOrgPolicyConstraints: Lists `Constraints` that could be
6809// applied on the specified resource.
6810func (r *ProjectsService) ListAvailableOrgPolicyConstraints(resource string, listavailableorgpolicyconstraintsrequest *ListAvailableOrgPolicyConstraintsRequest) *ProjectsListAvailableOrgPolicyConstraintsCall {
6811	c := &ProjectsListAvailableOrgPolicyConstraintsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6812	c.resource = resource
6813	c.listavailableorgpolicyconstraintsrequest = listavailableorgpolicyconstraintsrequest
6814	return c
6815}
6816
6817// Fields allows partial responses to be retrieved. See
6818// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6819// for more information.
6820func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Fields(s ...googleapi.Field) *ProjectsListAvailableOrgPolicyConstraintsCall {
6821	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6822	return c
6823}
6824
6825// Context sets the context to be used in this call's Do method. Any
6826// pending HTTP request will be aborted if the provided context is
6827// canceled.
6828func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Context(ctx context.Context) *ProjectsListAvailableOrgPolicyConstraintsCall {
6829	c.ctx_ = ctx
6830	return c
6831}
6832
6833// Header returns an http.Header that can be modified by the caller to
6834// add HTTP headers to the request.
6835func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Header() http.Header {
6836	if c.header_ == nil {
6837		c.header_ = make(http.Header)
6838	}
6839	return c.header_
6840}
6841
6842func (c *ProjectsListAvailableOrgPolicyConstraintsCall) doRequest(alt string) (*http.Response, error) {
6843	reqHeaders := make(http.Header)
6844	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
6845	for k, v := range c.header_ {
6846		reqHeaders[k] = v
6847	}
6848	reqHeaders.Set("User-Agent", c.s.userAgent())
6849	var body io.Reader = nil
6850	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listavailableorgpolicyconstraintsrequest)
6851	if err != nil {
6852		return nil, err
6853	}
6854	reqHeaders.Set("Content-Type", "application/json")
6855	c.urlParams_.Set("alt", alt)
6856	c.urlParams_.Set("prettyPrint", "false")
6857	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listAvailableOrgPolicyConstraints")
6858	urls += "?" + c.urlParams_.Encode()
6859	req, err := http.NewRequest("POST", urls, body)
6860	if err != nil {
6861		return nil, err
6862	}
6863	req.Header = reqHeaders
6864	googleapi.Expand(req.URL, map[string]string{
6865		"resource": c.resource,
6866	})
6867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6868}
6869
6870// Do executes the "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints" call.
6871// Exactly one of *ListAvailableOrgPolicyConstraintsResponse or error
6872// will be non-nil. Any non-2xx status code is an error. Response
6873// headers are in either
6874// *ListAvailableOrgPolicyConstraintsResponse.ServerResponse.Header or
6875// (if a response was returned at all) in
6876// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6877// whether the returned error was because http.StatusNotModified was
6878// returned.
6879func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Do(opts ...googleapi.CallOption) (*ListAvailableOrgPolicyConstraintsResponse, error) {
6880	gensupport.SetOptions(c.urlParams_, opts...)
6881	res, err := c.doRequest("json")
6882	if res != nil && res.StatusCode == http.StatusNotModified {
6883		if res.Body != nil {
6884			res.Body.Close()
6885		}
6886		return nil, &googleapi.Error{
6887			Code:   res.StatusCode,
6888			Header: res.Header,
6889		}
6890	}
6891	if err != nil {
6892		return nil, err
6893	}
6894	defer googleapi.CloseBody(res)
6895	if err := googleapi.CheckResponse(res); err != nil {
6896		return nil, err
6897	}
6898	ret := &ListAvailableOrgPolicyConstraintsResponse{
6899		ServerResponse: googleapi.ServerResponse{
6900			Header:         res.Header,
6901			HTTPStatusCode: res.StatusCode,
6902		},
6903	}
6904	target := &ret
6905	if err := gensupport.DecodeResponse(target, res); err != nil {
6906		return nil, err
6907	}
6908	return ret, nil
6909	// {
6910	//   "description": "Lists `Constraints` that could be applied on the specified resource.",
6911	//   "flatPath": "v1/projects/{projectsId}:listAvailableOrgPolicyConstraints",
6912	//   "httpMethod": "POST",
6913	//   "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints",
6914	//   "parameterOrder": [
6915	//     "resource"
6916	//   ],
6917	//   "parameters": {
6918	//     "resource": {
6919	//       "description": "Name of the resource to list `Constraints` for.",
6920	//       "location": "path",
6921	//       "pattern": "^projects/[^/]+$",
6922	//       "required": true,
6923	//       "type": "string"
6924	//     }
6925	//   },
6926	//   "path": "v1/{+resource}:listAvailableOrgPolicyConstraints",
6927	//   "request": {
6928	//     "$ref": "ListAvailableOrgPolicyConstraintsRequest"
6929	//   },
6930	//   "response": {
6931	//     "$ref": "ListAvailableOrgPolicyConstraintsResponse"
6932	//   },
6933	//   "scopes": [
6934	//     "https://www.googleapis.com/auth/cloud-platform",
6935	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
6936	//   ]
6937	// }
6938
6939}
6940
6941// Pages invokes f for each page of results.
6942// A non-nil error returned from f will halt the iteration.
6943// The provided context supersedes any context provided to the Context method.
6944func (c *ProjectsListAvailableOrgPolicyConstraintsCall) Pages(ctx context.Context, f func(*ListAvailableOrgPolicyConstraintsResponse) error) error {
6945	c.ctx_ = ctx
6946	defer func(pt string) { c.listavailableorgpolicyconstraintsrequest.PageToken = pt }(c.listavailableorgpolicyconstraintsrequest.PageToken) // reset paging to original point
6947	for {
6948		x, err := c.Do()
6949		if err != nil {
6950			return err
6951		}
6952		if err := f(x); err != nil {
6953			return err
6954		}
6955		if x.NextPageToken == "" {
6956			return nil
6957		}
6958		c.listavailableorgpolicyconstraintsrequest.PageToken = x.NextPageToken
6959	}
6960}
6961
6962// method id "cloudresourcemanager.projects.listOrgPolicies":
6963
6964type ProjectsListOrgPoliciesCall struct {
6965	s                      *Service
6966	resource               string
6967	listorgpoliciesrequest *ListOrgPoliciesRequest
6968	urlParams_             gensupport.URLParams
6969	ctx_                   context.Context
6970	header_                http.Header
6971}
6972
6973// ListOrgPolicies: Lists all the `Policies` set for a particular
6974// resource.
6975func (r *ProjectsService) ListOrgPolicies(resource string, listorgpoliciesrequest *ListOrgPoliciesRequest) *ProjectsListOrgPoliciesCall {
6976	c := &ProjectsListOrgPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6977	c.resource = resource
6978	c.listorgpoliciesrequest = listorgpoliciesrequest
6979	return c
6980}
6981
6982// Fields allows partial responses to be retrieved. See
6983// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6984// for more information.
6985func (c *ProjectsListOrgPoliciesCall) Fields(s ...googleapi.Field) *ProjectsListOrgPoliciesCall {
6986	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6987	return c
6988}
6989
6990// Context sets the context to be used in this call's Do method. Any
6991// pending HTTP request will be aborted if the provided context is
6992// canceled.
6993func (c *ProjectsListOrgPoliciesCall) Context(ctx context.Context) *ProjectsListOrgPoliciesCall {
6994	c.ctx_ = ctx
6995	return c
6996}
6997
6998// Header returns an http.Header that can be modified by the caller to
6999// add HTTP headers to the request.
7000func (c *ProjectsListOrgPoliciesCall) Header() http.Header {
7001	if c.header_ == nil {
7002		c.header_ = make(http.Header)
7003	}
7004	return c.header_
7005}
7006
7007func (c *ProjectsListOrgPoliciesCall) doRequest(alt string) (*http.Response, error) {
7008	reqHeaders := make(http.Header)
7009	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7010	for k, v := range c.header_ {
7011		reqHeaders[k] = v
7012	}
7013	reqHeaders.Set("User-Agent", c.s.userAgent())
7014	var body io.Reader = nil
7015	body, err := googleapi.WithoutDataWrapper.JSONReader(c.listorgpoliciesrequest)
7016	if err != nil {
7017		return nil, err
7018	}
7019	reqHeaders.Set("Content-Type", "application/json")
7020	c.urlParams_.Set("alt", alt)
7021	c.urlParams_.Set("prettyPrint", "false")
7022	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:listOrgPolicies")
7023	urls += "?" + c.urlParams_.Encode()
7024	req, err := http.NewRequest("POST", urls, body)
7025	if err != nil {
7026		return nil, err
7027	}
7028	req.Header = reqHeaders
7029	googleapi.Expand(req.URL, map[string]string{
7030		"resource": c.resource,
7031	})
7032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7033}
7034
7035// Do executes the "cloudresourcemanager.projects.listOrgPolicies" call.
7036// Exactly one of *ListOrgPoliciesResponse or error will be non-nil. Any
7037// non-2xx status code is an error. Response headers are in either
7038// *ListOrgPoliciesResponse.ServerResponse.Header or (if a response was
7039// returned at all) in error.(*googleapi.Error).Header. Use
7040// googleapi.IsNotModified to check whether the returned error was
7041// because http.StatusNotModified was returned.
7042func (c *ProjectsListOrgPoliciesCall) Do(opts ...googleapi.CallOption) (*ListOrgPoliciesResponse, error) {
7043	gensupport.SetOptions(c.urlParams_, opts...)
7044	res, err := c.doRequest("json")
7045	if res != nil && res.StatusCode == http.StatusNotModified {
7046		if res.Body != nil {
7047			res.Body.Close()
7048		}
7049		return nil, &googleapi.Error{
7050			Code:   res.StatusCode,
7051			Header: res.Header,
7052		}
7053	}
7054	if err != nil {
7055		return nil, err
7056	}
7057	defer googleapi.CloseBody(res)
7058	if err := googleapi.CheckResponse(res); err != nil {
7059		return nil, err
7060	}
7061	ret := &ListOrgPoliciesResponse{
7062		ServerResponse: googleapi.ServerResponse{
7063			Header:         res.Header,
7064			HTTPStatusCode: res.StatusCode,
7065		},
7066	}
7067	target := &ret
7068	if err := gensupport.DecodeResponse(target, res); err != nil {
7069		return nil, err
7070	}
7071	return ret, nil
7072	// {
7073	//   "description": "Lists all the `Policies` set for a particular resource.",
7074	//   "flatPath": "v1/projects/{projectsId}:listOrgPolicies",
7075	//   "httpMethod": "POST",
7076	//   "id": "cloudresourcemanager.projects.listOrgPolicies",
7077	//   "parameterOrder": [
7078	//     "resource"
7079	//   ],
7080	//   "parameters": {
7081	//     "resource": {
7082	//       "description": "Name of the resource to list Policies for.",
7083	//       "location": "path",
7084	//       "pattern": "^projects/[^/]+$",
7085	//       "required": true,
7086	//       "type": "string"
7087	//     }
7088	//   },
7089	//   "path": "v1/{+resource}:listOrgPolicies",
7090	//   "request": {
7091	//     "$ref": "ListOrgPoliciesRequest"
7092	//   },
7093	//   "response": {
7094	//     "$ref": "ListOrgPoliciesResponse"
7095	//   },
7096	//   "scopes": [
7097	//     "https://www.googleapis.com/auth/cloud-platform",
7098	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
7099	//   ]
7100	// }
7101
7102}
7103
7104// Pages invokes f for each page of results.
7105// A non-nil error returned from f will halt the iteration.
7106// The provided context supersedes any context provided to the Context method.
7107func (c *ProjectsListOrgPoliciesCall) Pages(ctx context.Context, f func(*ListOrgPoliciesResponse) error) error {
7108	c.ctx_ = ctx
7109	defer func(pt string) { c.listorgpoliciesrequest.PageToken = pt }(c.listorgpoliciesrequest.PageToken) // reset paging to original point
7110	for {
7111		x, err := c.Do()
7112		if err != nil {
7113			return err
7114		}
7115		if err := f(x); err != nil {
7116			return err
7117		}
7118		if x.NextPageToken == "" {
7119			return nil
7120		}
7121		c.listorgpoliciesrequest.PageToken = x.NextPageToken
7122	}
7123}
7124
7125// method id "cloudresourcemanager.projects.setIamPolicy":
7126
7127type ProjectsSetIamPolicyCall struct {
7128	s                   *Service
7129	resource            string
7130	setiampolicyrequest *SetIamPolicyRequest
7131	urlParams_          gensupport.URLParams
7132	ctx_                context.Context
7133	header_             http.Header
7134}
7135
7136// SetIamPolicy: Sets the IAM access control policy for the specified
7137// Project. CAUTION: This method will replace the existing policy, and
7138// cannot be used to append additional IAM settings. NOTE: Removing
7139// service accounts from policies or changing their roles can render
7140// services completely inoperable. It is important to understand how the
7141// service account is being used before removing or updating its roles.
7142// For additional information about `resource` (e.g. my-project-id)
7143// structure and identification, see [Resource
7144// Names](https://cloud.google.com/apis/design/resource_names). The
7145// following constraints apply when using `setIamPolicy()`: + Project
7146// does not support `allUsers` and `allAuthenticatedUsers` as `members`
7147// in a `Binding` of a `Policy`. + The owner role can be granted to a
7148// `user`, `serviceAccount`, or a group that is part of an organization.
7149// For example, group@myownpersonaldomain.com could be added as an owner
7150// to a project in the myownpersonaldomain.com organization, but not the
7151// examplepetstore.com organization. + Service accounts can be made
7152// owners of a project directly without any restrictions. However, to be
7153// added as an owner, a user must be invited via Cloud Platform console
7154// and must accept the invitation. + A user cannot be granted the owner
7155// role using `setIamPolicy()`. The user must be granted the owner role
7156// using the Cloud Platform Console and must explicitly accept the
7157// invitation. + You can only grant ownership of a project to a member
7158// by using the GCP Console. Inviting a member will deliver an
7159// invitation email that they must accept. An invitation email is not
7160// generated if you are granting a role other than owner, or if both the
7161// member you are inviting and the project are part of your
7162// organization. + Membership changes that leave the project without any
7163// owners that have accepted the Terms of Service (ToS) will be
7164// rejected. + If the project is not part of an organization, there must
7165// be at least one owner who has accepted the Terms of Service (ToS)
7166// agreement in the policy. Calling `setIamPolicy()` to remove the last
7167// ToS-accepted owner from the policy will fail. This restriction also
7168// applies to legacy projects that no longer have owners who have
7169// accepted the ToS. Edits to IAM policies will be rejected until the
7170// lack of a ToS-accepting owner is rectified. Authorization requires
7171// the Google IAM permission `resourcemanager.projects.setIamPolicy` on
7172// the project
7173func (r *ProjectsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsSetIamPolicyCall {
7174	c := &ProjectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7175	c.resource = resource
7176	c.setiampolicyrequest = setiampolicyrequest
7177	return c
7178}
7179
7180// Fields allows partial responses to be retrieved. See
7181// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7182// for more information.
7183func (c *ProjectsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsSetIamPolicyCall {
7184	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7185	return c
7186}
7187
7188// Context sets the context to be used in this call's Do method. Any
7189// pending HTTP request will be aborted if the provided context is
7190// canceled.
7191func (c *ProjectsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSetIamPolicyCall {
7192	c.ctx_ = ctx
7193	return c
7194}
7195
7196// Header returns an http.Header that can be modified by the caller to
7197// add HTTP headers to the request.
7198func (c *ProjectsSetIamPolicyCall) Header() http.Header {
7199	if c.header_ == nil {
7200		c.header_ = make(http.Header)
7201	}
7202	return c.header_
7203}
7204
7205func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7206	reqHeaders := make(http.Header)
7207	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7208	for k, v := range c.header_ {
7209		reqHeaders[k] = v
7210	}
7211	reqHeaders.Set("User-Agent", c.s.userAgent())
7212	var body io.Reader = nil
7213	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
7214	if err != nil {
7215		return nil, err
7216	}
7217	reqHeaders.Set("Content-Type", "application/json")
7218	c.urlParams_.Set("alt", alt)
7219	c.urlParams_.Set("prettyPrint", "false")
7220	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:setIamPolicy")
7221	urls += "?" + c.urlParams_.Encode()
7222	req, err := http.NewRequest("POST", urls, body)
7223	if err != nil {
7224		return nil, err
7225	}
7226	req.Header = reqHeaders
7227	googleapi.Expand(req.URL, map[string]string{
7228		"resource": c.resource,
7229	})
7230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7231}
7232
7233// Do executes the "cloudresourcemanager.projects.setIamPolicy" call.
7234// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7235// code is an error. Response headers are in either
7236// *Policy.ServerResponse.Header or (if a response was returned at all)
7237// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7238// check whether the returned error was because http.StatusNotModified
7239// was returned.
7240func (c *ProjectsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7241	gensupport.SetOptions(c.urlParams_, opts...)
7242	res, err := c.doRequest("json")
7243	if res != nil && res.StatusCode == http.StatusNotModified {
7244		if res.Body != nil {
7245			res.Body.Close()
7246		}
7247		return nil, &googleapi.Error{
7248			Code:   res.StatusCode,
7249			Header: res.Header,
7250		}
7251	}
7252	if err != nil {
7253		return nil, err
7254	}
7255	defer googleapi.CloseBody(res)
7256	if err := googleapi.CheckResponse(res); err != nil {
7257		return nil, err
7258	}
7259	ret := &Policy{
7260		ServerResponse: googleapi.ServerResponse{
7261			Header:         res.Header,
7262			HTTPStatusCode: res.StatusCode,
7263		},
7264	}
7265	target := &ret
7266	if err := gensupport.DecodeResponse(target, res); err != nil {
7267		return nil, err
7268	}
7269	return ret, nil
7270	// {
7271	//   "description": "Sets the IAM access control policy for the specified Project. CAUTION: This method will replace the existing policy, and cannot be used to append additional IAM settings. NOTE: Removing service accounts from policies or changing their roles can render services completely inoperable. It is important to understand how the service account is being used before removing or updating its roles. For additional information about `resource` (e.g. my-project-id) structure and identification, see [Resource Names](https://cloud.google.com/apis/design/resource_names). The following constraints apply when using `setIamPolicy()`: + Project does not support `allUsers` and `allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner role can be granted to a `user`, `serviceAccount`, or a group that is part of an organization. For example, group@myownpersonaldomain.com could be added as an owner to a project in the myownpersonaldomain.com organization, but not the examplepetstore.com organization. + Service accounts can be made owners of a project directly without any restrictions. However, to be added as an owner, a user must be invited via Cloud Platform console and must accept the invitation. + A user cannot be granted the owner role using `setIamPolicy()`. The user must be granted the owner role using the Cloud Platform Console and must explicitly accept the invitation. + You can only grant ownership of a project to a member by using the GCP Console. Inviting a member will deliver an invitation email that they must accept. An invitation email is not generated if you are granting a role other than owner, or if both the member you are inviting and the project are part of your organization. + Membership changes that leave the project without any owners that have accepted the Terms of Service (ToS) will be rejected. + If the project is not part of an organization, there must be at least one owner who has accepted the Terms of Service (ToS) agreement in the policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner from the policy will fail. This restriction also applies to legacy projects that no longer have owners who have accepted the ToS. Edits to IAM policies will be rejected until the lack of a ToS-accepting owner is rectified. Authorization requires the Google IAM permission `resourcemanager.projects.setIamPolicy` on the project",
7272	//   "flatPath": "v1/projects/{resource}:setIamPolicy",
7273	//   "httpMethod": "POST",
7274	//   "id": "cloudresourcemanager.projects.setIamPolicy",
7275	//   "parameterOrder": [
7276	//     "resource"
7277	//   ],
7278	//   "parameters": {
7279	//     "resource": {
7280	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
7281	//       "location": "path",
7282	//       "required": true,
7283	//       "type": "string"
7284	//     }
7285	//   },
7286	//   "path": "v1/projects/{resource}:setIamPolicy",
7287	//   "request": {
7288	//     "$ref": "SetIamPolicyRequest"
7289	//   },
7290	//   "response": {
7291	//     "$ref": "Policy"
7292	//   },
7293	//   "scopes": [
7294	//     "https://www.googleapis.com/auth/cloud-platform"
7295	//   ]
7296	// }
7297
7298}
7299
7300// method id "cloudresourcemanager.projects.setOrgPolicy":
7301
7302type ProjectsSetOrgPolicyCall struct {
7303	s                   *Service
7304	resource            string
7305	setorgpolicyrequest *SetOrgPolicyRequest
7306	urlParams_          gensupport.URLParams
7307	ctx_                context.Context
7308	header_             http.Header
7309}
7310
7311// SetOrgPolicy: Updates the specified `Policy` on the resource. Creates
7312// a new `Policy` for that `Constraint` on the resource if one does not
7313// exist. Not supplying an `etag` on the request `Policy` results in an
7314// unconditional write of the `Policy`.
7315func (r *ProjectsService) SetOrgPolicy(resource string, setorgpolicyrequest *SetOrgPolicyRequest) *ProjectsSetOrgPolicyCall {
7316	c := &ProjectsSetOrgPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7317	c.resource = resource
7318	c.setorgpolicyrequest = setorgpolicyrequest
7319	return c
7320}
7321
7322// Fields allows partial responses to be retrieved. See
7323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7324// for more information.
7325func (c *ProjectsSetOrgPolicyCall) Fields(s ...googleapi.Field) *ProjectsSetOrgPolicyCall {
7326	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7327	return c
7328}
7329
7330// Context sets the context to be used in this call's Do method. Any
7331// pending HTTP request will be aborted if the provided context is
7332// canceled.
7333func (c *ProjectsSetOrgPolicyCall) Context(ctx context.Context) *ProjectsSetOrgPolicyCall {
7334	c.ctx_ = ctx
7335	return c
7336}
7337
7338// Header returns an http.Header that can be modified by the caller to
7339// add HTTP headers to the request.
7340func (c *ProjectsSetOrgPolicyCall) Header() http.Header {
7341	if c.header_ == nil {
7342		c.header_ = make(http.Header)
7343	}
7344	return c.header_
7345}
7346
7347func (c *ProjectsSetOrgPolicyCall) doRequest(alt string) (*http.Response, error) {
7348	reqHeaders := make(http.Header)
7349	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7350	for k, v := range c.header_ {
7351		reqHeaders[k] = v
7352	}
7353	reqHeaders.Set("User-Agent", c.s.userAgent())
7354	var body io.Reader = nil
7355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setorgpolicyrequest)
7356	if err != nil {
7357		return nil, err
7358	}
7359	reqHeaders.Set("Content-Type", "application/json")
7360	c.urlParams_.Set("alt", alt)
7361	c.urlParams_.Set("prettyPrint", "false")
7362	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setOrgPolicy")
7363	urls += "?" + c.urlParams_.Encode()
7364	req, err := http.NewRequest("POST", urls, body)
7365	if err != nil {
7366		return nil, err
7367	}
7368	req.Header = reqHeaders
7369	googleapi.Expand(req.URL, map[string]string{
7370		"resource": c.resource,
7371	})
7372	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7373}
7374
7375// Do executes the "cloudresourcemanager.projects.setOrgPolicy" call.
7376// Exactly one of *OrgPolicy or error will be non-nil. Any non-2xx
7377// status code is an error. Response headers are in either
7378// *OrgPolicy.ServerResponse.Header or (if a response was returned at
7379// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7380// to check whether the returned error was because
7381// http.StatusNotModified was returned.
7382func (c *ProjectsSetOrgPolicyCall) Do(opts ...googleapi.CallOption) (*OrgPolicy, error) {
7383	gensupport.SetOptions(c.urlParams_, opts...)
7384	res, err := c.doRequest("json")
7385	if res != nil && res.StatusCode == http.StatusNotModified {
7386		if res.Body != nil {
7387			res.Body.Close()
7388		}
7389		return nil, &googleapi.Error{
7390			Code:   res.StatusCode,
7391			Header: res.Header,
7392		}
7393	}
7394	if err != nil {
7395		return nil, err
7396	}
7397	defer googleapi.CloseBody(res)
7398	if err := googleapi.CheckResponse(res); err != nil {
7399		return nil, err
7400	}
7401	ret := &OrgPolicy{
7402		ServerResponse: googleapi.ServerResponse{
7403			Header:         res.Header,
7404			HTTPStatusCode: res.StatusCode,
7405		},
7406	}
7407	target := &ret
7408	if err := gensupport.DecodeResponse(target, res); err != nil {
7409		return nil, err
7410	}
7411	return ret, nil
7412	// {
7413	//   "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for that `Constraint` on the resource if one does not exist. Not supplying an `etag` on the request `Policy` results in an unconditional write of the `Policy`.",
7414	//   "flatPath": "v1/projects/{projectsId}:setOrgPolicy",
7415	//   "httpMethod": "POST",
7416	//   "id": "cloudresourcemanager.projects.setOrgPolicy",
7417	//   "parameterOrder": [
7418	//     "resource"
7419	//   ],
7420	//   "parameters": {
7421	//     "resource": {
7422	//       "description": "Resource name of the resource to attach the `Policy`.",
7423	//       "location": "path",
7424	//       "pattern": "^projects/[^/]+$",
7425	//       "required": true,
7426	//       "type": "string"
7427	//     }
7428	//   },
7429	//   "path": "v1/{+resource}:setOrgPolicy",
7430	//   "request": {
7431	//     "$ref": "SetOrgPolicyRequest"
7432	//   },
7433	//   "response": {
7434	//     "$ref": "OrgPolicy"
7435	//   },
7436	//   "scopes": [
7437	//     "https://www.googleapis.com/auth/cloud-platform"
7438	//   ]
7439	// }
7440
7441}
7442
7443// method id "cloudresourcemanager.projects.testIamPermissions":
7444
7445type ProjectsTestIamPermissionsCall struct {
7446	s                         *Service
7447	resource                  string
7448	testiampermissionsrequest *TestIamPermissionsRequest
7449	urlParams_                gensupport.URLParams
7450	ctx_                      context.Context
7451	header_                   http.Header
7452}
7453
7454// TestIamPermissions: Returns permissions that a caller has on the
7455// specified Project. For additional information about `resource` (e.g.
7456// my-project-id) structure and identification, see [Resource
7457// Names](https://cloud.google.com/apis/design/resource_names). There
7458// are no permissions required for making this API call.
7459func (r *ProjectsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsTestIamPermissionsCall {
7460	c := &ProjectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7461	c.resource = resource
7462	c.testiampermissionsrequest = testiampermissionsrequest
7463	return c
7464}
7465
7466// Fields allows partial responses to be retrieved. See
7467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7468// for more information.
7469func (c *ProjectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsTestIamPermissionsCall {
7470	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7471	return c
7472}
7473
7474// Context sets the context to be used in this call's Do method. Any
7475// pending HTTP request will be aborted if the provided context is
7476// canceled.
7477func (c *ProjectsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsTestIamPermissionsCall {
7478	c.ctx_ = ctx
7479	return c
7480}
7481
7482// Header returns an http.Header that can be modified by the caller to
7483// add HTTP headers to the request.
7484func (c *ProjectsTestIamPermissionsCall) Header() http.Header {
7485	if c.header_ == nil {
7486		c.header_ = make(http.Header)
7487	}
7488	return c.header_
7489}
7490
7491func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7492	reqHeaders := make(http.Header)
7493	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7494	for k, v := range c.header_ {
7495		reqHeaders[k] = v
7496	}
7497	reqHeaders.Set("User-Agent", c.s.userAgent())
7498	var body io.Reader = nil
7499	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7500	if err != nil {
7501		return nil, err
7502	}
7503	reqHeaders.Set("Content-Type", "application/json")
7504	c.urlParams_.Set("alt", alt)
7505	c.urlParams_.Set("prettyPrint", "false")
7506	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{resource}:testIamPermissions")
7507	urls += "?" + c.urlParams_.Encode()
7508	req, err := http.NewRequest("POST", urls, body)
7509	if err != nil {
7510		return nil, err
7511	}
7512	req.Header = reqHeaders
7513	googleapi.Expand(req.URL, map[string]string{
7514		"resource": c.resource,
7515	})
7516	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7517}
7518
7519// Do executes the "cloudresourcemanager.projects.testIamPermissions" call.
7520// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
7521// Any non-2xx status code is an error. Response headers are in either
7522// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
7523// was returned at all) in error.(*googleapi.Error).Header. Use
7524// googleapi.IsNotModified to check whether the returned error was
7525// because http.StatusNotModified was returned.
7526func (c *ProjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7527	gensupport.SetOptions(c.urlParams_, opts...)
7528	res, err := c.doRequest("json")
7529	if res != nil && res.StatusCode == http.StatusNotModified {
7530		if res.Body != nil {
7531			res.Body.Close()
7532		}
7533		return nil, &googleapi.Error{
7534			Code:   res.StatusCode,
7535			Header: res.Header,
7536		}
7537	}
7538	if err != nil {
7539		return nil, err
7540	}
7541	defer googleapi.CloseBody(res)
7542	if err := googleapi.CheckResponse(res); err != nil {
7543		return nil, err
7544	}
7545	ret := &TestIamPermissionsResponse{
7546		ServerResponse: googleapi.ServerResponse{
7547			Header:         res.Header,
7548			HTTPStatusCode: res.StatusCode,
7549		},
7550	}
7551	target := &ret
7552	if err := gensupport.DecodeResponse(target, res); err != nil {
7553		return nil, err
7554	}
7555	return ret, nil
7556	// {
7557	//   "description": "Returns permissions that a caller has on the specified Project. For additional information about `resource` (e.g. my-project-id) structure and identification, see [Resource Names](https://cloud.google.com/apis/design/resource_names). There are no permissions required for making this API call.",
7558	//   "flatPath": "v1/projects/{resource}:testIamPermissions",
7559	//   "httpMethod": "POST",
7560	//   "id": "cloudresourcemanager.projects.testIamPermissions",
7561	//   "parameterOrder": [
7562	//     "resource"
7563	//   ],
7564	//   "parameters": {
7565	//     "resource": {
7566	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
7567	//       "location": "path",
7568	//       "required": true,
7569	//       "type": "string"
7570	//     }
7571	//   },
7572	//   "path": "v1/projects/{resource}:testIamPermissions",
7573	//   "request": {
7574	//     "$ref": "TestIamPermissionsRequest"
7575	//   },
7576	//   "response": {
7577	//     "$ref": "TestIamPermissionsResponse"
7578	//   },
7579	//   "scopes": [
7580	//     "https://www.googleapis.com/auth/cloud-platform",
7581	//     "https://www.googleapis.com/auth/cloud-platform.read-only"
7582	//   ]
7583	// }
7584
7585}
7586
7587// method id "cloudresourcemanager.projects.undelete":
7588
7589type ProjectsUndeleteCall struct {
7590	s                      *Service
7591	projectId              string
7592	undeleteprojectrequest *UndeleteProjectRequest
7593	urlParams_             gensupport.URLParams
7594	ctx_                   context.Context
7595	header_                http.Header
7596}
7597
7598// Undelete: Restores the Project identified by the specified
7599// `project_id` (for example, `my-project-123`). You can only use this
7600// method for a Project that has a lifecycle state of DELETE_REQUESTED.
7601// After deletion starts, the Project cannot be restored. The caller
7602// must have undelete permissions for this Project.
7603func (r *ProjectsService) Undelete(projectId string, undeleteprojectrequest *UndeleteProjectRequest) *ProjectsUndeleteCall {
7604	c := &ProjectsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7605	c.projectId = projectId
7606	c.undeleteprojectrequest = undeleteprojectrequest
7607	return c
7608}
7609
7610// Fields allows partial responses to be retrieved. See
7611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7612// for more information.
7613func (c *ProjectsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsUndeleteCall {
7614	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7615	return c
7616}
7617
7618// Context sets the context to be used in this call's Do method. Any
7619// pending HTTP request will be aborted if the provided context is
7620// canceled.
7621func (c *ProjectsUndeleteCall) Context(ctx context.Context) *ProjectsUndeleteCall {
7622	c.ctx_ = ctx
7623	return c
7624}
7625
7626// Header returns an http.Header that can be modified by the caller to
7627// add HTTP headers to the request.
7628func (c *ProjectsUndeleteCall) Header() http.Header {
7629	if c.header_ == nil {
7630		c.header_ = make(http.Header)
7631	}
7632	return c.header_
7633}
7634
7635func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) {
7636	reqHeaders := make(http.Header)
7637	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7638	for k, v := range c.header_ {
7639		reqHeaders[k] = v
7640	}
7641	reqHeaders.Set("User-Agent", c.s.userAgent())
7642	var body io.Reader = nil
7643	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteprojectrequest)
7644	if err != nil {
7645		return nil, err
7646	}
7647	reqHeaders.Set("Content-Type", "application/json")
7648	c.urlParams_.Set("alt", alt)
7649	c.urlParams_.Set("prettyPrint", "false")
7650	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}:undelete")
7651	urls += "?" + c.urlParams_.Encode()
7652	req, err := http.NewRequest("POST", urls, body)
7653	if err != nil {
7654		return nil, err
7655	}
7656	req.Header = reqHeaders
7657	googleapi.Expand(req.URL, map[string]string{
7658		"projectId": c.projectId,
7659	})
7660	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7661}
7662
7663// Do executes the "cloudresourcemanager.projects.undelete" call.
7664// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7665// code is an error. Response headers are in either
7666// *Empty.ServerResponse.Header or (if a response was returned at all)
7667// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7668// check whether the returned error was because http.StatusNotModified
7669// was returned.
7670func (c *ProjectsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7671	gensupport.SetOptions(c.urlParams_, opts...)
7672	res, err := c.doRequest("json")
7673	if res != nil && res.StatusCode == http.StatusNotModified {
7674		if res.Body != nil {
7675			res.Body.Close()
7676		}
7677		return nil, &googleapi.Error{
7678			Code:   res.StatusCode,
7679			Header: res.Header,
7680		}
7681	}
7682	if err != nil {
7683		return nil, err
7684	}
7685	defer googleapi.CloseBody(res)
7686	if err := googleapi.CheckResponse(res); err != nil {
7687		return nil, err
7688	}
7689	ret := &Empty{
7690		ServerResponse: googleapi.ServerResponse{
7691			Header:         res.Header,
7692			HTTPStatusCode: res.StatusCode,
7693		},
7694	}
7695	target := &ret
7696	if err := gensupport.DecodeResponse(target, res); err != nil {
7697		return nil, err
7698	}
7699	return ret, nil
7700	// {
7701	//   "description": "Restores the Project identified by the specified `project_id` (for example, `my-project-123`). You can only use this method for a Project that has a lifecycle state of DELETE_REQUESTED. After deletion starts, the Project cannot be restored. The caller must have undelete permissions for this Project.",
7702	//   "flatPath": "v1/projects/{projectId}:undelete",
7703	//   "httpMethod": "POST",
7704	//   "id": "cloudresourcemanager.projects.undelete",
7705	//   "parameterOrder": [
7706	//     "projectId"
7707	//   ],
7708	//   "parameters": {
7709	//     "projectId": {
7710	//       "description": "Required. The project ID (for example, `foo-bar-123`).",
7711	//       "location": "path",
7712	//       "required": true,
7713	//       "type": "string"
7714	//     }
7715	//   },
7716	//   "path": "v1/projects/{projectId}:undelete",
7717	//   "request": {
7718	//     "$ref": "UndeleteProjectRequest"
7719	//   },
7720	//   "response": {
7721	//     "$ref": "Empty"
7722	//   },
7723	//   "scopes": [
7724	//     "https://www.googleapis.com/auth/cloud-platform"
7725	//   ]
7726	// }
7727
7728}
7729
7730// method id "cloudresourcemanager.projects.update":
7731
7732type ProjectsUpdateCall struct {
7733	s          *Service
7734	projectId  string
7735	project    *Project
7736	urlParams_ gensupport.URLParams
7737	ctx_       context.Context
7738	header_    http.Header
7739}
7740
7741// Update: Updates the attributes of the Project identified by the
7742// specified `project_id` (for example, `my-project-123`). The caller
7743// must have modify permissions for this Project.
7744func (r *ProjectsService) Update(projectId string, project *Project) *ProjectsUpdateCall {
7745	c := &ProjectsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7746	c.projectId = projectId
7747	c.project = project
7748	return c
7749}
7750
7751// Fields allows partial responses to be retrieved. See
7752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7753// for more information.
7754func (c *ProjectsUpdateCall) Fields(s ...googleapi.Field) *ProjectsUpdateCall {
7755	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7756	return c
7757}
7758
7759// Context sets the context to be used in this call's Do method. Any
7760// pending HTTP request will be aborted if the provided context is
7761// canceled.
7762func (c *ProjectsUpdateCall) Context(ctx context.Context) *ProjectsUpdateCall {
7763	c.ctx_ = ctx
7764	return c
7765}
7766
7767// Header returns an http.Header that can be modified by the caller to
7768// add HTTP headers to the request.
7769func (c *ProjectsUpdateCall) Header() http.Header {
7770	if c.header_ == nil {
7771		c.header_ = make(http.Header)
7772	}
7773	return c.header_
7774}
7775
7776func (c *ProjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
7777	reqHeaders := make(http.Header)
7778	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
7779	for k, v := range c.header_ {
7780		reqHeaders[k] = v
7781	}
7782	reqHeaders.Set("User-Agent", c.s.userAgent())
7783	var body io.Reader = nil
7784	body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
7785	if err != nil {
7786		return nil, err
7787	}
7788	reqHeaders.Set("Content-Type", "application/json")
7789	c.urlParams_.Set("alt", alt)
7790	c.urlParams_.Set("prettyPrint", "false")
7791	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}")
7792	urls += "?" + c.urlParams_.Encode()
7793	req, err := http.NewRequest("PUT", urls, body)
7794	if err != nil {
7795		return nil, err
7796	}
7797	req.Header = reqHeaders
7798	googleapi.Expand(req.URL, map[string]string{
7799		"projectId": c.projectId,
7800	})
7801	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7802}
7803
7804// Do executes the "cloudresourcemanager.projects.update" call.
7805// Exactly one of *Project or error will be non-nil. Any non-2xx status
7806// code is an error. Response headers are in either
7807// *Project.ServerResponse.Header or (if a response was returned at all)
7808// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7809// check whether the returned error was because http.StatusNotModified
7810// was returned.
7811func (c *ProjectsUpdateCall) Do(opts ...googleapi.CallOption) (*Project, error) {
7812	gensupport.SetOptions(c.urlParams_, opts...)
7813	res, err := c.doRequest("json")
7814	if res != nil && res.StatusCode == http.StatusNotModified {
7815		if res.Body != nil {
7816			res.Body.Close()
7817		}
7818		return nil, &googleapi.Error{
7819			Code:   res.StatusCode,
7820			Header: res.Header,
7821		}
7822	}
7823	if err != nil {
7824		return nil, err
7825	}
7826	defer googleapi.CloseBody(res)
7827	if err := googleapi.CheckResponse(res); err != nil {
7828		return nil, err
7829	}
7830	ret := &Project{
7831		ServerResponse: googleapi.ServerResponse{
7832			Header:         res.Header,
7833			HTTPStatusCode: res.StatusCode,
7834		},
7835	}
7836	target := &ret
7837	if err := gensupport.DecodeResponse(target, res); err != nil {
7838		return nil, err
7839	}
7840	return ret, nil
7841	// {
7842	//   "description": "Updates the attributes of the Project identified by the specified `project_id` (for example, `my-project-123`). The caller must have modify permissions for this Project.",
7843	//   "flatPath": "v1/projects/{projectId}",
7844	//   "httpMethod": "PUT",
7845	//   "id": "cloudresourcemanager.projects.update",
7846	//   "parameterOrder": [
7847	//     "projectId"
7848	//   ],
7849	//   "parameters": {
7850	//     "projectId": {
7851	//       "description": "The project ID (for example, `my-project-123`). Required.",
7852	//       "location": "path",
7853	//       "required": true,
7854	//       "type": "string"
7855	//     }
7856	//   },
7857	//   "path": "v1/projects/{projectId}",
7858	//   "request": {
7859	//     "$ref": "Project"
7860	//   },
7861	//   "response": {
7862	//     "$ref": "Project"
7863	//   },
7864	//   "scopes": [
7865	//     "https://www.googleapis.com/auth/cloud-platform"
7866	//   ]
7867	// }
7868
7869}
7870