...

Source file src/google.golang.org/api/workstations/v1/workstations-gen.go

Documentation: google.golang.org/api/workstations/v1

     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 workstations provides access to the Cloud Workstations API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/workstations
    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/workstations/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	workstationsService, err := workstations.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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	workstationsService, err := workstations.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	workstationsService, err := workstations.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package workstations // import "google.golang.org/api/workstations/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "workstations:v1"
    90  const apiName = "workstations"
    91  const apiVersion = "v1"
    92  const basePath = "https://workstations.googleapis.com/"
    93  const basePathTemplate = "https://workstations.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://workstations.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Operations = NewProjectsLocationsOperationsService(s)
   172  	rs.WorkstationClusters = NewProjectsLocationsWorkstationClustersService(s)
   173  	return rs
   174  }
   175  
   176  type ProjectsLocationsService struct {
   177  	s *Service
   178  
   179  	Operations *ProjectsLocationsOperationsService
   180  
   181  	WorkstationClusters *ProjectsLocationsWorkstationClustersService
   182  }
   183  
   184  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   185  	rs := &ProjectsLocationsOperationsService{s: s}
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsOperationsService struct {
   190  	s *Service
   191  }
   192  
   193  func NewProjectsLocationsWorkstationClustersService(s *Service) *ProjectsLocationsWorkstationClustersService {
   194  	rs := &ProjectsLocationsWorkstationClustersService{s: s}
   195  	rs.WorkstationConfigs = NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s)
   196  	return rs
   197  }
   198  
   199  type ProjectsLocationsWorkstationClustersService struct {
   200  	s *Service
   201  
   202  	WorkstationConfigs *ProjectsLocationsWorkstationClustersWorkstationConfigsService
   203  }
   204  
   205  func NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsService {
   206  	rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsService{s: s}
   207  	rs.Workstations = NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s)
   208  	return rs
   209  }
   210  
   211  type ProjectsLocationsWorkstationClustersWorkstationConfigsService struct {
   212  	s *Service
   213  
   214  	Workstations *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService
   215  }
   216  
   217  func NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService {
   218  	rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService struct {
   223  	s *Service
   224  }
   225  
   226  // Accelerator: An accelerator card attached to the instance.
   227  type Accelerator struct {
   228  	// Count: Optional. Number of accelerator cards exposed to the instance.
   229  	Count int64 `json:"count,omitempty"`
   230  	// Type: Optional. Type of accelerator resource to attach to the instance, for
   231  	// example, "nvidia-tesla-p100".
   232  	Type string `json:"type,omitempty"`
   233  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
   234  	// include in API requests. By default, fields with empty or default values are
   235  	// omitted from API requests. See
   236  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   237  	// details.
   238  	ForceSendFields []string `json:"-"`
   239  	// NullFields is a list of field names (e.g. "Count") to include in API
   240  	// requests with the JSON null value. By default, fields with empty values are
   241  	// omitted from API requests. See
   242  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   243  	NullFields []string `json:"-"`
   244  }
   245  
   246  func (s *Accelerator) MarshalJSON() ([]byte, error) {
   247  	type NoMethod Accelerator
   248  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   249  }
   250  
   251  // AuditConfig: Specifies the audit configuration for a service. The
   252  // configuration determines which permission types are logged, and what
   253  // identities, if any, are exempted from logging. An AuditConfig must have one
   254  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   255  // and a specific service, the union of the two AuditConfigs is used for that
   256  // service: the log_types specified in each AuditConfig are enabled, and the
   257  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   258  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   259  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   260  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   261  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   262  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   263  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   264  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   265  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   266  // `aliya@example.com` from DATA_WRITE logging.
   267  type AuditConfig struct {
   268  	// AuditLogConfigs: The configuration for logging of each type of permission.
   269  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   270  	// Service: Specifies a service that will be enabled for audit logging. For
   271  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   272  	// is a special value that covers all services.
   273  	Service string `json:"service,omitempty"`
   274  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   275  	// unconditionally include in API requests. By default, fields with empty or
   276  	// default values are omitted from API requests. See
   277  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   278  	// details.
   279  	ForceSendFields []string `json:"-"`
   280  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   281  	// API requests with the JSON null value. By default, fields with empty values
   282  	// are omitted from API requests. See
   283  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   284  	NullFields []string `json:"-"`
   285  }
   286  
   287  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   288  	type NoMethod AuditConfig
   289  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   290  }
   291  
   292  // AuditLogConfig: Provides the configuration for logging a type of
   293  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   294  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   295  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   296  // exempting jose@example.com from DATA_READ logging.
   297  type AuditLogConfig struct {
   298  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   299  	// type of permission. Follows the same format of Binding.members.
   300  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   301  	// LogType: The log type that this config enables.
   302  	//
   303  	// Possible values:
   304  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   305  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   306  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   307  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   308  	LogType string `json:"logType,omitempty"`
   309  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   310  	// unconditionally include in API requests. By default, fields with empty or
   311  	// default values are omitted from API requests. See
   312  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   313  	// details.
   314  	ForceSendFields []string `json:"-"`
   315  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   316  	// API requests with the JSON null value. By default, fields with empty values
   317  	// are omitted from API requests. See
   318  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   319  	NullFields []string `json:"-"`
   320  }
   321  
   322  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   323  	type NoMethod AuditLogConfig
   324  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   325  }
   326  
   327  // Binding: Associates `members`, or principals, with a `role`.
   328  type Binding struct {
   329  	// Condition: The condition that is associated with this binding. If the
   330  	// condition evaluates to `true`, then this binding applies to the current
   331  	// request. If the condition evaluates to `false`, then this binding does not
   332  	// apply to the current request. However, a different role binding might grant
   333  	// the same role to one or more of the principals in this binding. To learn
   334  	// which resources support conditions in their IAM policies, see the IAM
   335  	// documentation
   336  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   337  	Condition *Expr `json:"condition,omitempty"`
   338  	// Members: Specifies the principals requesting access for a Google Cloud
   339  	// resource. `members` can have the following values: * `allUsers`: A special
   340  	// identifier that represents anyone who is on the internet; with or without a
   341  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   342  	// represents anyone who is authenticated with a Google account or a service
   343  	// account. Does not include identities that come from external identity
   344  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   345  	// address that represents a specific Google account. For example,
   346  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   347  	// represents a Google service account. For example,
   348  	// `my-other-app@appspot.gserviceaccount.com`. *
   349  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   350  	// identifier for a Kubernetes service account
   351  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   352  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   353  	// `group:{emailid}`: An email address that represents a Google group. For
   354  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   355  	// (primary) that represents all the users of that domain. For example,
   356  	// `google.com` or `example.com`. *
   357  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   358  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   359  	// pool. *
   360  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   361  	// group/{group_id}`: All workforce identities in a group. *
   362  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   363  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   364  	// a specific attribute value. *
   365  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   366  	// *`: All identities in a workforce identity pool. *
   367  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   368  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   369  	// identity in a workload identity pool. *
   370  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   371  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   372  	// group. *
   373  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   374  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   375  	// `: All identities in a workload identity pool with a certain attribute. *
   376  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   377  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   378  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   379  	// unique identifier) representing a user that has been recently deleted. For
   380  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   381  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   382  	// retains the role in the binding. *
   383  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   384  	// unique identifier) representing a service account that has been recently
   385  	// deleted. For example,
   386  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   387  	// service account is undeleted, this value reverts to
   388  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   389  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   390  	// address (plus unique identifier) representing a Google group that has been
   391  	// recently deleted. For example,
   392  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   393  	// this value reverts to `group:{emailid}` and the recovered group retains the
   394  	// role in the binding. *
   395  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   396  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   397  	// workforce identity pool. For example,
   398  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   399  	// ol-id/subject/my-subject-attribute-value`.
   400  	Members []string `json:"members,omitempty"`
   401  	// Role: Role that is assigned to the list of `members`, or principals. For
   402  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   403  	// of the IAM roles and permissions, see the IAM documentation
   404  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   405  	// available pre-defined roles, see here
   406  	// (https://cloud.google.com/iam/docs/understanding-roles).
   407  	Role string `json:"role,omitempty"`
   408  	// ForceSendFields is a list of field names (e.g. "Condition") to
   409  	// unconditionally include in API requests. By default, fields with empty or
   410  	// default values are omitted from API requests. See
   411  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   412  	// details.
   413  	ForceSendFields []string `json:"-"`
   414  	// NullFields is a list of field names (e.g. "Condition") to include in API
   415  	// requests with the JSON null value. By default, fields with empty values are
   416  	// omitted from API requests. See
   417  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   418  	NullFields []string `json:"-"`
   419  }
   420  
   421  func (s *Binding) MarshalJSON() ([]byte, error) {
   422  	type NoMethod Binding
   423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   424  }
   425  
   426  // CancelOperationRequest: The request message for Operations.CancelOperation.
   427  type CancelOperationRequest struct {
   428  }
   429  
   430  // Container: A Docker container.
   431  type Container struct {
   432  	// Args: Optional. Arguments passed to the entrypoint.
   433  	Args []string `json:"args,omitempty"`
   434  	// Command: Optional. If set, overrides the default ENTRYPOINT specified by the
   435  	// image.
   436  	Command []string `json:"command,omitempty"`
   437  	// Env: Optional. Environment variables passed to the container's entrypoint.
   438  	Env map[string]string `json:"env,omitempty"`
   439  	// Image: Optional. A Docker container image that defines a custom environment.
   440  	// Cloud Workstations provides a number of preconfigured images
   441  	// (https://cloud.google.com/workstations/docs/preconfigured-base-images), but
   442  	// you can create your own custom container images
   443  	// (https://cloud.google.com/workstations/docs/custom-container-images). If
   444  	// using a private image, the `host.gceInstance.serviceAccount` field must be
   445  	// specified in the workstation configuration. If using a custom container
   446  	// image, the service account must have Artifact Registry Reader
   447  	// (https://cloud.google.com/artifact-registry/docs/access-control#roles)
   448  	// permission to pull the specified image. Otherwise, the image must be
   449  	// publicly accessible.
   450  	Image string `json:"image,omitempty"`
   451  	// RunAsUser: Optional. If set, overrides the USER specified in the image with
   452  	// the given uid.
   453  	RunAsUser int64 `json:"runAsUser,omitempty"`
   454  	// WorkingDir: Optional. If set, overrides the default DIR specified by the
   455  	// image.
   456  	WorkingDir string `json:"workingDir,omitempty"`
   457  	// ForceSendFields is a list of field names (e.g. "Args") to unconditionally
   458  	// include in API requests. By default, fields with empty or default values are
   459  	// omitted from API requests. See
   460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   461  	// details.
   462  	ForceSendFields []string `json:"-"`
   463  	// NullFields is a list of field names (e.g. "Args") to include in API requests
   464  	// with the JSON null value. By default, fields with empty values are omitted
   465  	// from API requests. See
   466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   467  	NullFields []string `json:"-"`
   468  }
   469  
   470  func (s *Container) MarshalJSON() ([]byte, error) {
   471  	type NoMethod Container
   472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   473  }
   474  
   475  // CustomerEncryptionKey: A customer-managed encryption key (CMEK) for the
   476  // Compute Engine resources of the associated workstation configuration.
   477  // Specify the name of your Cloud KMS encryption key and the default service
   478  // account. We recommend that you use a separate service account and follow
   479  // Cloud KMS best practices
   480  // (https://cloud.google.com/kms/docs/separation-of-duties).
   481  type CustomerEncryptionKey struct {
   482  	// KmsKey: Immutable. The name of the Google Cloud KMS encryption key. For
   483  	// example,
   484  	// "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"
   485  	// `. The key must be in the same region as the workstation configuration.
   486  	KmsKey string `json:"kmsKey,omitempty"`
   487  	// KmsKeyServiceAccount: Immutable. The service account to use with the
   488  	// specified KMS key. We recommend that you use a separate service account and
   489  	// follow KMS best practices. For more information, see Separation of duties
   490  	// (https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms
   491  	// keys add-iam-policy-binding` `--member`
   492  	// (https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).
   493  	KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"`
   494  	// ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally
   495  	// include in API requests. By default, fields with empty or default values are
   496  	// omitted from API requests. See
   497  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   498  	// details.
   499  	ForceSendFields []string `json:"-"`
   500  	// NullFields is a list of field names (e.g. "KmsKey") to include in API
   501  	// requests with the JSON null value. By default, fields with empty values are
   502  	// omitted from API requests. See
   503  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   504  	NullFields []string `json:"-"`
   505  }
   506  
   507  func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) {
   508  	type NoMethod CustomerEncryptionKey
   509  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   510  }
   511  
   512  // DomainConfig: Configuration options for a custom domain.
   513  type DomainConfig struct {
   514  	// Domain: Immutable. Domain used by Workstations for HTTP ingress.
   515  	Domain string `json:"domain,omitempty"`
   516  	// ForceSendFields is a list of field names (e.g. "Domain") to unconditionally
   517  	// include in API requests. By default, fields with empty or default values are
   518  	// omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   520  	// details.
   521  	ForceSendFields []string `json:"-"`
   522  	// NullFields is a list of field names (e.g. "Domain") to include in API
   523  	// requests with the JSON null value. By default, fields with empty values are
   524  	// omitted from API requests. See
   525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   526  	NullFields []string `json:"-"`
   527  }
   528  
   529  func (s *DomainConfig) MarshalJSON() ([]byte, error) {
   530  	type NoMethod DomainConfig
   531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   532  }
   533  
   534  // EphemeralDirectory: An ephemeral directory which won't persist across
   535  // workstation sessions. It is freshly created on every workstation start
   536  // operation.
   537  type EphemeralDirectory struct {
   538  	// GcePd: An EphemeralDirectory backed by a Compute Engine persistent disk.
   539  	GcePd *GcePersistentDisk `json:"gcePd,omitempty"`
   540  	// MountPath: Required. Location of this directory in the running workstation.
   541  	MountPath string `json:"mountPath,omitempty"`
   542  	// ForceSendFields is a list of field names (e.g. "GcePd") to unconditionally
   543  	// include in API requests. By default, fields with empty or default values are
   544  	// omitted from API requests. See
   545  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   546  	// details.
   547  	ForceSendFields []string `json:"-"`
   548  	// NullFields is a list of field names (e.g. "GcePd") to include in API
   549  	// requests with the JSON null value. By default, fields with empty values are
   550  	// omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   552  	NullFields []string `json:"-"`
   553  }
   554  
   555  func (s *EphemeralDirectory) MarshalJSON() ([]byte, error) {
   556  	type NoMethod EphemeralDirectory
   557  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   558  }
   559  
   560  // Expr: Represents a textual expression in the Common Expression Language
   561  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   562  // of CEL are documented at https://github.com/google/cel-spec. Example
   563  // (Comparison): title: "Summary size limit" description: "Determines if a
   564  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   565  // Example (Equality): title: "Requestor is owner" description: "Determines if
   566  // requestor is the document owner" expression: "document.owner ==
   567  // request.auth.claims.email" Example (Logic): title: "Public documents"
   568  // description: "Determine whether the document should be publicly visible"
   569  // expression: "document.type != 'private' && document.type != 'internal'"
   570  // Example (Data Manipulation): title: "Notification string" description:
   571  // "Create a notification string with a timestamp." expression: "'New message
   572  // received at ' + string(document.create_time)" The exact variables and
   573  // functions that may be referenced within an expression are determined by the
   574  // service that evaluates it. See the service documentation for additional
   575  // information.
   576  type Expr struct {
   577  	// Description: Optional. Description of the expression. This is a longer text
   578  	// which describes the expression, e.g. when hovered over it in a UI.
   579  	Description string `json:"description,omitempty"`
   580  	// Expression: Textual representation of an expression in Common Expression
   581  	// Language syntax.
   582  	Expression string `json:"expression,omitempty"`
   583  	// Location: Optional. String indicating the location of the expression for
   584  	// error reporting, e.g. a file name and a position in the file.
   585  	Location string `json:"location,omitempty"`
   586  	// Title: Optional. Title for the expression, i.e. a short string describing
   587  	// its purpose. This can be used e.g. in UIs which allow to enter the
   588  	// expression.
   589  	Title string `json:"title,omitempty"`
   590  	// ForceSendFields is a list of field names (e.g. "Description") to
   591  	// unconditionally include in API requests. By default, fields with empty or
   592  	// default values are omitted from API requests. See
   593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   594  	// details.
   595  	ForceSendFields []string `json:"-"`
   596  	// NullFields is a list of field names (e.g. "Description") to include in API
   597  	// requests with the JSON null value. By default, fields with empty values are
   598  	// omitted from API requests. See
   599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   600  	NullFields []string `json:"-"`
   601  }
   602  
   603  func (s *Expr) MarshalJSON() ([]byte, error) {
   604  	type NoMethod Expr
   605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   606  }
   607  
   608  // GceConfidentialInstanceConfig: A set of Compute Engine Confidential VM
   609  // instance options.
   610  type GceConfidentialInstanceConfig struct {
   611  	// EnableConfidentialCompute: Optional. Whether the instance has confidential
   612  	// compute enabled.
   613  	EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"`
   614  	// ForceSendFields is a list of field names (e.g. "EnableConfidentialCompute")
   615  	// to unconditionally include in API requests. By default, fields with empty or
   616  	// default values are omitted from API requests. See
   617  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   618  	// details.
   619  	ForceSendFields []string `json:"-"`
   620  	// NullFields is a list of field names (e.g. "EnableConfidentialCompute") to
   621  	// include in API requests with the JSON null value. By default, fields with
   622  	// empty values are omitted from API requests. See
   623  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   624  	NullFields []string `json:"-"`
   625  }
   626  
   627  func (s *GceConfidentialInstanceConfig) MarshalJSON() ([]byte, error) {
   628  	type NoMethod GceConfidentialInstanceConfig
   629  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   630  }
   631  
   632  // GceInstance: A runtime using a Compute Engine instance.
   633  type GceInstance struct {
   634  	// Accelerators: Optional. A list of the type and count of accelerator cards
   635  	// attached to the instance.
   636  	Accelerators []*Accelerator `json:"accelerators,omitempty"`
   637  	// BootDiskSizeGb: Optional. The size of the boot disk for the VM in gigabytes
   638  	// (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.
   639  	BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
   640  	// ConfidentialInstanceConfig: Optional. A set of Compute Engine Confidential
   641  	// VM instance options.
   642  	ConfidentialInstanceConfig *GceConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"`
   643  	// DisablePublicIpAddresses: Optional. When set to true, disables public IP
   644  	// addresses for VMs. If you disable public IP addresses, you must set up
   645  	// Private Google Access or Cloud NAT on your network. If you use Private
   646  	// Google Access and you use `private.googleapis.com` or
   647  	// `restricted.googleapis.com` for Container Registry and Artifact Registry,
   648  	// make sure that you set up DNS records for domains `*.gcr.io` and
   649  	// `*.pkg.dev`. Defaults to false (VMs have public IP addresses).
   650  	DisablePublicIpAddresses bool `json:"disablePublicIpAddresses,omitempty"`
   651  	// DisableSsh: Optional. Whether to disable SSH access to the VM.
   652  	DisableSsh bool `json:"disableSsh,omitempty"`
   653  	// EnableNestedVirtualization: Optional. Whether to enable nested
   654  	// virtualization on Cloud Workstations VMs created using this workstation
   655  	// configuration. Nested virtualization lets you run virtual machine (VM)
   656  	// instances inside your workstation. Before enabling nested virtualization,
   657  	// consider the following important considerations. Cloud Workstations
   658  	// instances are subject to the same restrictions as Compute Engine instances
   659  	// (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions):
   660  	// * **Organization policy**: projects, folders, or organizations may be
   661  	// restricted from creating nested VMs if the **Disable VM nested
   662  	// virtualization** constraint is enforced in the organization policy. For more
   663  	// information, see the Compute Engine section, Checking whether nested
   664  	// virtualization is allowed
   665  	// (https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed).
   666  	// * **Performance**: nested VMs might experience a 10% or greater decrease in
   667  	// performance for workloads that are CPU-bound and possibly greater than a 10%
   668  	// decrease for workloads that are input/output bound. * **Machine Type**:
   669  	// nested virtualization can only be enabled on workstation configurations that
   670  	// specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested
   671  	// virtualization may not be enabled on workstation configurations with
   672  	// accelerators. * **Operating System**: Because Container-Optimized OS
   673  	// (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos)
   674  	// does not support nested virtualization, when nested virtualization is
   675  	// enabled, the underlying Compute Engine VM instances boot from an Ubuntu LTS
   676  	// (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.
   677  	EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"`
   678  	// MachineType: Optional. The type of machine to use for VM instances—for
   679  	// example, "e2-standard-4". For more information about machine types that
   680  	// Cloud Workstations supports, see the list of available machine types
   681  	// (https://cloud.google.com/workstations/docs/available-machine-types).
   682  	MachineType string `json:"machineType,omitempty"`
   683  	// PoolSize: Optional. The number of VMs that the system should keep idle so
   684  	// that new workstations can be started quickly for new users. Defaults to `0`
   685  	// in the API.
   686  	PoolSize int64 `json:"poolSize,omitempty"`
   687  	// PooledInstances: Output only. Number of instances currently available in the
   688  	// pool for faster workstation startup.
   689  	PooledInstances int64 `json:"pooledInstances,omitempty"`
   690  	// ServiceAccount: Optional. The email address of the service account for Cloud
   691  	// Workstations VMs created with this configuration. When specified, be sure
   692  	// that the service account has `logging.logEntries.create` and
   693  	// `monitoring.timeSeries.create` permissions on the project so it can write
   694  	// logs out to Cloud Logging. If using a custom container image, the service
   695  	// account must have Artifact Registry Reader
   696  	// (https://cloud.google.com/artifact-registry/docs/access-control#roles)
   697  	// permission to pull the specified image. If you as the administrator want to
   698  	// be able to `ssh` into the underlying VM, you need to set this value to a
   699  	// service account for which you have the `iam.serviceAccounts.actAs`
   700  	// permission. Conversely, if you don't want anyone to be able to `ssh` into
   701  	// the underlying VM, use a service account where no one has that permission.
   702  	// If not set, VMs run with a service account provided by the Cloud
   703  	// Workstations service, and the image must be publicly accessible.
   704  	ServiceAccount string `json:"serviceAccount,omitempty"`
   705  	// ServiceAccountScopes: Optional. Scopes to grant to the service_account. When
   706  	// specified, users of workstations under this configuration must have
   707  	// `iam.serviceAccounts.actAs` on the service account.
   708  	ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
   709  	// ShieldedInstanceConfig: Optional. A set of Compute Engine Shielded instance
   710  	// options.
   711  	ShieldedInstanceConfig *GceShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
   712  	// Tags: Optional. Network tags to add to the Compute Engine VMs backing the
   713  	// workstations. This option applies network tags
   714  	// (https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created
   715  	// with this configuration. These network tags enable the creation of firewall
   716  	// rules (https://cloud.google.com/workstations/docs/configure-firewall-rules).
   717  	Tags []string `json:"tags,omitempty"`
   718  	// ForceSendFields is a list of field names (e.g. "Accelerators") to
   719  	// unconditionally include in API requests. By default, fields with empty or
   720  	// default values are omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   722  	// details.
   723  	ForceSendFields []string `json:"-"`
   724  	// NullFields is a list of field names (e.g. "Accelerators") to include in API
   725  	// requests with the JSON null value. By default, fields with empty values are
   726  	// omitted from API requests. See
   727  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   728  	NullFields []string `json:"-"`
   729  }
   730  
   731  func (s *GceInstance) MarshalJSON() ([]byte, error) {
   732  	type NoMethod GceInstance
   733  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   734  }
   735  
   736  // GcePersistentDisk: An EphemeralDirectory is backed by a Compute Engine
   737  // persistent disk.
   738  type GcePersistentDisk struct {
   739  	// DiskType: Optional. Type of the disk to use. Defaults to "pd-standard".
   740  	DiskType string `json:"diskType,omitempty"`
   741  	// ReadOnly: Optional. Whether the disk is read only. If true, the disk may be
   742  	// shared by multiple VMs and source_snapshot must be set.
   743  	ReadOnly bool `json:"readOnly,omitempty"`
   744  	// SourceImage: Optional. Name of the disk image to use as the source for the
   745  	// disk. Must be empty if source_snapshot is set. Updating source_image will
   746  	// update content in the ephemeral directory after the workstation is
   747  	// restarted. This field is mutable.
   748  	SourceImage string `json:"sourceImage,omitempty"`
   749  	// SourceSnapshot: Optional. Name of the snapshot to use as the source for the
   750  	// disk. Must be empty if source_image is set. Must be empty if read_only is
   751  	// false. Updating source_snapshot will update content in the ephemeral
   752  	// directory after the workstation is restarted. This field is mutable.
   753  	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
   754  	// ForceSendFields is a list of field names (e.g. "DiskType") to
   755  	// unconditionally include in API requests. By default, fields with empty or
   756  	// default values are omitted from API requests. See
   757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   758  	// details.
   759  	ForceSendFields []string `json:"-"`
   760  	// NullFields is a list of field names (e.g. "DiskType") to include in API
   761  	// requests with the JSON null value. By default, fields with empty values are
   762  	// omitted from API requests. See
   763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   764  	NullFields []string `json:"-"`
   765  }
   766  
   767  func (s *GcePersistentDisk) MarshalJSON() ([]byte, error) {
   768  	type NoMethod GcePersistentDisk
   769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   770  }
   771  
   772  // GceRegionalPersistentDisk: A Persistent Directory backed by a Compute Engine
   773  // regional persistent disk. The persistent_directories field is repeated, but
   774  // it may contain only one entry. It creates a persistent disk
   775  // (https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts
   776  // to the workstation VM at `/home` when the session starts and detaches when
   777  // the session ends. If this field is empty, workstations created with this
   778  // configuration do not have a persistent home directory.
   779  type GceRegionalPersistentDisk struct {
   780  	// DiskType: Optional. The type of the persistent disk
   781  	// (https://cloud.google.com/compute/docs/disks#disk-types) for the home
   782  	// directory. Defaults to "pd-standard".
   783  	DiskType string `json:"diskType,omitempty"`
   784  	// FsType: Optional. Type of file system that the disk should be formatted
   785  	// with. The workstation image must support this file system type. Must be
   786  	// empty if source_snapshot is set. Defaults to "ext4".
   787  	FsType string `json:"fsType,omitempty"`
   788  	// ReclaimPolicy: Optional. Whether the persistent disk should be deleted when
   789  	// the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults
   790  	// to `DELETE`.
   791  	//
   792  	// Possible values:
   793  	//   "RECLAIM_POLICY_UNSPECIFIED" - Do not use.
   794  	//   "DELETE" - Delete the persistent disk when deleting the workstation.
   795  	//   "RETAIN" - Keep the persistent disk when deleting the workstation. An
   796  	// administrator must manually delete the disk.
   797  	ReclaimPolicy string `json:"reclaimPolicy,omitempty"`
   798  	// SizeGb: Optional. The GB capacity of a persistent home directory for each
   799  	// workstation created with this configuration. Must be empty if
   800  	// source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, `500`, or
   801  	// `1000`. Defaults to `200`. If less than `200` GB, the disk_type must be
   802  	// "pd-balanced" or "pd-ssd".
   803  	SizeGb int64 `json:"sizeGb,omitempty"`
   804  	// SourceSnapshot: Optional. Name of the snapshot to use as the source for the
   805  	// disk. If set, size_gb and fs_type must be empty.
   806  	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
   807  	// ForceSendFields is a list of field names (e.g. "DiskType") to
   808  	// unconditionally include in API requests. By default, fields with empty or
   809  	// default values are omitted from API requests. See
   810  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   811  	// details.
   812  	ForceSendFields []string `json:"-"`
   813  	// NullFields is a list of field names (e.g. "DiskType") to include in API
   814  	// requests with the JSON null value. By default, fields with empty values are
   815  	// omitted from API requests. See
   816  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   817  	NullFields []string `json:"-"`
   818  }
   819  
   820  func (s *GceRegionalPersistentDisk) MarshalJSON() ([]byte, error) {
   821  	type NoMethod GceRegionalPersistentDisk
   822  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   823  }
   824  
   825  // GceShieldedInstanceConfig: A set of Compute Engine Shielded instance
   826  // options.
   827  type GceShieldedInstanceConfig struct {
   828  	// EnableIntegrityMonitoring: Optional. Whether the instance has integrity
   829  	// monitoring enabled.
   830  	EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
   831  	// EnableSecureBoot: Optional. Whether the instance has Secure Boot enabled.
   832  	EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
   833  	// EnableVtpm: Optional. Whether the instance has the vTPM enabled.
   834  	EnableVtpm bool `json:"enableVtpm,omitempty"`
   835  	// ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring")
   836  	// to unconditionally include in API requests. By default, fields with empty or
   837  	// default values are omitted from API requests. See
   838  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   839  	// details.
   840  	ForceSendFields []string `json:"-"`
   841  	// NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to
   842  	// include in API requests with the JSON null value. By default, fields with
   843  	// empty values are omitted from API requests. See
   844  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   845  	NullFields []string `json:"-"`
   846  }
   847  
   848  func (s *GceShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
   849  	type NoMethod GceShieldedInstanceConfig
   850  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   851  }
   852  
   853  // GenerateAccessTokenRequest: Request message for GenerateAccessToken.
   854  type GenerateAccessTokenRequest struct {
   855  	// ExpireTime: Desired expiration time of the access token. This value must be
   856  	// at most 24 hours in the future. If a value is not specified, the token's
   857  	// expiration time will be set to a default value of 1 hour in the future.
   858  	ExpireTime string `json:"expireTime,omitempty"`
   859  	// Ttl: Desired lifetime duration of the access token. This value must be at
   860  	// most 24 hours. If a value is not specified, the token's lifetime will be set
   861  	// to a default value of 1 hour.
   862  	Ttl string `json:"ttl,omitempty"`
   863  	// ForceSendFields is a list of field names (e.g. "ExpireTime") to
   864  	// unconditionally include in API requests. By default, fields with empty or
   865  	// default values are omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   867  	// details.
   868  	ForceSendFields []string `json:"-"`
   869  	// NullFields is a list of field names (e.g. "ExpireTime") to include in API
   870  	// requests with the JSON null value. By default, fields with empty values are
   871  	// omitted from API requests. See
   872  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   873  	NullFields []string `json:"-"`
   874  }
   875  
   876  func (s *GenerateAccessTokenRequest) MarshalJSON() ([]byte, error) {
   877  	type NoMethod GenerateAccessTokenRequest
   878  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   879  }
   880  
   881  // GenerateAccessTokenResponse: Response message for GenerateAccessToken.
   882  type GenerateAccessTokenResponse struct {
   883  	// AccessToken: The generated bearer access token. To use this token, include
   884  	// it in an Authorization header of an HTTP request sent to the associated
   885  	// workstation's hostname—for example, `Authorization: Bearer `.
   886  	AccessToken string `json:"accessToken,omitempty"`
   887  	// ExpireTime: Time at which the generated token will expire.
   888  	ExpireTime string `json:"expireTime,omitempty"`
   889  
   890  	// ServerResponse contains the HTTP response code and headers from the server.
   891  	googleapi.ServerResponse `json:"-"`
   892  	// ForceSendFields is a list of field names (e.g. "AccessToken") to
   893  	// unconditionally include in API requests. By default, fields with empty or
   894  	// default values are omitted from API requests. See
   895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   896  	// details.
   897  	ForceSendFields []string `json:"-"`
   898  	// NullFields is a list of field names (e.g. "AccessToken") to include in API
   899  	// requests with the JSON null value. By default, fields with empty values are
   900  	// omitted from API requests. See
   901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   902  	NullFields []string `json:"-"`
   903  }
   904  
   905  func (s *GenerateAccessTokenResponse) MarshalJSON() ([]byte, error) {
   906  	type NoMethod GenerateAccessTokenResponse
   907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   908  }
   909  
   910  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
   911  // defining duplicated empty messages in your APIs. A typical example is to use
   912  // it as the request or the response type of an API method. For instance:
   913  // service Foo { rpc Bar(google.protobuf.Empty) returns
   914  // (google.protobuf.Empty); }
   915  type GoogleProtobufEmpty struct {
   916  	// ServerResponse contains the HTTP response code and headers from the server.
   917  	googleapi.ServerResponse `json:"-"`
   918  }
   919  
   920  // Host: Runtime host for a workstation.
   921  type Host struct {
   922  	// GceInstance: Specifies a Compute Engine instance as the host.
   923  	GceInstance *GceInstance `json:"gceInstance,omitempty"`
   924  	// ForceSendFields is a list of field names (e.g. "GceInstance") to
   925  	// unconditionally include in API requests. By default, fields with empty or
   926  	// default values are omitted from API requests. See
   927  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   928  	// details.
   929  	ForceSendFields []string `json:"-"`
   930  	// NullFields is a list of field names (e.g. "GceInstance") to include in API
   931  	// requests with the JSON null value. By default, fields with empty values are
   932  	// omitted from API requests. See
   933  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   934  	NullFields []string `json:"-"`
   935  }
   936  
   937  func (s *Host) MarshalJSON() ([]byte, error) {
   938  	type NoMethod Host
   939  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   940  }
   941  
   942  // ListLocationsResponse: The response message for Locations.ListLocations.
   943  type ListLocationsResponse struct {
   944  	// Locations: A list of locations that matches the specified filter in the
   945  	// request.
   946  	Locations []*Location `json:"locations,omitempty"`
   947  	// NextPageToken: The standard List next-page token.
   948  	NextPageToken string `json:"nextPageToken,omitempty"`
   949  
   950  	// ServerResponse contains the HTTP response code and headers from the server.
   951  	googleapi.ServerResponse `json:"-"`
   952  	// ForceSendFields is a list of field names (e.g. "Locations") to
   953  	// unconditionally include in API requests. By default, fields with empty or
   954  	// default values are omitted from API requests. See
   955  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   956  	// details.
   957  	ForceSendFields []string `json:"-"`
   958  	// NullFields is a list of field names (e.g. "Locations") to include in API
   959  	// requests with the JSON null value. By default, fields with empty values are
   960  	// omitted from API requests. See
   961  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   962  	NullFields []string `json:"-"`
   963  }
   964  
   965  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   966  	type NoMethod ListLocationsResponse
   967  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   968  }
   969  
   970  // ListOperationsResponse: The response message for Operations.ListOperations.
   971  type ListOperationsResponse struct {
   972  	// NextPageToken: The standard List next-page token.
   973  	NextPageToken string `json:"nextPageToken,omitempty"`
   974  	// Operations: A list of operations that matches the specified filter in the
   975  	// request.
   976  	Operations []*Operation `json:"operations,omitempty"`
   977  
   978  	// ServerResponse contains the HTTP response code and headers from the server.
   979  	googleapi.ServerResponse `json:"-"`
   980  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   981  	// unconditionally include in API requests. By default, fields with empty or
   982  	// default values are omitted from API requests. See
   983  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   984  	// details.
   985  	ForceSendFields []string `json:"-"`
   986  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   987  	// requests with the JSON null value. By default, fields with empty values are
   988  	// omitted from API requests. See
   989  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   990  	NullFields []string `json:"-"`
   991  }
   992  
   993  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   994  	type NoMethod ListOperationsResponse
   995  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   996  }
   997  
   998  // ListUsableWorkstationConfigsResponse: Response message for
   999  // ListUsableWorkstationConfigs.
  1000  type ListUsableWorkstationConfigsResponse struct {
  1001  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1002  	// are no more results in the list.
  1003  	NextPageToken string `json:"nextPageToken,omitempty"`
  1004  	// Unreachable: Unreachable resources.
  1005  	Unreachable []string `json:"unreachable,omitempty"`
  1006  	// WorkstationConfigs: The requested configs.
  1007  	WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"`
  1008  
  1009  	// ServerResponse contains the HTTP response code and headers from the server.
  1010  	googleapi.ServerResponse `json:"-"`
  1011  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1012  	// unconditionally include in API requests. By default, fields with empty or
  1013  	// default values are omitted from API requests. See
  1014  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1015  	// details.
  1016  	ForceSendFields []string `json:"-"`
  1017  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1018  	// requests with the JSON null value. By default, fields with empty values are
  1019  	// omitted from API requests. See
  1020  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1021  	NullFields []string `json:"-"`
  1022  }
  1023  
  1024  func (s *ListUsableWorkstationConfigsResponse) MarshalJSON() ([]byte, error) {
  1025  	type NoMethod ListUsableWorkstationConfigsResponse
  1026  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1027  }
  1028  
  1029  // ListUsableWorkstationsResponse: Response message for ListUsableWorkstations.
  1030  type ListUsableWorkstationsResponse struct {
  1031  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1032  	// are no more results in the list.
  1033  	NextPageToken string `json:"nextPageToken,omitempty"`
  1034  	// Unreachable: Unreachable resources.
  1035  	Unreachable []string `json:"unreachable,omitempty"`
  1036  	// Workstations: The requested workstations.
  1037  	Workstations []*Workstation `json:"workstations,omitempty"`
  1038  
  1039  	// ServerResponse contains the HTTP response code and headers from the server.
  1040  	googleapi.ServerResponse `json:"-"`
  1041  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1042  	// unconditionally include in API requests. By default, fields with empty or
  1043  	// default values are omitted from API requests. See
  1044  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1045  	// details.
  1046  	ForceSendFields []string `json:"-"`
  1047  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1048  	// requests with the JSON null value. By default, fields with empty values are
  1049  	// omitted from API requests. See
  1050  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1051  	NullFields []string `json:"-"`
  1052  }
  1053  
  1054  func (s *ListUsableWorkstationsResponse) MarshalJSON() ([]byte, error) {
  1055  	type NoMethod ListUsableWorkstationsResponse
  1056  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1057  }
  1058  
  1059  // ListWorkstationClustersResponse: Response message for
  1060  // ListWorkstationClusters.
  1061  type ListWorkstationClustersResponse struct {
  1062  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1063  	// are no more results in the list.
  1064  	NextPageToken string `json:"nextPageToken,omitempty"`
  1065  	// Unreachable: Unreachable resources.
  1066  	Unreachable []string `json:"unreachable,omitempty"`
  1067  	// WorkstationClusters: The requested workstation clusters.
  1068  	WorkstationClusters []*WorkstationCluster `json:"workstationClusters,omitempty"`
  1069  
  1070  	// ServerResponse contains the HTTP response code and headers from the server.
  1071  	googleapi.ServerResponse `json:"-"`
  1072  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1073  	// unconditionally include in API requests. By default, fields with empty or
  1074  	// default values are omitted from API requests. See
  1075  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1076  	// details.
  1077  	ForceSendFields []string `json:"-"`
  1078  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1079  	// requests with the JSON null value. By default, fields with empty values are
  1080  	// omitted from API requests. See
  1081  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1082  	NullFields []string `json:"-"`
  1083  }
  1084  
  1085  func (s *ListWorkstationClustersResponse) MarshalJSON() ([]byte, error) {
  1086  	type NoMethod ListWorkstationClustersResponse
  1087  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1088  }
  1089  
  1090  // ListWorkstationConfigsResponse: Response message for ListWorkstationConfigs.
  1091  type ListWorkstationConfigsResponse struct {
  1092  	// NextPageToken: Token to retrieve the next page of results, or empty if there
  1093  	// are no more results in the list.
  1094  	NextPageToken string `json:"nextPageToken,omitempty"`
  1095  	// Unreachable: Unreachable resources.
  1096  	Unreachable []string `json:"unreachable,omitempty"`
  1097  	// WorkstationConfigs: The requested configs.
  1098  	WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"`
  1099  
  1100  	// ServerResponse contains the HTTP response code and headers from the server.
  1101  	googleapi.ServerResponse `json:"-"`
  1102  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1103  	// unconditionally include in API requests. By default, fields with empty or
  1104  	// default values are omitted from API requests. See
  1105  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1106  	// details.
  1107  	ForceSendFields []string `json:"-"`
  1108  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1109  	// requests with the JSON null value. By default, fields with empty values are
  1110  	// omitted from API requests. See
  1111  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1112  	NullFields []string `json:"-"`
  1113  }
  1114  
  1115  func (s *ListWorkstationConfigsResponse) MarshalJSON() ([]byte, error) {
  1116  	type NoMethod ListWorkstationConfigsResponse
  1117  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1118  }
  1119  
  1120  // ListWorkstationsResponse: Response message for ListWorkstations.
  1121  type ListWorkstationsResponse struct {
  1122  	// NextPageToken: Optional. Token to retrieve the next page of results, or
  1123  	// empty if there are no more results in the list.
  1124  	NextPageToken string `json:"nextPageToken,omitempty"`
  1125  	// Unreachable: Optional. Unreachable resources.
  1126  	Unreachable []string `json:"unreachable,omitempty"`
  1127  	// Workstations: The requested workstations.
  1128  	Workstations []*Workstation `json:"workstations,omitempty"`
  1129  
  1130  	// ServerResponse contains the HTTP response code and headers from the server.
  1131  	googleapi.ServerResponse `json:"-"`
  1132  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1133  	// unconditionally include in API requests. By default, fields with empty or
  1134  	// default values are omitted from API requests. See
  1135  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1136  	// details.
  1137  	ForceSendFields []string `json:"-"`
  1138  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1139  	// requests with the JSON null value. By default, fields with empty values are
  1140  	// omitted from API requests. See
  1141  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1142  	NullFields []string `json:"-"`
  1143  }
  1144  
  1145  func (s *ListWorkstationsResponse) MarshalJSON() ([]byte, error) {
  1146  	type NoMethod ListWorkstationsResponse
  1147  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1148  }
  1149  
  1150  // Location: A resource that represents a Google Cloud location.
  1151  type Location struct {
  1152  	// DisplayName: The friendly name for this location, typically a nearby city
  1153  	// name. For example, "Tokyo".
  1154  	DisplayName string `json:"displayName,omitempty"`
  1155  	// Labels: Cross-service attributes for the location. For example
  1156  	// {"cloud.googleapis.com/region": "us-east1"}
  1157  	Labels map[string]string `json:"labels,omitempty"`
  1158  	// LocationId: The canonical id for this location. For example: "us-east1".
  1159  	LocationId string `json:"locationId,omitempty"`
  1160  	// Metadata: Service-specific metadata. For example the available capacity at
  1161  	// the given location.
  1162  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1163  	// Name: Resource name for the location, which may vary between
  1164  	// implementations. For example:
  1165  	// "projects/example-project/locations/us-east1"
  1166  	Name string `json:"name,omitempty"`
  1167  
  1168  	// ServerResponse contains the HTTP response code and headers from the server.
  1169  	googleapi.ServerResponse `json:"-"`
  1170  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1171  	// unconditionally include in API requests. By default, fields with empty or
  1172  	// default values are omitted from API requests. See
  1173  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1174  	// details.
  1175  	ForceSendFields []string `json:"-"`
  1176  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1177  	// requests with the JSON null value. By default, fields with empty values are
  1178  	// omitted from API requests. See
  1179  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1180  	NullFields []string `json:"-"`
  1181  }
  1182  
  1183  func (s *Location) MarshalJSON() ([]byte, error) {
  1184  	type NoMethod Location
  1185  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1186  }
  1187  
  1188  // Operation: This resource represents a long-running operation that is the
  1189  // result of a network API call.
  1190  type Operation struct {
  1191  	// Done: If the value is `false`, it means the operation is still in progress.
  1192  	// If `true`, the operation is completed, and either `error` or `response` is
  1193  	// available.
  1194  	Done bool `json:"done,omitempty"`
  1195  	// Error: The error result of the operation in case of failure or cancellation.
  1196  	Error *Status `json:"error,omitempty"`
  1197  	// Metadata: Service-specific metadata associated with the operation. It
  1198  	// typically contains progress information and common metadata such as create
  1199  	// time. Some services might not provide such metadata. Any method that returns
  1200  	// a long-running operation should document the metadata type, if any.
  1201  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1202  	// Name: The server-assigned name, which is only unique within the same service
  1203  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1204  	// should be a resource name ending with `operations/{unique_id}`.
  1205  	Name string `json:"name,omitempty"`
  1206  	// Response: The normal, successful response of the operation. If the original
  1207  	// method returns no data on success, such as `Delete`, the response is
  1208  	// `google.protobuf.Empty`. If the original method is standard
  1209  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1210  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1211  	// original method name. For example, if the original method name is
  1212  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1213  	Response googleapi.RawMessage `json:"response,omitempty"`
  1214  
  1215  	// ServerResponse contains the HTTP response code and headers from the server.
  1216  	googleapi.ServerResponse `json:"-"`
  1217  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1218  	// include in API requests. By default, fields with empty or default values are
  1219  	// omitted from API requests. See
  1220  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1221  	// details.
  1222  	ForceSendFields []string `json:"-"`
  1223  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1224  	// with the JSON null value. By default, fields with empty values are omitted
  1225  	// from API requests. See
  1226  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1227  	NullFields []string `json:"-"`
  1228  }
  1229  
  1230  func (s *Operation) MarshalJSON() ([]byte, error) {
  1231  	type NoMethod Operation
  1232  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1233  }
  1234  
  1235  // OperationMetadata: Metadata for long-running operations.
  1236  type OperationMetadata struct {
  1237  	// ApiVersion: Output only. API version used to start the operation.
  1238  	ApiVersion string `json:"apiVersion,omitempty"`
  1239  	// CreateTime: Output only. Time that the operation was created.
  1240  	CreateTime string `json:"createTime,omitempty"`
  1241  	// EndTime: Output only. Time that the operation finished running.
  1242  	EndTime string `json:"endTime,omitempty"`
  1243  	// RequestedCancellation: Output only. Identifies whether the user has
  1244  	// requested cancellation of the operation.
  1245  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1246  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1247  	StatusMessage string `json:"statusMessage,omitempty"`
  1248  	// Target: Output only. Server-defined resource path for the target of the
  1249  	// operation.
  1250  	Target string `json:"target,omitempty"`
  1251  	// Verb: Output only. Name of the verb executed by the operation.
  1252  	Verb string `json:"verb,omitempty"`
  1253  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1254  	// unconditionally include in API requests. By default, fields with empty or
  1255  	// default values are omitted from API requests. See
  1256  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1257  	// details.
  1258  	ForceSendFields []string `json:"-"`
  1259  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1260  	// requests with the JSON null value. By default, fields with empty values are
  1261  	// omitted from API requests. See
  1262  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1263  	NullFields []string `json:"-"`
  1264  }
  1265  
  1266  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1267  	type NoMethod OperationMetadata
  1268  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1269  }
  1270  
  1271  // PersistentDirectory: A directory to persist across workstation sessions.
  1272  type PersistentDirectory struct {
  1273  	// GcePd: A PersistentDirectory backed by a Compute Engine persistent disk.
  1274  	GcePd *GceRegionalPersistentDisk `json:"gcePd,omitempty"`
  1275  	// MountPath: Optional. Location of this directory in the running workstation.
  1276  	MountPath string `json:"mountPath,omitempty"`
  1277  	// ForceSendFields is a list of field names (e.g. "GcePd") to unconditionally
  1278  	// include in API requests. By default, fields with empty or default values are
  1279  	// omitted from API requests. See
  1280  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1281  	// details.
  1282  	ForceSendFields []string `json:"-"`
  1283  	// NullFields is a list of field names (e.g. "GcePd") to include in API
  1284  	// requests with the JSON null value. By default, fields with empty values are
  1285  	// omitted from API requests. See
  1286  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1287  	NullFields []string `json:"-"`
  1288  }
  1289  
  1290  func (s *PersistentDirectory) MarshalJSON() ([]byte, error) {
  1291  	type NoMethod PersistentDirectory
  1292  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1293  }
  1294  
  1295  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1296  // access controls for Google Cloud resources. A `Policy` is a collection of
  1297  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1298  // single `role`. Principals can be user accounts, service accounts, Google
  1299  // groups, and domains (such as G Suite). A `role` is a named list of
  1300  // permissions; each `role` can be an IAM predefined role or a user-created
  1301  // custom role. For some types of Google Cloud resources, a `binding` can also
  1302  // specify a `condition`, which is a logical expression that allows access to a
  1303  // resource only if the expression evaluates to `true`. A condition can add
  1304  // constraints based on attributes of the request, the resource, or both. To
  1305  // learn which resources support conditions in their IAM policies, see the IAM
  1306  // documentation
  1307  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1308  // example:** ``` { "bindings": [ { "role":
  1309  // "roles/resourcemanager.organizationAdmin", "members": [
  1310  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1311  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1312  // "roles/resourcemanager.organizationViewer", "members": [
  1313  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1314  // "description": "Does not grant access after Sep 2020", "expression":
  1315  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1316  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1317  // members: - user:mike@example.com - group:admins@example.com -
  1318  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1319  // role: roles/resourcemanager.organizationAdmin - members: -
  1320  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1321  // condition: title: expirable access description: Does not grant access after
  1322  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1323  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1324  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1325  type Policy struct {
  1326  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1327  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1328  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1329  	// Optionally, may specify a `condition` that determines how and when the
  1330  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1331  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1332  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1333  	// principal counts towards these limits. For example, if the `bindings` grant
  1334  	// 50 different roles to `user:alice@example.com`, and not to any other
  1335  	// principal, then you can add another 1,450 principals to the `bindings` in
  1336  	// the `Policy`.
  1337  	Bindings []*Binding `json:"bindings,omitempty"`
  1338  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1339  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1340  	// strongly suggested that systems make use of the `etag` in the
  1341  	// read-modify-write cycle to perform policy updates in order to avoid race
  1342  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1343  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1344  	// ensure that their change will be applied to the same version of the policy.
  1345  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1346  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1347  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1348  	// the conditions in the version `3` policy are lost.
  1349  	Etag string `json:"etag,omitempty"`
  1350  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1351  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1352  	// affects conditional role bindings must specify version `3`. This requirement
  1353  	// applies to the following operations: * Getting a policy that includes a
  1354  	// conditional role binding * Adding a conditional role binding to a policy *
  1355  	// Changing a conditional role binding in a policy * Removing any role binding,
  1356  	// with or without a condition, from a policy that includes conditions
  1357  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1358  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1359  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1360  	// the conditions in the version `3` policy are lost. If a policy does not
  1361  	// include any conditions, operations on that policy may specify any valid
  1362  	// version or leave the field unset. To learn which resources support
  1363  	// conditions in their IAM policies, see the IAM documentation
  1364  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1365  	Version int64 `json:"version,omitempty"`
  1366  
  1367  	// ServerResponse contains the HTTP response code and headers from the server.
  1368  	googleapi.ServerResponse `json:"-"`
  1369  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1370  	// unconditionally include in API requests. By default, fields with empty or
  1371  	// default values are omitted from API requests. See
  1372  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1373  	// details.
  1374  	ForceSendFields []string `json:"-"`
  1375  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1376  	// requests with the JSON null value. By default, fields with empty values are
  1377  	// omitted from API requests. See
  1378  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1379  	NullFields []string `json:"-"`
  1380  }
  1381  
  1382  func (s *Policy) MarshalJSON() ([]byte, error) {
  1383  	type NoMethod Policy
  1384  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1385  }
  1386  
  1387  // PrivateClusterConfig: Configuration options for private workstation
  1388  // clusters.
  1389  type PrivateClusterConfig struct {
  1390  	// AllowedProjects: Optional. Additional projects that are allowed to attach to
  1391  	// the workstation cluster's service attachment. By default, the workstation
  1392  	// cluster's project and the VPC host project (if different) are allowed.
  1393  	AllowedProjects []string `json:"allowedProjects,omitempty"`
  1394  	// ClusterHostname: Output only. Hostname for the workstation cluster. This
  1395  	// field will be populated only when private endpoint is enabled. To access
  1396  	// workstations in the workstation cluster, create a new DNS zone mapping this
  1397  	// domain name to an internal IP address and a forwarding rule mapping that
  1398  	// address to the service attachment.
  1399  	ClusterHostname string `json:"clusterHostname,omitempty"`
  1400  	// EnablePrivateEndpoint: Immutable. Whether Workstations endpoint is private.
  1401  	EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"`
  1402  	// ServiceAttachmentUri: Output only. Service attachment URI for the
  1403  	// workstation cluster. The service attachemnt is created when private endpoint
  1404  	// is enabled. To access workstations in the workstation cluster, configure
  1405  	// access to the managed service using Private Service Connect
  1406  	// (https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
  1407  	ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"`
  1408  	// ForceSendFields is a list of field names (e.g. "AllowedProjects") to
  1409  	// unconditionally include in API requests. By default, fields with empty or
  1410  	// default values are omitted from API requests. See
  1411  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1412  	// details.
  1413  	ForceSendFields []string `json:"-"`
  1414  	// NullFields is a list of field names (e.g. "AllowedProjects") to include in
  1415  	// API requests with the JSON null value. By default, fields with empty values
  1416  	// are omitted from API requests. See
  1417  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1418  	NullFields []string `json:"-"`
  1419  }
  1420  
  1421  func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) {
  1422  	type NoMethod PrivateClusterConfig
  1423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1424  }
  1425  
  1426  // ReadinessCheck: A readiness check to be performed on a workstation.
  1427  type ReadinessCheck struct {
  1428  	// Path: Optional. Path to which the request should be sent.
  1429  	Path string `json:"path,omitempty"`
  1430  	// Port: Optional. Port to which the request should be sent.
  1431  	Port int64 `json:"port,omitempty"`
  1432  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
  1433  	// include in API requests. By default, fields with empty or default values are
  1434  	// omitted from API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1436  	// details.
  1437  	ForceSendFields []string `json:"-"`
  1438  	// NullFields is a list of field names (e.g. "Path") to include in API requests
  1439  	// with the JSON null value. By default, fields with empty values are omitted
  1440  	// from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1442  	NullFields []string `json:"-"`
  1443  }
  1444  
  1445  func (s *ReadinessCheck) MarshalJSON() ([]byte, error) {
  1446  	type NoMethod ReadinessCheck
  1447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1451  type SetIamPolicyRequest struct {
  1452  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1453  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1454  	// policy but certain Google Cloud services (such as Projects) might reject
  1455  	// them.
  1456  	Policy *Policy `json:"policy,omitempty"`
  1457  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1458  	// modify. Only the fields in the mask will be modified. If no mask is
  1459  	// provided, the following default mask is used: `paths: "bindings, etag"
  1460  	UpdateMask string `json:"updateMask,omitempty"`
  1461  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1462  	// include in API requests. By default, fields with empty or default values are
  1463  	// omitted from API requests. See
  1464  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1465  	// details.
  1466  	ForceSendFields []string `json:"-"`
  1467  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1468  	// requests with the JSON null value. By default, fields with empty values are
  1469  	// omitted from API requests. See
  1470  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1471  	NullFields []string `json:"-"`
  1472  }
  1473  
  1474  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1475  	type NoMethod SetIamPolicyRequest
  1476  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1477  }
  1478  
  1479  // StartWorkstationRequest: Request message for StartWorkstation.
  1480  type StartWorkstationRequest struct {
  1481  	// Etag: Optional. If set, the request will be rejected if the latest version
  1482  	// of the workstation on the server does not have this ETag.
  1483  	Etag string `json:"etag,omitempty"`
  1484  	// ValidateOnly: Optional. If set, validate the request and preview the review,
  1485  	// but do not actually apply it.
  1486  	ValidateOnly bool `json:"validateOnly,omitempty"`
  1487  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1488  	// include in API requests. By default, fields with empty or default values are
  1489  	// omitted from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1491  	// details.
  1492  	ForceSendFields []string `json:"-"`
  1493  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1494  	// with the JSON null value. By default, fields with empty values are omitted
  1495  	// from API requests. See
  1496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1497  	NullFields []string `json:"-"`
  1498  }
  1499  
  1500  func (s *StartWorkstationRequest) MarshalJSON() ([]byte, error) {
  1501  	type NoMethod StartWorkstationRequest
  1502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1503  }
  1504  
  1505  // Status: The `Status` type defines a logical error model that is suitable for
  1506  // different programming environments, including REST APIs and RPC APIs. It is
  1507  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1508  // pieces of data: error code, error message, and error details. You can find
  1509  // out more about this error model and how to work with it in the API Design
  1510  // Guide (https://cloud.google.com/apis/design/errors).
  1511  type Status struct {
  1512  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1513  	Code int64 `json:"code,omitempty"`
  1514  	// Details: A list of messages that carry the error details. There is a common
  1515  	// set of message types for APIs to use.
  1516  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1517  	// Message: A developer-facing error message, which should be in English. Any
  1518  	// user-facing error message should be localized and sent in the
  1519  	// google.rpc.Status.details field, or localized by the client.
  1520  	Message string `json:"message,omitempty"`
  1521  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1522  	// include in API requests. By default, fields with empty or default values are
  1523  	// omitted from API requests. See
  1524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1525  	// details.
  1526  	ForceSendFields []string `json:"-"`
  1527  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1528  	// with the JSON null value. By default, fields with empty values are omitted
  1529  	// from API requests. See
  1530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1531  	NullFields []string `json:"-"`
  1532  }
  1533  
  1534  func (s *Status) MarshalJSON() ([]byte, error) {
  1535  	type NoMethod Status
  1536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1537  }
  1538  
  1539  // StopWorkstationRequest: Request message for StopWorkstation.
  1540  type StopWorkstationRequest struct {
  1541  	// Etag: Optional. If set, the request will be rejected if the latest version
  1542  	// of the workstation on the server does not have this ETag.
  1543  	Etag string `json:"etag,omitempty"`
  1544  	// ValidateOnly: Optional. If set, validate the request and preview the review,
  1545  	// but do not actually apply it.
  1546  	ValidateOnly bool `json:"validateOnly,omitempty"`
  1547  	// ForceSendFields is a list of field names (e.g. "Etag") to unconditionally
  1548  	// include in API requests. By default, fields with empty or default values are
  1549  	// omitted from API requests. See
  1550  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1551  	// details.
  1552  	ForceSendFields []string `json:"-"`
  1553  	// NullFields is a list of field names (e.g. "Etag") to include in API requests
  1554  	// with the JSON null value. By default, fields with empty values are omitted
  1555  	// from API requests. See
  1556  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1557  	NullFields []string `json:"-"`
  1558  }
  1559  
  1560  func (s *StopWorkstationRequest) MarshalJSON() ([]byte, error) {
  1561  	type NoMethod StopWorkstationRequest
  1562  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1563  }
  1564  
  1565  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1566  type TestIamPermissionsRequest struct {
  1567  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1568  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1569  	// information see IAM Overview
  1570  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1571  	Permissions []string `json:"permissions,omitempty"`
  1572  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1573  	// unconditionally include in API requests. By default, fields with empty or
  1574  	// default values are omitted from API requests. See
  1575  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1576  	// details.
  1577  	ForceSendFields []string `json:"-"`
  1578  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1579  	// requests with the JSON null value. By default, fields with empty values are
  1580  	// omitted from API requests. See
  1581  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1582  	NullFields []string `json:"-"`
  1583  }
  1584  
  1585  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1586  	type NoMethod TestIamPermissionsRequest
  1587  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1588  }
  1589  
  1590  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1591  // method.
  1592  type TestIamPermissionsResponse struct {
  1593  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1594  	// caller is allowed.
  1595  	Permissions []string `json:"permissions,omitempty"`
  1596  
  1597  	// ServerResponse contains the HTTP response code and headers from the server.
  1598  	googleapi.ServerResponse `json:"-"`
  1599  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1600  	// unconditionally include in API requests. By default, fields with empty or
  1601  	// default values are omitted from API requests. See
  1602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1603  	// details.
  1604  	ForceSendFields []string `json:"-"`
  1605  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1606  	// requests with the JSON null value. By default, fields with empty values are
  1607  	// omitted from API requests. See
  1608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1609  	NullFields []string `json:"-"`
  1610  }
  1611  
  1612  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1613  	type NoMethod TestIamPermissionsResponse
  1614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1615  }
  1616  
  1617  // Workstation: A single instance of a developer workstation with its own
  1618  // persistent storage.
  1619  type Workstation struct {
  1620  	// Annotations: Optional. Client-specified annotations.
  1621  	Annotations map[string]string `json:"annotations,omitempty"`
  1622  	// CreateTime: Output only. Time when this workstation was created.
  1623  	CreateTime string `json:"createTime,omitempty"`
  1624  	// DeleteTime: Output only. Time when this workstation was soft-deleted.
  1625  	DeleteTime string `json:"deleteTime,omitempty"`
  1626  	// DisplayName: Optional. Human-readable name for this workstation.
  1627  	DisplayName string `json:"displayName,omitempty"`
  1628  	// Env: Optional. Environment variables passed to the workstation container's
  1629  	// entrypoint.
  1630  	Env map[string]string `json:"env,omitempty"`
  1631  	// Etag: Optional. Checksum computed by the server. May be sent on update and
  1632  	// delete requests to make sure that the client has an up-to-date value before
  1633  	// proceeding.
  1634  	Etag string `json:"etag,omitempty"`
  1635  	// Host: Output only. Host to which clients can send HTTPS traffic that will be
  1636  	// received by the workstation. Authorized traffic will be received to the
  1637  	// workstation as HTTP on port 80. To send traffic to a different port, clients
  1638  	// may prefix the host with the destination port in the format `{port}-{host}`.
  1639  	Host string `json:"host,omitempty"`
  1640  	// KmsKey: Output only. The name of the Google Cloud KMS encryption key used to
  1641  	// encrypt this workstation. The KMS key can only be configured in the
  1642  	// WorkstationConfig. The expected format is
  1643  	// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  1644  	KmsKey string `json:"kmsKey,omitempty"`
  1645  	// Labels: Optional. Labels
  1646  	// (https://cloud.google.com/workstations/docs/label-resources) that are
  1647  	// applied to the workstation and that are also propagated to the underlying
  1648  	// Compute Engine resources.
  1649  	Labels map[string]string `json:"labels,omitempty"`
  1650  	// Name: Identifier. Full name of this workstation.
  1651  	Name string `json:"name,omitempty"`
  1652  	// Reconciling: Output only. Indicates whether this workstation is currently
  1653  	// being updated to match its intended state.
  1654  	Reconciling bool `json:"reconciling,omitempty"`
  1655  	// StartTime: Output only. Time when this workstation was most recently
  1656  	// successfully started, regardless of the workstation's initial state.
  1657  	StartTime string `json:"startTime,omitempty"`
  1658  	// State: Output only. Current state of the workstation.
  1659  	//
  1660  	// Possible values:
  1661  	//   "STATE_UNSPECIFIED" - Do not use.
  1662  	//   "STATE_STARTING" - The workstation is not yet ready to accept requests
  1663  	// from users but will be soon.
  1664  	//   "STATE_RUNNING" - The workstation is ready to accept requests from users.
  1665  	//   "STATE_STOPPING" - The workstation is being stopped.
  1666  	//   "STATE_STOPPED" - The workstation is stopped and will not be able to
  1667  	// receive requests until it is started.
  1668  	State string `json:"state,omitempty"`
  1669  	// Uid: Output only. A system-assigned unique identifier for this workstation.
  1670  	Uid string `json:"uid,omitempty"`
  1671  	// UpdateTime: Output only. Time when this workstation was most recently
  1672  	// updated.
  1673  	UpdateTime string `json:"updateTime,omitempty"`
  1674  
  1675  	// ServerResponse contains the HTTP response code and headers from the server.
  1676  	googleapi.ServerResponse `json:"-"`
  1677  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  1678  	// unconditionally include in API requests. By default, fields with empty or
  1679  	// default values are omitted from API requests. See
  1680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1681  	// details.
  1682  	ForceSendFields []string `json:"-"`
  1683  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  1684  	// requests with the JSON null value. By default, fields with empty values are
  1685  	// omitted from API requests. See
  1686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1687  	NullFields []string `json:"-"`
  1688  }
  1689  
  1690  func (s *Workstation) MarshalJSON() ([]byte, error) {
  1691  	type NoMethod Workstation
  1692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1693  }
  1694  
  1695  // WorkstationCluster: A workstation cluster resource in the Cloud Workstations
  1696  // API. Defines a group of workstations in a particular region and the VPC
  1697  // network they're attached to.
  1698  type WorkstationCluster struct {
  1699  	// Annotations: Optional. Client-specified annotations.
  1700  	Annotations map[string]string `json:"annotations,omitempty"`
  1701  	// Conditions: Output only. Status conditions describing the workstation
  1702  	// cluster's current state.
  1703  	Conditions []*Status `json:"conditions,omitempty"`
  1704  	// ControlPlaneIp: Output only. The private IP address of the control plane for
  1705  	// this workstation cluster. Workstation VMs need access to this IP address to
  1706  	// work with the service, so make sure that your firewall rules allow egress
  1707  	// from the workstation VMs to this address.
  1708  	ControlPlaneIp string `json:"controlPlaneIp,omitempty"`
  1709  	// CreateTime: Output only. Time when this workstation cluster was created.
  1710  	CreateTime string `json:"createTime,omitempty"`
  1711  	// Degraded: Output only. Whether this workstation cluster is in degraded mode,
  1712  	// in which case it may require user action to restore full functionality.
  1713  	// Details can be found in conditions.
  1714  	Degraded bool `json:"degraded,omitempty"`
  1715  	// DeleteTime: Output only. Time when this workstation cluster was
  1716  	// soft-deleted.
  1717  	DeleteTime string `json:"deleteTime,omitempty"`
  1718  	// DisplayName: Optional. Human-readable name for this workstation cluster.
  1719  	DisplayName string `json:"displayName,omitempty"`
  1720  	// DomainConfig: Optional. Configuration options for a custom domain.
  1721  	DomainConfig *DomainConfig `json:"domainConfig,omitempty"`
  1722  	// Etag: Optional. Checksum computed by the server. May be sent on update and
  1723  	// delete requests to make sure that the client has an up-to-date value before
  1724  	// proceeding.
  1725  	Etag string `json:"etag,omitempty"`
  1726  	// Labels: Optional. Labels
  1727  	// (https://cloud.google.com/workstations/docs/label-resources) that are
  1728  	// applied to the workstation cluster and that are also propagated to the
  1729  	// underlying Compute Engine resources.
  1730  	Labels map[string]string `json:"labels,omitempty"`
  1731  	// Name: Identifier. Full name of this workstation cluster.
  1732  	Name string `json:"name,omitempty"`
  1733  	// Network: Immutable. Name of the Compute Engine network in which instances
  1734  	// associated with this workstation cluster will be created.
  1735  	Network string `json:"network,omitempty"`
  1736  	// PrivateClusterConfig: Optional. Configuration for private workstation
  1737  	// cluster.
  1738  	PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"`
  1739  	// Reconciling: Output only. Indicates whether this workstation cluster is
  1740  	// currently being updated to match its intended state.
  1741  	Reconciling bool `json:"reconciling,omitempty"`
  1742  	// Subnetwork: Immutable. Name of the Compute Engine subnetwork in which
  1743  	// instances associated with this workstation cluster will be created. Must be
  1744  	// part of the subnetwork specified for this workstation cluster.
  1745  	Subnetwork string `json:"subnetwork,omitempty"`
  1746  	// Uid: Output only. A system-assigned unique identifier for this workstation
  1747  	// cluster.
  1748  	Uid string `json:"uid,omitempty"`
  1749  	// UpdateTime: Output only. Time when this workstation cluster was most
  1750  	// recently updated.
  1751  	UpdateTime string `json:"updateTime,omitempty"`
  1752  
  1753  	// ServerResponse contains the HTTP response code and headers from the server.
  1754  	googleapi.ServerResponse `json:"-"`
  1755  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  1756  	// unconditionally include in API requests. By default, fields with empty or
  1757  	// default values are omitted from API requests. See
  1758  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1759  	// details.
  1760  	ForceSendFields []string `json:"-"`
  1761  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  1762  	// requests with the JSON null value. By default, fields with empty values are
  1763  	// omitted from API requests. See
  1764  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1765  	NullFields []string `json:"-"`
  1766  }
  1767  
  1768  func (s *WorkstationCluster) MarshalJSON() ([]byte, error) {
  1769  	type NoMethod WorkstationCluster
  1770  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1771  }
  1772  
  1773  // WorkstationConfig: A workstation configuration resource in the Cloud
  1774  // Workstations API. Workstation configurations act as templates for
  1775  // workstations. The workstation configuration defines details such as the
  1776  // workstation virtual machine (VM) instance type, persistent storage,
  1777  // container image defining environment, which IDE or Code Editor to use, and
  1778  // more. Administrators and platform teams can also use Identity and Access
  1779  // Management (IAM) (https://cloud.google.com/iam/docs/overview) rules to grant
  1780  // access to teams or to individual developers.
  1781  type WorkstationConfig struct {
  1782  	// Annotations: Optional. Client-specified annotations.
  1783  	Annotations map[string]string `json:"annotations,omitempty"`
  1784  	// Conditions: Output only. Status conditions describing the current resource
  1785  	// state.
  1786  	Conditions []*Status `json:"conditions,omitempty"`
  1787  	// Container: Optional. Container that runs upon startup for each workstation
  1788  	// using this workstation configuration.
  1789  	Container *Container `json:"container,omitempty"`
  1790  	// CreateTime: Output only. Time when this workstation configuration was
  1791  	// created.
  1792  	CreateTime string `json:"createTime,omitempty"`
  1793  	// Degraded: Output only. Whether this resource is degraded, in which case it
  1794  	// may require user action to restore full functionality. See also the
  1795  	// conditions field.
  1796  	Degraded bool `json:"degraded,omitempty"`
  1797  	// DeleteTime: Output only. Time when this workstation configuration was
  1798  	// soft-deleted.
  1799  	DeleteTime string `json:"deleteTime,omitempty"`
  1800  	// DisableTcpConnections: Optional. Disables support for plain TCP connections
  1801  	// in the workstation. By default the service supports TCP connections through
  1802  	// a websocket relay. Setting this option to true disables that relay, which
  1803  	// prevents the usage of services that require plain TCP connections, such as
  1804  	// SSH. When enabled, all communication must occur over HTTPS or WSS.
  1805  	DisableTcpConnections bool `json:"disableTcpConnections,omitempty"`
  1806  	// DisplayName: Optional. Human-readable name for this workstation
  1807  	// configuration.
  1808  	DisplayName string `json:"displayName,omitempty"`
  1809  	// EnableAuditAgent: Optional. Whether to enable Linux `auditd` logging on the
  1810  	// workstation. When enabled, a service account must also be specified that has
  1811  	// `logging.buckets.write` permission on the project. Operating system audit
  1812  	// logging is distinct from Cloud Audit Logs
  1813  	// (https://cloud.google.com/workstations/docs/audit-logging).
  1814  	EnableAuditAgent bool `json:"enableAuditAgent,omitempty"`
  1815  	// EncryptionKey: Immutable. Encrypts resources of this workstation
  1816  	// configuration using a customer-managed encryption key (CMEK). If specified,
  1817  	// the boot disk of the Compute Engine instance and the persistent disk are
  1818  	// encrypted using this encryption key. If this field is not set, the disks are
  1819  	// encrypted using a generated key. Customer-managed encryption keys do not
  1820  	// protect disk metadata. If the customer-managed encryption key is rotated,
  1821  	// when the workstation instance is stopped, the system attempts to recreate
  1822  	// the persistent disk with the new version of the key. Be sure to keep older
  1823  	// versions of the key until the persistent disk is recreated. Otherwise, data
  1824  	// on the persistent disk might be lost. If the encryption key is revoked, the
  1825  	// workstation session automatically stops within 7 hours. Immutable after the
  1826  	// workstation configuration is created.
  1827  	EncryptionKey *CustomerEncryptionKey `json:"encryptionKey,omitempty"`
  1828  	// EphemeralDirectories: Optional. Ephemeral directories which won't persist
  1829  	// across workstation sessions.
  1830  	EphemeralDirectories []*EphemeralDirectory `json:"ephemeralDirectories,omitempty"`
  1831  	// Etag: Optional. Checksum computed by the server. May be sent on update and
  1832  	// delete requests to make sure that the client has an up-to-date value before
  1833  	// proceeding.
  1834  	Etag string `json:"etag,omitempty"`
  1835  	// Host: Optional. Runtime host for the workstation.
  1836  	Host *Host `json:"host,omitempty"`
  1837  	// IdleTimeout: Optional. Number of seconds to wait before automatically
  1838  	// stopping a workstation after it last received user traffic. A value of
  1839  	// "0s" indicates that Cloud Workstations VMs created with this configuration
  1840  	// should never time out due to idleness. Provide duration
  1841  	// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration)
  1842  	// terminated by `s` for seconds—for example, "7200s" (2 hours). The
  1843  	// default is "1200s" (20 minutes).
  1844  	IdleTimeout string `json:"idleTimeout,omitempty"`
  1845  	// Labels: Optional. Labels
  1846  	// (https://cloud.google.com/workstations/docs/label-resources) that are
  1847  	// applied to the workstation configuration and that are also propagated to the
  1848  	// underlying Compute Engine resources.
  1849  	Labels map[string]string `json:"labels,omitempty"`
  1850  	// Name: Identifier. Full name of this workstation configuration.
  1851  	Name string `json:"name,omitempty"`
  1852  	// PersistentDirectories: Optional. Directories to persist across workstation
  1853  	// sessions.
  1854  	PersistentDirectories []*PersistentDirectory `json:"persistentDirectories,omitempty"`
  1855  	// ReadinessChecks: Optional. Readiness checks to perform when starting a
  1856  	// workstation using this workstation configuration. Mark a workstation as
  1857  	// running only after all specified readiness checks return 200 status codes.
  1858  	ReadinessChecks []*ReadinessCheck `json:"readinessChecks,omitempty"`
  1859  	// Reconciling: Output only. Indicates whether this workstation configuration
  1860  	// is currently being updated to match its intended state.
  1861  	Reconciling bool `json:"reconciling,omitempty"`
  1862  	// ReplicaZones: Optional. Immutable. Specifies the zones used to replicate the
  1863  	// VM and disk resources within the region. If set, exactly two zones within
  1864  	// the workstation cluster's region must be specified—for example,
  1865  	// `['us-central1-a', 'us-central1-f']`. If this field is empty, two default
  1866  	// zones within the region are used. Immutable after the workstation
  1867  	// configuration is created.
  1868  	ReplicaZones []string `json:"replicaZones,omitempty"`
  1869  	// RunningTimeout: Optional. Number of seconds that a workstation can run until
  1870  	// it is automatically shut down. We recommend that workstations be shut down
  1871  	// daily to reduce costs and so that security updates can be applied upon
  1872  	// restart. The idle_timeout and running_timeout fields are independent of each
  1873  	// other. Note that the running_timeout field shuts down VMs after the
  1874  	// specified time, regardless of whether or not the VMs are idle. Provide
  1875  	// duration terminated by `s` for seconds—for example, "54000s" (15 hours).
  1876  	// Defaults to "43200s" (12 hours). A value of "0s" indicates that
  1877  	// workstations using this configuration should never time out. If
  1878  	// encryption_key is set, it must be greater than "0s" and less than
  1879  	// "86400s" (24 hours). Warning: A value of "0s" indicates that Cloud
  1880  	// Workstations VMs created with this configuration have no maximum running
  1881  	// time. This is strongly discouraged because you incur costs and will not pick
  1882  	// up security updates.
  1883  	RunningTimeout string `json:"runningTimeout,omitempty"`
  1884  	// Uid: Output only. A system-assigned unique identifier for this workstation
  1885  	// configuration.
  1886  	Uid string `json:"uid,omitempty"`
  1887  	// UpdateTime: Output only. Time when this workstation configuration was most
  1888  	// recently updated.
  1889  	UpdateTime string `json:"updateTime,omitempty"`
  1890  
  1891  	// ServerResponse contains the HTTP response code and headers from the server.
  1892  	googleapi.ServerResponse `json:"-"`
  1893  	// ForceSendFields is a list of field names (e.g. "Annotations") to
  1894  	// unconditionally include in API requests. By default, fields with empty or
  1895  	// default values are omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1897  	// details.
  1898  	ForceSendFields []string `json:"-"`
  1899  	// NullFields is a list of field names (e.g. "Annotations") to include in API
  1900  	// requests with the JSON null value. By default, fields with empty values are
  1901  	// omitted from API requests. See
  1902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1903  	NullFields []string `json:"-"`
  1904  }
  1905  
  1906  func (s *WorkstationConfig) MarshalJSON() ([]byte, error) {
  1907  	type NoMethod WorkstationConfig
  1908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1909  }
  1910  
  1911  type ProjectsLocationsGetCall struct {
  1912  	s            *Service
  1913  	name         string
  1914  	urlParams_   gensupport.URLParams
  1915  	ifNoneMatch_ string
  1916  	ctx_         context.Context
  1917  	header_      http.Header
  1918  }
  1919  
  1920  // Get: Gets information about a location.
  1921  //
  1922  // - name: Resource name for the location.
  1923  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1924  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1925  	c.name = name
  1926  	return c
  1927  }
  1928  
  1929  // Fields allows partial responses to be retrieved. See
  1930  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1931  // details.
  1932  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1933  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1934  	return c
  1935  }
  1936  
  1937  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1938  // object's ETag matches the given value. This is useful for getting updates
  1939  // only after the object has changed since the last request.
  1940  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1941  	c.ifNoneMatch_ = entityTag
  1942  	return c
  1943  }
  1944  
  1945  // Context sets the context to be used in this call's Do method.
  1946  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1947  	c.ctx_ = ctx
  1948  	return c
  1949  }
  1950  
  1951  // Header returns a http.Header that can be modified by the caller to add
  1952  // headers to the request.
  1953  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1954  	if c.header_ == nil {
  1955  		c.header_ = make(http.Header)
  1956  	}
  1957  	return c.header_
  1958  }
  1959  
  1960  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1961  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1962  	if c.ifNoneMatch_ != "" {
  1963  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1964  	}
  1965  	var body io.Reader = nil
  1966  	c.urlParams_.Set("alt", alt)
  1967  	c.urlParams_.Set("prettyPrint", "false")
  1968  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1969  	urls += "?" + c.urlParams_.Encode()
  1970  	req, err := http.NewRequest("GET", urls, body)
  1971  	if err != nil {
  1972  		return nil, err
  1973  	}
  1974  	req.Header = reqHeaders
  1975  	googleapi.Expand(req.URL, map[string]string{
  1976  		"name": c.name,
  1977  	})
  1978  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1979  }
  1980  
  1981  // Do executes the "workstations.projects.locations.get" call.
  1982  // Any non-2xx status code is an error. Response headers are in either
  1983  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1984  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1985  // whether the returned error was because http.StatusNotModified was returned.
  1986  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1987  	gensupport.SetOptions(c.urlParams_, opts...)
  1988  	res, err := c.doRequest("json")
  1989  	if res != nil && res.StatusCode == http.StatusNotModified {
  1990  		if res.Body != nil {
  1991  			res.Body.Close()
  1992  		}
  1993  		return nil, gensupport.WrapError(&googleapi.Error{
  1994  			Code:   res.StatusCode,
  1995  			Header: res.Header,
  1996  		})
  1997  	}
  1998  	if err != nil {
  1999  		return nil, err
  2000  	}
  2001  	defer googleapi.CloseBody(res)
  2002  	if err := googleapi.CheckResponse(res); err != nil {
  2003  		return nil, gensupport.WrapError(err)
  2004  	}
  2005  	ret := &Location{
  2006  		ServerResponse: googleapi.ServerResponse{
  2007  			Header:         res.Header,
  2008  			HTTPStatusCode: res.StatusCode,
  2009  		},
  2010  	}
  2011  	target := &ret
  2012  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2013  		return nil, err
  2014  	}
  2015  	return ret, nil
  2016  }
  2017  
  2018  type ProjectsLocationsListCall struct {
  2019  	s            *Service
  2020  	name         string
  2021  	urlParams_   gensupport.URLParams
  2022  	ifNoneMatch_ string
  2023  	ctx_         context.Context
  2024  	header_      http.Header
  2025  }
  2026  
  2027  // List: Lists information about the supported locations for this service.
  2028  //
  2029  // - name: The resource that owns the locations collection, if applicable.
  2030  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2031  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2032  	c.name = name
  2033  	return c
  2034  }
  2035  
  2036  // Filter sets the optional parameter "filter": A filter to narrow down results
  2037  // to a preferred subset. The filtering language accepts strings like
  2038  // "displayName=tokyo", and is documented in more detail in AIP-160
  2039  // (https://google.aip.dev/160).
  2040  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2041  	c.urlParams_.Set("filter", filter)
  2042  	return c
  2043  }
  2044  
  2045  // PageSize sets the optional parameter "pageSize": The maximum number of
  2046  // results to return. If not set, the service selects a default.
  2047  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2048  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2049  	return c
  2050  }
  2051  
  2052  // PageToken sets the optional parameter "pageToken": A page token received
  2053  // from the `next_page_token` field in the response. Send that page token to
  2054  // receive the subsequent page.
  2055  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2056  	c.urlParams_.Set("pageToken", pageToken)
  2057  	return c
  2058  }
  2059  
  2060  // Fields allows partial responses to be retrieved. See
  2061  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2062  // details.
  2063  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2064  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2065  	return c
  2066  }
  2067  
  2068  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2069  // object's ETag matches the given value. This is useful for getting updates
  2070  // only after the object has changed since the last request.
  2071  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2072  	c.ifNoneMatch_ = entityTag
  2073  	return c
  2074  }
  2075  
  2076  // Context sets the context to be used in this call's Do method.
  2077  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2078  	c.ctx_ = ctx
  2079  	return c
  2080  }
  2081  
  2082  // Header returns a http.Header that can be modified by the caller to add
  2083  // headers to the request.
  2084  func (c *ProjectsLocationsListCall) Header() http.Header {
  2085  	if c.header_ == nil {
  2086  		c.header_ = make(http.Header)
  2087  	}
  2088  	return c.header_
  2089  }
  2090  
  2091  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2093  	if c.ifNoneMatch_ != "" {
  2094  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2095  	}
  2096  	var body io.Reader = nil
  2097  	c.urlParams_.Set("alt", alt)
  2098  	c.urlParams_.Set("prettyPrint", "false")
  2099  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  2100  	urls += "?" + c.urlParams_.Encode()
  2101  	req, err := http.NewRequest("GET", urls, body)
  2102  	if err != nil {
  2103  		return nil, err
  2104  	}
  2105  	req.Header = reqHeaders
  2106  	googleapi.Expand(req.URL, map[string]string{
  2107  		"name": c.name,
  2108  	})
  2109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2110  }
  2111  
  2112  // Do executes the "workstations.projects.locations.list" call.
  2113  // Any non-2xx status code is an error. Response headers are in either
  2114  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2115  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2116  // check whether the returned error was because http.StatusNotModified was
  2117  // returned.
  2118  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2119  	gensupport.SetOptions(c.urlParams_, opts...)
  2120  	res, err := c.doRequest("json")
  2121  	if res != nil && res.StatusCode == http.StatusNotModified {
  2122  		if res.Body != nil {
  2123  			res.Body.Close()
  2124  		}
  2125  		return nil, gensupport.WrapError(&googleapi.Error{
  2126  			Code:   res.StatusCode,
  2127  			Header: res.Header,
  2128  		})
  2129  	}
  2130  	if err != nil {
  2131  		return nil, err
  2132  	}
  2133  	defer googleapi.CloseBody(res)
  2134  	if err := googleapi.CheckResponse(res); err != nil {
  2135  		return nil, gensupport.WrapError(err)
  2136  	}
  2137  	ret := &ListLocationsResponse{
  2138  		ServerResponse: googleapi.ServerResponse{
  2139  			Header:         res.Header,
  2140  			HTTPStatusCode: res.StatusCode,
  2141  		},
  2142  	}
  2143  	target := &ret
  2144  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2145  		return nil, err
  2146  	}
  2147  	return ret, nil
  2148  }
  2149  
  2150  // Pages invokes f for each page of results.
  2151  // A non-nil error returned from f will halt the iteration.
  2152  // The provided context supersedes any context provided to the Context method.
  2153  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2154  	c.ctx_ = ctx
  2155  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2156  	for {
  2157  		x, err := c.Do()
  2158  		if err != nil {
  2159  			return err
  2160  		}
  2161  		if err := f(x); err != nil {
  2162  			return err
  2163  		}
  2164  		if x.NextPageToken == "" {
  2165  			return nil
  2166  		}
  2167  		c.PageToken(x.NextPageToken)
  2168  	}
  2169  }
  2170  
  2171  type ProjectsLocationsOperationsCancelCall struct {
  2172  	s                      *Service
  2173  	name                   string
  2174  	canceloperationrequest *CancelOperationRequest
  2175  	urlParams_             gensupport.URLParams
  2176  	ctx_                   context.Context
  2177  	header_                http.Header
  2178  }
  2179  
  2180  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  2181  // server makes a best effort to cancel the operation, but success is not
  2182  // guaranteed. If the server doesn't support this method, it returns
  2183  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  2184  // other methods to check whether the cancellation succeeded or whether the
  2185  // operation completed despite cancellation. On successful cancellation, the
  2186  // operation is not deleted; instead, it becomes an operation with an
  2187  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  2188  // `Code.CANCELLED`.
  2189  //
  2190  // - name: The name of the operation resource to be cancelled.
  2191  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  2192  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2193  	c.name = name
  2194  	c.canceloperationrequest = canceloperationrequest
  2195  	return c
  2196  }
  2197  
  2198  // Fields allows partial responses to be retrieved. See
  2199  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2200  // details.
  2201  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  2202  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2203  	return c
  2204  }
  2205  
  2206  // Context sets the context to be used in this call's Do method.
  2207  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  2208  	c.ctx_ = ctx
  2209  	return c
  2210  }
  2211  
  2212  // Header returns a http.Header that can be modified by the caller to add
  2213  // headers to the request.
  2214  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  2215  	if c.header_ == nil {
  2216  		c.header_ = make(http.Header)
  2217  	}
  2218  	return c.header_
  2219  }
  2220  
  2221  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  2222  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2223  	var body io.Reader = nil
  2224  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  2225  	if err != nil {
  2226  		return nil, err
  2227  	}
  2228  	c.urlParams_.Set("alt", alt)
  2229  	c.urlParams_.Set("prettyPrint", "false")
  2230  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  2231  	urls += "?" + c.urlParams_.Encode()
  2232  	req, err := http.NewRequest("POST", urls, body)
  2233  	if err != nil {
  2234  		return nil, err
  2235  	}
  2236  	req.Header = reqHeaders
  2237  	googleapi.Expand(req.URL, map[string]string{
  2238  		"name": c.name,
  2239  	})
  2240  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2241  }
  2242  
  2243  // Do executes the "workstations.projects.locations.operations.cancel" call.
  2244  // Any non-2xx status code is an error. Response headers are in either
  2245  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  2246  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2247  // check whether the returned error was because http.StatusNotModified was
  2248  // returned.
  2249  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  2250  	gensupport.SetOptions(c.urlParams_, opts...)
  2251  	res, err := c.doRequest("json")
  2252  	if res != nil && res.StatusCode == http.StatusNotModified {
  2253  		if res.Body != nil {
  2254  			res.Body.Close()
  2255  		}
  2256  		return nil, gensupport.WrapError(&googleapi.Error{
  2257  			Code:   res.StatusCode,
  2258  			Header: res.Header,
  2259  		})
  2260  	}
  2261  	if err != nil {
  2262  		return nil, err
  2263  	}
  2264  	defer googleapi.CloseBody(res)
  2265  	if err := googleapi.CheckResponse(res); err != nil {
  2266  		return nil, gensupport.WrapError(err)
  2267  	}
  2268  	ret := &GoogleProtobufEmpty{
  2269  		ServerResponse: googleapi.ServerResponse{
  2270  			Header:         res.Header,
  2271  			HTTPStatusCode: res.StatusCode,
  2272  		},
  2273  	}
  2274  	target := &ret
  2275  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2276  		return nil, err
  2277  	}
  2278  	return ret, nil
  2279  }
  2280  
  2281  type ProjectsLocationsOperationsDeleteCall struct {
  2282  	s          *Service
  2283  	name       string
  2284  	urlParams_ gensupport.URLParams
  2285  	ctx_       context.Context
  2286  	header_    http.Header
  2287  }
  2288  
  2289  // Delete: Deletes a long-running operation. This method indicates that the
  2290  // client is no longer interested in the operation result. It does not cancel
  2291  // the operation. If the server doesn't support this method, it returns
  2292  // `google.rpc.Code.UNIMPLEMENTED`.
  2293  //
  2294  // - name: The name of the operation resource to be deleted.
  2295  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  2296  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2297  	c.name = name
  2298  	return c
  2299  }
  2300  
  2301  // Fields allows partial responses to be retrieved. See
  2302  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2303  // details.
  2304  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  2305  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2306  	return c
  2307  }
  2308  
  2309  // Context sets the context to be used in this call's Do method.
  2310  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  2311  	c.ctx_ = ctx
  2312  	return c
  2313  }
  2314  
  2315  // Header returns a http.Header that can be modified by the caller to add
  2316  // headers to the request.
  2317  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  2318  	if c.header_ == nil {
  2319  		c.header_ = make(http.Header)
  2320  	}
  2321  	return c.header_
  2322  }
  2323  
  2324  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2325  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2326  	var body io.Reader = nil
  2327  	c.urlParams_.Set("alt", alt)
  2328  	c.urlParams_.Set("prettyPrint", "false")
  2329  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2330  	urls += "?" + c.urlParams_.Encode()
  2331  	req, err := http.NewRequest("DELETE", urls, body)
  2332  	if err != nil {
  2333  		return nil, err
  2334  	}
  2335  	req.Header = reqHeaders
  2336  	googleapi.Expand(req.URL, map[string]string{
  2337  		"name": c.name,
  2338  	})
  2339  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2340  }
  2341  
  2342  // Do executes the "workstations.projects.locations.operations.delete" call.
  2343  // Any non-2xx status code is an error. Response headers are in either
  2344  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  2345  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2346  // check whether the returned error was because http.StatusNotModified was
  2347  // returned.
  2348  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  2349  	gensupport.SetOptions(c.urlParams_, opts...)
  2350  	res, err := c.doRequest("json")
  2351  	if res != nil && res.StatusCode == http.StatusNotModified {
  2352  		if res.Body != nil {
  2353  			res.Body.Close()
  2354  		}
  2355  		return nil, gensupport.WrapError(&googleapi.Error{
  2356  			Code:   res.StatusCode,
  2357  			Header: res.Header,
  2358  		})
  2359  	}
  2360  	if err != nil {
  2361  		return nil, err
  2362  	}
  2363  	defer googleapi.CloseBody(res)
  2364  	if err := googleapi.CheckResponse(res); err != nil {
  2365  		return nil, gensupport.WrapError(err)
  2366  	}
  2367  	ret := &GoogleProtobufEmpty{
  2368  		ServerResponse: googleapi.ServerResponse{
  2369  			Header:         res.Header,
  2370  			HTTPStatusCode: res.StatusCode,
  2371  		},
  2372  	}
  2373  	target := &ret
  2374  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2375  		return nil, err
  2376  	}
  2377  	return ret, nil
  2378  }
  2379  
  2380  type ProjectsLocationsOperationsGetCall struct {
  2381  	s            *Service
  2382  	name         string
  2383  	urlParams_   gensupport.URLParams
  2384  	ifNoneMatch_ string
  2385  	ctx_         context.Context
  2386  	header_      http.Header
  2387  }
  2388  
  2389  // Get: Gets the latest state of a long-running operation. Clients can use this
  2390  // method to poll the operation result at intervals as recommended by the API
  2391  // service.
  2392  //
  2393  // - name: The name of the operation resource.
  2394  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  2395  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2396  	c.name = name
  2397  	return c
  2398  }
  2399  
  2400  // Fields allows partial responses to be retrieved. See
  2401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2402  // details.
  2403  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  2404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2405  	return c
  2406  }
  2407  
  2408  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2409  // object's ETag matches the given value. This is useful for getting updates
  2410  // only after the object has changed since the last request.
  2411  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  2412  	c.ifNoneMatch_ = entityTag
  2413  	return c
  2414  }
  2415  
  2416  // Context sets the context to be used in this call's Do method.
  2417  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  2418  	c.ctx_ = ctx
  2419  	return c
  2420  }
  2421  
  2422  // Header returns a http.Header that can be modified by the caller to add
  2423  // headers to the request.
  2424  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  2425  	if c.header_ == nil {
  2426  		c.header_ = make(http.Header)
  2427  	}
  2428  	return c.header_
  2429  }
  2430  
  2431  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2432  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2433  	if c.ifNoneMatch_ != "" {
  2434  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2435  	}
  2436  	var body io.Reader = nil
  2437  	c.urlParams_.Set("alt", alt)
  2438  	c.urlParams_.Set("prettyPrint", "false")
  2439  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2440  	urls += "?" + c.urlParams_.Encode()
  2441  	req, err := http.NewRequest("GET", urls, body)
  2442  	if err != nil {
  2443  		return nil, err
  2444  	}
  2445  	req.Header = reqHeaders
  2446  	googleapi.Expand(req.URL, map[string]string{
  2447  		"name": c.name,
  2448  	})
  2449  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2450  }
  2451  
  2452  // Do executes the "workstations.projects.locations.operations.get" call.
  2453  // Any non-2xx status code is an error. Response headers are in either
  2454  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2455  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2456  // whether the returned error was because http.StatusNotModified was returned.
  2457  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2458  	gensupport.SetOptions(c.urlParams_, opts...)
  2459  	res, err := c.doRequest("json")
  2460  	if res != nil && res.StatusCode == http.StatusNotModified {
  2461  		if res.Body != nil {
  2462  			res.Body.Close()
  2463  		}
  2464  		return nil, gensupport.WrapError(&googleapi.Error{
  2465  			Code:   res.StatusCode,
  2466  			Header: res.Header,
  2467  		})
  2468  	}
  2469  	if err != nil {
  2470  		return nil, err
  2471  	}
  2472  	defer googleapi.CloseBody(res)
  2473  	if err := googleapi.CheckResponse(res); err != nil {
  2474  		return nil, gensupport.WrapError(err)
  2475  	}
  2476  	ret := &Operation{
  2477  		ServerResponse: googleapi.ServerResponse{
  2478  			Header:         res.Header,
  2479  			HTTPStatusCode: res.StatusCode,
  2480  		},
  2481  	}
  2482  	target := &ret
  2483  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2484  		return nil, err
  2485  	}
  2486  	return ret, nil
  2487  }
  2488  
  2489  type ProjectsLocationsOperationsListCall struct {
  2490  	s            *Service
  2491  	name         string
  2492  	urlParams_   gensupport.URLParams
  2493  	ifNoneMatch_ string
  2494  	ctx_         context.Context
  2495  	header_      http.Header
  2496  }
  2497  
  2498  // List: Lists operations that match the specified filter in the request. If
  2499  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  2500  //
  2501  // - name: The name of the operation's parent resource.
  2502  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  2503  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2504  	c.name = name
  2505  	return c
  2506  }
  2507  
  2508  // Filter sets the optional parameter "filter": The standard list filter.
  2509  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  2510  	c.urlParams_.Set("filter", filter)
  2511  	return c
  2512  }
  2513  
  2514  // PageSize sets the optional parameter "pageSize": The standard list page
  2515  // size.
  2516  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  2517  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2518  	return c
  2519  }
  2520  
  2521  // PageToken sets the optional parameter "pageToken": The standard list page
  2522  // token.
  2523  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  2524  	c.urlParams_.Set("pageToken", pageToken)
  2525  	return c
  2526  }
  2527  
  2528  // Fields allows partial responses to be retrieved. See
  2529  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2530  // details.
  2531  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  2532  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2533  	return c
  2534  }
  2535  
  2536  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2537  // object's ETag matches the given value. This is useful for getting updates
  2538  // only after the object has changed since the last request.
  2539  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  2540  	c.ifNoneMatch_ = entityTag
  2541  	return c
  2542  }
  2543  
  2544  // Context sets the context to be used in this call's Do method.
  2545  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  2546  	c.ctx_ = ctx
  2547  	return c
  2548  }
  2549  
  2550  // Header returns a http.Header that can be modified by the caller to add
  2551  // headers to the request.
  2552  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  2553  	if c.header_ == nil {
  2554  		c.header_ = make(http.Header)
  2555  	}
  2556  	return c.header_
  2557  }
  2558  
  2559  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2560  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2561  	if c.ifNoneMatch_ != "" {
  2562  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2563  	}
  2564  	var body io.Reader = nil
  2565  	c.urlParams_.Set("alt", alt)
  2566  	c.urlParams_.Set("prettyPrint", "false")
  2567  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  2568  	urls += "?" + c.urlParams_.Encode()
  2569  	req, err := http.NewRequest("GET", urls, body)
  2570  	if err != nil {
  2571  		return nil, err
  2572  	}
  2573  	req.Header = reqHeaders
  2574  	googleapi.Expand(req.URL, map[string]string{
  2575  		"name": c.name,
  2576  	})
  2577  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2578  }
  2579  
  2580  // Do executes the "workstations.projects.locations.operations.list" call.
  2581  // Any non-2xx status code is an error. Response headers are in either
  2582  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  2583  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2584  // check whether the returned error was because http.StatusNotModified was
  2585  // returned.
  2586  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2587  	gensupport.SetOptions(c.urlParams_, opts...)
  2588  	res, err := c.doRequest("json")
  2589  	if res != nil && res.StatusCode == http.StatusNotModified {
  2590  		if res.Body != nil {
  2591  			res.Body.Close()
  2592  		}
  2593  		return nil, gensupport.WrapError(&googleapi.Error{
  2594  			Code:   res.StatusCode,
  2595  			Header: res.Header,
  2596  		})
  2597  	}
  2598  	if err != nil {
  2599  		return nil, err
  2600  	}
  2601  	defer googleapi.CloseBody(res)
  2602  	if err := googleapi.CheckResponse(res); err != nil {
  2603  		return nil, gensupport.WrapError(err)
  2604  	}
  2605  	ret := &ListOperationsResponse{
  2606  		ServerResponse: googleapi.ServerResponse{
  2607  			Header:         res.Header,
  2608  			HTTPStatusCode: res.StatusCode,
  2609  		},
  2610  	}
  2611  	target := &ret
  2612  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2613  		return nil, err
  2614  	}
  2615  	return ret, nil
  2616  }
  2617  
  2618  // Pages invokes f for each page of results.
  2619  // A non-nil error returned from f will halt the iteration.
  2620  // The provided context supersedes any context provided to the Context method.
  2621  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2622  	c.ctx_ = ctx
  2623  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2624  	for {
  2625  		x, err := c.Do()
  2626  		if err != nil {
  2627  			return err
  2628  		}
  2629  		if err := f(x); err != nil {
  2630  			return err
  2631  		}
  2632  		if x.NextPageToken == "" {
  2633  			return nil
  2634  		}
  2635  		c.PageToken(x.NextPageToken)
  2636  	}
  2637  }
  2638  
  2639  type ProjectsLocationsWorkstationClustersCreateCall struct {
  2640  	s                  *Service
  2641  	parent             string
  2642  	workstationcluster *WorkstationCluster
  2643  	urlParams_         gensupport.URLParams
  2644  	ctx_               context.Context
  2645  	header_            http.Header
  2646  }
  2647  
  2648  // Create: Creates a new workstation cluster.
  2649  //
  2650  // - parent: Parent resource name.
  2651  func (r *ProjectsLocationsWorkstationClustersService) Create(parent string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersCreateCall {
  2652  	c := &ProjectsLocationsWorkstationClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2653  	c.parent = parent
  2654  	c.workstationcluster = workstationcluster
  2655  	return c
  2656  }
  2657  
  2658  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  2659  // the request and preview the review, but do not actually apply it.
  2660  func (c *ProjectsLocationsWorkstationClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersCreateCall {
  2661  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  2662  	return c
  2663  }
  2664  
  2665  // WorkstationClusterId sets the optional parameter "workstationClusterId":
  2666  // Required. ID to use for the workstation cluster.
  2667  func (c *ProjectsLocationsWorkstationClustersCreateCall) WorkstationClusterId(workstationClusterId string) *ProjectsLocationsWorkstationClustersCreateCall {
  2668  	c.urlParams_.Set("workstationClusterId", workstationClusterId)
  2669  	return c
  2670  }
  2671  
  2672  // Fields allows partial responses to be retrieved. See
  2673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2674  // details.
  2675  func (c *ProjectsLocationsWorkstationClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersCreateCall {
  2676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2677  	return c
  2678  }
  2679  
  2680  // Context sets the context to be used in this call's Do method.
  2681  func (c *ProjectsLocationsWorkstationClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersCreateCall {
  2682  	c.ctx_ = ctx
  2683  	return c
  2684  }
  2685  
  2686  // Header returns a http.Header that can be modified by the caller to add
  2687  // headers to the request.
  2688  func (c *ProjectsLocationsWorkstationClustersCreateCall) Header() http.Header {
  2689  	if c.header_ == nil {
  2690  		c.header_ = make(http.Header)
  2691  	}
  2692  	return c.header_
  2693  }
  2694  
  2695  func (c *ProjectsLocationsWorkstationClustersCreateCall) doRequest(alt string) (*http.Response, error) {
  2696  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2697  	var body io.Reader = nil
  2698  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster)
  2699  	if err != nil {
  2700  		return nil, err
  2701  	}
  2702  	c.urlParams_.Set("alt", alt)
  2703  	c.urlParams_.Set("prettyPrint", "false")
  2704  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationClusters")
  2705  	urls += "?" + c.urlParams_.Encode()
  2706  	req, err := http.NewRequest("POST", urls, body)
  2707  	if err != nil {
  2708  		return nil, err
  2709  	}
  2710  	req.Header = reqHeaders
  2711  	googleapi.Expand(req.URL, map[string]string{
  2712  		"parent": c.parent,
  2713  	})
  2714  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2715  }
  2716  
  2717  // Do executes the "workstations.projects.locations.workstationClusters.create" call.
  2718  // Any non-2xx status code is an error. Response headers are in either
  2719  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2720  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2721  // whether the returned error was because http.StatusNotModified was returned.
  2722  func (c *ProjectsLocationsWorkstationClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2723  	gensupport.SetOptions(c.urlParams_, opts...)
  2724  	res, err := c.doRequest("json")
  2725  	if res != nil && res.StatusCode == http.StatusNotModified {
  2726  		if res.Body != nil {
  2727  			res.Body.Close()
  2728  		}
  2729  		return nil, gensupport.WrapError(&googleapi.Error{
  2730  			Code:   res.StatusCode,
  2731  			Header: res.Header,
  2732  		})
  2733  	}
  2734  	if err != nil {
  2735  		return nil, err
  2736  	}
  2737  	defer googleapi.CloseBody(res)
  2738  	if err := googleapi.CheckResponse(res); err != nil {
  2739  		return nil, gensupport.WrapError(err)
  2740  	}
  2741  	ret := &Operation{
  2742  		ServerResponse: googleapi.ServerResponse{
  2743  			Header:         res.Header,
  2744  			HTTPStatusCode: res.StatusCode,
  2745  		},
  2746  	}
  2747  	target := &ret
  2748  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2749  		return nil, err
  2750  	}
  2751  	return ret, nil
  2752  }
  2753  
  2754  type ProjectsLocationsWorkstationClustersDeleteCall struct {
  2755  	s          *Service
  2756  	name       string
  2757  	urlParams_ gensupport.URLParams
  2758  	ctx_       context.Context
  2759  	header_    http.Header
  2760  }
  2761  
  2762  // Delete: Deletes the specified workstation cluster.
  2763  //
  2764  // - name: Name of the workstation cluster to delete.
  2765  func (r *ProjectsLocationsWorkstationClustersService) Delete(name string) *ProjectsLocationsWorkstationClustersDeleteCall {
  2766  	c := &ProjectsLocationsWorkstationClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2767  	c.name = name
  2768  	return c
  2769  }
  2770  
  2771  // Etag sets the optional parameter "etag": If set, the request will be
  2772  // rejected if the latest version of the workstation cluster on the server does
  2773  // not have this ETag.
  2774  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersDeleteCall {
  2775  	c.urlParams_.Set("etag", etag)
  2776  	return c
  2777  }
  2778  
  2779  // Force sets the optional parameter "force": If set, any workstation
  2780  // configurations and workstations in the workstation cluster are also deleted.
  2781  // Otherwise, the request only works if the workstation cluster has no
  2782  // configurations or workstations.
  2783  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersDeleteCall {
  2784  	c.urlParams_.Set("force", fmt.Sprint(force))
  2785  	return c
  2786  }
  2787  
  2788  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  2789  // the request and preview the review, but do not apply it.
  2790  func (c *ProjectsLocationsWorkstationClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersDeleteCall {
  2791  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  2792  	return c
  2793  }
  2794  
  2795  // Fields allows partial responses to be retrieved. See
  2796  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2797  // details.
  2798  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersDeleteCall {
  2799  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2800  	return c
  2801  }
  2802  
  2803  // Context sets the context to be used in this call's Do method.
  2804  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersDeleteCall {
  2805  	c.ctx_ = ctx
  2806  	return c
  2807  }
  2808  
  2809  // Header returns a http.Header that can be modified by the caller to add
  2810  // headers to the request.
  2811  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Header() http.Header {
  2812  	if c.header_ == nil {
  2813  		c.header_ = make(http.Header)
  2814  	}
  2815  	return c.header_
  2816  }
  2817  
  2818  func (c *ProjectsLocationsWorkstationClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
  2819  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2820  	var body io.Reader = nil
  2821  	c.urlParams_.Set("alt", alt)
  2822  	c.urlParams_.Set("prettyPrint", "false")
  2823  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2824  	urls += "?" + c.urlParams_.Encode()
  2825  	req, err := http.NewRequest("DELETE", urls, body)
  2826  	if err != nil {
  2827  		return nil, err
  2828  	}
  2829  	req.Header = reqHeaders
  2830  	googleapi.Expand(req.URL, map[string]string{
  2831  		"name": c.name,
  2832  	})
  2833  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2834  }
  2835  
  2836  // Do executes the "workstations.projects.locations.workstationClusters.delete" call.
  2837  // Any non-2xx status code is an error. Response headers are in either
  2838  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2839  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2840  // whether the returned error was because http.StatusNotModified was returned.
  2841  func (c *ProjectsLocationsWorkstationClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2842  	gensupport.SetOptions(c.urlParams_, opts...)
  2843  	res, err := c.doRequest("json")
  2844  	if res != nil && res.StatusCode == http.StatusNotModified {
  2845  		if res.Body != nil {
  2846  			res.Body.Close()
  2847  		}
  2848  		return nil, gensupport.WrapError(&googleapi.Error{
  2849  			Code:   res.StatusCode,
  2850  			Header: res.Header,
  2851  		})
  2852  	}
  2853  	if err != nil {
  2854  		return nil, err
  2855  	}
  2856  	defer googleapi.CloseBody(res)
  2857  	if err := googleapi.CheckResponse(res); err != nil {
  2858  		return nil, gensupport.WrapError(err)
  2859  	}
  2860  	ret := &Operation{
  2861  		ServerResponse: googleapi.ServerResponse{
  2862  			Header:         res.Header,
  2863  			HTTPStatusCode: res.StatusCode,
  2864  		},
  2865  	}
  2866  	target := &ret
  2867  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2868  		return nil, err
  2869  	}
  2870  	return ret, nil
  2871  }
  2872  
  2873  type ProjectsLocationsWorkstationClustersGetCall struct {
  2874  	s            *Service
  2875  	name         string
  2876  	urlParams_   gensupport.URLParams
  2877  	ifNoneMatch_ string
  2878  	ctx_         context.Context
  2879  	header_      http.Header
  2880  }
  2881  
  2882  // Get: Returns the requested workstation cluster.
  2883  //
  2884  // - name: Name of the requested resource.
  2885  func (r *ProjectsLocationsWorkstationClustersService) Get(name string) *ProjectsLocationsWorkstationClustersGetCall {
  2886  	c := &ProjectsLocationsWorkstationClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2887  	c.name = name
  2888  	return c
  2889  }
  2890  
  2891  // Fields allows partial responses to be retrieved. See
  2892  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2893  // details.
  2894  func (c *ProjectsLocationsWorkstationClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersGetCall {
  2895  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2896  	return c
  2897  }
  2898  
  2899  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2900  // object's ETag matches the given value. This is useful for getting updates
  2901  // only after the object has changed since the last request.
  2902  func (c *ProjectsLocationsWorkstationClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersGetCall {
  2903  	c.ifNoneMatch_ = entityTag
  2904  	return c
  2905  }
  2906  
  2907  // Context sets the context to be used in this call's Do method.
  2908  func (c *ProjectsLocationsWorkstationClustersGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersGetCall {
  2909  	c.ctx_ = ctx
  2910  	return c
  2911  }
  2912  
  2913  // Header returns a http.Header that can be modified by the caller to add
  2914  // headers to the request.
  2915  func (c *ProjectsLocationsWorkstationClustersGetCall) Header() http.Header {
  2916  	if c.header_ == nil {
  2917  		c.header_ = make(http.Header)
  2918  	}
  2919  	return c.header_
  2920  }
  2921  
  2922  func (c *ProjectsLocationsWorkstationClustersGetCall) doRequest(alt string) (*http.Response, error) {
  2923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2924  	if c.ifNoneMatch_ != "" {
  2925  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2926  	}
  2927  	var body io.Reader = nil
  2928  	c.urlParams_.Set("alt", alt)
  2929  	c.urlParams_.Set("prettyPrint", "false")
  2930  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2931  	urls += "?" + c.urlParams_.Encode()
  2932  	req, err := http.NewRequest("GET", urls, body)
  2933  	if err != nil {
  2934  		return nil, err
  2935  	}
  2936  	req.Header = reqHeaders
  2937  	googleapi.Expand(req.URL, map[string]string{
  2938  		"name": c.name,
  2939  	})
  2940  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2941  }
  2942  
  2943  // Do executes the "workstations.projects.locations.workstationClusters.get" call.
  2944  // Any non-2xx status code is an error. Response headers are in either
  2945  // *WorkstationCluster.ServerResponse.Header or (if a response was returned at
  2946  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2947  // check whether the returned error was because http.StatusNotModified was
  2948  // returned.
  2949  func (c *ProjectsLocationsWorkstationClustersGetCall) Do(opts ...googleapi.CallOption) (*WorkstationCluster, error) {
  2950  	gensupport.SetOptions(c.urlParams_, opts...)
  2951  	res, err := c.doRequest("json")
  2952  	if res != nil && res.StatusCode == http.StatusNotModified {
  2953  		if res.Body != nil {
  2954  			res.Body.Close()
  2955  		}
  2956  		return nil, gensupport.WrapError(&googleapi.Error{
  2957  			Code:   res.StatusCode,
  2958  			Header: res.Header,
  2959  		})
  2960  	}
  2961  	if err != nil {
  2962  		return nil, err
  2963  	}
  2964  	defer googleapi.CloseBody(res)
  2965  	if err := googleapi.CheckResponse(res); err != nil {
  2966  		return nil, gensupport.WrapError(err)
  2967  	}
  2968  	ret := &WorkstationCluster{
  2969  		ServerResponse: googleapi.ServerResponse{
  2970  			Header:         res.Header,
  2971  			HTTPStatusCode: res.StatusCode,
  2972  		},
  2973  	}
  2974  	target := &ret
  2975  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2976  		return nil, err
  2977  	}
  2978  	return ret, nil
  2979  }
  2980  
  2981  type ProjectsLocationsWorkstationClustersListCall struct {
  2982  	s            *Service
  2983  	parent       string
  2984  	urlParams_   gensupport.URLParams
  2985  	ifNoneMatch_ string
  2986  	ctx_         context.Context
  2987  	header_      http.Header
  2988  }
  2989  
  2990  // List: Returns all workstation clusters in the specified location.
  2991  //
  2992  // - parent: Parent resource name.
  2993  func (r *ProjectsLocationsWorkstationClustersService) List(parent string) *ProjectsLocationsWorkstationClustersListCall {
  2994  	c := &ProjectsLocationsWorkstationClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2995  	c.parent = parent
  2996  	return c
  2997  }
  2998  
  2999  // PageSize sets the optional parameter "pageSize": Maximum number of items to
  3000  // return.
  3001  func (c *ProjectsLocationsWorkstationClustersListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersListCall {
  3002  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3003  	return c
  3004  }
  3005  
  3006  // PageToken sets the optional parameter "pageToken": next_page_token value
  3007  // returned from a previous List request, if any.
  3008  func (c *ProjectsLocationsWorkstationClustersListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersListCall {
  3009  	c.urlParams_.Set("pageToken", pageToken)
  3010  	return c
  3011  }
  3012  
  3013  // Fields allows partial responses to be retrieved. See
  3014  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3015  // details.
  3016  func (c *ProjectsLocationsWorkstationClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersListCall {
  3017  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3018  	return c
  3019  }
  3020  
  3021  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3022  // object's ETag matches the given value. This is useful for getting updates
  3023  // only after the object has changed since the last request.
  3024  func (c *ProjectsLocationsWorkstationClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersListCall {
  3025  	c.ifNoneMatch_ = entityTag
  3026  	return c
  3027  }
  3028  
  3029  // Context sets the context to be used in this call's Do method.
  3030  func (c *ProjectsLocationsWorkstationClustersListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersListCall {
  3031  	c.ctx_ = ctx
  3032  	return c
  3033  }
  3034  
  3035  // Header returns a http.Header that can be modified by the caller to add
  3036  // headers to the request.
  3037  func (c *ProjectsLocationsWorkstationClustersListCall) Header() http.Header {
  3038  	if c.header_ == nil {
  3039  		c.header_ = make(http.Header)
  3040  	}
  3041  	return c.header_
  3042  }
  3043  
  3044  func (c *ProjectsLocationsWorkstationClustersListCall) doRequest(alt string) (*http.Response, error) {
  3045  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3046  	if c.ifNoneMatch_ != "" {
  3047  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3048  	}
  3049  	var body io.Reader = nil
  3050  	c.urlParams_.Set("alt", alt)
  3051  	c.urlParams_.Set("prettyPrint", "false")
  3052  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationClusters")
  3053  	urls += "?" + c.urlParams_.Encode()
  3054  	req, err := http.NewRequest("GET", urls, body)
  3055  	if err != nil {
  3056  		return nil, err
  3057  	}
  3058  	req.Header = reqHeaders
  3059  	googleapi.Expand(req.URL, map[string]string{
  3060  		"parent": c.parent,
  3061  	})
  3062  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3063  }
  3064  
  3065  // Do executes the "workstations.projects.locations.workstationClusters.list" call.
  3066  // Any non-2xx status code is an error. Response headers are in either
  3067  // *ListWorkstationClustersResponse.ServerResponse.Header or (if a response was
  3068  // returned at all) in error.(*googleapi.Error).Header. Use
  3069  // googleapi.IsNotModified to check whether the returned error was because
  3070  // http.StatusNotModified was returned.
  3071  func (c *ProjectsLocationsWorkstationClustersListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationClustersResponse, error) {
  3072  	gensupport.SetOptions(c.urlParams_, opts...)
  3073  	res, err := c.doRequest("json")
  3074  	if res != nil && res.StatusCode == http.StatusNotModified {
  3075  		if res.Body != nil {
  3076  			res.Body.Close()
  3077  		}
  3078  		return nil, gensupport.WrapError(&googleapi.Error{
  3079  			Code:   res.StatusCode,
  3080  			Header: res.Header,
  3081  		})
  3082  	}
  3083  	if err != nil {
  3084  		return nil, err
  3085  	}
  3086  	defer googleapi.CloseBody(res)
  3087  	if err := googleapi.CheckResponse(res); err != nil {
  3088  		return nil, gensupport.WrapError(err)
  3089  	}
  3090  	ret := &ListWorkstationClustersResponse{
  3091  		ServerResponse: googleapi.ServerResponse{
  3092  			Header:         res.Header,
  3093  			HTTPStatusCode: res.StatusCode,
  3094  		},
  3095  	}
  3096  	target := &ret
  3097  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3098  		return nil, err
  3099  	}
  3100  	return ret, nil
  3101  }
  3102  
  3103  // Pages invokes f for each page of results.
  3104  // A non-nil error returned from f will halt the iteration.
  3105  // The provided context supersedes any context provided to the Context method.
  3106  func (c *ProjectsLocationsWorkstationClustersListCall) Pages(ctx context.Context, f func(*ListWorkstationClustersResponse) error) error {
  3107  	c.ctx_ = ctx
  3108  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3109  	for {
  3110  		x, err := c.Do()
  3111  		if err != nil {
  3112  			return err
  3113  		}
  3114  		if err := f(x); err != nil {
  3115  			return err
  3116  		}
  3117  		if x.NextPageToken == "" {
  3118  			return nil
  3119  		}
  3120  		c.PageToken(x.NextPageToken)
  3121  	}
  3122  }
  3123  
  3124  type ProjectsLocationsWorkstationClustersPatchCall struct {
  3125  	s                  *Service
  3126  	name               string
  3127  	workstationcluster *WorkstationCluster
  3128  	urlParams_         gensupport.URLParams
  3129  	ctx_               context.Context
  3130  	header_            http.Header
  3131  }
  3132  
  3133  // Patch: Updates an existing workstation cluster.
  3134  //
  3135  // - name: Identifier. Full name of this workstation cluster.
  3136  func (r *ProjectsLocationsWorkstationClustersService) Patch(name string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersPatchCall {
  3137  	c := &ProjectsLocationsWorkstationClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3138  	c.name = name
  3139  	c.workstationcluster = workstationcluster
  3140  	return c
  3141  }
  3142  
  3143  // AllowMissing sets the optional parameter "allowMissing": If set, and the
  3144  // workstation cluster is not found, a new workstation cluster will be created.
  3145  // In this situation, update_mask is ignored.
  3146  func (c *ProjectsLocationsWorkstationClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersPatchCall {
  3147  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  3148  	return c
  3149  }
  3150  
  3151  // UpdateMask sets the optional parameter "updateMask": Required. Mask that
  3152  // specifies which fields in the workstation cluster should be updated.
  3153  func (c *ProjectsLocationsWorkstationClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersPatchCall {
  3154  	c.urlParams_.Set("updateMask", updateMask)
  3155  	return c
  3156  }
  3157  
  3158  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  3159  // the request and preview the review, but do not actually apply it.
  3160  func (c *ProjectsLocationsWorkstationClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersPatchCall {
  3161  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  3162  	return c
  3163  }
  3164  
  3165  // Fields allows partial responses to be retrieved. See
  3166  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3167  // details.
  3168  func (c *ProjectsLocationsWorkstationClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersPatchCall {
  3169  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3170  	return c
  3171  }
  3172  
  3173  // Context sets the context to be used in this call's Do method.
  3174  func (c *ProjectsLocationsWorkstationClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersPatchCall {
  3175  	c.ctx_ = ctx
  3176  	return c
  3177  }
  3178  
  3179  // Header returns a http.Header that can be modified by the caller to add
  3180  // headers to the request.
  3181  func (c *ProjectsLocationsWorkstationClustersPatchCall) Header() http.Header {
  3182  	if c.header_ == nil {
  3183  		c.header_ = make(http.Header)
  3184  	}
  3185  	return c.header_
  3186  }
  3187  
  3188  func (c *ProjectsLocationsWorkstationClustersPatchCall) doRequest(alt string) (*http.Response, error) {
  3189  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3190  	var body io.Reader = nil
  3191  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster)
  3192  	if err != nil {
  3193  		return nil, err
  3194  	}
  3195  	c.urlParams_.Set("alt", alt)
  3196  	c.urlParams_.Set("prettyPrint", "false")
  3197  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3198  	urls += "?" + c.urlParams_.Encode()
  3199  	req, err := http.NewRequest("PATCH", urls, body)
  3200  	if err != nil {
  3201  		return nil, err
  3202  	}
  3203  	req.Header = reqHeaders
  3204  	googleapi.Expand(req.URL, map[string]string{
  3205  		"name": c.name,
  3206  	})
  3207  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3208  }
  3209  
  3210  // Do executes the "workstations.projects.locations.workstationClusters.patch" call.
  3211  // Any non-2xx status code is an error. Response headers are in either
  3212  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3213  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3214  // whether the returned error was because http.StatusNotModified was returned.
  3215  func (c *ProjectsLocationsWorkstationClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3216  	gensupport.SetOptions(c.urlParams_, opts...)
  3217  	res, err := c.doRequest("json")
  3218  	if res != nil && res.StatusCode == http.StatusNotModified {
  3219  		if res.Body != nil {
  3220  			res.Body.Close()
  3221  		}
  3222  		return nil, gensupport.WrapError(&googleapi.Error{
  3223  			Code:   res.StatusCode,
  3224  			Header: res.Header,
  3225  		})
  3226  	}
  3227  	if err != nil {
  3228  		return nil, err
  3229  	}
  3230  	defer googleapi.CloseBody(res)
  3231  	if err := googleapi.CheckResponse(res); err != nil {
  3232  		return nil, gensupport.WrapError(err)
  3233  	}
  3234  	ret := &Operation{
  3235  		ServerResponse: googleapi.ServerResponse{
  3236  			Header:         res.Header,
  3237  			HTTPStatusCode: res.StatusCode,
  3238  		},
  3239  	}
  3240  	target := &ret
  3241  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3242  		return nil, err
  3243  	}
  3244  	return ret, nil
  3245  }
  3246  
  3247  type ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall struct {
  3248  	s                 *Service
  3249  	parent            string
  3250  	workstationconfig *WorkstationConfig
  3251  	urlParams_        gensupport.URLParams
  3252  	ctx_              context.Context
  3253  	header_           http.Header
  3254  }
  3255  
  3256  // Create: Creates a new workstation configuration.
  3257  //
  3258  // - parent: Parent resource name.
  3259  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Create(parent string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall {
  3260  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3261  	c.parent = parent
  3262  	c.workstationconfig = workstationconfig
  3263  	return c
  3264  }
  3265  
  3266  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  3267  // the request and preview the review, but do not actually apply it.
  3268  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall {
  3269  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  3270  	return c
  3271  }
  3272  
  3273  // WorkstationConfigId sets the optional parameter "workstationConfigId":
  3274  // Required. ID to use for the workstation configuration.
  3275  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) WorkstationConfigId(workstationConfigId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall {
  3276  	c.urlParams_.Set("workstationConfigId", workstationConfigId)
  3277  	return c
  3278  }
  3279  
  3280  // Fields allows partial responses to be retrieved. See
  3281  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3282  // details.
  3283  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall {
  3284  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3285  	return c
  3286  }
  3287  
  3288  // Context sets the context to be used in this call's Do method.
  3289  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall {
  3290  	c.ctx_ = ctx
  3291  	return c
  3292  }
  3293  
  3294  // Header returns a http.Header that can be modified by the caller to add
  3295  // headers to the request.
  3296  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Header() http.Header {
  3297  	if c.header_ == nil {
  3298  		c.header_ = make(http.Header)
  3299  	}
  3300  	return c.header_
  3301  }
  3302  
  3303  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  3304  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3305  	var body io.Reader = nil
  3306  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig)
  3307  	if err != nil {
  3308  		return nil, err
  3309  	}
  3310  	c.urlParams_.Set("alt", alt)
  3311  	c.urlParams_.Set("prettyPrint", "false")
  3312  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs")
  3313  	urls += "?" + c.urlParams_.Encode()
  3314  	req, err := http.NewRequest("POST", urls, body)
  3315  	if err != nil {
  3316  		return nil, err
  3317  	}
  3318  	req.Header = reqHeaders
  3319  	googleapi.Expand(req.URL, map[string]string{
  3320  		"parent": c.parent,
  3321  	})
  3322  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3323  }
  3324  
  3325  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.create" call.
  3326  // Any non-2xx status code is an error. Response headers are in either
  3327  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3328  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3329  // whether the returned error was because http.StatusNotModified was returned.
  3330  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3331  	gensupport.SetOptions(c.urlParams_, opts...)
  3332  	res, err := c.doRequest("json")
  3333  	if res != nil && res.StatusCode == http.StatusNotModified {
  3334  		if res.Body != nil {
  3335  			res.Body.Close()
  3336  		}
  3337  		return nil, gensupport.WrapError(&googleapi.Error{
  3338  			Code:   res.StatusCode,
  3339  			Header: res.Header,
  3340  		})
  3341  	}
  3342  	if err != nil {
  3343  		return nil, err
  3344  	}
  3345  	defer googleapi.CloseBody(res)
  3346  	if err := googleapi.CheckResponse(res); err != nil {
  3347  		return nil, gensupport.WrapError(err)
  3348  	}
  3349  	ret := &Operation{
  3350  		ServerResponse: googleapi.ServerResponse{
  3351  			Header:         res.Header,
  3352  			HTTPStatusCode: res.StatusCode,
  3353  		},
  3354  	}
  3355  	target := &ret
  3356  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3357  		return nil, err
  3358  	}
  3359  	return ret, nil
  3360  }
  3361  
  3362  type ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall struct {
  3363  	s          *Service
  3364  	name       string
  3365  	urlParams_ gensupport.URLParams
  3366  	ctx_       context.Context
  3367  	header_    http.Header
  3368  }
  3369  
  3370  // Delete: Deletes the specified workstation configuration.
  3371  //
  3372  // - name: Name of the workstation configuration to delete.
  3373  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3374  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3375  	c.name = name
  3376  	return c
  3377  }
  3378  
  3379  // Etag sets the optional parameter "etag": If set, the request is rejected if
  3380  // the latest version of the workstation configuration on the server does not
  3381  // have this ETag.
  3382  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3383  	c.urlParams_.Set("etag", etag)
  3384  	return c
  3385  }
  3386  
  3387  // Force sets the optional parameter "force": If set, any workstations in the
  3388  // workstation configuration are also deleted. Otherwise, the request works
  3389  // only if the workstation configuration has no workstations.
  3390  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3391  	c.urlParams_.Set("force", fmt.Sprint(force))
  3392  	return c
  3393  }
  3394  
  3395  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  3396  // the request and preview the review, but do not actually apply it.
  3397  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3398  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  3399  	return c
  3400  }
  3401  
  3402  // Fields allows partial responses to be retrieved. See
  3403  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3404  // details.
  3405  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3406  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3407  	return c
  3408  }
  3409  
  3410  // Context sets the context to be used in this call's Do method.
  3411  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall {
  3412  	c.ctx_ = ctx
  3413  	return c
  3414  }
  3415  
  3416  // Header returns a http.Header that can be modified by the caller to add
  3417  // headers to the request.
  3418  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Header() http.Header {
  3419  	if c.header_ == nil {
  3420  		c.header_ = make(http.Header)
  3421  	}
  3422  	return c.header_
  3423  }
  3424  
  3425  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3427  	var body io.Reader = nil
  3428  	c.urlParams_.Set("alt", alt)
  3429  	c.urlParams_.Set("prettyPrint", "false")
  3430  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3431  	urls += "?" + c.urlParams_.Encode()
  3432  	req, err := http.NewRequest("DELETE", urls, body)
  3433  	if err != nil {
  3434  		return nil, err
  3435  	}
  3436  	req.Header = reqHeaders
  3437  	googleapi.Expand(req.URL, map[string]string{
  3438  		"name": c.name,
  3439  	})
  3440  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3441  }
  3442  
  3443  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.delete" call.
  3444  // Any non-2xx status code is an error. Response headers are in either
  3445  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3446  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3447  // whether the returned error was because http.StatusNotModified was returned.
  3448  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3449  	gensupport.SetOptions(c.urlParams_, opts...)
  3450  	res, err := c.doRequest("json")
  3451  	if res != nil && res.StatusCode == http.StatusNotModified {
  3452  		if res.Body != nil {
  3453  			res.Body.Close()
  3454  		}
  3455  		return nil, gensupport.WrapError(&googleapi.Error{
  3456  			Code:   res.StatusCode,
  3457  			Header: res.Header,
  3458  		})
  3459  	}
  3460  	if err != nil {
  3461  		return nil, err
  3462  	}
  3463  	defer googleapi.CloseBody(res)
  3464  	if err := googleapi.CheckResponse(res); err != nil {
  3465  		return nil, gensupport.WrapError(err)
  3466  	}
  3467  	ret := &Operation{
  3468  		ServerResponse: googleapi.ServerResponse{
  3469  			Header:         res.Header,
  3470  			HTTPStatusCode: res.StatusCode,
  3471  		},
  3472  	}
  3473  	target := &ret
  3474  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3475  		return nil, err
  3476  	}
  3477  	return ret, nil
  3478  }
  3479  
  3480  type ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall struct {
  3481  	s            *Service
  3482  	name         string
  3483  	urlParams_   gensupport.URLParams
  3484  	ifNoneMatch_ string
  3485  	ctx_         context.Context
  3486  	header_      http.Header
  3487  }
  3488  
  3489  // Get: Returns the requested workstation configuration.
  3490  //
  3491  // - name: Name of the requested resource.
  3492  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall {
  3493  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3494  	c.name = name
  3495  	return c
  3496  }
  3497  
  3498  // Fields allows partial responses to be retrieved. See
  3499  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3500  // details.
  3501  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall {
  3502  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3503  	return c
  3504  }
  3505  
  3506  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3507  // object's ETag matches the given value. This is useful for getting updates
  3508  // only after the object has changed since the last request.
  3509  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall {
  3510  	c.ifNoneMatch_ = entityTag
  3511  	return c
  3512  }
  3513  
  3514  // Context sets the context to be used in this call's Do method.
  3515  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall {
  3516  	c.ctx_ = ctx
  3517  	return c
  3518  }
  3519  
  3520  // Header returns a http.Header that can be modified by the caller to add
  3521  // headers to the request.
  3522  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Header() http.Header {
  3523  	if c.header_ == nil {
  3524  		c.header_ = make(http.Header)
  3525  	}
  3526  	return c.header_
  3527  }
  3528  
  3529  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  3530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3531  	if c.ifNoneMatch_ != "" {
  3532  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3533  	}
  3534  	var body io.Reader = nil
  3535  	c.urlParams_.Set("alt", alt)
  3536  	c.urlParams_.Set("prettyPrint", "false")
  3537  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3538  	urls += "?" + c.urlParams_.Encode()
  3539  	req, err := http.NewRequest("GET", urls, body)
  3540  	if err != nil {
  3541  		return nil, err
  3542  	}
  3543  	req.Header = reqHeaders
  3544  	googleapi.Expand(req.URL, map[string]string{
  3545  		"name": c.name,
  3546  	})
  3547  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3548  }
  3549  
  3550  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.get" call.
  3551  // Any non-2xx status code is an error. Response headers are in either
  3552  // *WorkstationConfig.ServerResponse.Header or (if a response was returned at
  3553  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3554  // check whether the returned error was because http.StatusNotModified was
  3555  // returned.
  3556  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Do(opts ...googleapi.CallOption) (*WorkstationConfig, error) {
  3557  	gensupport.SetOptions(c.urlParams_, opts...)
  3558  	res, err := c.doRequest("json")
  3559  	if res != nil && res.StatusCode == http.StatusNotModified {
  3560  		if res.Body != nil {
  3561  			res.Body.Close()
  3562  		}
  3563  		return nil, gensupport.WrapError(&googleapi.Error{
  3564  			Code:   res.StatusCode,
  3565  			Header: res.Header,
  3566  		})
  3567  	}
  3568  	if err != nil {
  3569  		return nil, err
  3570  	}
  3571  	defer googleapi.CloseBody(res)
  3572  	if err := googleapi.CheckResponse(res); err != nil {
  3573  		return nil, gensupport.WrapError(err)
  3574  	}
  3575  	ret := &WorkstationConfig{
  3576  		ServerResponse: googleapi.ServerResponse{
  3577  			Header:         res.Header,
  3578  			HTTPStatusCode: res.StatusCode,
  3579  		},
  3580  	}
  3581  	target := &ret
  3582  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3583  		return nil, err
  3584  	}
  3585  	return ret, nil
  3586  }
  3587  
  3588  type ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall struct {
  3589  	s            *Service
  3590  	resource     string
  3591  	urlParams_   gensupport.URLParams
  3592  	ifNoneMatch_ string
  3593  	ctx_         context.Context
  3594  	header_      http.Header
  3595  }
  3596  
  3597  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3598  // empty policy if the resource exists and does not have a policy set.
  3599  //
  3600  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3601  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3602  //     for the appropriate value for this field.
  3603  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall {
  3604  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3605  	c.resource = resource
  3606  	return c
  3607  }
  3608  
  3609  // OptionsRequestedPolicyVersion sets the optional parameter
  3610  // "options.requestedPolicyVersion": The maximum policy version that will be
  3611  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3612  // an invalid value will be rejected. Requests for policies with any
  3613  // conditional role bindings must specify version 3. Policies with no
  3614  // conditional role bindings may specify any valid value or leave the field
  3615  // unset. The policy in the response might use the policy version that you
  3616  // specified, or it might use a lower policy version. For example, if you
  3617  // specify version 3, but the policy has no conditional role bindings, the
  3618  // response uses version 1. To learn which resources support conditions in
  3619  // their IAM policies, see the IAM documentation
  3620  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3621  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall {
  3622  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3623  	return c
  3624  }
  3625  
  3626  // Fields allows partial responses to be retrieved. See
  3627  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3628  // details.
  3629  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall {
  3630  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3631  	return c
  3632  }
  3633  
  3634  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3635  // object's ETag matches the given value. This is useful for getting updates
  3636  // only after the object has changed since the last request.
  3637  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall {
  3638  	c.ifNoneMatch_ = entityTag
  3639  	return c
  3640  }
  3641  
  3642  // Context sets the context to be used in this call's Do method.
  3643  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall {
  3644  	c.ctx_ = ctx
  3645  	return c
  3646  }
  3647  
  3648  // Header returns a http.Header that can be modified by the caller to add
  3649  // headers to the request.
  3650  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Header() http.Header {
  3651  	if c.header_ == nil {
  3652  		c.header_ = make(http.Header)
  3653  	}
  3654  	return c.header_
  3655  }
  3656  
  3657  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3658  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3659  	if c.ifNoneMatch_ != "" {
  3660  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3661  	}
  3662  	var body io.Reader = nil
  3663  	c.urlParams_.Set("alt", alt)
  3664  	c.urlParams_.Set("prettyPrint", "false")
  3665  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3666  	urls += "?" + c.urlParams_.Encode()
  3667  	req, err := http.NewRequest("GET", urls, body)
  3668  	if err != nil {
  3669  		return nil, err
  3670  	}
  3671  	req.Header = reqHeaders
  3672  	googleapi.Expand(req.URL, map[string]string{
  3673  		"resource": c.resource,
  3674  	})
  3675  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3676  }
  3677  
  3678  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy" call.
  3679  // Any non-2xx status code is an error. Response headers are in either
  3680  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3681  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3682  // whether the returned error was because http.StatusNotModified was returned.
  3683  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3684  	gensupport.SetOptions(c.urlParams_, opts...)
  3685  	res, err := c.doRequest("json")
  3686  	if res != nil && res.StatusCode == http.StatusNotModified {
  3687  		if res.Body != nil {
  3688  			res.Body.Close()
  3689  		}
  3690  		return nil, gensupport.WrapError(&googleapi.Error{
  3691  			Code:   res.StatusCode,
  3692  			Header: res.Header,
  3693  		})
  3694  	}
  3695  	if err != nil {
  3696  		return nil, err
  3697  	}
  3698  	defer googleapi.CloseBody(res)
  3699  	if err := googleapi.CheckResponse(res); err != nil {
  3700  		return nil, gensupport.WrapError(err)
  3701  	}
  3702  	ret := &Policy{
  3703  		ServerResponse: googleapi.ServerResponse{
  3704  			Header:         res.Header,
  3705  			HTTPStatusCode: res.StatusCode,
  3706  		},
  3707  	}
  3708  	target := &ret
  3709  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3710  		return nil, err
  3711  	}
  3712  	return ret, nil
  3713  }
  3714  
  3715  type ProjectsLocationsWorkstationClustersWorkstationConfigsListCall struct {
  3716  	s            *Service
  3717  	parent       string
  3718  	urlParams_   gensupport.URLParams
  3719  	ifNoneMatch_ string
  3720  	ctx_         context.Context
  3721  	header_      http.Header
  3722  }
  3723  
  3724  // List: Returns all workstation configurations in the specified cluster.
  3725  //
  3726  // - parent: Parent resource name.
  3727  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3728  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3729  	c.parent = parent
  3730  	return c
  3731  }
  3732  
  3733  // PageSize sets the optional parameter "pageSize": Maximum number of items to
  3734  // return.
  3735  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3736  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3737  	return c
  3738  }
  3739  
  3740  // PageToken sets the optional parameter "pageToken": next_page_token value
  3741  // returned from a previous List request, if any.
  3742  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3743  	c.urlParams_.Set("pageToken", pageToken)
  3744  	return c
  3745  }
  3746  
  3747  // Fields allows partial responses to be retrieved. See
  3748  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3749  // details.
  3750  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3751  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3752  	return c
  3753  }
  3754  
  3755  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3756  // object's ETag matches the given value. This is useful for getting updates
  3757  // only after the object has changed since the last request.
  3758  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3759  	c.ifNoneMatch_ = entityTag
  3760  	return c
  3761  }
  3762  
  3763  // Context sets the context to be used in this call's Do method.
  3764  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall {
  3765  	c.ctx_ = ctx
  3766  	return c
  3767  }
  3768  
  3769  // Header returns a http.Header that can be modified by the caller to add
  3770  // headers to the request.
  3771  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Header() http.Header {
  3772  	if c.header_ == nil {
  3773  		c.header_ = make(http.Header)
  3774  	}
  3775  	return c.header_
  3776  }
  3777  
  3778  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) doRequest(alt string) (*http.Response, error) {
  3779  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3780  	if c.ifNoneMatch_ != "" {
  3781  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3782  	}
  3783  	var body io.Reader = nil
  3784  	c.urlParams_.Set("alt", alt)
  3785  	c.urlParams_.Set("prettyPrint", "false")
  3786  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs")
  3787  	urls += "?" + c.urlParams_.Encode()
  3788  	req, err := http.NewRequest("GET", urls, body)
  3789  	if err != nil {
  3790  		return nil, err
  3791  	}
  3792  	req.Header = reqHeaders
  3793  	googleapi.Expand(req.URL, map[string]string{
  3794  		"parent": c.parent,
  3795  	})
  3796  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3797  }
  3798  
  3799  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.list" call.
  3800  // Any non-2xx status code is an error. Response headers are in either
  3801  // *ListWorkstationConfigsResponse.ServerResponse.Header or (if a response was
  3802  // returned at all) in error.(*googleapi.Error).Header. Use
  3803  // googleapi.IsNotModified to check whether the returned error was because
  3804  // http.StatusNotModified was returned.
  3805  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationConfigsResponse, error) {
  3806  	gensupport.SetOptions(c.urlParams_, opts...)
  3807  	res, err := c.doRequest("json")
  3808  	if res != nil && res.StatusCode == http.StatusNotModified {
  3809  		if res.Body != nil {
  3810  			res.Body.Close()
  3811  		}
  3812  		return nil, gensupport.WrapError(&googleapi.Error{
  3813  			Code:   res.StatusCode,
  3814  			Header: res.Header,
  3815  		})
  3816  	}
  3817  	if err != nil {
  3818  		return nil, err
  3819  	}
  3820  	defer googleapi.CloseBody(res)
  3821  	if err := googleapi.CheckResponse(res); err != nil {
  3822  		return nil, gensupport.WrapError(err)
  3823  	}
  3824  	ret := &ListWorkstationConfigsResponse{
  3825  		ServerResponse: googleapi.ServerResponse{
  3826  			Header:         res.Header,
  3827  			HTTPStatusCode: res.StatusCode,
  3828  		},
  3829  	}
  3830  	target := &ret
  3831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3832  		return nil, err
  3833  	}
  3834  	return ret, nil
  3835  }
  3836  
  3837  // Pages invokes f for each page of results.
  3838  // A non-nil error returned from f will halt the iteration.
  3839  // The provided context supersedes any context provided to the Context method.
  3840  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Pages(ctx context.Context, f func(*ListWorkstationConfigsResponse) error) error {
  3841  	c.ctx_ = ctx
  3842  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3843  	for {
  3844  		x, err := c.Do()
  3845  		if err != nil {
  3846  			return err
  3847  		}
  3848  		if err := f(x); err != nil {
  3849  			return err
  3850  		}
  3851  		if x.NextPageToken == "" {
  3852  			return nil
  3853  		}
  3854  		c.PageToken(x.NextPageToken)
  3855  	}
  3856  }
  3857  
  3858  type ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall struct {
  3859  	s            *Service
  3860  	parent       string
  3861  	urlParams_   gensupport.URLParams
  3862  	ifNoneMatch_ string
  3863  	ctx_         context.Context
  3864  	header_      http.Header
  3865  }
  3866  
  3867  // ListUsable: Returns all workstation configurations in the specified cluster
  3868  // on which the caller has the "workstations.workstation.create" permission.
  3869  //
  3870  // - parent: Parent resource name.
  3871  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3872  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3873  	c.parent = parent
  3874  	return c
  3875  }
  3876  
  3877  // PageSize sets the optional parameter "pageSize": Maximum number of items to
  3878  // return.
  3879  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3880  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3881  	return c
  3882  }
  3883  
  3884  // PageToken sets the optional parameter "pageToken": next_page_token value
  3885  // returned from a previous List request, if any.
  3886  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3887  	c.urlParams_.Set("pageToken", pageToken)
  3888  	return c
  3889  }
  3890  
  3891  // Fields allows partial responses to be retrieved. See
  3892  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3893  // details.
  3894  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3895  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3896  	return c
  3897  }
  3898  
  3899  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3900  // object's ETag matches the given value. This is useful for getting updates
  3901  // only after the object has changed since the last request.
  3902  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3903  	c.ifNoneMatch_ = entityTag
  3904  	return c
  3905  }
  3906  
  3907  // Context sets the context to be used in this call's Do method.
  3908  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall {
  3909  	c.ctx_ = ctx
  3910  	return c
  3911  }
  3912  
  3913  // Header returns a http.Header that can be modified by the caller to add
  3914  // headers to the request.
  3915  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Header() http.Header {
  3916  	if c.header_ == nil {
  3917  		c.header_ = make(http.Header)
  3918  	}
  3919  	return c.header_
  3920  }
  3921  
  3922  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) doRequest(alt string) (*http.Response, error) {
  3923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3924  	if c.ifNoneMatch_ != "" {
  3925  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3926  	}
  3927  	var body io.Reader = nil
  3928  	c.urlParams_.Set("alt", alt)
  3929  	c.urlParams_.Set("prettyPrint", "false")
  3930  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs:listUsable")
  3931  	urls += "?" + c.urlParams_.Encode()
  3932  	req, err := http.NewRequest("GET", urls, body)
  3933  	if err != nil {
  3934  		return nil, err
  3935  	}
  3936  	req.Header = reqHeaders
  3937  	googleapi.Expand(req.URL, map[string]string{
  3938  		"parent": c.parent,
  3939  	})
  3940  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3941  }
  3942  
  3943  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable" call.
  3944  // Any non-2xx status code is an error. Response headers are in either
  3945  // *ListUsableWorkstationConfigsResponse.ServerResponse.Header or (if a
  3946  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3947  // googleapi.IsNotModified to check whether the returned error was because
  3948  // http.StatusNotModified was returned.
  3949  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationConfigsResponse, error) {
  3950  	gensupport.SetOptions(c.urlParams_, opts...)
  3951  	res, err := c.doRequest("json")
  3952  	if res != nil && res.StatusCode == http.StatusNotModified {
  3953  		if res.Body != nil {
  3954  			res.Body.Close()
  3955  		}
  3956  		return nil, gensupport.WrapError(&googleapi.Error{
  3957  			Code:   res.StatusCode,
  3958  			Header: res.Header,
  3959  		})
  3960  	}
  3961  	if err != nil {
  3962  		return nil, err
  3963  	}
  3964  	defer googleapi.CloseBody(res)
  3965  	if err := googleapi.CheckResponse(res); err != nil {
  3966  		return nil, gensupport.WrapError(err)
  3967  	}
  3968  	ret := &ListUsableWorkstationConfigsResponse{
  3969  		ServerResponse: googleapi.ServerResponse{
  3970  			Header:         res.Header,
  3971  			HTTPStatusCode: res.StatusCode,
  3972  		},
  3973  	}
  3974  	target := &ret
  3975  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3976  		return nil, err
  3977  	}
  3978  	return ret, nil
  3979  }
  3980  
  3981  // Pages invokes f for each page of results.
  3982  // A non-nil error returned from f will halt the iteration.
  3983  // The provided context supersedes any context provided to the Context method.
  3984  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationConfigsResponse) error) error {
  3985  	c.ctx_ = ctx
  3986  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3987  	for {
  3988  		x, err := c.Do()
  3989  		if err != nil {
  3990  			return err
  3991  		}
  3992  		if err := f(x); err != nil {
  3993  			return err
  3994  		}
  3995  		if x.NextPageToken == "" {
  3996  			return nil
  3997  		}
  3998  		c.PageToken(x.NextPageToken)
  3999  	}
  4000  }
  4001  
  4002  type ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall struct {
  4003  	s                 *Service
  4004  	name              string
  4005  	workstationconfig *WorkstationConfig
  4006  	urlParams_        gensupport.URLParams
  4007  	ctx_              context.Context
  4008  	header_           http.Header
  4009  }
  4010  
  4011  // Patch: Updates an existing workstation configuration.
  4012  //
  4013  // - name: Identifier. Full name of this workstation configuration.
  4014  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Patch(name string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4015  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4016  	c.name = name
  4017  	c.workstationconfig = workstationconfig
  4018  	return c
  4019  }
  4020  
  4021  // AllowMissing sets the optional parameter "allowMissing": If set and the
  4022  // workstation configuration is not found, a new workstation configuration will
  4023  // be created. In this situation, update_mask is ignored.
  4024  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4025  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  4026  	return c
  4027  }
  4028  
  4029  // UpdateMask sets the optional parameter "updateMask": Required. Mask
  4030  // specifying which fields in the workstation configuration should be updated.
  4031  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4032  	c.urlParams_.Set("updateMask", updateMask)
  4033  	return c
  4034  }
  4035  
  4036  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  4037  // the request and preview the review, but do not actually apply it.
  4038  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4039  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4040  	return c
  4041  }
  4042  
  4043  // Fields allows partial responses to be retrieved. See
  4044  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4045  // details.
  4046  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4047  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4048  	return c
  4049  }
  4050  
  4051  // Context sets the context to be used in this call's Do method.
  4052  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall {
  4053  	c.ctx_ = ctx
  4054  	return c
  4055  }
  4056  
  4057  // Header returns a http.Header that can be modified by the caller to add
  4058  // headers to the request.
  4059  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Header() http.Header {
  4060  	if c.header_ == nil {
  4061  		c.header_ = make(http.Header)
  4062  	}
  4063  	return c.header_
  4064  }
  4065  
  4066  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  4067  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4068  	var body io.Reader = nil
  4069  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig)
  4070  	if err != nil {
  4071  		return nil, err
  4072  	}
  4073  	c.urlParams_.Set("alt", alt)
  4074  	c.urlParams_.Set("prettyPrint", "false")
  4075  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4076  	urls += "?" + c.urlParams_.Encode()
  4077  	req, err := http.NewRequest("PATCH", urls, body)
  4078  	if err != nil {
  4079  		return nil, err
  4080  	}
  4081  	req.Header = reqHeaders
  4082  	googleapi.Expand(req.URL, map[string]string{
  4083  		"name": c.name,
  4084  	})
  4085  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4086  }
  4087  
  4088  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.patch" call.
  4089  // Any non-2xx status code is an error. Response headers are in either
  4090  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4091  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4092  // whether the returned error was because http.StatusNotModified was returned.
  4093  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4094  	gensupport.SetOptions(c.urlParams_, opts...)
  4095  	res, err := c.doRequest("json")
  4096  	if res != nil && res.StatusCode == http.StatusNotModified {
  4097  		if res.Body != nil {
  4098  			res.Body.Close()
  4099  		}
  4100  		return nil, gensupport.WrapError(&googleapi.Error{
  4101  			Code:   res.StatusCode,
  4102  			Header: res.Header,
  4103  		})
  4104  	}
  4105  	if err != nil {
  4106  		return nil, err
  4107  	}
  4108  	defer googleapi.CloseBody(res)
  4109  	if err := googleapi.CheckResponse(res); err != nil {
  4110  		return nil, gensupport.WrapError(err)
  4111  	}
  4112  	ret := &Operation{
  4113  		ServerResponse: googleapi.ServerResponse{
  4114  			Header:         res.Header,
  4115  			HTTPStatusCode: res.StatusCode,
  4116  		},
  4117  	}
  4118  	target := &ret
  4119  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4120  		return nil, err
  4121  	}
  4122  	return ret, nil
  4123  }
  4124  
  4125  type ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall struct {
  4126  	s                   *Service
  4127  	resource            string
  4128  	setiampolicyrequest *SetIamPolicyRequest
  4129  	urlParams_          gensupport.URLParams
  4130  	ctx_                context.Context
  4131  	header_             http.Header
  4132  }
  4133  
  4134  // SetIamPolicy: Sets the access control policy on the specified resource.
  4135  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4136  // and `PERMISSION_DENIED` errors.
  4137  //
  4138  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4139  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4140  //     for the appropriate value for this field.
  4141  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall {
  4142  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4143  	c.resource = resource
  4144  	c.setiampolicyrequest = setiampolicyrequest
  4145  	return c
  4146  }
  4147  
  4148  // Fields allows partial responses to be retrieved. See
  4149  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4150  // details.
  4151  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall {
  4152  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4153  	return c
  4154  }
  4155  
  4156  // Context sets the context to be used in this call's Do method.
  4157  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall {
  4158  	c.ctx_ = ctx
  4159  	return c
  4160  }
  4161  
  4162  // Header returns a http.Header that can be modified by the caller to add
  4163  // headers to the request.
  4164  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Header() http.Header {
  4165  	if c.header_ == nil {
  4166  		c.header_ = make(http.Header)
  4167  	}
  4168  	return c.header_
  4169  }
  4170  
  4171  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4172  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4173  	var body io.Reader = nil
  4174  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4175  	if err != nil {
  4176  		return nil, err
  4177  	}
  4178  	c.urlParams_.Set("alt", alt)
  4179  	c.urlParams_.Set("prettyPrint", "false")
  4180  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4181  	urls += "?" + c.urlParams_.Encode()
  4182  	req, err := http.NewRequest("POST", urls, body)
  4183  	if err != nil {
  4184  		return nil, err
  4185  	}
  4186  	req.Header = reqHeaders
  4187  	googleapi.Expand(req.URL, map[string]string{
  4188  		"resource": c.resource,
  4189  	})
  4190  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4191  }
  4192  
  4193  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy" call.
  4194  // Any non-2xx status code is an error. Response headers are in either
  4195  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4196  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4197  // whether the returned error was because http.StatusNotModified was returned.
  4198  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4199  	gensupport.SetOptions(c.urlParams_, opts...)
  4200  	res, err := c.doRequest("json")
  4201  	if res != nil && res.StatusCode == http.StatusNotModified {
  4202  		if res.Body != nil {
  4203  			res.Body.Close()
  4204  		}
  4205  		return nil, gensupport.WrapError(&googleapi.Error{
  4206  			Code:   res.StatusCode,
  4207  			Header: res.Header,
  4208  		})
  4209  	}
  4210  	if err != nil {
  4211  		return nil, err
  4212  	}
  4213  	defer googleapi.CloseBody(res)
  4214  	if err := googleapi.CheckResponse(res); err != nil {
  4215  		return nil, gensupport.WrapError(err)
  4216  	}
  4217  	ret := &Policy{
  4218  		ServerResponse: googleapi.ServerResponse{
  4219  			Header:         res.Header,
  4220  			HTTPStatusCode: res.StatusCode,
  4221  		},
  4222  	}
  4223  	target := &ret
  4224  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4225  		return nil, err
  4226  	}
  4227  	return ret, nil
  4228  }
  4229  
  4230  type ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall struct {
  4231  	s                         *Service
  4232  	resource                  string
  4233  	testiampermissionsrequest *TestIamPermissionsRequest
  4234  	urlParams_                gensupport.URLParams
  4235  	ctx_                      context.Context
  4236  	header_                   http.Header
  4237  }
  4238  
  4239  // TestIamPermissions: Returns permissions that a caller has on the specified
  4240  // resource. If the resource does not exist, this will return an empty set of
  4241  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4242  // used for building permission-aware UIs and command-line tools, not for
  4243  // authorization checking. This operation may "fail open" without warning.
  4244  //
  4245  //   - resource: REQUIRED: The resource for which the policy detail is being
  4246  //     requested. See Resource names
  4247  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4248  //     value for this field.
  4249  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall {
  4250  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4251  	c.resource = resource
  4252  	c.testiampermissionsrequest = testiampermissionsrequest
  4253  	return c
  4254  }
  4255  
  4256  // Fields allows partial responses to be retrieved. See
  4257  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4258  // details.
  4259  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall {
  4260  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4261  	return c
  4262  }
  4263  
  4264  // Context sets the context to be used in this call's Do method.
  4265  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall {
  4266  	c.ctx_ = ctx
  4267  	return c
  4268  }
  4269  
  4270  // Header returns a http.Header that can be modified by the caller to add
  4271  // headers to the request.
  4272  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Header() http.Header {
  4273  	if c.header_ == nil {
  4274  		c.header_ = make(http.Header)
  4275  	}
  4276  	return c.header_
  4277  }
  4278  
  4279  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4280  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4281  	var body io.Reader = nil
  4282  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4283  	if err != nil {
  4284  		return nil, err
  4285  	}
  4286  	c.urlParams_.Set("alt", alt)
  4287  	c.urlParams_.Set("prettyPrint", "false")
  4288  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4289  	urls += "?" + c.urlParams_.Encode()
  4290  	req, err := http.NewRequest("POST", urls, body)
  4291  	if err != nil {
  4292  		return nil, err
  4293  	}
  4294  	req.Header = reqHeaders
  4295  	googleapi.Expand(req.URL, map[string]string{
  4296  		"resource": c.resource,
  4297  	})
  4298  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4299  }
  4300  
  4301  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions" call.
  4302  // Any non-2xx status code is an error. Response headers are in either
  4303  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4304  // returned at all) in error.(*googleapi.Error).Header. Use
  4305  // googleapi.IsNotModified to check whether the returned error was because
  4306  // http.StatusNotModified was returned.
  4307  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4308  	gensupport.SetOptions(c.urlParams_, opts...)
  4309  	res, err := c.doRequest("json")
  4310  	if res != nil && res.StatusCode == http.StatusNotModified {
  4311  		if res.Body != nil {
  4312  			res.Body.Close()
  4313  		}
  4314  		return nil, gensupport.WrapError(&googleapi.Error{
  4315  			Code:   res.StatusCode,
  4316  			Header: res.Header,
  4317  		})
  4318  	}
  4319  	if err != nil {
  4320  		return nil, err
  4321  	}
  4322  	defer googleapi.CloseBody(res)
  4323  	if err := googleapi.CheckResponse(res); err != nil {
  4324  		return nil, gensupport.WrapError(err)
  4325  	}
  4326  	ret := &TestIamPermissionsResponse{
  4327  		ServerResponse: googleapi.ServerResponse{
  4328  			Header:         res.Header,
  4329  			HTTPStatusCode: res.StatusCode,
  4330  		},
  4331  	}
  4332  	target := &ret
  4333  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4334  		return nil, err
  4335  	}
  4336  	return ret, nil
  4337  }
  4338  
  4339  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall struct {
  4340  	s           *Service
  4341  	parent      string
  4342  	workstation *Workstation
  4343  	urlParams_  gensupport.URLParams
  4344  	ctx_        context.Context
  4345  	header_     http.Header
  4346  }
  4347  
  4348  // Create: Creates a new workstation.
  4349  //
  4350  // - parent: Parent resource name.
  4351  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Create(parent string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall {
  4352  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4353  	c.parent = parent
  4354  	c.workstation = workstation
  4355  	return c
  4356  }
  4357  
  4358  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  4359  // the request and preview the review, but do not actually apply it.
  4360  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall {
  4361  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4362  	return c
  4363  }
  4364  
  4365  // WorkstationId sets the optional parameter "workstationId": Required. ID to
  4366  // use for the workstation.
  4367  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) WorkstationId(workstationId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall {
  4368  	c.urlParams_.Set("workstationId", workstationId)
  4369  	return c
  4370  }
  4371  
  4372  // Fields allows partial responses to be retrieved. See
  4373  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4374  // details.
  4375  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall {
  4376  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4377  	return c
  4378  }
  4379  
  4380  // Context sets the context to be used in this call's Do method.
  4381  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall {
  4382  	c.ctx_ = ctx
  4383  	return c
  4384  }
  4385  
  4386  // Header returns a http.Header that can be modified by the caller to add
  4387  // headers to the request.
  4388  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Header() http.Header {
  4389  	if c.header_ == nil {
  4390  		c.header_ = make(http.Header)
  4391  	}
  4392  	return c.header_
  4393  }
  4394  
  4395  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) doRequest(alt string) (*http.Response, error) {
  4396  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4397  	var body io.Reader = nil
  4398  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation)
  4399  	if err != nil {
  4400  		return nil, err
  4401  	}
  4402  	c.urlParams_.Set("alt", alt)
  4403  	c.urlParams_.Set("prettyPrint", "false")
  4404  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations")
  4405  	urls += "?" + c.urlParams_.Encode()
  4406  	req, err := http.NewRequest("POST", urls, body)
  4407  	if err != nil {
  4408  		return nil, err
  4409  	}
  4410  	req.Header = reqHeaders
  4411  	googleapi.Expand(req.URL, map[string]string{
  4412  		"parent": c.parent,
  4413  	})
  4414  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4415  }
  4416  
  4417  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create" call.
  4418  // Any non-2xx status code is an error. Response headers are in either
  4419  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4420  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4421  // whether the returned error was because http.StatusNotModified was returned.
  4422  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4423  	gensupport.SetOptions(c.urlParams_, opts...)
  4424  	res, err := c.doRequest("json")
  4425  	if res != nil && res.StatusCode == http.StatusNotModified {
  4426  		if res.Body != nil {
  4427  			res.Body.Close()
  4428  		}
  4429  		return nil, gensupport.WrapError(&googleapi.Error{
  4430  			Code:   res.StatusCode,
  4431  			Header: res.Header,
  4432  		})
  4433  	}
  4434  	if err != nil {
  4435  		return nil, err
  4436  	}
  4437  	defer googleapi.CloseBody(res)
  4438  	if err := googleapi.CheckResponse(res); err != nil {
  4439  		return nil, gensupport.WrapError(err)
  4440  	}
  4441  	ret := &Operation{
  4442  		ServerResponse: googleapi.ServerResponse{
  4443  			Header:         res.Header,
  4444  			HTTPStatusCode: res.StatusCode,
  4445  		},
  4446  	}
  4447  	target := &ret
  4448  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4449  		return nil, err
  4450  	}
  4451  	return ret, nil
  4452  }
  4453  
  4454  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall struct {
  4455  	s          *Service
  4456  	name       string
  4457  	urlParams_ gensupport.URLParams
  4458  	ctx_       context.Context
  4459  	header_    http.Header
  4460  }
  4461  
  4462  // Delete: Deletes the specified workstation.
  4463  //
  4464  // - name: Name of the workstation to delete.
  4465  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall {
  4466  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4467  	c.name = name
  4468  	return c
  4469  }
  4470  
  4471  // Etag sets the optional parameter "etag": If set, the request will be
  4472  // rejected if the latest version of the workstation on the server does not
  4473  // have this ETag.
  4474  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall {
  4475  	c.urlParams_.Set("etag", etag)
  4476  	return c
  4477  }
  4478  
  4479  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  4480  // the request and preview the review, but do not actually apply it.
  4481  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall {
  4482  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  4483  	return c
  4484  }
  4485  
  4486  // Fields allows partial responses to be retrieved. See
  4487  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4488  // details.
  4489  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall {
  4490  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4491  	return c
  4492  }
  4493  
  4494  // Context sets the context to be used in this call's Do method.
  4495  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall {
  4496  	c.ctx_ = ctx
  4497  	return c
  4498  }
  4499  
  4500  // Header returns a http.Header that can be modified by the caller to add
  4501  // headers to the request.
  4502  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Header() http.Header {
  4503  	if c.header_ == nil {
  4504  		c.header_ = make(http.Header)
  4505  	}
  4506  	return c.header_
  4507  }
  4508  
  4509  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4510  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4511  	var body io.Reader = nil
  4512  	c.urlParams_.Set("alt", alt)
  4513  	c.urlParams_.Set("prettyPrint", "false")
  4514  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4515  	urls += "?" + c.urlParams_.Encode()
  4516  	req, err := http.NewRequest("DELETE", urls, body)
  4517  	if err != nil {
  4518  		return nil, err
  4519  	}
  4520  	req.Header = reqHeaders
  4521  	googleapi.Expand(req.URL, map[string]string{
  4522  		"name": c.name,
  4523  	})
  4524  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4525  }
  4526  
  4527  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete" call.
  4528  // Any non-2xx status code is an error. Response headers are in either
  4529  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4530  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4531  // whether the returned error was because http.StatusNotModified was returned.
  4532  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4533  	gensupport.SetOptions(c.urlParams_, opts...)
  4534  	res, err := c.doRequest("json")
  4535  	if res != nil && res.StatusCode == http.StatusNotModified {
  4536  		if res.Body != nil {
  4537  			res.Body.Close()
  4538  		}
  4539  		return nil, gensupport.WrapError(&googleapi.Error{
  4540  			Code:   res.StatusCode,
  4541  			Header: res.Header,
  4542  		})
  4543  	}
  4544  	if err != nil {
  4545  		return nil, err
  4546  	}
  4547  	defer googleapi.CloseBody(res)
  4548  	if err := googleapi.CheckResponse(res); err != nil {
  4549  		return nil, gensupport.WrapError(err)
  4550  	}
  4551  	ret := &Operation{
  4552  		ServerResponse: googleapi.ServerResponse{
  4553  			Header:         res.Header,
  4554  			HTTPStatusCode: res.StatusCode,
  4555  		},
  4556  	}
  4557  	target := &ret
  4558  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4559  		return nil, err
  4560  	}
  4561  	return ret, nil
  4562  }
  4563  
  4564  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall struct {
  4565  	s                          *Service
  4566  	workstation                string
  4567  	generateaccesstokenrequest *GenerateAccessTokenRequest
  4568  	urlParams_                 gensupport.URLParams
  4569  	ctx_                       context.Context
  4570  	header_                    http.Header
  4571  }
  4572  
  4573  // GenerateAccessToken: Returns a short-lived credential that can be used to
  4574  // send authenticated and authorized traffic to a workstation.
  4575  //
  4576  //   - workstation: Name of the workstation for which the access token should be
  4577  //     generated.
  4578  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GenerateAccessToken(workstation string, generateaccesstokenrequest *GenerateAccessTokenRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall {
  4579  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4580  	c.workstation = workstation
  4581  	c.generateaccesstokenrequest = generateaccesstokenrequest
  4582  	return c
  4583  }
  4584  
  4585  // Fields allows partial responses to be retrieved. See
  4586  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4587  // details.
  4588  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall {
  4589  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4590  	return c
  4591  }
  4592  
  4593  // Context sets the context to be used in this call's Do method.
  4594  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall {
  4595  	c.ctx_ = ctx
  4596  	return c
  4597  }
  4598  
  4599  // Header returns a http.Header that can be modified by the caller to add
  4600  // headers to the request.
  4601  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Header() http.Header {
  4602  	if c.header_ == nil {
  4603  		c.header_ = make(http.Header)
  4604  	}
  4605  	return c.header_
  4606  }
  4607  
  4608  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) doRequest(alt string) (*http.Response, error) {
  4609  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4610  	var body io.Reader = nil
  4611  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateaccesstokenrequest)
  4612  	if err != nil {
  4613  		return nil, err
  4614  	}
  4615  	c.urlParams_.Set("alt", alt)
  4616  	c.urlParams_.Set("prettyPrint", "false")
  4617  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+workstation}:generateAccessToken")
  4618  	urls += "?" + c.urlParams_.Encode()
  4619  	req, err := http.NewRequest("POST", urls, body)
  4620  	if err != nil {
  4621  		return nil, err
  4622  	}
  4623  	req.Header = reqHeaders
  4624  	googleapi.Expand(req.URL, map[string]string{
  4625  		"workstation": c.workstation,
  4626  	})
  4627  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4628  }
  4629  
  4630  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken" call.
  4631  // Any non-2xx status code is an error. Response headers are in either
  4632  // *GenerateAccessTokenResponse.ServerResponse.Header or (if a response was
  4633  // returned at all) in error.(*googleapi.Error).Header. Use
  4634  // googleapi.IsNotModified to check whether the returned error was because
  4635  // http.StatusNotModified was returned.
  4636  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Do(opts ...googleapi.CallOption) (*GenerateAccessTokenResponse, error) {
  4637  	gensupport.SetOptions(c.urlParams_, opts...)
  4638  	res, err := c.doRequest("json")
  4639  	if res != nil && res.StatusCode == http.StatusNotModified {
  4640  		if res.Body != nil {
  4641  			res.Body.Close()
  4642  		}
  4643  		return nil, gensupport.WrapError(&googleapi.Error{
  4644  			Code:   res.StatusCode,
  4645  			Header: res.Header,
  4646  		})
  4647  	}
  4648  	if err != nil {
  4649  		return nil, err
  4650  	}
  4651  	defer googleapi.CloseBody(res)
  4652  	if err := googleapi.CheckResponse(res); err != nil {
  4653  		return nil, gensupport.WrapError(err)
  4654  	}
  4655  	ret := &GenerateAccessTokenResponse{
  4656  		ServerResponse: googleapi.ServerResponse{
  4657  			Header:         res.Header,
  4658  			HTTPStatusCode: res.StatusCode,
  4659  		},
  4660  	}
  4661  	target := &ret
  4662  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4663  		return nil, err
  4664  	}
  4665  	return ret, nil
  4666  }
  4667  
  4668  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall struct {
  4669  	s            *Service
  4670  	name         string
  4671  	urlParams_   gensupport.URLParams
  4672  	ifNoneMatch_ string
  4673  	ctx_         context.Context
  4674  	header_      http.Header
  4675  }
  4676  
  4677  // Get: Returns the requested workstation.
  4678  //
  4679  // - name: Name of the requested resource.
  4680  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall {
  4681  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4682  	c.name = name
  4683  	return c
  4684  }
  4685  
  4686  // Fields allows partial responses to be retrieved. See
  4687  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4688  // details.
  4689  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall {
  4690  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4691  	return c
  4692  }
  4693  
  4694  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4695  // object's ETag matches the given value. This is useful for getting updates
  4696  // only after the object has changed since the last request.
  4697  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall {
  4698  	c.ifNoneMatch_ = entityTag
  4699  	return c
  4700  }
  4701  
  4702  // Context sets the context to be used in this call's Do method.
  4703  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall {
  4704  	c.ctx_ = ctx
  4705  	return c
  4706  }
  4707  
  4708  // Header returns a http.Header that can be modified by the caller to add
  4709  // headers to the request.
  4710  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Header() http.Header {
  4711  	if c.header_ == nil {
  4712  		c.header_ = make(http.Header)
  4713  	}
  4714  	return c.header_
  4715  }
  4716  
  4717  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) doRequest(alt string) (*http.Response, error) {
  4718  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4719  	if c.ifNoneMatch_ != "" {
  4720  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4721  	}
  4722  	var body io.Reader = nil
  4723  	c.urlParams_.Set("alt", alt)
  4724  	c.urlParams_.Set("prettyPrint", "false")
  4725  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4726  	urls += "?" + c.urlParams_.Encode()
  4727  	req, err := http.NewRequest("GET", urls, body)
  4728  	if err != nil {
  4729  		return nil, err
  4730  	}
  4731  	req.Header = reqHeaders
  4732  	googleapi.Expand(req.URL, map[string]string{
  4733  		"name": c.name,
  4734  	})
  4735  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4736  }
  4737  
  4738  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get" call.
  4739  // Any non-2xx status code is an error. Response headers are in either
  4740  // *Workstation.ServerResponse.Header or (if a response was returned at all) in
  4741  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4742  // whether the returned error was because http.StatusNotModified was returned.
  4743  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Do(opts ...googleapi.CallOption) (*Workstation, error) {
  4744  	gensupport.SetOptions(c.urlParams_, opts...)
  4745  	res, err := c.doRequest("json")
  4746  	if res != nil && res.StatusCode == http.StatusNotModified {
  4747  		if res.Body != nil {
  4748  			res.Body.Close()
  4749  		}
  4750  		return nil, gensupport.WrapError(&googleapi.Error{
  4751  			Code:   res.StatusCode,
  4752  			Header: res.Header,
  4753  		})
  4754  	}
  4755  	if err != nil {
  4756  		return nil, err
  4757  	}
  4758  	defer googleapi.CloseBody(res)
  4759  	if err := googleapi.CheckResponse(res); err != nil {
  4760  		return nil, gensupport.WrapError(err)
  4761  	}
  4762  	ret := &Workstation{
  4763  		ServerResponse: googleapi.ServerResponse{
  4764  			Header:         res.Header,
  4765  			HTTPStatusCode: res.StatusCode,
  4766  		},
  4767  	}
  4768  	target := &ret
  4769  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4770  		return nil, err
  4771  	}
  4772  	return ret, nil
  4773  }
  4774  
  4775  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall struct {
  4776  	s            *Service
  4777  	resource     string
  4778  	urlParams_   gensupport.URLParams
  4779  	ifNoneMatch_ string
  4780  	ctx_         context.Context
  4781  	header_      http.Header
  4782  }
  4783  
  4784  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4785  // empty policy if the resource exists and does not have a policy set.
  4786  //
  4787  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4788  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4789  //     for the appropriate value for this field.
  4790  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall {
  4791  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4792  	c.resource = resource
  4793  	return c
  4794  }
  4795  
  4796  // OptionsRequestedPolicyVersion sets the optional parameter
  4797  // "options.requestedPolicyVersion": The maximum policy version that will be
  4798  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4799  // an invalid value will be rejected. Requests for policies with any
  4800  // conditional role bindings must specify version 3. Policies with no
  4801  // conditional role bindings may specify any valid value or leave the field
  4802  // unset. The policy in the response might use the policy version that you
  4803  // specified, or it might use a lower policy version. For example, if you
  4804  // specify version 3, but the policy has no conditional role bindings, the
  4805  // response uses version 1. To learn which resources support conditions in
  4806  // their IAM policies, see the IAM documentation
  4807  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4808  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall {
  4809  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4810  	return c
  4811  }
  4812  
  4813  // Fields allows partial responses to be retrieved. See
  4814  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4815  // details.
  4816  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall {
  4817  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4818  	return c
  4819  }
  4820  
  4821  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4822  // object's ETag matches the given value. This is useful for getting updates
  4823  // only after the object has changed since the last request.
  4824  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall {
  4825  	c.ifNoneMatch_ = entityTag
  4826  	return c
  4827  }
  4828  
  4829  // Context sets the context to be used in this call's Do method.
  4830  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall {
  4831  	c.ctx_ = ctx
  4832  	return c
  4833  }
  4834  
  4835  // Header returns a http.Header that can be modified by the caller to add
  4836  // headers to the request.
  4837  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Header() http.Header {
  4838  	if c.header_ == nil {
  4839  		c.header_ = make(http.Header)
  4840  	}
  4841  	return c.header_
  4842  }
  4843  
  4844  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4845  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4846  	if c.ifNoneMatch_ != "" {
  4847  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4848  	}
  4849  	var body io.Reader = nil
  4850  	c.urlParams_.Set("alt", alt)
  4851  	c.urlParams_.Set("prettyPrint", "false")
  4852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4853  	urls += "?" + c.urlParams_.Encode()
  4854  	req, err := http.NewRequest("GET", urls, body)
  4855  	if err != nil {
  4856  		return nil, err
  4857  	}
  4858  	req.Header = reqHeaders
  4859  	googleapi.Expand(req.URL, map[string]string{
  4860  		"resource": c.resource,
  4861  	})
  4862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4863  }
  4864  
  4865  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy" call.
  4866  // Any non-2xx status code is an error. Response headers are in either
  4867  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4869  // whether the returned error was because http.StatusNotModified was returned.
  4870  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4871  	gensupport.SetOptions(c.urlParams_, opts...)
  4872  	res, err := c.doRequest("json")
  4873  	if res != nil && res.StatusCode == http.StatusNotModified {
  4874  		if res.Body != nil {
  4875  			res.Body.Close()
  4876  		}
  4877  		return nil, gensupport.WrapError(&googleapi.Error{
  4878  			Code:   res.StatusCode,
  4879  			Header: res.Header,
  4880  		})
  4881  	}
  4882  	if err != nil {
  4883  		return nil, err
  4884  	}
  4885  	defer googleapi.CloseBody(res)
  4886  	if err := googleapi.CheckResponse(res); err != nil {
  4887  		return nil, gensupport.WrapError(err)
  4888  	}
  4889  	ret := &Policy{
  4890  		ServerResponse: googleapi.ServerResponse{
  4891  			Header:         res.Header,
  4892  			HTTPStatusCode: res.StatusCode,
  4893  		},
  4894  	}
  4895  	target := &ret
  4896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4897  		return nil, err
  4898  	}
  4899  	return ret, nil
  4900  }
  4901  
  4902  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall struct {
  4903  	s            *Service
  4904  	parent       string
  4905  	urlParams_   gensupport.URLParams
  4906  	ifNoneMatch_ string
  4907  	ctx_         context.Context
  4908  	header_      http.Header
  4909  }
  4910  
  4911  // List: Returns all Workstations using the specified workstation
  4912  // configuration.
  4913  //
  4914  // - parent: Parent resource name.
  4915  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4916  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4917  	c.parent = parent
  4918  	return c
  4919  }
  4920  
  4921  // PageSize sets the optional parameter "pageSize": Maximum number of items to
  4922  // return.
  4923  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4924  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4925  	return c
  4926  }
  4927  
  4928  // PageToken sets the optional parameter "pageToken": next_page_token value
  4929  // returned from a previous List request, if any.
  4930  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4931  	c.urlParams_.Set("pageToken", pageToken)
  4932  	return c
  4933  }
  4934  
  4935  // Fields allows partial responses to be retrieved. See
  4936  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4937  // details.
  4938  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4939  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4940  	return c
  4941  }
  4942  
  4943  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4944  // object's ETag matches the given value. This is useful for getting updates
  4945  // only after the object has changed since the last request.
  4946  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4947  	c.ifNoneMatch_ = entityTag
  4948  	return c
  4949  }
  4950  
  4951  // Context sets the context to be used in this call's Do method.
  4952  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall {
  4953  	c.ctx_ = ctx
  4954  	return c
  4955  }
  4956  
  4957  // Header returns a http.Header that can be modified by the caller to add
  4958  // headers to the request.
  4959  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Header() http.Header {
  4960  	if c.header_ == nil {
  4961  		c.header_ = make(http.Header)
  4962  	}
  4963  	return c.header_
  4964  }
  4965  
  4966  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) doRequest(alt string) (*http.Response, error) {
  4967  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4968  	if c.ifNoneMatch_ != "" {
  4969  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4970  	}
  4971  	var body io.Reader = nil
  4972  	c.urlParams_.Set("alt", alt)
  4973  	c.urlParams_.Set("prettyPrint", "false")
  4974  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations")
  4975  	urls += "?" + c.urlParams_.Encode()
  4976  	req, err := http.NewRequest("GET", urls, body)
  4977  	if err != nil {
  4978  		return nil, err
  4979  	}
  4980  	req.Header = reqHeaders
  4981  	googleapi.Expand(req.URL, map[string]string{
  4982  		"parent": c.parent,
  4983  	})
  4984  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4985  }
  4986  
  4987  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list" call.
  4988  // Any non-2xx status code is an error. Response headers are in either
  4989  // *ListWorkstationsResponse.ServerResponse.Header or (if a response was
  4990  // returned at all) in error.(*googleapi.Error).Header. Use
  4991  // googleapi.IsNotModified to check whether the returned error was because
  4992  // http.StatusNotModified was returned.
  4993  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationsResponse, error) {
  4994  	gensupport.SetOptions(c.urlParams_, opts...)
  4995  	res, err := c.doRequest("json")
  4996  	if res != nil && res.StatusCode == http.StatusNotModified {
  4997  		if res.Body != nil {
  4998  			res.Body.Close()
  4999  		}
  5000  		return nil, gensupport.WrapError(&googleapi.Error{
  5001  			Code:   res.StatusCode,
  5002  			Header: res.Header,
  5003  		})
  5004  	}
  5005  	if err != nil {
  5006  		return nil, err
  5007  	}
  5008  	defer googleapi.CloseBody(res)
  5009  	if err := googleapi.CheckResponse(res); err != nil {
  5010  		return nil, gensupport.WrapError(err)
  5011  	}
  5012  	ret := &ListWorkstationsResponse{
  5013  		ServerResponse: googleapi.ServerResponse{
  5014  			Header:         res.Header,
  5015  			HTTPStatusCode: res.StatusCode,
  5016  		},
  5017  	}
  5018  	target := &ret
  5019  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5020  		return nil, err
  5021  	}
  5022  	return ret, nil
  5023  }
  5024  
  5025  // Pages invokes f for each page of results.
  5026  // A non-nil error returned from f will halt the iteration.
  5027  // The provided context supersedes any context provided to the Context method.
  5028  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Pages(ctx context.Context, f func(*ListWorkstationsResponse) error) error {
  5029  	c.ctx_ = ctx
  5030  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5031  	for {
  5032  		x, err := c.Do()
  5033  		if err != nil {
  5034  			return err
  5035  		}
  5036  		if err := f(x); err != nil {
  5037  			return err
  5038  		}
  5039  		if x.NextPageToken == "" {
  5040  			return nil
  5041  		}
  5042  		c.PageToken(x.NextPageToken)
  5043  	}
  5044  }
  5045  
  5046  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall struct {
  5047  	s            *Service
  5048  	parent       string
  5049  	urlParams_   gensupport.URLParams
  5050  	ifNoneMatch_ string
  5051  	ctx_         context.Context
  5052  	header_      http.Header
  5053  }
  5054  
  5055  // ListUsable: Returns all workstations using the specified workstation
  5056  // configuration on which the caller has the "workstations.workstations.use"
  5057  // permission.
  5058  //
  5059  // - parent: Parent resource name.
  5060  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5061  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5062  	c.parent = parent
  5063  	return c
  5064  }
  5065  
  5066  // PageSize sets the optional parameter "pageSize": Maximum number of items to
  5067  // return.
  5068  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5069  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5070  	return c
  5071  }
  5072  
  5073  // PageToken sets the optional parameter "pageToken": next_page_token value
  5074  // returned from a previous List request, if any.
  5075  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5076  	c.urlParams_.Set("pageToken", pageToken)
  5077  	return c
  5078  }
  5079  
  5080  // Fields allows partial responses to be retrieved. See
  5081  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5082  // details.
  5083  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5084  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5085  	return c
  5086  }
  5087  
  5088  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5089  // object's ETag matches the given value. This is useful for getting updates
  5090  // only after the object has changed since the last request.
  5091  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5092  	c.ifNoneMatch_ = entityTag
  5093  	return c
  5094  }
  5095  
  5096  // Context sets the context to be used in this call's Do method.
  5097  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall {
  5098  	c.ctx_ = ctx
  5099  	return c
  5100  }
  5101  
  5102  // Header returns a http.Header that can be modified by the caller to add
  5103  // headers to the request.
  5104  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Header() http.Header {
  5105  	if c.header_ == nil {
  5106  		c.header_ = make(http.Header)
  5107  	}
  5108  	return c.header_
  5109  }
  5110  
  5111  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) doRequest(alt string) (*http.Response, error) {
  5112  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5113  	if c.ifNoneMatch_ != "" {
  5114  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5115  	}
  5116  	var body io.Reader = nil
  5117  	c.urlParams_.Set("alt", alt)
  5118  	c.urlParams_.Set("prettyPrint", "false")
  5119  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations:listUsable")
  5120  	urls += "?" + c.urlParams_.Encode()
  5121  	req, err := http.NewRequest("GET", urls, body)
  5122  	if err != nil {
  5123  		return nil, err
  5124  	}
  5125  	req.Header = reqHeaders
  5126  	googleapi.Expand(req.URL, map[string]string{
  5127  		"parent": c.parent,
  5128  	})
  5129  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5130  }
  5131  
  5132  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable" call.
  5133  // Any non-2xx status code is an error. Response headers are in either
  5134  // *ListUsableWorkstationsResponse.ServerResponse.Header or (if a response was
  5135  // returned at all) in error.(*googleapi.Error).Header. Use
  5136  // googleapi.IsNotModified to check whether the returned error was because
  5137  // http.StatusNotModified was returned.
  5138  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationsResponse, error) {
  5139  	gensupport.SetOptions(c.urlParams_, opts...)
  5140  	res, err := c.doRequest("json")
  5141  	if res != nil && res.StatusCode == http.StatusNotModified {
  5142  		if res.Body != nil {
  5143  			res.Body.Close()
  5144  		}
  5145  		return nil, gensupport.WrapError(&googleapi.Error{
  5146  			Code:   res.StatusCode,
  5147  			Header: res.Header,
  5148  		})
  5149  	}
  5150  	if err != nil {
  5151  		return nil, err
  5152  	}
  5153  	defer googleapi.CloseBody(res)
  5154  	if err := googleapi.CheckResponse(res); err != nil {
  5155  		return nil, gensupport.WrapError(err)
  5156  	}
  5157  	ret := &ListUsableWorkstationsResponse{
  5158  		ServerResponse: googleapi.ServerResponse{
  5159  			Header:         res.Header,
  5160  			HTTPStatusCode: res.StatusCode,
  5161  		},
  5162  	}
  5163  	target := &ret
  5164  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5165  		return nil, err
  5166  	}
  5167  	return ret, nil
  5168  }
  5169  
  5170  // Pages invokes f for each page of results.
  5171  // A non-nil error returned from f will halt the iteration.
  5172  // The provided context supersedes any context provided to the Context method.
  5173  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationsResponse) error) error {
  5174  	c.ctx_ = ctx
  5175  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5176  	for {
  5177  		x, err := c.Do()
  5178  		if err != nil {
  5179  			return err
  5180  		}
  5181  		if err := f(x); err != nil {
  5182  			return err
  5183  		}
  5184  		if x.NextPageToken == "" {
  5185  			return nil
  5186  		}
  5187  		c.PageToken(x.NextPageToken)
  5188  	}
  5189  }
  5190  
  5191  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall struct {
  5192  	s           *Service
  5193  	name        string
  5194  	workstation *Workstation
  5195  	urlParams_  gensupport.URLParams
  5196  	ctx_        context.Context
  5197  	header_     http.Header
  5198  }
  5199  
  5200  // Patch: Updates an existing workstation.
  5201  //
  5202  // - name: Identifier. Full name of this workstation.
  5203  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Patch(name string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5204  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5205  	c.name = name
  5206  	c.workstation = workstation
  5207  	return c
  5208  }
  5209  
  5210  // AllowMissing sets the optional parameter "allowMissing": If set and the
  5211  // workstation configuration is not found, a new workstation configuration is
  5212  // created. In this situation, update_mask is ignored.
  5213  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5214  	c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
  5215  	return c
  5216  }
  5217  
  5218  // UpdateMask sets the optional parameter "updateMask": Required. Mask
  5219  // specifying which fields in the workstation configuration should be updated.
  5220  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5221  	c.urlParams_.Set("updateMask", updateMask)
  5222  	return c
  5223  }
  5224  
  5225  // ValidateOnly sets the optional parameter "validateOnly": If set, validate
  5226  // the request and preview the review, but do not actually apply it.
  5227  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5228  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  5229  	return c
  5230  }
  5231  
  5232  // Fields allows partial responses to be retrieved. See
  5233  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5234  // details.
  5235  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5236  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5237  	return c
  5238  }
  5239  
  5240  // Context sets the context to be used in this call's Do method.
  5241  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall {
  5242  	c.ctx_ = ctx
  5243  	return c
  5244  }
  5245  
  5246  // Header returns a http.Header that can be modified by the caller to add
  5247  // headers to the request.
  5248  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Header() http.Header {
  5249  	if c.header_ == nil {
  5250  		c.header_ = make(http.Header)
  5251  	}
  5252  	return c.header_
  5253  }
  5254  
  5255  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) doRequest(alt string) (*http.Response, error) {
  5256  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5257  	var body io.Reader = nil
  5258  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation)
  5259  	if err != nil {
  5260  		return nil, err
  5261  	}
  5262  	c.urlParams_.Set("alt", alt)
  5263  	c.urlParams_.Set("prettyPrint", "false")
  5264  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5265  	urls += "?" + c.urlParams_.Encode()
  5266  	req, err := http.NewRequest("PATCH", urls, body)
  5267  	if err != nil {
  5268  		return nil, err
  5269  	}
  5270  	req.Header = reqHeaders
  5271  	googleapi.Expand(req.URL, map[string]string{
  5272  		"name": c.name,
  5273  	})
  5274  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5275  }
  5276  
  5277  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch" call.
  5278  // Any non-2xx status code is an error. Response headers are in either
  5279  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5280  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5281  // whether the returned error was because http.StatusNotModified was returned.
  5282  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5283  	gensupport.SetOptions(c.urlParams_, opts...)
  5284  	res, err := c.doRequest("json")
  5285  	if res != nil && res.StatusCode == http.StatusNotModified {
  5286  		if res.Body != nil {
  5287  			res.Body.Close()
  5288  		}
  5289  		return nil, gensupport.WrapError(&googleapi.Error{
  5290  			Code:   res.StatusCode,
  5291  			Header: res.Header,
  5292  		})
  5293  	}
  5294  	if err != nil {
  5295  		return nil, err
  5296  	}
  5297  	defer googleapi.CloseBody(res)
  5298  	if err := googleapi.CheckResponse(res); err != nil {
  5299  		return nil, gensupport.WrapError(err)
  5300  	}
  5301  	ret := &Operation{
  5302  		ServerResponse: googleapi.ServerResponse{
  5303  			Header:         res.Header,
  5304  			HTTPStatusCode: res.StatusCode,
  5305  		},
  5306  	}
  5307  	target := &ret
  5308  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5309  		return nil, err
  5310  	}
  5311  	return ret, nil
  5312  }
  5313  
  5314  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall struct {
  5315  	s                   *Service
  5316  	resource            string
  5317  	setiampolicyrequest *SetIamPolicyRequest
  5318  	urlParams_          gensupport.URLParams
  5319  	ctx_                context.Context
  5320  	header_             http.Header
  5321  }
  5322  
  5323  // SetIamPolicy: Sets the access control policy on the specified resource.
  5324  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5325  // and `PERMISSION_DENIED` errors.
  5326  //
  5327  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5328  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5329  //     for the appropriate value for this field.
  5330  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall {
  5331  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5332  	c.resource = resource
  5333  	c.setiampolicyrequest = setiampolicyrequest
  5334  	return c
  5335  }
  5336  
  5337  // Fields allows partial responses to be retrieved. See
  5338  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5339  // details.
  5340  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall {
  5341  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5342  	return c
  5343  }
  5344  
  5345  // Context sets the context to be used in this call's Do method.
  5346  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall {
  5347  	c.ctx_ = ctx
  5348  	return c
  5349  }
  5350  
  5351  // Header returns a http.Header that can be modified by the caller to add
  5352  // headers to the request.
  5353  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Header() http.Header {
  5354  	if c.header_ == nil {
  5355  		c.header_ = make(http.Header)
  5356  	}
  5357  	return c.header_
  5358  }
  5359  
  5360  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5361  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5362  	var body io.Reader = nil
  5363  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5364  	if err != nil {
  5365  		return nil, err
  5366  	}
  5367  	c.urlParams_.Set("alt", alt)
  5368  	c.urlParams_.Set("prettyPrint", "false")
  5369  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5370  	urls += "?" + c.urlParams_.Encode()
  5371  	req, err := http.NewRequest("POST", urls, body)
  5372  	if err != nil {
  5373  		return nil, err
  5374  	}
  5375  	req.Header = reqHeaders
  5376  	googleapi.Expand(req.URL, map[string]string{
  5377  		"resource": c.resource,
  5378  	})
  5379  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5380  }
  5381  
  5382  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy" call.
  5383  // Any non-2xx status code is an error. Response headers are in either
  5384  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5385  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5386  // whether the returned error was because http.StatusNotModified was returned.
  5387  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5388  	gensupport.SetOptions(c.urlParams_, opts...)
  5389  	res, err := c.doRequest("json")
  5390  	if res != nil && res.StatusCode == http.StatusNotModified {
  5391  		if res.Body != nil {
  5392  			res.Body.Close()
  5393  		}
  5394  		return nil, gensupport.WrapError(&googleapi.Error{
  5395  			Code:   res.StatusCode,
  5396  			Header: res.Header,
  5397  		})
  5398  	}
  5399  	if err != nil {
  5400  		return nil, err
  5401  	}
  5402  	defer googleapi.CloseBody(res)
  5403  	if err := googleapi.CheckResponse(res); err != nil {
  5404  		return nil, gensupport.WrapError(err)
  5405  	}
  5406  	ret := &Policy{
  5407  		ServerResponse: googleapi.ServerResponse{
  5408  			Header:         res.Header,
  5409  			HTTPStatusCode: res.StatusCode,
  5410  		},
  5411  	}
  5412  	target := &ret
  5413  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5414  		return nil, err
  5415  	}
  5416  	return ret, nil
  5417  }
  5418  
  5419  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall struct {
  5420  	s                       *Service
  5421  	name                    string
  5422  	startworkstationrequest *StartWorkstationRequest
  5423  	urlParams_              gensupport.URLParams
  5424  	ctx_                    context.Context
  5425  	header_                 http.Header
  5426  }
  5427  
  5428  // Start: Starts running a workstation so that users can connect to it.
  5429  //
  5430  // - name: Name of the workstation to start.
  5431  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Start(name string, startworkstationrequest *StartWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall {
  5432  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5433  	c.name = name
  5434  	c.startworkstationrequest = startworkstationrequest
  5435  	return c
  5436  }
  5437  
  5438  // Fields allows partial responses to be retrieved. See
  5439  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5440  // details.
  5441  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall {
  5442  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5443  	return c
  5444  }
  5445  
  5446  // Context sets the context to be used in this call's Do method.
  5447  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall {
  5448  	c.ctx_ = ctx
  5449  	return c
  5450  }
  5451  
  5452  // Header returns a http.Header that can be modified by the caller to add
  5453  // headers to the request.
  5454  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Header() http.Header {
  5455  	if c.header_ == nil {
  5456  		c.header_ = make(http.Header)
  5457  	}
  5458  	return c.header_
  5459  }
  5460  
  5461  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) doRequest(alt string) (*http.Response, error) {
  5462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5463  	var body io.Reader = nil
  5464  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startworkstationrequest)
  5465  	if err != nil {
  5466  		return nil, err
  5467  	}
  5468  	c.urlParams_.Set("alt", alt)
  5469  	c.urlParams_.Set("prettyPrint", "false")
  5470  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start")
  5471  	urls += "?" + c.urlParams_.Encode()
  5472  	req, err := http.NewRequest("POST", urls, body)
  5473  	if err != nil {
  5474  		return nil, err
  5475  	}
  5476  	req.Header = reqHeaders
  5477  	googleapi.Expand(req.URL, map[string]string{
  5478  		"name": c.name,
  5479  	})
  5480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5481  }
  5482  
  5483  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start" call.
  5484  // Any non-2xx status code is an error. Response headers are in either
  5485  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5486  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5487  // whether the returned error was because http.StatusNotModified was returned.
  5488  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5489  	gensupport.SetOptions(c.urlParams_, opts...)
  5490  	res, err := c.doRequest("json")
  5491  	if res != nil && res.StatusCode == http.StatusNotModified {
  5492  		if res.Body != nil {
  5493  			res.Body.Close()
  5494  		}
  5495  		return nil, gensupport.WrapError(&googleapi.Error{
  5496  			Code:   res.StatusCode,
  5497  			Header: res.Header,
  5498  		})
  5499  	}
  5500  	if err != nil {
  5501  		return nil, err
  5502  	}
  5503  	defer googleapi.CloseBody(res)
  5504  	if err := googleapi.CheckResponse(res); err != nil {
  5505  		return nil, gensupport.WrapError(err)
  5506  	}
  5507  	ret := &Operation{
  5508  		ServerResponse: googleapi.ServerResponse{
  5509  			Header:         res.Header,
  5510  			HTTPStatusCode: res.StatusCode,
  5511  		},
  5512  	}
  5513  	target := &ret
  5514  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5515  		return nil, err
  5516  	}
  5517  	return ret, nil
  5518  }
  5519  
  5520  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall struct {
  5521  	s                      *Service
  5522  	name                   string
  5523  	stopworkstationrequest *StopWorkstationRequest
  5524  	urlParams_             gensupport.URLParams
  5525  	ctx_                   context.Context
  5526  	header_                http.Header
  5527  }
  5528  
  5529  // Stop: Stops running a workstation, reducing costs.
  5530  //
  5531  // - name: Name of the workstation to stop.
  5532  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Stop(name string, stopworkstationrequest *StopWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall {
  5533  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5534  	c.name = name
  5535  	c.stopworkstationrequest = stopworkstationrequest
  5536  	return c
  5537  }
  5538  
  5539  // Fields allows partial responses to be retrieved. See
  5540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5541  // details.
  5542  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall {
  5543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5544  	return c
  5545  }
  5546  
  5547  // Context sets the context to be used in this call's Do method.
  5548  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall {
  5549  	c.ctx_ = ctx
  5550  	return c
  5551  }
  5552  
  5553  // Header returns a http.Header that can be modified by the caller to add
  5554  // headers to the request.
  5555  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Header() http.Header {
  5556  	if c.header_ == nil {
  5557  		c.header_ = make(http.Header)
  5558  	}
  5559  	return c.header_
  5560  }
  5561  
  5562  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) doRequest(alt string) (*http.Response, error) {
  5563  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5564  	var body io.Reader = nil
  5565  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopworkstationrequest)
  5566  	if err != nil {
  5567  		return nil, err
  5568  	}
  5569  	c.urlParams_.Set("alt", alt)
  5570  	c.urlParams_.Set("prettyPrint", "false")
  5571  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop")
  5572  	urls += "?" + c.urlParams_.Encode()
  5573  	req, err := http.NewRequest("POST", urls, body)
  5574  	if err != nil {
  5575  		return nil, err
  5576  	}
  5577  	req.Header = reqHeaders
  5578  	googleapi.Expand(req.URL, map[string]string{
  5579  		"name": c.name,
  5580  	})
  5581  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5582  }
  5583  
  5584  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop" call.
  5585  // Any non-2xx status code is an error. Response headers are in either
  5586  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5587  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5588  // whether the returned error was because http.StatusNotModified was returned.
  5589  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5590  	gensupport.SetOptions(c.urlParams_, opts...)
  5591  	res, err := c.doRequest("json")
  5592  	if res != nil && res.StatusCode == http.StatusNotModified {
  5593  		if res.Body != nil {
  5594  			res.Body.Close()
  5595  		}
  5596  		return nil, gensupport.WrapError(&googleapi.Error{
  5597  			Code:   res.StatusCode,
  5598  			Header: res.Header,
  5599  		})
  5600  	}
  5601  	if err != nil {
  5602  		return nil, err
  5603  	}
  5604  	defer googleapi.CloseBody(res)
  5605  	if err := googleapi.CheckResponse(res); err != nil {
  5606  		return nil, gensupport.WrapError(err)
  5607  	}
  5608  	ret := &Operation{
  5609  		ServerResponse: googleapi.ServerResponse{
  5610  			Header:         res.Header,
  5611  			HTTPStatusCode: res.StatusCode,
  5612  		},
  5613  	}
  5614  	target := &ret
  5615  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5616  		return nil, err
  5617  	}
  5618  	return ret, nil
  5619  }
  5620  
  5621  type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall struct {
  5622  	s                         *Service
  5623  	resource                  string
  5624  	testiampermissionsrequest *TestIamPermissionsRequest
  5625  	urlParams_                gensupport.URLParams
  5626  	ctx_                      context.Context
  5627  	header_                   http.Header
  5628  }
  5629  
  5630  // TestIamPermissions: Returns permissions that a caller has on the specified
  5631  // resource. If the resource does not exist, this will return an empty set of
  5632  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5633  // used for building permission-aware UIs and command-line tools, not for
  5634  // authorization checking. This operation may "fail open" without warning.
  5635  //
  5636  //   - resource: REQUIRED: The resource for which the policy detail is being
  5637  //     requested. See Resource names
  5638  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5639  //     value for this field.
  5640  func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall {
  5641  	c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5642  	c.resource = resource
  5643  	c.testiampermissionsrequest = testiampermissionsrequest
  5644  	return c
  5645  }
  5646  
  5647  // Fields allows partial responses to be retrieved. See
  5648  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5649  // details.
  5650  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall {
  5651  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5652  	return c
  5653  }
  5654  
  5655  // Context sets the context to be used in this call's Do method.
  5656  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall {
  5657  	c.ctx_ = ctx
  5658  	return c
  5659  }
  5660  
  5661  // Header returns a http.Header that can be modified by the caller to add
  5662  // headers to the request.
  5663  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Header() http.Header {
  5664  	if c.header_ == nil {
  5665  		c.header_ = make(http.Header)
  5666  	}
  5667  	return c.header_
  5668  }
  5669  
  5670  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5671  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5672  	var body io.Reader = nil
  5673  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5674  	if err != nil {
  5675  		return nil, err
  5676  	}
  5677  	c.urlParams_.Set("alt", alt)
  5678  	c.urlParams_.Set("prettyPrint", "false")
  5679  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5680  	urls += "?" + c.urlParams_.Encode()
  5681  	req, err := http.NewRequest("POST", urls, body)
  5682  	if err != nil {
  5683  		return nil, err
  5684  	}
  5685  	req.Header = reqHeaders
  5686  	googleapi.Expand(req.URL, map[string]string{
  5687  		"resource": c.resource,
  5688  	})
  5689  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5690  }
  5691  
  5692  // Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions" call.
  5693  // Any non-2xx status code is an error. Response headers are in either
  5694  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5695  // returned at all) in error.(*googleapi.Error).Header. Use
  5696  // googleapi.IsNotModified to check whether the returned error was because
  5697  // http.StatusNotModified was returned.
  5698  func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5699  	gensupport.SetOptions(c.urlParams_, opts...)
  5700  	res, err := c.doRequest("json")
  5701  	if res != nil && res.StatusCode == http.StatusNotModified {
  5702  		if res.Body != nil {
  5703  			res.Body.Close()
  5704  		}
  5705  		return nil, gensupport.WrapError(&googleapi.Error{
  5706  			Code:   res.StatusCode,
  5707  			Header: res.Header,
  5708  		})
  5709  	}
  5710  	if err != nil {
  5711  		return nil, err
  5712  	}
  5713  	defer googleapi.CloseBody(res)
  5714  	if err := googleapi.CheckResponse(res); err != nil {
  5715  		return nil, gensupport.WrapError(err)
  5716  	}
  5717  	ret := &TestIamPermissionsResponse{
  5718  		ServerResponse: googleapi.ServerResponse{
  5719  			Header:         res.Header,
  5720  			HTTPStatusCode: res.StatusCode,
  5721  		},
  5722  	}
  5723  	target := &ret
  5724  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5725  		return nil, err
  5726  	}
  5727  	return ret, nil
  5728  }
  5729  

View as plain text