...

Source file src/google.golang.org/api/cloudresourcemanager/v3/cloudresourcemanager-gen.go

Documentation: google.golang.org/api/cloudresourcemanager/v3

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

View as plain text