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