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