...

Source file src/google.golang.org/api/apphub/v1alpha/apphub-gen.go

Documentation: google.golang.org/api/apphub/v1alpha

     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 apphub provides access to the App Hub API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/app-hub/docs/
    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/apphub/v1alpha"
    27  //	...
    28  //	ctx := context.Background()
    29  //	apphubService, err := apphub.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  //	apphubService, err := apphub.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  //	apphubService, err := apphub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package apphub // import "google.golang.org/api/apphub/v1alpha"
    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 = "apphub:v1alpha"
    90  const apiName = "apphub"
    91  const apiVersion = "v1alpha"
    92  const basePath = "https://apphub.googleapis.com/"
    93  const basePathTemplate = "https://apphub.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://apphub.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 APIService.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, 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 APIService. 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) (*APIService, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &APIService{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type APIService 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 *APIService) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *APIService) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *APIService
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Applications = NewProjectsLocationsApplicationsService(s)
   172  	rs.DiscoveredServices = NewProjectsLocationsDiscoveredServicesService(s)
   173  	rs.DiscoveredWorkloads = NewProjectsLocationsDiscoveredWorkloadsService(s)
   174  	rs.Operations = NewProjectsLocationsOperationsService(s)
   175  	rs.ServiceProjectAttachments = NewProjectsLocationsServiceProjectAttachmentsService(s)
   176  	return rs
   177  }
   178  
   179  type ProjectsLocationsService struct {
   180  	s *APIService
   181  
   182  	Applications *ProjectsLocationsApplicationsService
   183  
   184  	DiscoveredServices *ProjectsLocationsDiscoveredServicesService
   185  
   186  	DiscoveredWorkloads *ProjectsLocationsDiscoveredWorkloadsService
   187  
   188  	Operations *ProjectsLocationsOperationsService
   189  
   190  	ServiceProjectAttachments *ProjectsLocationsServiceProjectAttachmentsService
   191  }
   192  
   193  func NewProjectsLocationsApplicationsService(s *APIService) *ProjectsLocationsApplicationsService {
   194  	rs := &ProjectsLocationsApplicationsService{s: s}
   195  	rs.Services = NewProjectsLocationsApplicationsServicesService(s)
   196  	rs.Workloads = NewProjectsLocationsApplicationsWorkloadsService(s)
   197  	return rs
   198  }
   199  
   200  type ProjectsLocationsApplicationsService struct {
   201  	s *APIService
   202  
   203  	Services *ProjectsLocationsApplicationsServicesService
   204  
   205  	Workloads *ProjectsLocationsApplicationsWorkloadsService
   206  }
   207  
   208  func NewProjectsLocationsApplicationsServicesService(s *APIService) *ProjectsLocationsApplicationsServicesService {
   209  	rs := &ProjectsLocationsApplicationsServicesService{s: s}
   210  	return rs
   211  }
   212  
   213  type ProjectsLocationsApplicationsServicesService struct {
   214  	s *APIService
   215  }
   216  
   217  func NewProjectsLocationsApplicationsWorkloadsService(s *APIService) *ProjectsLocationsApplicationsWorkloadsService {
   218  	rs := &ProjectsLocationsApplicationsWorkloadsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsApplicationsWorkloadsService struct {
   223  	s *APIService
   224  }
   225  
   226  func NewProjectsLocationsDiscoveredServicesService(s *APIService) *ProjectsLocationsDiscoveredServicesService {
   227  	rs := &ProjectsLocationsDiscoveredServicesService{s: s}
   228  	return rs
   229  }
   230  
   231  type ProjectsLocationsDiscoveredServicesService struct {
   232  	s *APIService
   233  }
   234  
   235  func NewProjectsLocationsDiscoveredWorkloadsService(s *APIService) *ProjectsLocationsDiscoveredWorkloadsService {
   236  	rs := &ProjectsLocationsDiscoveredWorkloadsService{s: s}
   237  	return rs
   238  }
   239  
   240  type ProjectsLocationsDiscoveredWorkloadsService struct {
   241  	s *APIService
   242  }
   243  
   244  func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService {
   245  	rs := &ProjectsLocationsOperationsService{s: s}
   246  	return rs
   247  }
   248  
   249  type ProjectsLocationsOperationsService struct {
   250  	s *APIService
   251  }
   252  
   253  func NewProjectsLocationsServiceProjectAttachmentsService(s *APIService) *ProjectsLocationsServiceProjectAttachmentsService {
   254  	rs := &ProjectsLocationsServiceProjectAttachmentsService{s: s}
   255  	return rs
   256  }
   257  
   258  type ProjectsLocationsServiceProjectAttachmentsService struct {
   259  	s *APIService
   260  }
   261  
   262  // Application: Application defines the governance boundary for App Hub
   263  // Entities that perform a logical end-to-end business function. App Hub
   264  // supports application level IAM permission to align with governance
   265  // requirements.
   266  type Application struct {
   267  	// Attributes: Optional. Consumer provided attributes.
   268  	Attributes *Attributes `json:"attributes,omitempty"`
   269  	// CreateTime: Output only. Create time.
   270  	CreateTime string `json:"createTime,omitempty"`
   271  	// Description: Optional. User-defined description of an Application. Can have
   272  	// a maximum length of 2048 characters.
   273  	Description string `json:"description,omitempty"`
   274  	// DisplayName: Optional. User-defined name for the Application. Can have a
   275  	// maximum length of 63 characters.
   276  	DisplayName string `json:"displayName,omitempty"`
   277  	// Name: Identifier. The resource name of an Application. Format:
   278  	// "projects/{host-project-id}/locations/{location}/applications/{application-id
   279  	// }"
   280  	Name string `json:"name,omitempty"`
   281  	// Scope: Required. Immutable. Defines what data can be included into this
   282  	// Application. Limits which Services and Workloads can be registered.
   283  	Scope *Scope `json:"scope,omitempty"`
   284  	// State: Output only. Application state.
   285  	//
   286  	// Possible values:
   287  	//   "STATE_UNSPECIFIED" - Unspecified state.
   288  	//   "CREATING" - The Application is being created.
   289  	//   "ACTIVE" - The Application is ready to register Services and Workloads.
   290  	//   "DELETING" - The Application is being deleted.
   291  	State string `json:"state,omitempty"`
   292  	// Uid: Output only. A universally unique identifier (in UUID4 format) for the
   293  	// `Application`.
   294  	Uid string `json:"uid,omitempty"`
   295  	// UpdateTime: Output only. Update time.
   296  	UpdateTime string `json:"updateTime,omitempty"`
   297  
   298  	// ServerResponse contains the HTTP response code and headers from the server.
   299  	googleapi.ServerResponse `json:"-"`
   300  	// ForceSendFields is a list of field names (e.g. "Attributes") to
   301  	// unconditionally include in API requests. By default, fields with empty or
   302  	// default values are omitted from API requests. See
   303  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   304  	// details.
   305  	ForceSendFields []string `json:"-"`
   306  	// NullFields is a list of field names (e.g. "Attributes") to include in API
   307  	// requests with the JSON null value. By default, fields with empty values are
   308  	// omitted from API requests. See
   309  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   310  	NullFields []string `json:"-"`
   311  }
   312  
   313  func (s *Application) MarshalJSON() ([]byte, error) {
   314  	type NoMethod Application
   315  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   316  }
   317  
   318  // Attributes: Consumer provided attributes.
   319  type Attributes struct {
   320  	// BusinessOwners: Optional. Business team that ensures user needs are met and
   321  	// value is delivered
   322  	BusinessOwners []*ContactInfo `json:"businessOwners,omitempty"`
   323  	// Criticality: Optional. User-defined criticality information.
   324  	Criticality *Criticality `json:"criticality,omitempty"`
   325  	// DeveloperOwners: Optional. Developer team that owns development and coding.
   326  	DeveloperOwners []*ContactInfo `json:"developerOwners,omitempty"`
   327  	// Environment: Optional. User-defined environment information.
   328  	Environment *Environment `json:"environment,omitempty"`
   329  	// OperatorOwners: Optional. Operator team that ensures runtime and operations.
   330  	OperatorOwners []*ContactInfo `json:"operatorOwners,omitempty"`
   331  	// ForceSendFields is a list of field names (e.g. "BusinessOwners") to
   332  	// unconditionally include in API requests. By default, fields with empty or
   333  	// default values are omitted from API requests. See
   334  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   335  	// details.
   336  	ForceSendFields []string `json:"-"`
   337  	// NullFields is a list of field names (e.g. "BusinessOwners") to include in
   338  	// API requests with the JSON null value. By default, fields with empty values
   339  	// are omitted from API requests. See
   340  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   341  	NullFields []string `json:"-"`
   342  }
   343  
   344  func (s *Attributes) MarshalJSON() ([]byte, error) {
   345  	type NoMethod Attributes
   346  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   347  }
   348  
   349  // AuditConfig: Specifies the audit configuration for a service. The
   350  // configuration determines which permission types are logged, and what
   351  // identities, if any, are exempted from logging. An AuditConfig must have one
   352  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   353  // and a specific service, the union of the two AuditConfigs is used for that
   354  // service: the log_types specified in each AuditConfig are enabled, and the
   355  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   356  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   357  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   358  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   359  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   360  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   361  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   362  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   363  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   364  // `aliya@example.com` from DATA_WRITE logging.
   365  type AuditConfig struct {
   366  	// AuditLogConfigs: The configuration for logging of each type of permission.
   367  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   368  	// Service: Specifies a service that will be enabled for audit logging. For
   369  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   370  	// is a special value that covers all services.
   371  	Service string `json:"service,omitempty"`
   372  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   373  	// unconditionally include in API requests. By default, fields with empty or
   374  	// default values are omitted from API requests. See
   375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   376  	// details.
   377  	ForceSendFields []string `json:"-"`
   378  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   379  	// API requests with the JSON null value. By default, fields with empty values
   380  	// are omitted from API requests. See
   381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   382  	NullFields []string `json:"-"`
   383  }
   384  
   385  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   386  	type NoMethod AuditConfig
   387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   388  }
   389  
   390  // AuditLogConfig: Provides the configuration for logging a type of
   391  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   392  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   393  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   394  // exempting jose@example.com from DATA_READ logging.
   395  type AuditLogConfig struct {
   396  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   397  	// type of permission. Follows the same format of Binding.members.
   398  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   399  	// LogType: The log type that this config enables.
   400  	//
   401  	// Possible values:
   402  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   403  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   404  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   405  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   406  	LogType string `json:"logType,omitempty"`
   407  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   408  	// unconditionally include in API requests. By default, fields with empty or
   409  	// default values are omitted from API requests. See
   410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   411  	// details.
   412  	ForceSendFields []string `json:"-"`
   413  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   414  	// API requests with the JSON null value. By default, fields with empty values
   415  	// are omitted from API requests. See
   416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   417  	NullFields []string `json:"-"`
   418  }
   419  
   420  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   421  	type NoMethod AuditLogConfig
   422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   423  }
   424  
   425  // Binding: Associates `members`, or principals, with a `role`.
   426  type Binding struct {
   427  	// Condition: The condition that is associated with this binding. If the
   428  	// condition evaluates to `true`, then this binding applies to the current
   429  	// request. If the condition evaluates to `false`, then this binding does not
   430  	// apply to the current request. However, a different role binding might grant
   431  	// the same role to one or more of the principals in this binding. To learn
   432  	// which resources support conditions in their IAM policies, see the IAM
   433  	// documentation
   434  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   435  	Condition *Expr `json:"condition,omitempty"`
   436  	// Members: Specifies the principals requesting access for a Google Cloud
   437  	// resource. `members` can have the following values: * `allUsers`: A special
   438  	// identifier that represents anyone who is on the internet; with or without a
   439  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   440  	// represents anyone who is authenticated with a Google account or a service
   441  	// account. Does not include identities that come from external identity
   442  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   443  	// address that represents a specific Google account. For example,
   444  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   445  	// represents a Google service account. For example,
   446  	// `my-other-app@appspot.gserviceaccount.com`. *
   447  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   448  	// identifier for a Kubernetes service account
   449  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   450  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   451  	// `group:{emailid}`: An email address that represents a Google group. For
   452  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   453  	// (primary) that represents all the users of that domain. For example,
   454  	// `google.com` or `example.com`. *
   455  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   456  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   457  	// pool. *
   458  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   459  	// group/{group_id}`: All workforce identities in a group. *
   460  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   461  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   462  	// a specific attribute value. *
   463  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   464  	// *`: All identities in a workforce identity pool. *
   465  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   466  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   467  	// identity in a workload identity pool. *
   468  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   469  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   470  	// group. *
   471  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   472  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   473  	// `: All identities in a workload identity pool with a certain attribute. *
   474  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   475  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   476  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   477  	// unique identifier) representing a user that has been recently deleted. For
   478  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   479  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   480  	// retains the role in the binding. *
   481  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   482  	// unique identifier) representing a service account that has been recently
   483  	// deleted. For example,
   484  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   485  	// service account is undeleted, this value reverts to
   486  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   487  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   488  	// address (plus unique identifier) representing a Google group that has been
   489  	// recently deleted. For example,
   490  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   491  	// this value reverts to `group:{emailid}` and the recovered group retains the
   492  	// role in the binding. *
   493  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   494  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   495  	// workforce identity pool. For example,
   496  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   497  	// ol-id/subject/my-subject-attribute-value`.
   498  	Members []string `json:"members,omitempty"`
   499  	// Role: Role that is assigned to the list of `members`, or principals. For
   500  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   501  	// of the IAM roles and permissions, see the IAM documentation
   502  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   503  	// available pre-defined roles, see here
   504  	// (https://cloud.google.com/iam/docs/understanding-roles).
   505  	Role string `json:"role,omitempty"`
   506  	// ForceSendFields is a list of field names (e.g. "Condition") to
   507  	// unconditionally include in API requests. By default, fields with empty or
   508  	// default values are omitted from API requests. See
   509  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   510  	// details.
   511  	ForceSendFields []string `json:"-"`
   512  	// NullFields is a list of field names (e.g. "Condition") to include in API
   513  	// requests with the JSON null value. By default, fields with empty values are
   514  	// omitted from API requests. See
   515  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   516  	NullFields []string `json:"-"`
   517  }
   518  
   519  func (s *Binding) MarshalJSON() ([]byte, error) {
   520  	type NoMethod Binding
   521  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   522  }
   523  
   524  // CancelOperationRequest: The request message for Operations.CancelOperation.
   525  type CancelOperationRequest struct {
   526  }
   527  
   528  // Channel: Separate message to accommodate custom formats across IRC and
   529  // Slack.
   530  type Channel struct {
   531  	// Uri: Required. URI of the channel.
   532  	Uri string `json:"uri,omitempty"`
   533  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
   534  	// include in API requests. By default, fields with empty or default values are
   535  	// omitted from API requests. See
   536  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   537  	// details.
   538  	ForceSendFields []string `json:"-"`
   539  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
   540  	// with the JSON null value. By default, fields with empty values are omitted
   541  	// from API requests. See
   542  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   543  	NullFields []string `json:"-"`
   544  }
   545  
   546  func (s *Channel) MarshalJSON() ([]byte, error) {
   547  	type NoMethod Channel
   548  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   549  }
   550  
   551  // ContactInfo: Contact information of stakeholders.
   552  type ContactInfo struct {
   553  	// Channel: Optional. Communication channel of the contacts.
   554  	Channel *Channel `json:"channel,omitempty"`
   555  	// DisplayName: Optional. Contact's name. Can have a maximum length of 63
   556  	// characters.
   557  	DisplayName string `json:"displayName,omitempty"`
   558  	// Email: Required. Email address of the contacts.
   559  	Email string `json:"email,omitempty"`
   560  	// ForceSendFields is a list of field names (e.g. "Channel") to unconditionally
   561  	// include in API requests. By default, fields with empty or default values are
   562  	// omitted from API requests. See
   563  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   564  	// details.
   565  	ForceSendFields []string `json:"-"`
   566  	// NullFields is a list of field names (e.g. "Channel") to include in API
   567  	// requests with the JSON null value. By default, fields with empty values are
   568  	// omitted from API requests. See
   569  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   570  	NullFields []string `json:"-"`
   571  }
   572  
   573  func (s *ContactInfo) MarshalJSON() ([]byte, error) {
   574  	type NoMethod ContactInfo
   575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   576  }
   577  
   578  // Criticality: Criticality of the Application, Service, or Workload
   579  type Criticality struct {
   580  	// Level: Optional. Criticality level. Can contain only lowercase letters,
   581  	// numeric characters, underscores, and dashes. Can have a maximum length of 63
   582  	// characters. Deprecated: Please refer to type instead.
   583  	Level string `json:"level,omitempty"`
   584  	// MissionCritical: Optional. Indicates mission-critical Application, Service,
   585  	// or Workload. Deprecated: Please refer to type instead.
   586  	MissionCritical bool `json:"missionCritical,omitempty"`
   587  	// Type: Required. Criticality Type.
   588  	//
   589  	// Possible values:
   590  	//   "TYPE_UNSPECIFIED" - Unspecified type.
   591  	//   "MISSION_CRITICAL" - Mission critical service, application or workload.
   592  	//   "HIGH" - High impact.
   593  	//   "MEDIUM" - Medium impact.
   594  	//   "LOW" - Low impact.
   595  	Type string `json:"type,omitempty"`
   596  	// ForceSendFields is a list of field names (e.g. "Level") to unconditionally
   597  	// include in API requests. By default, fields with empty or default values are
   598  	// omitted from API requests. See
   599  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   600  	// details.
   601  	ForceSendFields []string `json:"-"`
   602  	// NullFields is a list of field names (e.g. "Level") to include in API
   603  	// requests with the JSON null value. By default, fields with empty values are
   604  	// omitted from API requests. See
   605  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   606  	NullFields []string `json:"-"`
   607  }
   608  
   609  func (s *Criticality) MarshalJSON() ([]byte, error) {
   610  	type NoMethod Criticality
   611  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   612  }
   613  
   614  // DetachServiceProjectAttachmentRequest: Request for
   615  // DetachServiceProjectAttachment.
   616  type DetachServiceProjectAttachmentRequest struct {
   617  }
   618  
   619  // DetachServiceProjectAttachmentResponse: Response for
   620  // DetachServiceProjectAttachment.
   621  type DetachServiceProjectAttachmentResponse struct {
   622  	// ServerResponse contains the HTTP response code and headers from the server.
   623  	googleapi.ServerResponse `json:"-"`
   624  }
   625  
   626  // DiscoveredService: DiscoveredService is a network/api interface that exposes
   627  // some functionality to clients for consumption over the network. A discovered
   628  // service can be registered to a App Hub service.
   629  type DiscoveredService struct {
   630  	// Name: Identifier. The resource name of the discovered service. Format:
   631  	// "projects/{host-project-id}/locations/{location}/discoveredServices/{uuid}""
   632  	Name string `json:"name,omitempty"`
   633  	// ServiceProperties: Output only. Properties of an underlying compute resource
   634  	// that can comprise a Service. These are immutable.
   635  	ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"`
   636  	// ServiceReference: Output only. Reference to an underlying networking
   637  	// resource that can comprise a Service. These are immutable.
   638  	ServiceReference *ServiceReference `json:"serviceReference,omitempty"`
   639  
   640  	// ServerResponse contains the HTTP response code and headers from the server.
   641  	googleapi.ServerResponse `json:"-"`
   642  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   643  	// include in API requests. By default, fields with empty or default values are
   644  	// omitted from API requests. See
   645  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   646  	// details.
   647  	ForceSendFields []string `json:"-"`
   648  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   649  	// with the JSON null value. By default, fields with empty values are omitted
   650  	// from API requests. See
   651  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   652  	NullFields []string `json:"-"`
   653  }
   654  
   655  func (s *DiscoveredService) MarshalJSON() ([]byte, error) {
   656  	type NoMethod DiscoveredService
   657  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   658  }
   659  
   660  // DiscoveredWorkload: DiscoveredWorkload is a binary deployment (such as
   661  // managed instance groups (MIGs) and GKE deployments) that performs the
   662  // smallest logical subset of business functionality. A discovered workload can
   663  // be registered to an App Hub Workload.
   664  type DiscoveredWorkload struct {
   665  	// Name: Identifier. The resource name of the discovered workload. Format:
   666  	// "projects/{host-project-id}/locations/{location}/discoveredWorkloads/{uuid}"
   667  	Name string `json:"name,omitempty"`
   668  	// WorkloadProperties: Output only. Properties of an underlying compute
   669  	// resource represented by the Workload. These are immutable.
   670  	WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"`
   671  	// WorkloadReference: Output only. Reference of an underlying compute resource
   672  	// represented by the Workload. These are immutable.
   673  	WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"`
   674  
   675  	// ServerResponse contains the HTTP response code and headers from the server.
   676  	googleapi.ServerResponse `json:"-"`
   677  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   678  	// include in API requests. By default, fields with empty or default values are
   679  	// omitted from API requests. See
   680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   681  	// details.
   682  	ForceSendFields []string `json:"-"`
   683  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   684  	// with the JSON null value. By default, fields with empty values are omitted
   685  	// from API requests. See
   686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   687  	NullFields []string `json:"-"`
   688  }
   689  
   690  func (s *DiscoveredWorkload) MarshalJSON() ([]byte, error) {
   691  	type NoMethod DiscoveredWorkload
   692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   693  }
   694  
   695  // Empty: A generic empty message that you can re-use to avoid defining
   696  // duplicated empty messages in your APIs. A typical example is to use it as
   697  // the request or the response type of an API method. For instance: service Foo
   698  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   699  type Empty struct {
   700  	// ServerResponse contains the HTTP response code and headers from the server.
   701  	googleapi.ServerResponse `json:"-"`
   702  }
   703  
   704  // Environment: Environment of the Application, Service, or Workload
   705  type Environment struct {
   706  	// Environment: Optional. Environment name. Can contain only lowercase letters,
   707  	// numeric characters, underscores, and dashes. Can have a maximum length of 63
   708  	// characters. Deprecated: Please refer to type instead.
   709  	Environment string `json:"environment,omitempty"`
   710  	// Type: Required. Environment Type.
   711  	//
   712  	// Possible values:
   713  	//   "TYPE_UNSPECIFIED" - Unspecified type.
   714  	//   "PRODUCTION" - Production environment.
   715  	//   "STAGING" - Staging environment.
   716  	//   "TEST" - Test environment.
   717  	//   "DEVELOPMENT" - Development environment.
   718  	Type string `json:"type,omitempty"`
   719  	// ForceSendFields is a list of field names (e.g. "Environment") to
   720  	// unconditionally include in API requests. By default, fields with empty or
   721  	// default values are omitted from API requests. See
   722  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   723  	// details.
   724  	ForceSendFields []string `json:"-"`
   725  	// NullFields is a list of field names (e.g. "Environment") to include in API
   726  	// requests with the JSON null value. By default, fields with empty values are
   727  	// omitted from API requests. See
   728  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   729  	NullFields []string `json:"-"`
   730  }
   731  
   732  func (s *Environment) MarshalJSON() ([]byte, error) {
   733  	type NoMethod Environment
   734  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   735  }
   736  
   737  // Expr: Represents a textual expression in the Common Expression Language
   738  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   739  // of CEL are documented at https://github.com/google/cel-spec. Example
   740  // (Comparison): title: "Summary size limit" description: "Determines if a
   741  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   742  // Example (Equality): title: "Requestor is owner" description: "Determines if
   743  // requestor is the document owner" expression: "document.owner ==
   744  // request.auth.claims.email" Example (Logic): title: "Public documents"
   745  // description: "Determine whether the document should be publicly visible"
   746  // expression: "document.type != 'private' && document.type != 'internal'"
   747  // Example (Data Manipulation): title: "Notification string" description:
   748  // "Create a notification string with a timestamp." expression: "'New message
   749  // received at ' + string(document.create_time)" The exact variables and
   750  // functions that may be referenced within an expression are determined by the
   751  // service that evaluates it. See the service documentation for additional
   752  // information.
   753  type Expr struct {
   754  	// Description: Optional. Description of the expression. This is a longer text
   755  	// which describes the expression, e.g. when hovered over it in a UI.
   756  	Description string `json:"description,omitempty"`
   757  	// Expression: Textual representation of an expression in Common Expression
   758  	// Language syntax.
   759  	Expression string `json:"expression,omitempty"`
   760  	// Location: Optional. String indicating the location of the expression for
   761  	// error reporting, e.g. a file name and a position in the file.
   762  	Location string `json:"location,omitempty"`
   763  	// Title: Optional. Title for the expression, i.e. a short string describing
   764  	// its purpose. This can be used e.g. in UIs which allow to enter the
   765  	// expression.
   766  	Title string `json:"title,omitempty"`
   767  	// ForceSendFields is a list of field names (e.g. "Description") to
   768  	// unconditionally include in API requests. By default, fields with empty or
   769  	// default values are omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   771  	// details.
   772  	ForceSendFields []string `json:"-"`
   773  	// NullFields is a list of field names (e.g. "Description") to include in API
   774  	// requests with the JSON null value. By default, fields with empty values are
   775  	// omitted from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   777  	NullFields []string `json:"-"`
   778  }
   779  
   780  func (s *Expr) MarshalJSON() ([]byte, error) {
   781  	type NoMethod Expr
   782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   783  }
   784  
   785  // FindUnregisteredServicesResponse: Response for FindUnregisteredServices.
   786  type FindUnregisteredServicesResponse struct {
   787  	// DiscoveredServices: List of Discovered Services.
   788  	DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"`
   789  	// NextPageToken: A token identifying a page of results the server should
   790  	// return.
   791  	NextPageToken string `json:"nextPageToken,omitempty"`
   792  	// Unreachable: Locations that could not be reached.
   793  	Unreachable []string `json:"unreachable,omitempty"`
   794  
   795  	// ServerResponse contains the HTTP response code and headers from the server.
   796  	googleapi.ServerResponse `json:"-"`
   797  	// ForceSendFields is a list of field names (e.g. "DiscoveredServices") to
   798  	// unconditionally include in API requests. By default, fields with empty or
   799  	// default values are omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   801  	// details.
   802  	ForceSendFields []string `json:"-"`
   803  	// NullFields is a list of field names (e.g. "DiscoveredServices") to include
   804  	// in API requests with the JSON null value. By default, fields with empty
   805  	// values are omitted from API requests. See
   806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   807  	NullFields []string `json:"-"`
   808  }
   809  
   810  func (s *FindUnregisteredServicesResponse) MarshalJSON() ([]byte, error) {
   811  	type NoMethod FindUnregisteredServicesResponse
   812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   813  }
   814  
   815  // FindUnregisteredWorkloadsResponse: Response for FindUnregisteredWorkloads.
   816  type FindUnregisteredWorkloadsResponse struct {
   817  	// DiscoveredWorkloads: List of Discovered Workloads.
   818  	DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,omitempty"`
   819  	// NextPageToken: A token identifying a page of results the server should
   820  	// return.
   821  	NextPageToken string `json:"nextPageToken,omitempty"`
   822  	// Unreachable: Locations that could not be reached.
   823  	Unreachable []string `json:"unreachable,omitempty"`
   824  
   825  	// ServerResponse contains the HTTP response code and headers from the server.
   826  	googleapi.ServerResponse `json:"-"`
   827  	// ForceSendFields is a list of field names (e.g. "DiscoveredWorkloads") to
   828  	// unconditionally include in API requests. By default, fields with empty or
   829  	// default values are omitted from API requests. See
   830  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   831  	// details.
   832  	ForceSendFields []string `json:"-"`
   833  	// NullFields is a list of field names (e.g. "DiscoveredWorkloads") to include
   834  	// in API requests with the JSON null value. By default, fields with empty
   835  	// values are omitted from API requests. See
   836  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   837  	NullFields []string `json:"-"`
   838  }
   839  
   840  func (s *FindUnregisteredWorkloadsResponse) MarshalJSON() ([]byte, error) {
   841  	type NoMethod FindUnregisteredWorkloadsResponse
   842  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   843  }
   844  
   845  // ListApplicationsResponse: Response for ListApplications.
   846  type ListApplicationsResponse struct {
   847  	// Applications: List of Applications.
   848  	Applications []*Application `json:"applications,omitempty"`
   849  	// NextPageToken: A token identifying a page of results the server should
   850  	// return.
   851  	NextPageToken string `json:"nextPageToken,omitempty"`
   852  	// Unreachable: Locations that could not be reached.
   853  	Unreachable []string `json:"unreachable,omitempty"`
   854  
   855  	// ServerResponse contains the HTTP response code and headers from the server.
   856  	googleapi.ServerResponse `json:"-"`
   857  	// ForceSendFields is a list of field names (e.g. "Applications") to
   858  	// unconditionally include in API requests. By default, fields with empty or
   859  	// default values are omitted from API requests. See
   860  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   861  	// details.
   862  	ForceSendFields []string `json:"-"`
   863  	// NullFields is a list of field names (e.g. "Applications") to include in API
   864  	// requests with the JSON null value. By default, fields with empty values are
   865  	// omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   867  	NullFields []string `json:"-"`
   868  }
   869  
   870  func (s *ListApplicationsResponse) MarshalJSON() ([]byte, error) {
   871  	type NoMethod ListApplicationsResponse
   872  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   873  }
   874  
   875  // ListDiscoveredServicesResponse: Response for ListDiscoveredServices.
   876  type ListDiscoveredServicesResponse struct {
   877  	// DiscoveredServices: List of Discovered Services.
   878  	DiscoveredServices []*DiscoveredService `json:"discoveredServices,omitempty"`
   879  	// NextPageToken: A token identifying a page of results the server should
   880  	// return.
   881  	NextPageToken string `json:"nextPageToken,omitempty"`
   882  	// Unreachable: Locations that could not be reached.
   883  	Unreachable []string `json:"unreachable,omitempty"`
   884  
   885  	// ServerResponse contains the HTTP response code and headers from the server.
   886  	googleapi.ServerResponse `json:"-"`
   887  	// ForceSendFields is a list of field names (e.g. "DiscoveredServices") to
   888  	// unconditionally include in API requests. By default, fields with empty or
   889  	// default values are omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   891  	// details.
   892  	ForceSendFields []string `json:"-"`
   893  	// NullFields is a list of field names (e.g. "DiscoveredServices") to include
   894  	// in API requests with the JSON null value. By default, fields with empty
   895  	// values are omitted from API requests. See
   896  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   897  	NullFields []string `json:"-"`
   898  }
   899  
   900  func (s *ListDiscoveredServicesResponse) MarshalJSON() ([]byte, error) {
   901  	type NoMethod ListDiscoveredServicesResponse
   902  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   903  }
   904  
   905  // ListDiscoveredWorkloadsResponse: Response for ListDiscoveredWorkloads.
   906  type ListDiscoveredWorkloadsResponse struct {
   907  	// DiscoveredWorkloads: List of Discovered Workloads.
   908  	DiscoveredWorkloads []*DiscoveredWorkload `json:"discoveredWorkloads,omitempty"`
   909  	// NextPageToken: A token identifying a page of results the server should
   910  	// return.
   911  	NextPageToken string `json:"nextPageToken,omitempty"`
   912  	// Unreachable: Locations that could not be reached.
   913  	Unreachable []string `json:"unreachable,omitempty"`
   914  
   915  	// ServerResponse contains the HTTP response code and headers from the server.
   916  	googleapi.ServerResponse `json:"-"`
   917  	// ForceSendFields is a list of field names (e.g. "DiscoveredWorkloads") to
   918  	// unconditionally include in API requests. By default, fields with empty or
   919  	// default values are omitted from API requests. See
   920  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   921  	// details.
   922  	ForceSendFields []string `json:"-"`
   923  	// NullFields is a list of field names (e.g. "DiscoveredWorkloads") to include
   924  	// in API requests with the JSON null value. By default, fields with empty
   925  	// values are omitted from API requests. See
   926  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   927  	NullFields []string `json:"-"`
   928  }
   929  
   930  func (s *ListDiscoveredWorkloadsResponse) MarshalJSON() ([]byte, error) {
   931  	type NoMethod ListDiscoveredWorkloadsResponse
   932  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   933  }
   934  
   935  // ListLocationsResponse: The response message for Locations.ListLocations.
   936  type ListLocationsResponse struct {
   937  	// Locations: A list of locations that matches the specified filter in the
   938  	// request.
   939  	Locations []*Location `json:"locations,omitempty"`
   940  	// NextPageToken: The standard List next-page token.
   941  	NextPageToken string `json:"nextPageToken,omitempty"`
   942  
   943  	// ServerResponse contains the HTTP response code and headers from the server.
   944  	googleapi.ServerResponse `json:"-"`
   945  	// ForceSendFields is a list of field names (e.g. "Locations") to
   946  	// unconditionally include in API requests. By default, fields with empty or
   947  	// default values are omitted from API requests. See
   948  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   949  	// details.
   950  	ForceSendFields []string `json:"-"`
   951  	// NullFields is a list of field names (e.g. "Locations") to include in API
   952  	// requests with the JSON null value. By default, fields with empty values are
   953  	// omitted from API requests. See
   954  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   955  	NullFields []string `json:"-"`
   956  }
   957  
   958  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   959  	type NoMethod ListLocationsResponse
   960  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   961  }
   962  
   963  // ListOperationsResponse: The response message for Operations.ListOperations.
   964  type ListOperationsResponse struct {
   965  	// NextPageToken: The standard List next-page token.
   966  	NextPageToken string `json:"nextPageToken,omitempty"`
   967  	// Operations: A list of operations that matches the specified filter in the
   968  	// request.
   969  	Operations []*Operation `json:"operations,omitempty"`
   970  
   971  	// ServerResponse contains the HTTP response code and headers from the server.
   972  	googleapi.ServerResponse `json:"-"`
   973  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   974  	// unconditionally include in API requests. By default, fields with empty or
   975  	// default values are omitted from API requests. See
   976  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   977  	// details.
   978  	ForceSendFields []string `json:"-"`
   979  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   980  	// requests with the JSON null value. By default, fields with empty values are
   981  	// omitted from API requests. See
   982  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   983  	NullFields []string `json:"-"`
   984  }
   985  
   986  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   987  	type NoMethod ListOperationsResponse
   988  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   989  }
   990  
   991  // ListServiceProjectAttachmentsResponse: Response for
   992  // ListServiceProjectAttachments.
   993  type ListServiceProjectAttachmentsResponse struct {
   994  	// NextPageToken: A token identifying a page of results the server should
   995  	// return.
   996  	NextPageToken string `json:"nextPageToken,omitempty"`
   997  	// ServiceProjectAttachments: List of service project attachments.
   998  	ServiceProjectAttachments []*ServiceProjectAttachment `json:"serviceProjectAttachments,omitempty"`
   999  	// Unreachable: Locations that could not be reached.
  1000  	Unreachable []string `json:"unreachable,omitempty"`
  1001  
  1002  	// ServerResponse contains the HTTP response code and headers from the server.
  1003  	googleapi.ServerResponse `json:"-"`
  1004  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1005  	// unconditionally include in API requests. By default, fields with empty or
  1006  	// default values are omitted from API requests. See
  1007  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1008  	// details.
  1009  	ForceSendFields []string `json:"-"`
  1010  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1011  	// requests with the JSON null value. By default, fields with empty values are
  1012  	// omitted from API requests. See
  1013  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1014  	NullFields []string `json:"-"`
  1015  }
  1016  
  1017  func (s *ListServiceProjectAttachmentsResponse) MarshalJSON() ([]byte, error) {
  1018  	type NoMethod ListServiceProjectAttachmentsResponse
  1019  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1020  }
  1021  
  1022  // ListServicesResponse: Response for ListServices.
  1023  type ListServicesResponse struct {
  1024  	// NextPageToken: A token identifying a page of results the server should
  1025  	// return.
  1026  	NextPageToken string `json:"nextPageToken,omitempty"`
  1027  	// Services: List of Services.
  1028  	Services []*Service `json:"services,omitempty"`
  1029  	// Unreachable: Locations that could not be reached.
  1030  	Unreachable []string `json:"unreachable,omitempty"`
  1031  
  1032  	// ServerResponse contains the HTTP response code and headers from the server.
  1033  	googleapi.ServerResponse `json:"-"`
  1034  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1035  	// unconditionally include in API requests. By default, fields with empty or
  1036  	// default values are omitted from API requests. See
  1037  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1038  	// details.
  1039  	ForceSendFields []string `json:"-"`
  1040  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1041  	// requests with the JSON null value. By default, fields with empty values are
  1042  	// omitted from API requests. See
  1043  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1044  	NullFields []string `json:"-"`
  1045  }
  1046  
  1047  func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1048  	type NoMethod ListServicesResponse
  1049  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1050  }
  1051  
  1052  // ListWorkloadsResponse: Response for ListWorkloads.
  1053  type ListWorkloadsResponse struct {
  1054  	// NextPageToken: A token identifying a page of results the server should
  1055  	// return.
  1056  	NextPageToken string `json:"nextPageToken,omitempty"`
  1057  	// Unreachable: Locations that could not be reached.
  1058  	Unreachable []string `json:"unreachable,omitempty"`
  1059  	// Workloads: List of Workloads.
  1060  	Workloads []*Workload `json:"workloads,omitempty"`
  1061  
  1062  	// ServerResponse contains the HTTP response code and headers from the server.
  1063  	googleapi.ServerResponse `json:"-"`
  1064  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1065  	// unconditionally include in API requests. By default, fields with empty or
  1066  	// default values are omitted from API requests. See
  1067  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1068  	// details.
  1069  	ForceSendFields []string `json:"-"`
  1070  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1071  	// requests with the JSON null value. By default, fields with empty values are
  1072  	// omitted from API requests. See
  1073  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1074  	NullFields []string `json:"-"`
  1075  }
  1076  
  1077  func (s *ListWorkloadsResponse) MarshalJSON() ([]byte, error) {
  1078  	type NoMethod ListWorkloadsResponse
  1079  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1080  }
  1081  
  1082  // Location: A resource that represents a Google Cloud location.
  1083  type Location struct {
  1084  	// DisplayName: The friendly name for this location, typically a nearby city
  1085  	// name. For example, "Tokyo".
  1086  	DisplayName string `json:"displayName,omitempty"`
  1087  	// Labels: Cross-service attributes for the location. For example
  1088  	// {"cloud.googleapis.com/region": "us-east1"}
  1089  	Labels map[string]string `json:"labels,omitempty"`
  1090  	// LocationId: The canonical id for this location. For example: "us-east1".
  1091  	LocationId string `json:"locationId,omitempty"`
  1092  	// Metadata: Service-specific metadata. For example the available capacity at
  1093  	// the given location.
  1094  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1095  	// Name: Resource name for the location, which may vary between
  1096  	// implementations. For example:
  1097  	// "projects/example-project/locations/us-east1"
  1098  	Name string `json:"name,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. "DisplayName") 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. "DisplayName") 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 *Location) MarshalJSON() ([]byte, error) {
  1116  	type NoMethod Location
  1117  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1118  }
  1119  
  1120  // LookupDiscoveredServiceResponse: Response for LookupDiscoveredService.
  1121  type LookupDiscoveredServiceResponse struct {
  1122  	// DiscoveredService: Discovered Service if exists, empty otherwise.
  1123  	DiscoveredService *DiscoveredService `json:"discoveredService,omitempty"`
  1124  
  1125  	// ServerResponse contains the HTTP response code and headers from the server.
  1126  	googleapi.ServerResponse `json:"-"`
  1127  	// ForceSendFields is a list of field names (e.g. "DiscoveredService") to
  1128  	// unconditionally include in API requests. By default, fields with empty or
  1129  	// default values are omitted from API requests. See
  1130  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1131  	// details.
  1132  	ForceSendFields []string `json:"-"`
  1133  	// NullFields is a list of field names (e.g. "DiscoveredService") to include in
  1134  	// API requests with the JSON null value. By default, fields with empty values
  1135  	// are omitted from API requests. See
  1136  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1137  	NullFields []string `json:"-"`
  1138  }
  1139  
  1140  func (s *LookupDiscoveredServiceResponse) MarshalJSON() ([]byte, error) {
  1141  	type NoMethod LookupDiscoveredServiceResponse
  1142  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1143  }
  1144  
  1145  // LookupDiscoveredWorkloadResponse: Response for LookupDiscoveredWorkload.
  1146  type LookupDiscoveredWorkloadResponse struct {
  1147  	// DiscoveredWorkload: Discovered Workload if exists, empty otherwise.
  1148  	DiscoveredWorkload *DiscoveredWorkload `json:"discoveredWorkload,omitempty"`
  1149  
  1150  	// ServerResponse contains the HTTP response code and headers from the server.
  1151  	googleapi.ServerResponse `json:"-"`
  1152  	// ForceSendFields is a list of field names (e.g. "DiscoveredWorkload") to
  1153  	// unconditionally include in API requests. By default, fields with empty or
  1154  	// default values are omitted from API requests. See
  1155  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1156  	// details.
  1157  	ForceSendFields []string `json:"-"`
  1158  	// NullFields is a list of field names (e.g. "DiscoveredWorkload") to include
  1159  	// in API requests with the JSON null value. By default, fields with empty
  1160  	// values are omitted from API requests. See
  1161  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1162  	NullFields []string `json:"-"`
  1163  }
  1164  
  1165  func (s *LookupDiscoveredWorkloadResponse) MarshalJSON() ([]byte, error) {
  1166  	type NoMethod LookupDiscoveredWorkloadResponse
  1167  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1168  }
  1169  
  1170  // LookupServiceProjectAttachmentResponse: Response for
  1171  // LookupServiceProjectAttachment.
  1172  type LookupServiceProjectAttachmentResponse struct {
  1173  	// ServiceProjectAttachment: Service project attachment for a project if
  1174  	// exists, empty otherwise.
  1175  	ServiceProjectAttachment *ServiceProjectAttachment `json:"serviceProjectAttachment,omitempty"`
  1176  
  1177  	// ServerResponse contains the HTTP response code and headers from the server.
  1178  	googleapi.ServerResponse `json:"-"`
  1179  	// ForceSendFields is a list of field names (e.g. "ServiceProjectAttachment")
  1180  	// to unconditionally include in API requests. By default, fields with empty or
  1181  	// default values are omitted from API requests. See
  1182  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1183  	// details.
  1184  	ForceSendFields []string `json:"-"`
  1185  	// NullFields is a list of field names (e.g. "ServiceProjectAttachment") to
  1186  	// include in API requests with the JSON null value. By default, fields with
  1187  	// empty values are omitted from API requests. See
  1188  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1189  	NullFields []string `json:"-"`
  1190  }
  1191  
  1192  func (s *LookupServiceProjectAttachmentResponse) MarshalJSON() ([]byte, error) {
  1193  	type NoMethod LookupServiceProjectAttachmentResponse
  1194  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1195  }
  1196  
  1197  // Operation: This resource represents a long-running operation that is the
  1198  // result of a network API call.
  1199  type Operation struct {
  1200  	// Done: If the value is `false`, it means the operation is still in progress.
  1201  	// If `true`, the operation is completed, and either `error` or `response` is
  1202  	// available.
  1203  	Done bool `json:"done,omitempty"`
  1204  	// Error: The error result of the operation in case of failure or cancellation.
  1205  	Error *Status `json:"error,omitempty"`
  1206  	// Metadata: Service-specific metadata associated with the operation. It
  1207  	// typically contains progress information and common metadata such as create
  1208  	// time. Some services might not provide such metadata. Any method that returns
  1209  	// a long-running operation should document the metadata type, if any.
  1210  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1211  	// Name: The server-assigned name, which is only unique within the same service
  1212  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1213  	// should be a resource name ending with `operations/{unique_id}`.
  1214  	Name string `json:"name,omitempty"`
  1215  	// Response: The normal, successful response of the operation. If the original
  1216  	// method returns no data on success, such as `Delete`, the response is
  1217  	// `google.protobuf.Empty`. If the original method is standard
  1218  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1219  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1220  	// original method name. For example, if the original method name is
  1221  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1222  	Response googleapi.RawMessage `json:"response,omitempty"`
  1223  
  1224  	// ServerResponse contains the HTTP response code and headers from the server.
  1225  	googleapi.ServerResponse `json:"-"`
  1226  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1227  	// include in API requests. By default, fields with empty or default values are
  1228  	// omitted from API requests. See
  1229  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1230  	// details.
  1231  	ForceSendFields []string `json:"-"`
  1232  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1233  	// with the JSON null value. By default, fields with empty values are omitted
  1234  	// from API requests. See
  1235  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1236  	NullFields []string `json:"-"`
  1237  }
  1238  
  1239  func (s *Operation) MarshalJSON() ([]byte, error) {
  1240  	type NoMethod Operation
  1241  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1242  }
  1243  
  1244  // OperationMetadata: Represents the metadata of the long-running operation.
  1245  type OperationMetadata struct {
  1246  	// ApiVersion: Output only. API version used to start the operation.
  1247  	ApiVersion string `json:"apiVersion,omitempty"`
  1248  	// CreateTime: Output only. The time the operation was created.
  1249  	CreateTime string `json:"createTime,omitempty"`
  1250  	// EndTime: Output only. The time the operation finished running.
  1251  	EndTime string `json:"endTime,omitempty"`
  1252  	// RequestedCancellation: Output only. Identifies whether the user has
  1253  	// requested cancellation of the operation. Operations that have been cancelled
  1254  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
  1255  	// corresponding to `Code.CANCELLED`.
  1256  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1257  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1258  	StatusMessage string `json:"statusMessage,omitempty"`
  1259  	// Target: Output only. Server-defined resource path for the target of the
  1260  	// operation.
  1261  	Target string `json:"target,omitempty"`
  1262  	// Verb: Output only. Name of the verb executed by the operation.
  1263  	Verb string `json:"verb,omitempty"`
  1264  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1265  	// unconditionally include in API requests. By default, fields with empty or
  1266  	// default values are omitted from API requests. See
  1267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1268  	// details.
  1269  	ForceSendFields []string `json:"-"`
  1270  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1271  	// requests with the JSON null value. By default, fields with empty values are
  1272  	// omitted from API requests. See
  1273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1274  	NullFields []string `json:"-"`
  1275  }
  1276  
  1277  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1278  	type NoMethod OperationMetadata
  1279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1280  }
  1281  
  1282  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1283  // access controls for Google Cloud resources. A `Policy` is a collection of
  1284  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1285  // single `role`. Principals can be user accounts, service accounts, Google
  1286  // groups, and domains (such as G Suite). A `role` is a named list of
  1287  // permissions; each `role` can be an IAM predefined role or a user-created
  1288  // custom role. For some types of Google Cloud resources, a `binding` can also
  1289  // specify a `condition`, which is a logical expression that allows access to a
  1290  // resource only if the expression evaluates to `true`. A condition can add
  1291  // constraints based on attributes of the request, the resource, or both. To
  1292  // learn which resources support conditions in their IAM policies, see the IAM
  1293  // documentation
  1294  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1295  // example:** ``` { "bindings": [ { "role":
  1296  // "roles/resourcemanager.organizationAdmin", "members": [
  1297  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1298  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1299  // "roles/resourcemanager.organizationViewer", "members": [
  1300  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1301  // "description": "Does not grant access after Sep 2020", "expression":
  1302  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1303  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1304  // members: - user:mike@example.com - group:admins@example.com -
  1305  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1306  // role: roles/resourcemanager.organizationAdmin - members: -
  1307  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1308  // condition: title: expirable access description: Does not grant access after
  1309  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1310  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1311  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1312  type Policy struct {
  1313  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1314  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1315  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1316  	// Optionally, may specify a `condition` that determines how and when the
  1317  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1318  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1319  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1320  	// principal counts towards these limits. For example, if the `bindings` grant
  1321  	// 50 different roles to `user:alice@example.com`, and not to any other
  1322  	// principal, then you can add another 1,450 principals to the `bindings` in
  1323  	// the `Policy`.
  1324  	Bindings []*Binding `json:"bindings,omitempty"`
  1325  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1326  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1327  	// strongly suggested that systems make use of the `etag` in the
  1328  	// read-modify-write cycle to perform policy updates in order to avoid race
  1329  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1330  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1331  	// ensure that their change will be applied to the same version of the policy.
  1332  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1333  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1334  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1335  	// the conditions in the version `3` policy are lost.
  1336  	Etag string `json:"etag,omitempty"`
  1337  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1338  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1339  	// affects conditional role bindings must specify version `3`. This requirement
  1340  	// applies to the following operations: * Getting a policy that includes a
  1341  	// conditional role binding * Adding a conditional role binding to a policy *
  1342  	// Changing a conditional role binding in a policy * Removing any role binding,
  1343  	// with or without a condition, from a policy that includes conditions
  1344  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1345  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1346  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1347  	// the conditions in the version `3` policy are lost. If a policy does not
  1348  	// include any conditions, operations on that policy may specify any valid
  1349  	// version or leave the field unset. To learn which resources support
  1350  	// conditions in their IAM policies, see the IAM documentation
  1351  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1352  	Version int64 `json:"version,omitempty"`
  1353  
  1354  	// ServerResponse contains the HTTP response code and headers from the server.
  1355  	googleapi.ServerResponse `json:"-"`
  1356  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1357  	// unconditionally include in API requests. By default, fields with empty or
  1358  	// default values are omitted from API requests. See
  1359  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1360  	// details.
  1361  	ForceSendFields []string `json:"-"`
  1362  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1363  	// requests with the JSON null value. By default, fields with empty values are
  1364  	// omitted from API requests. See
  1365  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1366  	NullFields []string `json:"-"`
  1367  }
  1368  
  1369  func (s *Policy) MarshalJSON() ([]byte, error) {
  1370  	type NoMethod Policy
  1371  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1372  }
  1373  
  1374  // Scope: Scope of an application.
  1375  type Scope struct {
  1376  	// Type: Required. Scope Type.
  1377  	//
  1378  	// Possible values:
  1379  	//   "TYPE_UNSPECIFIED" - Unspecified type.
  1380  	//   "REGIONAL" - Regional type.
  1381  	Type string `json:"type,omitempty"`
  1382  	// ForceSendFields is a list of field names (e.g. "Type") to unconditionally
  1383  	// include in API requests. By default, fields with empty or default values are
  1384  	// omitted from API requests. See
  1385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1386  	// details.
  1387  	ForceSendFields []string `json:"-"`
  1388  	// NullFields is a list of field names (e.g. "Type") to include in API requests
  1389  	// with the JSON null value. By default, fields with empty values are omitted
  1390  	// from API requests. See
  1391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1392  	NullFields []string `json:"-"`
  1393  }
  1394  
  1395  func (s *Scope) MarshalJSON() ([]byte, error) {
  1396  	type NoMethod Scope
  1397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1398  }
  1399  
  1400  // Service: Service is an App Hub data model that contains a discovered
  1401  // service, which represents a network/api interface that exposes some
  1402  // functionality to clients for consumption over the network.
  1403  type Service struct {
  1404  	// Attributes: Optional. Consumer provided attributes.
  1405  	Attributes *Attributes `json:"attributes,omitempty"`
  1406  	// CreateTime: Output only. Create time.
  1407  	CreateTime string `json:"createTime,omitempty"`
  1408  	// Description: Optional. User-defined description of a Service. Can have a
  1409  	// maximum length of 2048 characters.
  1410  	Description string `json:"description,omitempty"`
  1411  	// DiscoveredService: Required. Immutable. The resource name of the original
  1412  	// discovered service.
  1413  	DiscoveredService string `json:"discoveredService,omitempty"`
  1414  	// DisplayName: Optional. User-defined name for the Service. Can have a maximum
  1415  	// length of 63 characters.
  1416  	DisplayName string `json:"displayName,omitempty"`
  1417  	// Name: Identifier. The resource name of a Service. Format:
  1418  	// "projects/{host-project-id}/locations/{location}/applications/{application-id
  1419  	// }/services/{service-id}"
  1420  	Name string `json:"name,omitempty"`
  1421  	// ServiceProperties: Output only. Properties of an underlying compute resource
  1422  	// that can comprise a Service. These are immutable.
  1423  	ServiceProperties *ServiceProperties `json:"serviceProperties,omitempty"`
  1424  	// ServiceReference: Output only. Reference to an underlying networking
  1425  	// resource that can comprise a Service. These are immutable.
  1426  	ServiceReference *ServiceReference `json:"serviceReference,omitempty"`
  1427  	// State: Output only. Service state.
  1428  	//
  1429  	// Possible values:
  1430  	//   "STATE_UNSPECIFIED" - Unspecified state.
  1431  	//   "CREATING" - The service is being created.
  1432  	//   "ACTIVE" - The service is ready.
  1433  	//   "DELETING" - The service is being deleted.
  1434  	//   "DETACHED" - The underlying networking resources have been deleted.
  1435  	State string `json:"state,omitempty"`
  1436  	// Uid: Output only. A universally unique identifier (UUID) for the `Service`
  1437  	// in the UUID4 format.
  1438  	Uid string `json:"uid,omitempty"`
  1439  	// UpdateTime: Output only. Update time.
  1440  	UpdateTime string `json:"updateTime,omitempty"`
  1441  
  1442  	// ServerResponse contains the HTTP response code and headers from the server.
  1443  	googleapi.ServerResponse `json:"-"`
  1444  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  1445  	// unconditionally include in API requests. By default, fields with empty or
  1446  	// default values are omitted from API requests. See
  1447  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1448  	// details.
  1449  	ForceSendFields []string `json:"-"`
  1450  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  1451  	// requests with the JSON null value. By default, fields with empty values are
  1452  	// omitted from API requests. See
  1453  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1454  	NullFields []string `json:"-"`
  1455  }
  1456  
  1457  func (s *Service) MarshalJSON() ([]byte, error) {
  1458  	type NoMethod Service
  1459  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1460  }
  1461  
  1462  // ServiceProjectAttachment: ServiceProjectAttachment represents an attachment
  1463  // from a service project to a host project. Service projects contain the
  1464  // underlying cloud infrastructure resources, and expose these resources to the
  1465  // host project through a ServiceProjectAttachment. With the attachments, the
  1466  // host project can provide an aggregated view of resources across all service
  1467  // projects.
  1468  type ServiceProjectAttachment struct {
  1469  	// CreateTime: Output only. Create time.
  1470  	CreateTime string `json:"createTime,omitempty"`
  1471  	// Name: Identifier. The resource name of a ServiceProjectAttachment. Format:
  1472  	// "projects/{host-project-id}/locations/global/serviceProjectAttachments/{servi
  1473  	// ce-project-id}."
  1474  	Name string `json:"name,omitempty"`
  1475  	// ServiceProject: Required. Immutable. Service project name in the format:
  1476  	// "projects/abc" or "projects/123". As input, project name with either project
  1477  	// id or number are accepted. As output, this field will contain project
  1478  	// number.
  1479  	ServiceProject string `json:"serviceProject,omitempty"`
  1480  	// State: Output only. ServiceProjectAttachment state.
  1481  	//
  1482  	// Possible values:
  1483  	//   "STATE_UNSPECIFIED" - Unspecified state.
  1484  	//   "CREATING" - The ServiceProjectAttachment is being created.
  1485  	//   "ACTIVE" - The ServiceProjectAttachment is ready. This means Services and
  1486  	// Workloads under the corresponding ServiceProjectAttachment is ready for
  1487  	// registration.
  1488  	//   "DELETING" - The ServiceProjectAttachment is being deleted.
  1489  	State string `json:"state,omitempty"`
  1490  	// Uid: Output only. A globally unique identifier (in UUID4 format) for the
  1491  	// `ServiceProjectAttachment`.
  1492  	Uid string `json:"uid,omitempty"`
  1493  
  1494  	// ServerResponse contains the HTTP response code and headers from the server.
  1495  	googleapi.ServerResponse `json:"-"`
  1496  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1497  	// unconditionally include in API requests. By default, fields with empty or
  1498  	// default values are omitted from API requests. See
  1499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1500  	// details.
  1501  	ForceSendFields []string `json:"-"`
  1502  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1503  	// requests with the JSON null value. By default, fields with empty values are
  1504  	// omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1506  	NullFields []string `json:"-"`
  1507  }
  1508  
  1509  func (s *ServiceProjectAttachment) MarshalJSON() ([]byte, error) {
  1510  	type NoMethod ServiceProjectAttachment
  1511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1512  }
  1513  
  1514  // ServiceProperties: Properties of an underlying cloud resource that can
  1515  // comprise a Service.
  1516  type ServiceProperties struct {
  1517  	// GcpProject: Output only. The service project identifier that the underlying
  1518  	// cloud resource resides in.
  1519  	GcpProject string `json:"gcpProject,omitempty"`
  1520  	// Location: Output only. The location that the underlying resource resides in,
  1521  	// for example, us-west1.
  1522  	Location string `json:"location,omitempty"`
  1523  	// Zone: Output only. The location that the underlying resource resides in if
  1524  	// it is zonal, for example, us-west1-a).
  1525  	Zone string `json:"zone,omitempty"`
  1526  	// ForceSendFields is a list of field names (e.g. "GcpProject") to
  1527  	// unconditionally include in API requests. By default, fields with empty or
  1528  	// default values are omitted from API requests. See
  1529  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1530  	// details.
  1531  	ForceSendFields []string `json:"-"`
  1532  	// NullFields is a list of field names (e.g. "GcpProject") to include in API
  1533  	// requests with the JSON null value. By default, fields with empty values are
  1534  	// omitted from API requests. See
  1535  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1536  	NullFields []string `json:"-"`
  1537  }
  1538  
  1539  func (s *ServiceProperties) MarshalJSON() ([]byte, error) {
  1540  	type NoMethod ServiceProperties
  1541  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1542  }
  1543  
  1544  // ServiceReference: Reference to an underlying networking resource that can
  1545  // comprise a Service.
  1546  type ServiceReference struct {
  1547  	// Path: Output only. Additional path under the resource URI (demultiplexing
  1548  	// one resource URI into multiple entries). Smallest unit a policy can be
  1549  	// attached to. Examples: URL Map path entry.
  1550  	Path string `json:"path,omitempty"`
  1551  	// Uri: Output only. The underlying resource URI (For example, URI of
  1552  	// Forwarding Rule, URL Map, and Backend Service).
  1553  	Uri string `json:"uri,omitempty"`
  1554  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
  1555  	// include in API requests. By default, fields with empty or default values are
  1556  	// omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1558  	// details.
  1559  	ForceSendFields []string `json:"-"`
  1560  	// NullFields is a list of field names (e.g. "Path") to include in API requests
  1561  	// with the JSON null value. By default, fields with empty values are omitted
  1562  	// from API requests. See
  1563  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1564  	NullFields []string `json:"-"`
  1565  }
  1566  
  1567  func (s *ServiceReference) MarshalJSON() ([]byte, error) {
  1568  	type NoMethod ServiceReference
  1569  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1570  }
  1571  
  1572  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1573  type SetIamPolicyRequest struct {
  1574  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1575  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1576  	// policy but certain Google Cloud services (such as Projects) might reject
  1577  	// them.
  1578  	Policy *Policy `json:"policy,omitempty"`
  1579  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1580  	// modify. Only the fields in the mask will be modified. If no mask is
  1581  	// provided, the following default mask is used: `paths: "bindings, etag"
  1582  	UpdateMask string `json:"updateMask,omitempty"`
  1583  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1584  	// include in API requests. By default, fields with empty or default values are
  1585  	// omitted from API requests. See
  1586  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1587  	// details.
  1588  	ForceSendFields []string `json:"-"`
  1589  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1590  	// requests with the JSON null value. By default, fields with empty values are
  1591  	// omitted from API requests. See
  1592  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1593  	NullFields []string `json:"-"`
  1594  }
  1595  
  1596  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1597  	type NoMethod SetIamPolicyRequest
  1598  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1599  }
  1600  
  1601  // Status: The `Status` type defines a logical error model that is suitable for
  1602  // different programming environments, including REST APIs and RPC APIs. It is
  1603  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1604  // pieces of data: error code, error message, and error details. You can find
  1605  // out more about this error model and how to work with it in the API Design
  1606  // Guide (https://cloud.google.com/apis/design/errors).
  1607  type Status struct {
  1608  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1609  	Code int64 `json:"code,omitempty"`
  1610  	// Details: A list of messages that carry the error details. There is a common
  1611  	// set of message types for APIs to use.
  1612  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1613  	// Message: A developer-facing error message, which should be in English. Any
  1614  	// user-facing error message should be localized and sent in the
  1615  	// google.rpc.Status.details field, or localized by the client.
  1616  	Message string `json:"message,omitempty"`
  1617  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1618  	// include in API requests. By default, fields with empty or default values are
  1619  	// omitted from API requests. See
  1620  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1621  	// details.
  1622  	ForceSendFields []string `json:"-"`
  1623  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1624  	// with the JSON null value. By default, fields with empty values are omitted
  1625  	// from API requests. See
  1626  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1627  	NullFields []string `json:"-"`
  1628  }
  1629  
  1630  func (s *Status) MarshalJSON() ([]byte, error) {
  1631  	type NoMethod Status
  1632  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1633  }
  1634  
  1635  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1636  type TestIamPermissionsRequest struct {
  1637  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1638  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1639  	// information see IAM Overview
  1640  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1641  	Permissions []string `json:"permissions,omitempty"`
  1642  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1643  	// unconditionally include in API requests. By default, fields with empty or
  1644  	// default values are omitted from API requests. See
  1645  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1646  	// details.
  1647  	ForceSendFields []string `json:"-"`
  1648  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1649  	// requests with the JSON null value. By default, fields with empty values are
  1650  	// omitted from API requests. See
  1651  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1652  	NullFields []string `json:"-"`
  1653  }
  1654  
  1655  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1656  	type NoMethod TestIamPermissionsRequest
  1657  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1658  }
  1659  
  1660  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1661  // method.
  1662  type TestIamPermissionsResponse struct {
  1663  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1664  	// caller is allowed.
  1665  	Permissions []string `json:"permissions,omitempty"`
  1666  
  1667  	// ServerResponse contains the HTTP response code and headers from the server.
  1668  	googleapi.ServerResponse `json:"-"`
  1669  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1670  	// unconditionally include in API requests. By default, fields with empty or
  1671  	// default values are omitted from API requests. See
  1672  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1673  	// details.
  1674  	ForceSendFields []string `json:"-"`
  1675  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1676  	// requests with the JSON null value. By default, fields with empty values are
  1677  	// omitted from API requests. See
  1678  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1679  	NullFields []string `json:"-"`
  1680  }
  1681  
  1682  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1683  	type NoMethod TestIamPermissionsResponse
  1684  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1685  }
  1686  
  1687  // Workload: Workload is an App Hub data model that contains a discovered
  1688  // workload, which represents a binary deployment (such as managed instance
  1689  // groups (MIGs) and GKE deployments) that performs the smallest logical subset
  1690  // of business functionality.
  1691  type Workload struct {
  1692  	// Attributes: Optional. Consumer provided attributes.
  1693  	Attributes *Attributes `json:"attributes,omitempty"`
  1694  	// CreateTime: Output only. Create time.
  1695  	CreateTime string `json:"createTime,omitempty"`
  1696  	// Description: Optional. User-defined description of a Workload. Can have a
  1697  	// maximum length of 2048 characters.
  1698  	Description string `json:"description,omitempty"`
  1699  	// DiscoveredWorkload: Required. Immutable. The resource name of the original
  1700  	// discovered workload.
  1701  	DiscoveredWorkload string `json:"discoveredWorkload,omitempty"`
  1702  	// DisplayName: Optional. User-defined name for the Workload. Can have a
  1703  	// maximum length of 63 characters.
  1704  	DisplayName string `json:"displayName,omitempty"`
  1705  	// Name: Identifier. The resource name of the Workload. Format:
  1706  	// "projects/{host-project-id}/locations/{location}/applications/{application-id
  1707  	// }/workloads/{workload-id}"
  1708  	Name string `json:"name,omitempty"`
  1709  	// State: Output only. Workload state.
  1710  	//
  1711  	// Possible values:
  1712  	//   "STATE_UNSPECIFIED" - Unspecified state.
  1713  	//   "CREATING" - The Workload is being created.
  1714  	//   "ACTIVE" - The Workload is ready.
  1715  	//   "DELETING" - The Workload is being deleted.
  1716  	//   "DETACHED" - The underlying compute resources have been deleted.
  1717  	State string `json:"state,omitempty"`
  1718  	// Uid: Output only. A universally unique identifier (UUID) for the `Workload`
  1719  	// in the UUID4 format.
  1720  	Uid string `json:"uid,omitempty"`
  1721  	// UpdateTime: Output only. Update time.
  1722  	UpdateTime string `json:"updateTime,omitempty"`
  1723  	// WorkloadProperties: Output only. Properties of an underlying compute
  1724  	// resource represented by the Workload. These are immutable.
  1725  	WorkloadProperties *WorkloadProperties `json:"workloadProperties,omitempty"`
  1726  	// WorkloadReference: Output only. Reference of an underlying compute resource
  1727  	// represented by the Workload. These are immutable.
  1728  	WorkloadReference *WorkloadReference `json:"workloadReference,omitempty"`
  1729  
  1730  	// ServerResponse contains the HTTP response code and headers from the server.
  1731  	googleapi.ServerResponse `json:"-"`
  1732  	// ForceSendFields is a list of field names (e.g. "Attributes") to
  1733  	// unconditionally include in API requests. By default, fields with empty or
  1734  	// default values are omitted from API requests. See
  1735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1736  	// details.
  1737  	ForceSendFields []string `json:"-"`
  1738  	// NullFields is a list of field names (e.g. "Attributes") to include in API
  1739  	// requests with the JSON null value. By default, fields with empty values are
  1740  	// omitted from API requests. See
  1741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1742  	NullFields []string `json:"-"`
  1743  }
  1744  
  1745  func (s *Workload) MarshalJSON() ([]byte, error) {
  1746  	type NoMethod Workload
  1747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1748  }
  1749  
  1750  // WorkloadProperties: Properties of an underlying compute resource represented
  1751  // by the Workload.
  1752  type WorkloadProperties struct {
  1753  	// GcpProject: Output only. The service project identifier that the underlying
  1754  	// cloud resource resides in. Empty for non cloud resources.
  1755  	GcpProject string `json:"gcpProject,omitempty"`
  1756  	// Location: Output only. The location that the underlying compute resource
  1757  	// resides in (e.g us-west1).
  1758  	Location string `json:"location,omitempty"`
  1759  	// Zone: Output only. The location that the underlying compute resource resides
  1760  	// in if it is zonal (e.g us-west1-a).
  1761  	Zone string `json:"zone,omitempty"`
  1762  	// ForceSendFields is a list of field names (e.g. "GcpProject") to
  1763  	// unconditionally include in API requests. By default, fields with empty or
  1764  	// default values are omitted from API requests. See
  1765  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1766  	// details.
  1767  	ForceSendFields []string `json:"-"`
  1768  	// NullFields is a list of field names (e.g. "GcpProject") to include in API
  1769  	// requests with the JSON null value. By default, fields with empty values are
  1770  	// omitted from API requests. See
  1771  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1772  	NullFields []string `json:"-"`
  1773  }
  1774  
  1775  func (s *WorkloadProperties) MarshalJSON() ([]byte, error) {
  1776  	type NoMethod WorkloadProperties
  1777  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1778  }
  1779  
  1780  // WorkloadReference: Reference of an underlying compute resource represented
  1781  // by the Workload.
  1782  type WorkloadReference struct {
  1783  	// Uri: Output only. The underlying compute resource uri.
  1784  	Uri string `json:"uri,omitempty"`
  1785  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1786  	// include in API requests. By default, fields with empty or default values are
  1787  	// omitted from API requests. See
  1788  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1789  	// details.
  1790  	ForceSendFields []string `json:"-"`
  1791  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1792  	// with the JSON null value. By default, fields with empty values are omitted
  1793  	// from API requests. See
  1794  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1795  	NullFields []string `json:"-"`
  1796  }
  1797  
  1798  func (s *WorkloadReference) MarshalJSON() ([]byte, error) {
  1799  	type NoMethod WorkloadReference
  1800  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1801  }
  1802  
  1803  type ProjectsLocationsDetachServiceProjectAttachmentCall struct {
  1804  	s                                     *APIService
  1805  	name                                  string
  1806  	detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest
  1807  	urlParams_                            gensupport.URLParams
  1808  	ctx_                                  context.Context
  1809  	header_                               http.Header
  1810  }
  1811  
  1812  // DetachServiceProjectAttachment: Detaches a service project from a host
  1813  // project. You can call this API from any service project without needing
  1814  // access to the host project that it is attached to.
  1815  //
  1816  //   - name: Service project id and location to detach from a host project. Only
  1817  //     global location is supported. Expected format:
  1818  //     `projects/{project}/locations/{location}`.
  1819  func (r *ProjectsLocationsService) DetachServiceProjectAttachment(name string, detachserviceprojectattachmentrequest *DetachServiceProjectAttachmentRequest) *ProjectsLocationsDetachServiceProjectAttachmentCall {
  1820  	c := &ProjectsLocationsDetachServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1821  	c.name = name
  1822  	c.detachserviceprojectattachmentrequest = detachserviceprojectattachmentrequest
  1823  	return c
  1824  }
  1825  
  1826  // Fields allows partial responses to be retrieved. See
  1827  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1828  // details.
  1829  func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDetachServiceProjectAttachmentCall {
  1830  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1831  	return c
  1832  }
  1833  
  1834  // Context sets the context to be used in this call's Do method.
  1835  func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsDetachServiceProjectAttachmentCall {
  1836  	c.ctx_ = ctx
  1837  	return c
  1838  }
  1839  
  1840  // Header returns a http.Header that can be modified by the caller to add
  1841  // headers to the request.
  1842  func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Header() http.Header {
  1843  	if c.header_ == nil {
  1844  		c.header_ = make(http.Header)
  1845  	}
  1846  	return c.header_
  1847  }
  1848  
  1849  func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) {
  1850  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1851  	var body io.Reader = nil
  1852  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.detachserviceprojectattachmentrequest)
  1853  	if err != nil {
  1854  		return nil, err
  1855  	}
  1856  	c.urlParams_.Set("alt", alt)
  1857  	c.urlParams_.Set("prettyPrint", "false")
  1858  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:detachServiceProjectAttachment")
  1859  	urls += "?" + c.urlParams_.Encode()
  1860  	req, err := http.NewRequest("POST", urls, body)
  1861  	if err != nil {
  1862  		return nil, err
  1863  	}
  1864  	req.Header = reqHeaders
  1865  	googleapi.Expand(req.URL, map[string]string{
  1866  		"name": c.name,
  1867  	})
  1868  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1869  }
  1870  
  1871  // Do executes the "apphub.projects.locations.detachServiceProjectAttachment" call.
  1872  // Any non-2xx status code is an error. Response headers are in either
  1873  // *DetachServiceProjectAttachmentResponse.ServerResponse.Header or (if a
  1874  // response was returned at all) in error.(*googleapi.Error).Header. Use
  1875  // googleapi.IsNotModified to check whether the returned error was because
  1876  // http.StatusNotModified was returned.
  1877  func (c *ProjectsLocationsDetachServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*DetachServiceProjectAttachmentResponse, error) {
  1878  	gensupport.SetOptions(c.urlParams_, opts...)
  1879  	res, err := c.doRequest("json")
  1880  	if res != nil && res.StatusCode == http.StatusNotModified {
  1881  		if res.Body != nil {
  1882  			res.Body.Close()
  1883  		}
  1884  		return nil, gensupport.WrapError(&googleapi.Error{
  1885  			Code:   res.StatusCode,
  1886  			Header: res.Header,
  1887  		})
  1888  	}
  1889  	if err != nil {
  1890  		return nil, err
  1891  	}
  1892  	defer googleapi.CloseBody(res)
  1893  	if err := googleapi.CheckResponse(res); err != nil {
  1894  		return nil, gensupport.WrapError(err)
  1895  	}
  1896  	ret := &DetachServiceProjectAttachmentResponse{
  1897  		ServerResponse: googleapi.ServerResponse{
  1898  			Header:         res.Header,
  1899  			HTTPStatusCode: res.StatusCode,
  1900  		},
  1901  	}
  1902  	target := &ret
  1903  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1904  		return nil, err
  1905  	}
  1906  	return ret, nil
  1907  }
  1908  
  1909  type ProjectsLocationsGetCall struct {
  1910  	s            *APIService
  1911  	name         string
  1912  	urlParams_   gensupport.URLParams
  1913  	ifNoneMatch_ string
  1914  	ctx_         context.Context
  1915  	header_      http.Header
  1916  }
  1917  
  1918  // Get: Gets information about a location.
  1919  //
  1920  // - name: Resource name for the location.
  1921  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1922  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1923  	c.name = name
  1924  	return c
  1925  }
  1926  
  1927  // Fields allows partial responses to be retrieved. See
  1928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1929  // details.
  1930  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1932  	return c
  1933  }
  1934  
  1935  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1936  // object's ETag matches the given value. This is useful for getting updates
  1937  // only after the object has changed since the last request.
  1938  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1939  	c.ifNoneMatch_ = entityTag
  1940  	return c
  1941  }
  1942  
  1943  // Context sets the context to be used in this call's Do method.
  1944  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1945  	c.ctx_ = ctx
  1946  	return c
  1947  }
  1948  
  1949  // Header returns a http.Header that can be modified by the caller to add
  1950  // headers to the request.
  1951  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1952  	if c.header_ == nil {
  1953  		c.header_ = make(http.Header)
  1954  	}
  1955  	return c.header_
  1956  }
  1957  
  1958  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1959  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1960  	if c.ifNoneMatch_ != "" {
  1961  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1962  	}
  1963  	var body io.Reader = nil
  1964  	c.urlParams_.Set("alt", alt)
  1965  	c.urlParams_.Set("prettyPrint", "false")
  1966  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  1967  	urls += "?" + c.urlParams_.Encode()
  1968  	req, err := http.NewRequest("GET", urls, body)
  1969  	if err != nil {
  1970  		return nil, err
  1971  	}
  1972  	req.Header = reqHeaders
  1973  	googleapi.Expand(req.URL, map[string]string{
  1974  		"name": c.name,
  1975  	})
  1976  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1977  }
  1978  
  1979  // Do executes the "apphub.projects.locations.get" call.
  1980  // Any non-2xx status code is an error. Response headers are in either
  1981  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1982  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1983  // whether the returned error was because http.StatusNotModified was returned.
  1984  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1985  	gensupport.SetOptions(c.urlParams_, opts...)
  1986  	res, err := c.doRequest("json")
  1987  	if res != nil && res.StatusCode == http.StatusNotModified {
  1988  		if res.Body != nil {
  1989  			res.Body.Close()
  1990  		}
  1991  		return nil, gensupport.WrapError(&googleapi.Error{
  1992  			Code:   res.StatusCode,
  1993  			Header: res.Header,
  1994  		})
  1995  	}
  1996  	if err != nil {
  1997  		return nil, err
  1998  	}
  1999  	defer googleapi.CloseBody(res)
  2000  	if err := googleapi.CheckResponse(res); err != nil {
  2001  		return nil, gensupport.WrapError(err)
  2002  	}
  2003  	ret := &Location{
  2004  		ServerResponse: googleapi.ServerResponse{
  2005  			Header:         res.Header,
  2006  			HTTPStatusCode: res.StatusCode,
  2007  		},
  2008  	}
  2009  	target := &ret
  2010  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2011  		return nil, err
  2012  	}
  2013  	return ret, nil
  2014  }
  2015  
  2016  type ProjectsLocationsListCall struct {
  2017  	s            *APIService
  2018  	name         string
  2019  	urlParams_   gensupport.URLParams
  2020  	ifNoneMatch_ string
  2021  	ctx_         context.Context
  2022  	header_      http.Header
  2023  }
  2024  
  2025  // List: Lists information about the supported locations for this service.
  2026  //
  2027  // - name: The resource that owns the locations collection, if applicable.
  2028  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2029  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2030  	c.name = name
  2031  	return c
  2032  }
  2033  
  2034  // Filter sets the optional parameter "filter": A filter to narrow down results
  2035  // to a preferred subset. The filtering language accepts strings like
  2036  // "displayName=tokyo", and is documented in more detail in AIP-160
  2037  // (https://google.aip.dev/160).
  2038  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2039  	c.urlParams_.Set("filter", filter)
  2040  	return c
  2041  }
  2042  
  2043  // PageSize sets the optional parameter "pageSize": The maximum number of
  2044  // results to return. If not set, the service selects a default.
  2045  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2046  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2047  	return c
  2048  }
  2049  
  2050  // PageToken sets the optional parameter "pageToken": A page token received
  2051  // from the `next_page_token` field in the response. Send that page token to
  2052  // receive the subsequent page.
  2053  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2054  	c.urlParams_.Set("pageToken", pageToken)
  2055  	return c
  2056  }
  2057  
  2058  // Fields allows partial responses to be retrieved. See
  2059  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2060  // details.
  2061  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2062  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2063  	return c
  2064  }
  2065  
  2066  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2067  // object's ETag matches the given value. This is useful for getting updates
  2068  // only after the object has changed since the last request.
  2069  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2070  	c.ifNoneMatch_ = entityTag
  2071  	return c
  2072  }
  2073  
  2074  // Context sets the context to be used in this call's Do method.
  2075  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2076  	c.ctx_ = ctx
  2077  	return c
  2078  }
  2079  
  2080  // Header returns a http.Header that can be modified by the caller to add
  2081  // headers to the request.
  2082  func (c *ProjectsLocationsListCall) Header() http.Header {
  2083  	if c.header_ == nil {
  2084  		c.header_ = make(http.Header)
  2085  	}
  2086  	return c.header_
  2087  }
  2088  
  2089  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2090  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2091  	if c.ifNoneMatch_ != "" {
  2092  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2093  	}
  2094  	var body io.Reader = nil
  2095  	c.urlParams_.Set("alt", alt)
  2096  	c.urlParams_.Set("prettyPrint", "false")
  2097  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations")
  2098  	urls += "?" + c.urlParams_.Encode()
  2099  	req, err := http.NewRequest("GET", urls, body)
  2100  	if err != nil {
  2101  		return nil, err
  2102  	}
  2103  	req.Header = reqHeaders
  2104  	googleapi.Expand(req.URL, map[string]string{
  2105  		"name": c.name,
  2106  	})
  2107  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2108  }
  2109  
  2110  // Do executes the "apphub.projects.locations.list" call.
  2111  // Any non-2xx status code is an error. Response headers are in either
  2112  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2113  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2114  // check whether the returned error was because http.StatusNotModified was
  2115  // returned.
  2116  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2117  	gensupport.SetOptions(c.urlParams_, opts...)
  2118  	res, err := c.doRequest("json")
  2119  	if res != nil && res.StatusCode == http.StatusNotModified {
  2120  		if res.Body != nil {
  2121  			res.Body.Close()
  2122  		}
  2123  		return nil, gensupport.WrapError(&googleapi.Error{
  2124  			Code:   res.StatusCode,
  2125  			Header: res.Header,
  2126  		})
  2127  	}
  2128  	if err != nil {
  2129  		return nil, err
  2130  	}
  2131  	defer googleapi.CloseBody(res)
  2132  	if err := googleapi.CheckResponse(res); err != nil {
  2133  		return nil, gensupport.WrapError(err)
  2134  	}
  2135  	ret := &ListLocationsResponse{
  2136  		ServerResponse: googleapi.ServerResponse{
  2137  			Header:         res.Header,
  2138  			HTTPStatusCode: res.StatusCode,
  2139  		},
  2140  	}
  2141  	target := &ret
  2142  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2143  		return nil, err
  2144  	}
  2145  	return ret, nil
  2146  }
  2147  
  2148  // Pages invokes f for each page of results.
  2149  // A non-nil error returned from f will halt the iteration.
  2150  // The provided context supersedes any context provided to the Context method.
  2151  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2152  	c.ctx_ = ctx
  2153  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2154  	for {
  2155  		x, err := c.Do()
  2156  		if err != nil {
  2157  			return err
  2158  		}
  2159  		if err := f(x); err != nil {
  2160  			return err
  2161  		}
  2162  		if x.NextPageToken == "" {
  2163  			return nil
  2164  		}
  2165  		c.PageToken(x.NextPageToken)
  2166  	}
  2167  }
  2168  
  2169  type ProjectsLocationsLookupServiceProjectAttachmentCall struct {
  2170  	s            *APIService
  2171  	name         string
  2172  	urlParams_   gensupport.URLParams
  2173  	ifNoneMatch_ string
  2174  	ctx_         context.Context
  2175  	header_      http.Header
  2176  }
  2177  
  2178  // LookupServiceProjectAttachment: Lists a service project attachment for a
  2179  // given service project. You can call this API from any project to find if it
  2180  // is attached to a host project.
  2181  //
  2182  //   - name: Service project ID and location to lookup service project attachment
  2183  //     for. Only global location is supported. Expected format:
  2184  //     `projects/{project}/locations/{location}`.
  2185  func (r *ProjectsLocationsService) LookupServiceProjectAttachment(name string) *ProjectsLocationsLookupServiceProjectAttachmentCall {
  2186  	c := &ProjectsLocationsLookupServiceProjectAttachmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2187  	c.name = name
  2188  	return c
  2189  }
  2190  
  2191  // Fields allows partial responses to be retrieved. See
  2192  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2193  // details.
  2194  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupServiceProjectAttachmentCall {
  2195  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2196  	return c
  2197  }
  2198  
  2199  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2200  // object's ETag matches the given value. This is useful for getting updates
  2201  // only after the object has changed since the last request.
  2202  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupServiceProjectAttachmentCall {
  2203  	c.ifNoneMatch_ = entityTag
  2204  	return c
  2205  }
  2206  
  2207  // Context sets the context to be used in this call's Do method.
  2208  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Context(ctx context.Context) *ProjectsLocationsLookupServiceProjectAttachmentCall {
  2209  	c.ctx_ = ctx
  2210  	return c
  2211  }
  2212  
  2213  // Header returns a http.Header that can be modified by the caller to add
  2214  // headers to the request.
  2215  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Header() http.Header {
  2216  	if c.header_ == nil {
  2217  		c.header_ = make(http.Header)
  2218  	}
  2219  	return c.header_
  2220  }
  2221  
  2222  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) doRequest(alt string) (*http.Response, error) {
  2223  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2224  	if c.ifNoneMatch_ != "" {
  2225  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2226  	}
  2227  	var body io.Reader = nil
  2228  	c.urlParams_.Set("alt", alt)
  2229  	c.urlParams_.Set("prettyPrint", "false")
  2230  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:lookupServiceProjectAttachment")
  2231  	urls += "?" + c.urlParams_.Encode()
  2232  	req, err := http.NewRequest("GET", 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 "apphub.projects.locations.lookupServiceProjectAttachment" call.
  2244  // Any non-2xx status code is an error. Response headers are in either
  2245  // *LookupServiceProjectAttachmentResponse.ServerResponse.Header or (if a
  2246  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2247  // googleapi.IsNotModified to check whether the returned error was because
  2248  // http.StatusNotModified was returned.
  2249  func (c *ProjectsLocationsLookupServiceProjectAttachmentCall) Do(opts ...googleapi.CallOption) (*LookupServiceProjectAttachmentResponse, 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 := &LookupServiceProjectAttachmentResponse{
  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 ProjectsLocationsApplicationsCreateCall struct {
  2282  	s           *APIService
  2283  	parent      string
  2284  	application *Application
  2285  	urlParams_  gensupport.URLParams
  2286  	ctx_        context.Context
  2287  	header_     http.Header
  2288  }
  2289  
  2290  // Create: Creates an Application in a host project and location.
  2291  //
  2292  //   - parent: Project and location to create Application in. Expected format:
  2293  //     `projects/{project}/locations/{location}`.
  2294  func (r *ProjectsLocationsApplicationsService) Create(parent string, application *Application) *ProjectsLocationsApplicationsCreateCall {
  2295  	c := &ProjectsLocationsApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2296  	c.parent = parent
  2297  	c.application = application
  2298  	return c
  2299  }
  2300  
  2301  // ApplicationId sets the optional parameter "applicationId": Required. The
  2302  // Application identifier. Must contain only lowercase letters, numbers or
  2303  // hyphens, with the first character a letter, the last a letter or a number,
  2304  // and a 63 character maximum.
  2305  func (c *ProjectsLocationsApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsApplicationsCreateCall {
  2306  	c.urlParams_.Set("applicationId", applicationId)
  2307  	return c
  2308  }
  2309  
  2310  // RequestId sets the optional parameter "requestId": An optional request ID to
  2311  // identify requests. Specify a unique request ID so that if you must retry
  2312  // your request, the server will know to ignore the request if it has already
  2313  // been completed. The server will guarantee that for at least 60 minutes since
  2314  // the first request. For example, consider a situation where you make an
  2315  // initial request and the request times out. If you make the request again
  2316  // with the same request ID, the server can check if original operation with
  2317  // the same request ID was received, and if so, will ignore the second request.
  2318  // This prevents clients from accidentally creating duplicate commitments. The
  2319  // request ID must be a valid UUID with the exception that zero UUID is not
  2320  // supported (00000000-0000-0000-0000-000000000000).
  2321  func (c *ProjectsLocationsApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsCreateCall {
  2322  	c.urlParams_.Set("requestId", requestId)
  2323  	return c
  2324  }
  2325  
  2326  // Fields allows partial responses to be retrieved. See
  2327  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2328  // details.
  2329  func (c *ProjectsLocationsApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsCreateCall {
  2330  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2331  	return c
  2332  }
  2333  
  2334  // Context sets the context to be used in this call's Do method.
  2335  func (c *ProjectsLocationsApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsCreateCall {
  2336  	c.ctx_ = ctx
  2337  	return c
  2338  }
  2339  
  2340  // Header returns a http.Header that can be modified by the caller to add
  2341  // headers to the request.
  2342  func (c *ProjectsLocationsApplicationsCreateCall) Header() http.Header {
  2343  	if c.header_ == nil {
  2344  		c.header_ = make(http.Header)
  2345  	}
  2346  	return c.header_
  2347  }
  2348  
  2349  func (c *ProjectsLocationsApplicationsCreateCall) doRequest(alt string) (*http.Response, error) {
  2350  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2351  	var body io.Reader = nil
  2352  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2353  	if err != nil {
  2354  		return nil, err
  2355  	}
  2356  	c.urlParams_.Set("alt", alt)
  2357  	c.urlParams_.Set("prettyPrint", "false")
  2358  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications")
  2359  	urls += "?" + c.urlParams_.Encode()
  2360  	req, err := http.NewRequest("POST", urls, body)
  2361  	if err != nil {
  2362  		return nil, err
  2363  	}
  2364  	req.Header = reqHeaders
  2365  	googleapi.Expand(req.URL, map[string]string{
  2366  		"parent": c.parent,
  2367  	})
  2368  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2369  }
  2370  
  2371  // Do executes the "apphub.projects.locations.applications.create" call.
  2372  // Any non-2xx status code is an error. Response headers are in either
  2373  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2374  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2375  // whether the returned error was because http.StatusNotModified was returned.
  2376  func (c *ProjectsLocationsApplicationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2377  	gensupport.SetOptions(c.urlParams_, opts...)
  2378  	res, err := c.doRequest("json")
  2379  	if res != nil && res.StatusCode == http.StatusNotModified {
  2380  		if res.Body != nil {
  2381  			res.Body.Close()
  2382  		}
  2383  		return nil, gensupport.WrapError(&googleapi.Error{
  2384  			Code:   res.StatusCode,
  2385  			Header: res.Header,
  2386  		})
  2387  	}
  2388  	if err != nil {
  2389  		return nil, err
  2390  	}
  2391  	defer googleapi.CloseBody(res)
  2392  	if err := googleapi.CheckResponse(res); err != nil {
  2393  		return nil, gensupport.WrapError(err)
  2394  	}
  2395  	ret := &Operation{
  2396  		ServerResponse: googleapi.ServerResponse{
  2397  			Header:         res.Header,
  2398  			HTTPStatusCode: res.StatusCode,
  2399  		},
  2400  	}
  2401  	target := &ret
  2402  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2403  		return nil, err
  2404  	}
  2405  	return ret, nil
  2406  }
  2407  
  2408  type ProjectsLocationsApplicationsDeleteCall struct {
  2409  	s          *APIService
  2410  	name       string
  2411  	urlParams_ gensupport.URLParams
  2412  	ctx_       context.Context
  2413  	header_    http.Header
  2414  }
  2415  
  2416  // Delete: Deletes an Application in a host project and location.
  2417  //
  2418  //   - name: Fully qualified name of the Application to delete. Expected format:
  2419  //     `projects/{project}/locations/{location}/applications/{application}`.
  2420  func (r *ProjectsLocationsApplicationsService) Delete(name string) *ProjectsLocationsApplicationsDeleteCall {
  2421  	c := &ProjectsLocationsApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2422  	c.name = name
  2423  	return c
  2424  }
  2425  
  2426  // RequestId sets the optional parameter "requestId": An optional request ID to
  2427  // identify requests. Specify a unique request ID so that if you must retry
  2428  // your request, the server will know to ignore the request if it has already
  2429  // been completed. The server will guarantee that for at least 60 minutes after
  2430  // the first request. For example, consider a situation where you make an
  2431  // initial request and the request times out. If you make the request again
  2432  // with the same request ID, the server can check if original operation with
  2433  // the same request ID was received, and if so, will ignore the second request.
  2434  // This prevents clients from accidentally creating duplicate commitments. The
  2435  // request ID must be a valid UUID with the exception that zero UUID is not
  2436  // supported (00000000-0000-0000-0000-000000000000).
  2437  func (c *ProjectsLocationsApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsDeleteCall {
  2438  	c.urlParams_.Set("requestId", requestId)
  2439  	return c
  2440  }
  2441  
  2442  // Fields allows partial responses to be retrieved. See
  2443  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2444  // details.
  2445  func (c *ProjectsLocationsApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsDeleteCall {
  2446  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2447  	return c
  2448  }
  2449  
  2450  // Context sets the context to be used in this call's Do method.
  2451  func (c *ProjectsLocationsApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsDeleteCall {
  2452  	c.ctx_ = ctx
  2453  	return c
  2454  }
  2455  
  2456  // Header returns a http.Header that can be modified by the caller to add
  2457  // headers to the request.
  2458  func (c *ProjectsLocationsApplicationsDeleteCall) Header() http.Header {
  2459  	if c.header_ == nil {
  2460  		c.header_ = make(http.Header)
  2461  	}
  2462  	return c.header_
  2463  }
  2464  
  2465  func (c *ProjectsLocationsApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2466  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2467  	var body io.Reader = nil
  2468  	c.urlParams_.Set("alt", alt)
  2469  	c.urlParams_.Set("prettyPrint", "false")
  2470  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2471  	urls += "?" + c.urlParams_.Encode()
  2472  	req, err := http.NewRequest("DELETE", urls, body)
  2473  	if err != nil {
  2474  		return nil, err
  2475  	}
  2476  	req.Header = reqHeaders
  2477  	googleapi.Expand(req.URL, map[string]string{
  2478  		"name": c.name,
  2479  	})
  2480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2481  }
  2482  
  2483  // Do executes the "apphub.projects.locations.applications.delete" call.
  2484  // Any non-2xx status code is an error. Response headers are in either
  2485  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2486  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2487  // whether the returned error was because http.StatusNotModified was returned.
  2488  func (c *ProjectsLocationsApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2489  	gensupport.SetOptions(c.urlParams_, opts...)
  2490  	res, err := c.doRequest("json")
  2491  	if res != nil && res.StatusCode == http.StatusNotModified {
  2492  		if res.Body != nil {
  2493  			res.Body.Close()
  2494  		}
  2495  		return nil, gensupport.WrapError(&googleapi.Error{
  2496  			Code:   res.StatusCode,
  2497  			Header: res.Header,
  2498  		})
  2499  	}
  2500  	if err != nil {
  2501  		return nil, err
  2502  	}
  2503  	defer googleapi.CloseBody(res)
  2504  	if err := googleapi.CheckResponse(res); err != nil {
  2505  		return nil, gensupport.WrapError(err)
  2506  	}
  2507  	ret := &Operation{
  2508  		ServerResponse: googleapi.ServerResponse{
  2509  			Header:         res.Header,
  2510  			HTTPStatusCode: res.StatusCode,
  2511  		},
  2512  	}
  2513  	target := &ret
  2514  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2515  		return nil, err
  2516  	}
  2517  	return ret, nil
  2518  }
  2519  
  2520  type ProjectsLocationsApplicationsGetCall struct {
  2521  	s            *APIService
  2522  	name         string
  2523  	urlParams_   gensupport.URLParams
  2524  	ifNoneMatch_ string
  2525  	ctx_         context.Context
  2526  	header_      http.Header
  2527  }
  2528  
  2529  // Get: Gets an Application in a host project and location.
  2530  //
  2531  //   - name: Fully qualified name of the Application to fetch. Expected format:
  2532  //     `projects/{project}/locations/{location}/applications/{application}`.
  2533  func (r *ProjectsLocationsApplicationsService) Get(name string) *ProjectsLocationsApplicationsGetCall {
  2534  	c := &ProjectsLocationsApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2535  	c.name = name
  2536  	return c
  2537  }
  2538  
  2539  // Fields allows partial responses to be retrieved. See
  2540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2541  // details.
  2542  func (c *ProjectsLocationsApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetCall {
  2543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2544  	return c
  2545  }
  2546  
  2547  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2548  // object's ETag matches the given value. This is useful for getting updates
  2549  // only after the object has changed since the last request.
  2550  func (c *ProjectsLocationsApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetCall {
  2551  	c.ifNoneMatch_ = entityTag
  2552  	return c
  2553  }
  2554  
  2555  // Context sets the context to be used in this call's Do method.
  2556  func (c *ProjectsLocationsApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetCall {
  2557  	c.ctx_ = ctx
  2558  	return c
  2559  }
  2560  
  2561  // Header returns a http.Header that can be modified by the caller to add
  2562  // headers to the request.
  2563  func (c *ProjectsLocationsApplicationsGetCall) Header() http.Header {
  2564  	if c.header_ == nil {
  2565  		c.header_ = make(http.Header)
  2566  	}
  2567  	return c.header_
  2568  }
  2569  
  2570  func (c *ProjectsLocationsApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
  2571  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2572  	if c.ifNoneMatch_ != "" {
  2573  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2574  	}
  2575  	var body io.Reader = nil
  2576  	c.urlParams_.Set("alt", alt)
  2577  	c.urlParams_.Set("prettyPrint", "false")
  2578  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2579  	urls += "?" + c.urlParams_.Encode()
  2580  	req, err := http.NewRequest("GET", urls, body)
  2581  	if err != nil {
  2582  		return nil, err
  2583  	}
  2584  	req.Header = reqHeaders
  2585  	googleapi.Expand(req.URL, map[string]string{
  2586  		"name": c.name,
  2587  	})
  2588  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2589  }
  2590  
  2591  // Do executes the "apphub.projects.locations.applications.get" call.
  2592  // Any non-2xx status code is an error. Response headers are in either
  2593  // *Application.ServerResponse.Header or (if a response was returned at all) in
  2594  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2595  // whether the returned error was because http.StatusNotModified was returned.
  2596  func (c *ProjectsLocationsApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
  2597  	gensupport.SetOptions(c.urlParams_, opts...)
  2598  	res, err := c.doRequest("json")
  2599  	if res != nil && res.StatusCode == http.StatusNotModified {
  2600  		if res.Body != nil {
  2601  			res.Body.Close()
  2602  		}
  2603  		return nil, gensupport.WrapError(&googleapi.Error{
  2604  			Code:   res.StatusCode,
  2605  			Header: res.Header,
  2606  		})
  2607  	}
  2608  	if err != nil {
  2609  		return nil, err
  2610  	}
  2611  	defer googleapi.CloseBody(res)
  2612  	if err := googleapi.CheckResponse(res); err != nil {
  2613  		return nil, gensupport.WrapError(err)
  2614  	}
  2615  	ret := &Application{
  2616  		ServerResponse: googleapi.ServerResponse{
  2617  			Header:         res.Header,
  2618  			HTTPStatusCode: res.StatusCode,
  2619  		},
  2620  	}
  2621  	target := &ret
  2622  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2623  		return nil, err
  2624  	}
  2625  	return ret, nil
  2626  }
  2627  
  2628  type ProjectsLocationsApplicationsGetIamPolicyCall struct {
  2629  	s            *APIService
  2630  	resource     string
  2631  	urlParams_   gensupport.URLParams
  2632  	ifNoneMatch_ string
  2633  	ctx_         context.Context
  2634  	header_      http.Header
  2635  }
  2636  
  2637  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  2638  // empty policy if the resource exists and does not have a policy set.
  2639  //
  2640  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2641  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2642  //     for the appropriate value for this field.
  2643  func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall {
  2644  	c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2645  	c.resource = resource
  2646  	return c
  2647  }
  2648  
  2649  // OptionsRequestedPolicyVersion sets the optional parameter
  2650  // "options.requestedPolicyVersion": The maximum policy version that will be
  2651  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2652  // an invalid value will be rejected. Requests for policies with any
  2653  // conditional role bindings must specify version 3. Policies with no
  2654  // conditional role bindings may specify any valid value or leave the field
  2655  // unset. The policy in the response might use the policy version that you
  2656  // specified, or it might use a lower policy version. For example, if you
  2657  // specify version 3, but the policy has no conditional role bindings, the
  2658  // response uses version 1. To learn which resources support conditions in
  2659  // their IAM policies, see the IAM documentation
  2660  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2661  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall {
  2662  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2663  	return c
  2664  }
  2665  
  2666  // Fields allows partial responses to be retrieved. See
  2667  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2668  // details.
  2669  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall {
  2670  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2671  	return c
  2672  }
  2673  
  2674  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2675  // object's ETag matches the given value. This is useful for getting updates
  2676  // only after the object has changed since the last request.
  2677  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall {
  2678  	c.ifNoneMatch_ = entityTag
  2679  	return c
  2680  }
  2681  
  2682  // Context sets the context to be used in this call's Do method.
  2683  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall {
  2684  	c.ctx_ = ctx
  2685  	return c
  2686  }
  2687  
  2688  // Header returns a http.Header that can be modified by the caller to add
  2689  // headers to the request.
  2690  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header {
  2691  	if c.header_ == nil {
  2692  		c.header_ = make(http.Header)
  2693  	}
  2694  	return c.header_
  2695  }
  2696  
  2697  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2699  	if c.ifNoneMatch_ != "" {
  2700  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2701  	}
  2702  	var body io.Reader = nil
  2703  	c.urlParams_.Set("alt", alt)
  2704  	c.urlParams_.Set("prettyPrint", "false")
  2705  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy")
  2706  	urls += "?" + c.urlParams_.Encode()
  2707  	req, err := http.NewRequest("GET", urls, body)
  2708  	if err != nil {
  2709  		return nil, err
  2710  	}
  2711  	req.Header = reqHeaders
  2712  	googleapi.Expand(req.URL, map[string]string{
  2713  		"resource": c.resource,
  2714  	})
  2715  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2716  }
  2717  
  2718  // Do executes the "apphub.projects.locations.applications.getIamPolicy" call.
  2719  // Any non-2xx status code is an error. Response headers are in either
  2720  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2721  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2722  // whether the returned error was because http.StatusNotModified was returned.
  2723  func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2724  	gensupport.SetOptions(c.urlParams_, opts...)
  2725  	res, err := c.doRequest("json")
  2726  	if res != nil && res.StatusCode == http.StatusNotModified {
  2727  		if res.Body != nil {
  2728  			res.Body.Close()
  2729  		}
  2730  		return nil, gensupport.WrapError(&googleapi.Error{
  2731  			Code:   res.StatusCode,
  2732  			Header: res.Header,
  2733  		})
  2734  	}
  2735  	if err != nil {
  2736  		return nil, err
  2737  	}
  2738  	defer googleapi.CloseBody(res)
  2739  	if err := googleapi.CheckResponse(res); err != nil {
  2740  		return nil, gensupport.WrapError(err)
  2741  	}
  2742  	ret := &Policy{
  2743  		ServerResponse: googleapi.ServerResponse{
  2744  			Header:         res.Header,
  2745  			HTTPStatusCode: res.StatusCode,
  2746  		},
  2747  	}
  2748  	target := &ret
  2749  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2750  		return nil, err
  2751  	}
  2752  	return ret, nil
  2753  }
  2754  
  2755  type ProjectsLocationsApplicationsListCall struct {
  2756  	s            *APIService
  2757  	parent       string
  2758  	urlParams_   gensupport.URLParams
  2759  	ifNoneMatch_ string
  2760  	ctx_         context.Context
  2761  	header_      http.Header
  2762  }
  2763  
  2764  // List: Lists Applications in a host project and location.
  2765  //
  2766  //   - parent: Project and location to list Applications on. Expected format:
  2767  //     `projects/{project}/locations/{location}`.
  2768  func (r *ProjectsLocationsApplicationsService) List(parent string) *ProjectsLocationsApplicationsListCall {
  2769  	c := &ProjectsLocationsApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2770  	c.parent = parent
  2771  	return c
  2772  }
  2773  
  2774  // Filter sets the optional parameter "filter": Filtering results.
  2775  func (c *ProjectsLocationsApplicationsListCall) Filter(filter string) *ProjectsLocationsApplicationsListCall {
  2776  	c.urlParams_.Set("filter", filter)
  2777  	return c
  2778  }
  2779  
  2780  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  2781  // results.
  2782  func (c *ProjectsLocationsApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsListCall {
  2783  	c.urlParams_.Set("orderBy", orderBy)
  2784  	return c
  2785  }
  2786  
  2787  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  2788  // may return fewer items than requested. If unspecified, server will pick an
  2789  // appropriate default.
  2790  func (c *ProjectsLocationsApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsListCall {
  2791  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2792  	return c
  2793  }
  2794  
  2795  // PageToken sets the optional parameter "pageToken": A token identifying a
  2796  // page of results the server should return.
  2797  func (c *ProjectsLocationsApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsListCall {
  2798  	c.urlParams_.Set("pageToken", pageToken)
  2799  	return c
  2800  }
  2801  
  2802  // Fields allows partial responses to be retrieved. See
  2803  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2804  // details.
  2805  func (c *ProjectsLocationsApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsListCall {
  2806  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2807  	return c
  2808  }
  2809  
  2810  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2811  // object's ETag matches the given value. This is useful for getting updates
  2812  // only after the object has changed since the last request.
  2813  func (c *ProjectsLocationsApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsListCall {
  2814  	c.ifNoneMatch_ = entityTag
  2815  	return c
  2816  }
  2817  
  2818  // Context sets the context to be used in this call's Do method.
  2819  func (c *ProjectsLocationsApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsListCall {
  2820  	c.ctx_ = ctx
  2821  	return c
  2822  }
  2823  
  2824  // Header returns a http.Header that can be modified by the caller to add
  2825  // headers to the request.
  2826  func (c *ProjectsLocationsApplicationsListCall) Header() http.Header {
  2827  	if c.header_ == nil {
  2828  		c.header_ = make(http.Header)
  2829  	}
  2830  	return c.header_
  2831  }
  2832  
  2833  func (c *ProjectsLocationsApplicationsListCall) doRequest(alt string) (*http.Response, error) {
  2834  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2835  	if c.ifNoneMatch_ != "" {
  2836  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2837  	}
  2838  	var body io.Reader = nil
  2839  	c.urlParams_.Set("alt", alt)
  2840  	c.urlParams_.Set("prettyPrint", "false")
  2841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications")
  2842  	urls += "?" + c.urlParams_.Encode()
  2843  	req, err := http.NewRequest("GET", urls, body)
  2844  	if err != nil {
  2845  		return nil, err
  2846  	}
  2847  	req.Header = reqHeaders
  2848  	googleapi.Expand(req.URL, map[string]string{
  2849  		"parent": c.parent,
  2850  	})
  2851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2852  }
  2853  
  2854  // Do executes the "apphub.projects.locations.applications.list" call.
  2855  // Any non-2xx status code is an error. Response headers are in either
  2856  // *ListApplicationsResponse.ServerResponse.Header or (if a response was
  2857  // returned at all) in error.(*googleapi.Error).Header. Use
  2858  // googleapi.IsNotModified to check whether the returned error was because
  2859  // http.StatusNotModified was returned.
  2860  func (c *ProjectsLocationsApplicationsListCall) Do(opts ...googleapi.CallOption) (*ListApplicationsResponse, error) {
  2861  	gensupport.SetOptions(c.urlParams_, opts...)
  2862  	res, err := c.doRequest("json")
  2863  	if res != nil && res.StatusCode == http.StatusNotModified {
  2864  		if res.Body != nil {
  2865  			res.Body.Close()
  2866  		}
  2867  		return nil, gensupport.WrapError(&googleapi.Error{
  2868  			Code:   res.StatusCode,
  2869  			Header: res.Header,
  2870  		})
  2871  	}
  2872  	if err != nil {
  2873  		return nil, err
  2874  	}
  2875  	defer googleapi.CloseBody(res)
  2876  	if err := googleapi.CheckResponse(res); err != nil {
  2877  		return nil, gensupport.WrapError(err)
  2878  	}
  2879  	ret := &ListApplicationsResponse{
  2880  		ServerResponse: googleapi.ServerResponse{
  2881  			Header:         res.Header,
  2882  			HTTPStatusCode: res.StatusCode,
  2883  		},
  2884  	}
  2885  	target := &ret
  2886  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2887  		return nil, err
  2888  	}
  2889  	return ret, nil
  2890  }
  2891  
  2892  // Pages invokes f for each page of results.
  2893  // A non-nil error returned from f will halt the iteration.
  2894  // The provided context supersedes any context provided to the Context method.
  2895  func (c *ProjectsLocationsApplicationsListCall) Pages(ctx context.Context, f func(*ListApplicationsResponse) error) error {
  2896  	c.ctx_ = ctx
  2897  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2898  	for {
  2899  		x, err := c.Do()
  2900  		if err != nil {
  2901  			return err
  2902  		}
  2903  		if err := f(x); err != nil {
  2904  			return err
  2905  		}
  2906  		if x.NextPageToken == "" {
  2907  			return nil
  2908  		}
  2909  		c.PageToken(x.NextPageToken)
  2910  	}
  2911  }
  2912  
  2913  type ProjectsLocationsApplicationsPatchCall struct {
  2914  	s           *APIService
  2915  	name        string
  2916  	application *Application
  2917  	urlParams_  gensupport.URLParams
  2918  	ctx_        context.Context
  2919  	header_     http.Header
  2920  }
  2921  
  2922  // Patch: Updates an Application in a host project and location.
  2923  //
  2924  //   - name: Identifier. The resource name of an Application. Format:
  2925  //     "projects/{host-project-id}/locations/{location}/applications/{application-
  2926  //     id}".
  2927  func (r *ProjectsLocationsApplicationsService) Patch(name string, application *Application) *ProjectsLocationsApplicationsPatchCall {
  2928  	c := &ProjectsLocationsApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2929  	c.name = name
  2930  	c.application = application
  2931  	return c
  2932  }
  2933  
  2934  // RequestId sets the optional parameter "requestId": An optional request ID to
  2935  // identify requests. Specify a unique request ID so that if you must retry
  2936  // your request, the server will know to ignore the request if it has already
  2937  // been completed. The server will guarantee that for at least 60 minutes since
  2938  // the first request. For example, consider a situation where you make an
  2939  // initial request and the request times out. If you make the request again
  2940  // with the same request ID, the server can check if original operation with
  2941  // the same request ID was received, and if so, will ignore the second request.
  2942  // This prevents clients from accidentally creating duplicate commitments. The
  2943  // request ID must be a valid UUID with the exception that zero UUID is not
  2944  // supported (00000000-0000-0000-0000-000000000000).
  2945  func (c *ProjectsLocationsApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsPatchCall {
  2946  	c.urlParams_.Set("requestId", requestId)
  2947  	return c
  2948  }
  2949  
  2950  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  2951  // used to specify the fields to be overwritten in the Application resource by
  2952  // the update. The fields specified in the update_mask are relative to the
  2953  // resource, not the full request. The API changes the values of the fields as
  2954  // specified in the update_mask. The API ignores the values of all fields not
  2955  // covered by the update_mask. You can also unset a field by not specifying it
  2956  // in the updated message, but adding the field to the mask. This clears
  2957  // whatever value the field previously had.
  2958  func (c *ProjectsLocationsApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsPatchCall {
  2959  	c.urlParams_.Set("updateMask", updateMask)
  2960  	return c
  2961  }
  2962  
  2963  // Fields allows partial responses to be retrieved. See
  2964  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2965  // details.
  2966  func (c *ProjectsLocationsApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsPatchCall {
  2967  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2968  	return c
  2969  }
  2970  
  2971  // Context sets the context to be used in this call's Do method.
  2972  func (c *ProjectsLocationsApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsPatchCall {
  2973  	c.ctx_ = ctx
  2974  	return c
  2975  }
  2976  
  2977  // Header returns a http.Header that can be modified by the caller to add
  2978  // headers to the request.
  2979  func (c *ProjectsLocationsApplicationsPatchCall) Header() http.Header {
  2980  	if c.header_ == nil {
  2981  		c.header_ = make(http.Header)
  2982  	}
  2983  	return c.header_
  2984  }
  2985  
  2986  func (c *ProjectsLocationsApplicationsPatchCall) doRequest(alt string) (*http.Response, error) {
  2987  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2988  	var body io.Reader = nil
  2989  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.application)
  2990  	if err != nil {
  2991  		return nil, err
  2992  	}
  2993  	c.urlParams_.Set("alt", alt)
  2994  	c.urlParams_.Set("prettyPrint", "false")
  2995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  2996  	urls += "?" + c.urlParams_.Encode()
  2997  	req, err := http.NewRequest("PATCH", urls, body)
  2998  	if err != nil {
  2999  		return nil, err
  3000  	}
  3001  	req.Header = reqHeaders
  3002  	googleapi.Expand(req.URL, map[string]string{
  3003  		"name": c.name,
  3004  	})
  3005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3006  }
  3007  
  3008  // Do executes the "apphub.projects.locations.applications.patch" call.
  3009  // Any non-2xx status code is an error. Response headers are in either
  3010  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3011  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3012  // whether the returned error was because http.StatusNotModified was returned.
  3013  func (c *ProjectsLocationsApplicationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3014  	gensupport.SetOptions(c.urlParams_, opts...)
  3015  	res, err := c.doRequest("json")
  3016  	if res != nil && res.StatusCode == http.StatusNotModified {
  3017  		if res.Body != nil {
  3018  			res.Body.Close()
  3019  		}
  3020  		return nil, gensupport.WrapError(&googleapi.Error{
  3021  			Code:   res.StatusCode,
  3022  			Header: res.Header,
  3023  		})
  3024  	}
  3025  	if err != nil {
  3026  		return nil, err
  3027  	}
  3028  	defer googleapi.CloseBody(res)
  3029  	if err := googleapi.CheckResponse(res); err != nil {
  3030  		return nil, gensupport.WrapError(err)
  3031  	}
  3032  	ret := &Operation{
  3033  		ServerResponse: googleapi.ServerResponse{
  3034  			Header:         res.Header,
  3035  			HTTPStatusCode: res.StatusCode,
  3036  		},
  3037  	}
  3038  	target := &ret
  3039  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3040  		return nil, err
  3041  	}
  3042  	return ret, nil
  3043  }
  3044  
  3045  type ProjectsLocationsApplicationsSetIamPolicyCall struct {
  3046  	s                   *APIService
  3047  	resource            string
  3048  	setiampolicyrequest *SetIamPolicyRequest
  3049  	urlParams_          gensupport.URLParams
  3050  	ctx_                context.Context
  3051  	header_             http.Header
  3052  }
  3053  
  3054  // SetIamPolicy: Sets the access control policy on the specified resource.
  3055  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  3056  // and `PERMISSION_DENIED` errors.
  3057  //
  3058  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3059  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3060  //     for the appropriate value for this field.
  3061  func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall {
  3062  	c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3063  	c.resource = resource
  3064  	c.setiampolicyrequest = setiampolicyrequest
  3065  	return c
  3066  }
  3067  
  3068  // Fields allows partial responses to be retrieved. See
  3069  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3070  // details.
  3071  func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall {
  3072  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3073  	return c
  3074  }
  3075  
  3076  // Context sets the context to be used in this call's Do method.
  3077  func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall {
  3078  	c.ctx_ = ctx
  3079  	return c
  3080  }
  3081  
  3082  // Header returns a http.Header that can be modified by the caller to add
  3083  // headers to the request.
  3084  func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header {
  3085  	if c.header_ == nil {
  3086  		c.header_ = make(http.Header)
  3087  	}
  3088  	return c.header_
  3089  }
  3090  
  3091  func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3093  	var body io.Reader = nil
  3094  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3095  	if err != nil {
  3096  		return nil, err
  3097  	}
  3098  	c.urlParams_.Set("alt", alt)
  3099  	c.urlParams_.Set("prettyPrint", "false")
  3100  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy")
  3101  	urls += "?" + c.urlParams_.Encode()
  3102  	req, err := http.NewRequest("POST", urls, body)
  3103  	if err != nil {
  3104  		return nil, err
  3105  	}
  3106  	req.Header = reqHeaders
  3107  	googleapi.Expand(req.URL, map[string]string{
  3108  		"resource": c.resource,
  3109  	})
  3110  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3111  }
  3112  
  3113  // Do executes the "apphub.projects.locations.applications.setIamPolicy" call.
  3114  // Any non-2xx status code is an error. Response headers are in either
  3115  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3116  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3117  // whether the returned error was because http.StatusNotModified was returned.
  3118  func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3119  	gensupport.SetOptions(c.urlParams_, opts...)
  3120  	res, err := c.doRequest("json")
  3121  	if res != nil && res.StatusCode == http.StatusNotModified {
  3122  		if res.Body != nil {
  3123  			res.Body.Close()
  3124  		}
  3125  		return nil, gensupport.WrapError(&googleapi.Error{
  3126  			Code:   res.StatusCode,
  3127  			Header: res.Header,
  3128  		})
  3129  	}
  3130  	if err != nil {
  3131  		return nil, err
  3132  	}
  3133  	defer googleapi.CloseBody(res)
  3134  	if err := googleapi.CheckResponse(res); err != nil {
  3135  		return nil, gensupport.WrapError(err)
  3136  	}
  3137  	ret := &Policy{
  3138  		ServerResponse: googleapi.ServerResponse{
  3139  			Header:         res.Header,
  3140  			HTTPStatusCode: res.StatusCode,
  3141  		},
  3142  	}
  3143  	target := &ret
  3144  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3145  		return nil, err
  3146  	}
  3147  	return ret, nil
  3148  }
  3149  
  3150  type ProjectsLocationsApplicationsTestIamPermissionsCall struct {
  3151  	s                         *APIService
  3152  	resource                  string
  3153  	testiampermissionsrequest *TestIamPermissionsRequest
  3154  	urlParams_                gensupport.URLParams
  3155  	ctx_                      context.Context
  3156  	header_                   http.Header
  3157  }
  3158  
  3159  // TestIamPermissions: Returns permissions that a caller has on the specified
  3160  // resource. If the resource does not exist, this will return an empty set of
  3161  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  3162  // used for building permission-aware UIs and command-line tools, not for
  3163  // authorization checking. This operation may "fail open" without warning.
  3164  //
  3165  //   - resource: REQUIRED: The resource for which the policy detail is being
  3166  //     requested. See Resource names
  3167  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3168  //     value for this field.
  3169  func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall {
  3170  	c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3171  	c.resource = resource
  3172  	c.testiampermissionsrequest = testiampermissionsrequest
  3173  	return c
  3174  }
  3175  
  3176  // Fields allows partial responses to be retrieved. See
  3177  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3178  // details.
  3179  func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall {
  3180  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3181  	return c
  3182  }
  3183  
  3184  // Context sets the context to be used in this call's Do method.
  3185  func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall {
  3186  	c.ctx_ = ctx
  3187  	return c
  3188  }
  3189  
  3190  // Header returns a http.Header that can be modified by the caller to add
  3191  // headers to the request.
  3192  func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header {
  3193  	if c.header_ == nil {
  3194  		c.header_ = make(http.Header)
  3195  	}
  3196  	return c.header_
  3197  }
  3198  
  3199  func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3200  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3201  	var body io.Reader = nil
  3202  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3203  	if err != nil {
  3204  		return nil, err
  3205  	}
  3206  	c.urlParams_.Set("alt", alt)
  3207  	c.urlParams_.Set("prettyPrint", "false")
  3208  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions")
  3209  	urls += "?" + c.urlParams_.Encode()
  3210  	req, err := http.NewRequest("POST", urls, body)
  3211  	if err != nil {
  3212  		return nil, err
  3213  	}
  3214  	req.Header = reqHeaders
  3215  	googleapi.Expand(req.URL, map[string]string{
  3216  		"resource": c.resource,
  3217  	})
  3218  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3219  }
  3220  
  3221  // Do executes the "apphub.projects.locations.applications.testIamPermissions" call.
  3222  // Any non-2xx status code is an error. Response headers are in either
  3223  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3224  // returned at all) in error.(*googleapi.Error).Header. Use
  3225  // googleapi.IsNotModified to check whether the returned error was because
  3226  // http.StatusNotModified was returned.
  3227  func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3228  	gensupport.SetOptions(c.urlParams_, opts...)
  3229  	res, err := c.doRequest("json")
  3230  	if res != nil && res.StatusCode == http.StatusNotModified {
  3231  		if res.Body != nil {
  3232  			res.Body.Close()
  3233  		}
  3234  		return nil, gensupport.WrapError(&googleapi.Error{
  3235  			Code:   res.StatusCode,
  3236  			Header: res.Header,
  3237  		})
  3238  	}
  3239  	if err != nil {
  3240  		return nil, err
  3241  	}
  3242  	defer googleapi.CloseBody(res)
  3243  	if err := googleapi.CheckResponse(res); err != nil {
  3244  		return nil, gensupport.WrapError(err)
  3245  	}
  3246  	ret := &TestIamPermissionsResponse{
  3247  		ServerResponse: googleapi.ServerResponse{
  3248  			Header:         res.Header,
  3249  			HTTPStatusCode: res.StatusCode,
  3250  		},
  3251  	}
  3252  	target := &ret
  3253  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3254  		return nil, err
  3255  	}
  3256  	return ret, nil
  3257  }
  3258  
  3259  type ProjectsLocationsApplicationsServicesCreateCall struct {
  3260  	s          *APIService
  3261  	parent     string
  3262  	service    *Service
  3263  	urlParams_ gensupport.URLParams
  3264  	ctx_       context.Context
  3265  	header_    http.Header
  3266  }
  3267  
  3268  // Create: Creates a Service in an Application.
  3269  //
  3270  //   - parent: Fully qualified name of the parent Application to create the
  3271  //     Service in. Expected format:
  3272  //     `projects/{project}/locations/{location}/applications/{application}`.
  3273  func (r *ProjectsLocationsApplicationsServicesService) Create(parent string, service *Service) *ProjectsLocationsApplicationsServicesCreateCall {
  3274  	c := &ProjectsLocationsApplicationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3275  	c.parent = parent
  3276  	c.service = service
  3277  	return c
  3278  }
  3279  
  3280  // RequestId sets the optional parameter "requestId": An optional request ID to
  3281  // identify requests. Specify a unique request ID so that if you must retry
  3282  // your request, the server will know to ignore the request if it has already
  3283  // been completed. The server will guarantee that for at least 60 minutes since
  3284  // the first request. For example, consider a situation where you make an
  3285  // initial request and the request times out. If you make the request again
  3286  // with the same request ID, the server can check if original operation with
  3287  // the same request ID was received, and if so, will ignore the second request.
  3288  // This prevents clients from accidentally creating duplicate commitments. The
  3289  // request ID must be a valid UUID with the exception that zero UUID is not
  3290  // supported (00000000-0000-0000-0000-000000000000).
  3291  func (c *ProjectsLocationsApplicationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesCreateCall {
  3292  	c.urlParams_.Set("requestId", requestId)
  3293  	return c
  3294  }
  3295  
  3296  // ServiceId sets the optional parameter "serviceId": Required. The Service
  3297  // identifier. Must contain only lowercase letters, numbers or hyphens, with
  3298  // the first character a letter, the last a letter or a number, and a 63
  3299  // character maximum.
  3300  func (c *ProjectsLocationsApplicationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsApplicationsServicesCreateCall {
  3301  	c.urlParams_.Set("serviceId", serviceId)
  3302  	return c
  3303  }
  3304  
  3305  // Fields allows partial responses to be retrieved. See
  3306  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3307  // details.
  3308  func (c *ProjectsLocationsApplicationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesCreateCall {
  3309  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3310  	return c
  3311  }
  3312  
  3313  // Context sets the context to be used in this call's Do method.
  3314  func (c *ProjectsLocationsApplicationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesCreateCall {
  3315  	c.ctx_ = ctx
  3316  	return c
  3317  }
  3318  
  3319  // Header returns a http.Header that can be modified by the caller to add
  3320  // headers to the request.
  3321  func (c *ProjectsLocationsApplicationsServicesCreateCall) Header() http.Header {
  3322  	if c.header_ == nil {
  3323  		c.header_ = make(http.Header)
  3324  	}
  3325  	return c.header_
  3326  }
  3327  
  3328  func (c *ProjectsLocationsApplicationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
  3329  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3330  	var body io.Reader = nil
  3331  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  3332  	if err != nil {
  3333  		return nil, err
  3334  	}
  3335  	c.urlParams_.Set("alt", alt)
  3336  	c.urlParams_.Set("prettyPrint", "false")
  3337  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/services")
  3338  	urls += "?" + c.urlParams_.Encode()
  3339  	req, err := http.NewRequest("POST", urls, body)
  3340  	if err != nil {
  3341  		return nil, err
  3342  	}
  3343  	req.Header = reqHeaders
  3344  	googleapi.Expand(req.URL, map[string]string{
  3345  		"parent": c.parent,
  3346  	})
  3347  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3348  }
  3349  
  3350  // Do executes the "apphub.projects.locations.applications.services.create" call.
  3351  // Any non-2xx status code is an error. Response headers are in either
  3352  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3353  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3354  // whether the returned error was because http.StatusNotModified was returned.
  3355  func (c *ProjectsLocationsApplicationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3356  	gensupport.SetOptions(c.urlParams_, opts...)
  3357  	res, err := c.doRequest("json")
  3358  	if res != nil && res.StatusCode == http.StatusNotModified {
  3359  		if res.Body != nil {
  3360  			res.Body.Close()
  3361  		}
  3362  		return nil, gensupport.WrapError(&googleapi.Error{
  3363  			Code:   res.StatusCode,
  3364  			Header: res.Header,
  3365  		})
  3366  	}
  3367  	if err != nil {
  3368  		return nil, err
  3369  	}
  3370  	defer googleapi.CloseBody(res)
  3371  	if err := googleapi.CheckResponse(res); err != nil {
  3372  		return nil, gensupport.WrapError(err)
  3373  	}
  3374  	ret := &Operation{
  3375  		ServerResponse: googleapi.ServerResponse{
  3376  			Header:         res.Header,
  3377  			HTTPStatusCode: res.StatusCode,
  3378  		},
  3379  	}
  3380  	target := &ret
  3381  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3382  		return nil, err
  3383  	}
  3384  	return ret, nil
  3385  }
  3386  
  3387  type ProjectsLocationsApplicationsServicesDeleteCall struct {
  3388  	s          *APIService
  3389  	name       string
  3390  	urlParams_ gensupport.URLParams
  3391  	ctx_       context.Context
  3392  	header_    http.Header
  3393  }
  3394  
  3395  // Delete: Deletes a Service from an Application.
  3396  //
  3397  //   - name: Fully qualified name of the Service to delete from an Application.
  3398  //     Expected format:
  3399  //     `projects/{project}/locations/{location}/applications/{application}/service
  3400  //     s/{service}`.
  3401  func (r *ProjectsLocationsApplicationsServicesService) Delete(name string) *ProjectsLocationsApplicationsServicesDeleteCall {
  3402  	c := &ProjectsLocationsApplicationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3403  	c.name = name
  3404  	return c
  3405  }
  3406  
  3407  // RequestId sets the optional parameter "requestId": An optional request ID to
  3408  // identify requests. Specify a unique request ID so that if you must retry
  3409  // your request, the server will know to ignore the request if it has already
  3410  // been completed. The server will guarantee that for at least 60 minutes after
  3411  // the first request. For example, consider a situation where you make an
  3412  // initial request and the request times out. If you make the request again
  3413  // with the same request ID, the server can check if original operation with
  3414  // the same request ID was received, and if so, will ignore the second request.
  3415  // This prevents clients from accidentally creating duplicate commitments. The
  3416  // request ID must be a valid UUID with the exception that zero UUID is not
  3417  // supported (00000000-0000-0000-0000-000000000000).
  3418  func (c *ProjectsLocationsApplicationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesDeleteCall {
  3419  	c.urlParams_.Set("requestId", requestId)
  3420  	return c
  3421  }
  3422  
  3423  // Fields allows partial responses to be retrieved. See
  3424  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3425  // details.
  3426  func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall {
  3427  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3428  	return c
  3429  }
  3430  
  3431  // Context sets the context to be used in this call's Do method.
  3432  func (c *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall {
  3433  	c.ctx_ = ctx
  3434  	return c
  3435  }
  3436  
  3437  // Header returns a http.Header that can be modified by the caller to add
  3438  // headers to the request.
  3439  func (c *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header {
  3440  	if c.header_ == nil {
  3441  		c.header_ = make(http.Header)
  3442  	}
  3443  	return c.header_
  3444  }
  3445  
  3446  func (c *ProjectsLocationsApplicationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3447  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3448  	var body io.Reader = nil
  3449  	c.urlParams_.Set("alt", alt)
  3450  	c.urlParams_.Set("prettyPrint", "false")
  3451  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3452  	urls += "?" + c.urlParams_.Encode()
  3453  	req, err := http.NewRequest("DELETE", urls, body)
  3454  	if err != nil {
  3455  		return nil, err
  3456  	}
  3457  	req.Header = reqHeaders
  3458  	googleapi.Expand(req.URL, map[string]string{
  3459  		"name": c.name,
  3460  	})
  3461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3462  }
  3463  
  3464  // Do executes the "apphub.projects.locations.applications.services.delete" call.
  3465  // Any non-2xx status code is an error. Response headers are in either
  3466  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3467  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3468  // whether the returned error was because http.StatusNotModified was returned.
  3469  func (c *ProjectsLocationsApplicationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3470  	gensupport.SetOptions(c.urlParams_, opts...)
  3471  	res, err := c.doRequest("json")
  3472  	if res != nil && res.StatusCode == http.StatusNotModified {
  3473  		if res.Body != nil {
  3474  			res.Body.Close()
  3475  		}
  3476  		return nil, gensupport.WrapError(&googleapi.Error{
  3477  			Code:   res.StatusCode,
  3478  			Header: res.Header,
  3479  		})
  3480  	}
  3481  	if err != nil {
  3482  		return nil, err
  3483  	}
  3484  	defer googleapi.CloseBody(res)
  3485  	if err := googleapi.CheckResponse(res); err != nil {
  3486  		return nil, gensupport.WrapError(err)
  3487  	}
  3488  	ret := &Operation{
  3489  		ServerResponse: googleapi.ServerResponse{
  3490  			Header:         res.Header,
  3491  			HTTPStatusCode: res.StatusCode,
  3492  		},
  3493  	}
  3494  	target := &ret
  3495  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3496  		return nil, err
  3497  	}
  3498  	return ret, nil
  3499  }
  3500  
  3501  type ProjectsLocationsApplicationsServicesGetCall struct {
  3502  	s            *APIService
  3503  	name         string
  3504  	urlParams_   gensupport.URLParams
  3505  	ifNoneMatch_ string
  3506  	ctx_         context.Context
  3507  	header_      http.Header
  3508  }
  3509  
  3510  // Get: Gets a Service in an Application.
  3511  //
  3512  //   - name: Fully qualified name of the Service to fetch. Expected format:
  3513  //     `projects/{project}/locations/{location}/applications/{application}/service
  3514  //     s/{service}`.
  3515  func (r *ProjectsLocationsApplicationsServicesService) Get(name string) *ProjectsLocationsApplicationsServicesGetCall {
  3516  	c := &ProjectsLocationsApplicationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3517  	c.name = name
  3518  	return c
  3519  }
  3520  
  3521  // Fields allows partial responses to be retrieved. See
  3522  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3523  // details.
  3524  func (c *ProjectsLocationsApplicationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesGetCall {
  3525  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3526  	return c
  3527  }
  3528  
  3529  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3530  // object's ETag matches the given value. This is useful for getting updates
  3531  // only after the object has changed since the last request.
  3532  func (c *ProjectsLocationsApplicationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesGetCall {
  3533  	c.ifNoneMatch_ = entityTag
  3534  	return c
  3535  }
  3536  
  3537  // Context sets the context to be used in this call's Do method.
  3538  func (c *ProjectsLocationsApplicationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesGetCall {
  3539  	c.ctx_ = ctx
  3540  	return c
  3541  }
  3542  
  3543  // Header returns a http.Header that can be modified by the caller to add
  3544  // headers to the request.
  3545  func (c *ProjectsLocationsApplicationsServicesGetCall) Header() http.Header {
  3546  	if c.header_ == nil {
  3547  		c.header_ = make(http.Header)
  3548  	}
  3549  	return c.header_
  3550  }
  3551  
  3552  func (c *ProjectsLocationsApplicationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  3553  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3554  	if c.ifNoneMatch_ != "" {
  3555  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3556  	}
  3557  	var body io.Reader = nil
  3558  	c.urlParams_.Set("alt", alt)
  3559  	c.urlParams_.Set("prettyPrint", "false")
  3560  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3561  	urls += "?" + c.urlParams_.Encode()
  3562  	req, err := http.NewRequest("GET", urls, body)
  3563  	if err != nil {
  3564  		return nil, err
  3565  	}
  3566  	req.Header = reqHeaders
  3567  	googleapi.Expand(req.URL, map[string]string{
  3568  		"name": c.name,
  3569  	})
  3570  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3571  }
  3572  
  3573  // Do executes the "apphub.projects.locations.applications.services.get" call.
  3574  // Any non-2xx status code is an error. Response headers are in either
  3575  // *Service.ServerResponse.Header or (if a response was returned at all) in
  3576  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3577  // whether the returned error was because http.StatusNotModified was returned.
  3578  func (c *ProjectsLocationsApplicationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  3579  	gensupport.SetOptions(c.urlParams_, opts...)
  3580  	res, err := c.doRequest("json")
  3581  	if res != nil && res.StatusCode == http.StatusNotModified {
  3582  		if res.Body != nil {
  3583  			res.Body.Close()
  3584  		}
  3585  		return nil, gensupport.WrapError(&googleapi.Error{
  3586  			Code:   res.StatusCode,
  3587  			Header: res.Header,
  3588  		})
  3589  	}
  3590  	if err != nil {
  3591  		return nil, err
  3592  	}
  3593  	defer googleapi.CloseBody(res)
  3594  	if err := googleapi.CheckResponse(res); err != nil {
  3595  		return nil, gensupport.WrapError(err)
  3596  	}
  3597  	ret := &Service{
  3598  		ServerResponse: googleapi.ServerResponse{
  3599  			Header:         res.Header,
  3600  			HTTPStatusCode: res.StatusCode,
  3601  		},
  3602  	}
  3603  	target := &ret
  3604  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3605  		return nil, err
  3606  	}
  3607  	return ret, nil
  3608  }
  3609  
  3610  type ProjectsLocationsApplicationsServicesListCall struct {
  3611  	s            *APIService
  3612  	parent       string
  3613  	urlParams_   gensupport.URLParams
  3614  	ifNoneMatch_ string
  3615  	ctx_         context.Context
  3616  	header_      http.Header
  3617  }
  3618  
  3619  // List: Lists Services in an Application.
  3620  //
  3621  //   - parent: Fully qualified name of the parent Application to list Services
  3622  //     for. Expected format:
  3623  //     `projects/{project}/locations/{location}/applications/{application}`.
  3624  func (r *ProjectsLocationsApplicationsServicesService) List(parent string) *ProjectsLocationsApplicationsServicesListCall {
  3625  	c := &ProjectsLocationsApplicationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3626  	c.parent = parent
  3627  	return c
  3628  }
  3629  
  3630  // Filter sets the optional parameter "filter": Filtering results
  3631  func (c *ProjectsLocationsApplicationsServicesListCall) Filter(filter string) *ProjectsLocationsApplicationsServicesListCall {
  3632  	c.urlParams_.Set("filter", filter)
  3633  	return c
  3634  }
  3635  
  3636  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  3637  // results
  3638  func (c *ProjectsLocationsApplicationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsServicesListCall {
  3639  	c.urlParams_.Set("orderBy", orderBy)
  3640  	return c
  3641  }
  3642  
  3643  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  3644  // may return fewer items than requested. If unspecified, server will pick an
  3645  // appropriate default.
  3646  func (c *ProjectsLocationsApplicationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsServicesListCall {
  3647  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3648  	return c
  3649  }
  3650  
  3651  // PageToken sets the optional parameter "pageToken": A token identifying a
  3652  // page of results the server should return.
  3653  func (c *ProjectsLocationsApplicationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsServicesListCall {
  3654  	c.urlParams_.Set("pageToken", pageToken)
  3655  	return c
  3656  }
  3657  
  3658  // Fields allows partial responses to be retrieved. See
  3659  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3660  // details.
  3661  func (c *ProjectsLocationsApplicationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesListCall {
  3662  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3663  	return c
  3664  }
  3665  
  3666  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3667  // object's ETag matches the given value. This is useful for getting updates
  3668  // only after the object has changed since the last request.
  3669  func (c *ProjectsLocationsApplicationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsServicesListCall {
  3670  	c.ifNoneMatch_ = entityTag
  3671  	return c
  3672  }
  3673  
  3674  // Context sets the context to be used in this call's Do method.
  3675  func (c *ProjectsLocationsApplicationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesListCall {
  3676  	c.ctx_ = ctx
  3677  	return c
  3678  }
  3679  
  3680  // Header returns a http.Header that can be modified by the caller to add
  3681  // headers to the request.
  3682  func (c *ProjectsLocationsApplicationsServicesListCall) Header() http.Header {
  3683  	if c.header_ == nil {
  3684  		c.header_ = make(http.Header)
  3685  	}
  3686  	return c.header_
  3687  }
  3688  
  3689  func (c *ProjectsLocationsApplicationsServicesListCall) doRequest(alt string) (*http.Response, error) {
  3690  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3691  	if c.ifNoneMatch_ != "" {
  3692  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3693  	}
  3694  	var body io.Reader = nil
  3695  	c.urlParams_.Set("alt", alt)
  3696  	c.urlParams_.Set("prettyPrint", "false")
  3697  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/services")
  3698  	urls += "?" + c.urlParams_.Encode()
  3699  	req, err := http.NewRequest("GET", urls, body)
  3700  	if err != nil {
  3701  		return nil, err
  3702  	}
  3703  	req.Header = reqHeaders
  3704  	googleapi.Expand(req.URL, map[string]string{
  3705  		"parent": c.parent,
  3706  	})
  3707  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3708  }
  3709  
  3710  // Do executes the "apphub.projects.locations.applications.services.list" call.
  3711  // Any non-2xx status code is an error. Response headers are in either
  3712  // *ListServicesResponse.ServerResponse.Header or (if a response was returned
  3713  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3714  // check whether the returned error was because http.StatusNotModified was
  3715  // returned.
  3716  func (c *ProjectsLocationsApplicationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  3717  	gensupport.SetOptions(c.urlParams_, opts...)
  3718  	res, err := c.doRequest("json")
  3719  	if res != nil && res.StatusCode == http.StatusNotModified {
  3720  		if res.Body != nil {
  3721  			res.Body.Close()
  3722  		}
  3723  		return nil, gensupport.WrapError(&googleapi.Error{
  3724  			Code:   res.StatusCode,
  3725  			Header: res.Header,
  3726  		})
  3727  	}
  3728  	if err != nil {
  3729  		return nil, err
  3730  	}
  3731  	defer googleapi.CloseBody(res)
  3732  	if err := googleapi.CheckResponse(res); err != nil {
  3733  		return nil, gensupport.WrapError(err)
  3734  	}
  3735  	ret := &ListServicesResponse{
  3736  		ServerResponse: googleapi.ServerResponse{
  3737  			Header:         res.Header,
  3738  			HTTPStatusCode: res.StatusCode,
  3739  		},
  3740  	}
  3741  	target := &ret
  3742  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3743  		return nil, err
  3744  	}
  3745  	return ret, nil
  3746  }
  3747  
  3748  // Pages invokes f for each page of results.
  3749  // A non-nil error returned from f will halt the iteration.
  3750  // The provided context supersedes any context provided to the Context method.
  3751  func (c *ProjectsLocationsApplicationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  3752  	c.ctx_ = ctx
  3753  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3754  	for {
  3755  		x, err := c.Do()
  3756  		if err != nil {
  3757  			return err
  3758  		}
  3759  		if err := f(x); err != nil {
  3760  			return err
  3761  		}
  3762  		if x.NextPageToken == "" {
  3763  			return nil
  3764  		}
  3765  		c.PageToken(x.NextPageToken)
  3766  	}
  3767  }
  3768  
  3769  type ProjectsLocationsApplicationsServicesPatchCall struct {
  3770  	s          *APIService
  3771  	name       string
  3772  	service    *Service
  3773  	urlParams_ gensupport.URLParams
  3774  	ctx_       context.Context
  3775  	header_    http.Header
  3776  }
  3777  
  3778  // Patch: Updates a Service in an Application.
  3779  //
  3780  //   - name: Identifier. The resource name of a Service. Format:
  3781  //     "projects/{host-project-id}/locations/{location}/applications/{application-
  3782  //     id}/services/{service-id}".
  3783  func (r *ProjectsLocationsApplicationsServicesService) Patch(name string, service *Service) *ProjectsLocationsApplicationsServicesPatchCall {
  3784  	c := &ProjectsLocationsApplicationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3785  	c.name = name
  3786  	c.service = service
  3787  	return c
  3788  }
  3789  
  3790  // RequestId sets the optional parameter "requestId": An optional request ID to
  3791  // identify requests. Specify a unique request ID so that if you must retry
  3792  // your request, the server will know to ignore the request if it has already
  3793  // been completed. The server will guarantee that for at least 60 minutes since
  3794  // the first request. For example, consider a situation where you make an
  3795  // initial request and the request times out. If you make the request again
  3796  // with the same request ID, the server can check if original operation with
  3797  // the same request ID was received, and if so, will ignore the second request.
  3798  // This prevents clients from accidentally creating duplicate commitments. The
  3799  // request ID must be a valid UUID with the exception that zero UUID is not
  3800  // supported (00000000-0000-0000-0000-000000000000).
  3801  func (c *ProjectsLocationsApplicationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsServicesPatchCall {
  3802  	c.urlParams_.Set("requestId", requestId)
  3803  	return c
  3804  }
  3805  
  3806  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  3807  // used to specify the fields to be overwritten in the Service resource by the
  3808  // update. The fields specified in the update_mask are relative to the
  3809  // resource, not the full request. The API changes the values of the fields as
  3810  // specified in the update_mask. The API ignores the values of all fields not
  3811  // covered by the update_mask. You can also unset a field by not specifying it
  3812  // in the updated message, but adding the field to the mask. This clears
  3813  // whatever value the field previously had.
  3814  func (c *ProjectsLocationsApplicationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsServicesPatchCall {
  3815  	c.urlParams_.Set("updateMask", updateMask)
  3816  	return c
  3817  }
  3818  
  3819  // Fields allows partial responses to be retrieved. See
  3820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3821  // details.
  3822  func (c *ProjectsLocationsApplicationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesPatchCall {
  3823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3824  	return c
  3825  }
  3826  
  3827  // Context sets the context to be used in this call's Do method.
  3828  func (c *ProjectsLocationsApplicationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesPatchCall {
  3829  	c.ctx_ = ctx
  3830  	return c
  3831  }
  3832  
  3833  // Header returns a http.Header that can be modified by the caller to add
  3834  // headers to the request.
  3835  func (c *ProjectsLocationsApplicationsServicesPatchCall) Header() http.Header {
  3836  	if c.header_ == nil {
  3837  		c.header_ = make(http.Header)
  3838  	}
  3839  	return c.header_
  3840  }
  3841  
  3842  func (c *ProjectsLocationsApplicationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  3843  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3844  	var body io.Reader = nil
  3845  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  3846  	if err != nil {
  3847  		return nil, err
  3848  	}
  3849  	c.urlParams_.Set("alt", alt)
  3850  	c.urlParams_.Set("prettyPrint", "false")
  3851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  3852  	urls += "?" + c.urlParams_.Encode()
  3853  	req, err := http.NewRequest("PATCH", urls, body)
  3854  	if err != nil {
  3855  		return nil, err
  3856  	}
  3857  	req.Header = reqHeaders
  3858  	googleapi.Expand(req.URL, map[string]string{
  3859  		"name": c.name,
  3860  	})
  3861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3862  }
  3863  
  3864  // Do executes the "apphub.projects.locations.applications.services.patch" call.
  3865  // Any non-2xx status code is an error. Response headers are in either
  3866  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3867  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3868  // whether the returned error was because http.StatusNotModified was returned.
  3869  func (c *ProjectsLocationsApplicationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3870  	gensupport.SetOptions(c.urlParams_, opts...)
  3871  	res, err := c.doRequest("json")
  3872  	if res != nil && res.StatusCode == http.StatusNotModified {
  3873  		if res.Body != nil {
  3874  			res.Body.Close()
  3875  		}
  3876  		return nil, gensupport.WrapError(&googleapi.Error{
  3877  			Code:   res.StatusCode,
  3878  			Header: res.Header,
  3879  		})
  3880  	}
  3881  	if err != nil {
  3882  		return nil, err
  3883  	}
  3884  	defer googleapi.CloseBody(res)
  3885  	if err := googleapi.CheckResponse(res); err != nil {
  3886  		return nil, gensupport.WrapError(err)
  3887  	}
  3888  	ret := &Operation{
  3889  		ServerResponse: googleapi.ServerResponse{
  3890  			Header:         res.Header,
  3891  			HTTPStatusCode: res.StatusCode,
  3892  		},
  3893  	}
  3894  	target := &ret
  3895  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3896  		return nil, err
  3897  	}
  3898  	return ret, nil
  3899  }
  3900  
  3901  type ProjectsLocationsApplicationsWorkloadsCreateCall struct {
  3902  	s          *APIService
  3903  	parent     string
  3904  	workload   *Workload
  3905  	urlParams_ gensupport.URLParams
  3906  	ctx_       context.Context
  3907  	header_    http.Header
  3908  }
  3909  
  3910  // Create: Creates a Workload in an Application.
  3911  //
  3912  //   - parent: Fully qualified name of the Application to create Workload in.
  3913  //     Expected format:
  3914  //     `projects/{project}/locations/{location}/applications/{application}`.
  3915  func (r *ProjectsLocationsApplicationsWorkloadsService) Create(parent string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsCreateCall {
  3916  	c := &ProjectsLocationsApplicationsWorkloadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3917  	c.parent = parent
  3918  	c.workload = workload
  3919  	return c
  3920  }
  3921  
  3922  // RequestId sets the optional parameter "requestId": An optional request ID to
  3923  // identify requests. Specify a unique request ID so that if you must retry
  3924  // your request, the server will know to ignore the request if it has already
  3925  // been completed. The server will guarantee that for at least 60 minutes since
  3926  // the first request. For example, consider a situation where you make an
  3927  // initial request and the request times out. If you make the request again
  3928  // with the same request ID, the server can check if original operation with
  3929  // the same request ID was received, and if so, will ignore the second request.
  3930  // This prevents clients from accidentally creating duplicate commitments. The
  3931  // request ID must be a valid UUID with the exception that zero UUID is not
  3932  // supported (00000000-0000-0000-0000-000000000000).
  3933  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsCreateCall {
  3934  	c.urlParams_.Set("requestId", requestId)
  3935  	return c
  3936  }
  3937  
  3938  // WorkloadId sets the optional parameter "workloadId": Required. The Workload
  3939  // identifier. Must contain only lowercase letters, numbers or hyphens, with
  3940  // the first character a letter, the last a letter or a number, and a 63
  3941  // character maximum.
  3942  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) WorkloadId(workloadId string) *ProjectsLocationsApplicationsWorkloadsCreateCall {
  3943  	c.urlParams_.Set("workloadId", workloadId)
  3944  	return c
  3945  }
  3946  
  3947  // Fields allows partial responses to be retrieved. See
  3948  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3949  // details.
  3950  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsCreateCall {
  3951  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3952  	return c
  3953  }
  3954  
  3955  // Context sets the context to be used in this call's Do method.
  3956  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsCreateCall {
  3957  	c.ctx_ = ctx
  3958  	return c
  3959  }
  3960  
  3961  // Header returns a http.Header that can be modified by the caller to add
  3962  // headers to the request.
  3963  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Header() http.Header {
  3964  	if c.header_ == nil {
  3965  		c.header_ = make(http.Header)
  3966  	}
  3967  	return c.header_
  3968  }
  3969  
  3970  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) doRequest(alt string) (*http.Response, error) {
  3971  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3972  	var body io.Reader = nil
  3973  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload)
  3974  	if err != nil {
  3975  		return nil, err
  3976  	}
  3977  	c.urlParams_.Set("alt", alt)
  3978  	c.urlParams_.Set("prettyPrint", "false")
  3979  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workloads")
  3980  	urls += "?" + c.urlParams_.Encode()
  3981  	req, err := http.NewRequest("POST", urls, body)
  3982  	if err != nil {
  3983  		return nil, err
  3984  	}
  3985  	req.Header = reqHeaders
  3986  	googleapi.Expand(req.URL, map[string]string{
  3987  		"parent": c.parent,
  3988  	})
  3989  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3990  }
  3991  
  3992  // Do executes the "apphub.projects.locations.applications.workloads.create" call.
  3993  // Any non-2xx status code is an error. Response headers are in either
  3994  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3995  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3996  // whether the returned error was because http.StatusNotModified was returned.
  3997  func (c *ProjectsLocationsApplicationsWorkloadsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3998  	gensupport.SetOptions(c.urlParams_, opts...)
  3999  	res, err := c.doRequest("json")
  4000  	if res != nil && res.StatusCode == http.StatusNotModified {
  4001  		if res.Body != nil {
  4002  			res.Body.Close()
  4003  		}
  4004  		return nil, gensupport.WrapError(&googleapi.Error{
  4005  			Code:   res.StatusCode,
  4006  			Header: res.Header,
  4007  		})
  4008  	}
  4009  	if err != nil {
  4010  		return nil, err
  4011  	}
  4012  	defer googleapi.CloseBody(res)
  4013  	if err := googleapi.CheckResponse(res); err != nil {
  4014  		return nil, gensupport.WrapError(err)
  4015  	}
  4016  	ret := &Operation{
  4017  		ServerResponse: googleapi.ServerResponse{
  4018  			Header:         res.Header,
  4019  			HTTPStatusCode: res.StatusCode,
  4020  		},
  4021  	}
  4022  	target := &ret
  4023  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4024  		return nil, err
  4025  	}
  4026  	return ret, nil
  4027  }
  4028  
  4029  type ProjectsLocationsApplicationsWorkloadsDeleteCall struct {
  4030  	s          *APIService
  4031  	name       string
  4032  	urlParams_ gensupport.URLParams
  4033  	ctx_       context.Context
  4034  	header_    http.Header
  4035  }
  4036  
  4037  // Delete: Deletes a Workload from an Application.
  4038  //
  4039  //   - name: Fully qualified name of the Workload to delete from an Application.
  4040  //     Expected format:
  4041  //     `projects/{project}/locations/{location}/applications/{application}/workloa
  4042  //     ds/{workload}`.
  4043  func (r *ProjectsLocationsApplicationsWorkloadsService) Delete(name string) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
  4044  	c := &ProjectsLocationsApplicationsWorkloadsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4045  	c.name = name
  4046  	return c
  4047  }
  4048  
  4049  // RequestId sets the optional parameter "requestId": An optional request ID to
  4050  // identify requests. Specify a unique request ID so that if you must retry
  4051  // your request, the server will know to ignore the request if it has already
  4052  // been completed. The server will guarantee that for at least 60 minutes after
  4053  // the first request. For example, consider a situation where you make an
  4054  // initial request and the request times out. If you make the request again
  4055  // with the same request ID, the server can check if original operation with
  4056  // the same request ID was received, and if so, will ignore the second request.
  4057  // This prevents clients from accidentally creating duplicate commitments. The
  4058  // request ID must be a valid UUID with the exception that zero UUID is not
  4059  // supported (00000000-0000-0000-0000-000000000000).
  4060  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
  4061  	c.urlParams_.Set("requestId", requestId)
  4062  	return c
  4063  }
  4064  
  4065  // Fields allows partial responses to be retrieved. See
  4066  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4067  // details.
  4068  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
  4069  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4070  	return c
  4071  }
  4072  
  4073  // Context sets the context to be used in this call's Do method.
  4074  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsDeleteCall {
  4075  	c.ctx_ = ctx
  4076  	return c
  4077  }
  4078  
  4079  // Header returns a http.Header that can be modified by the caller to add
  4080  // headers to the request.
  4081  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Header() http.Header {
  4082  	if c.header_ == nil {
  4083  		c.header_ = make(http.Header)
  4084  	}
  4085  	return c.header_
  4086  }
  4087  
  4088  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4089  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4090  	var body io.Reader = nil
  4091  	c.urlParams_.Set("alt", alt)
  4092  	c.urlParams_.Set("prettyPrint", "false")
  4093  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4094  	urls += "?" + c.urlParams_.Encode()
  4095  	req, err := http.NewRequest("DELETE", urls, body)
  4096  	if err != nil {
  4097  		return nil, err
  4098  	}
  4099  	req.Header = reqHeaders
  4100  	googleapi.Expand(req.URL, map[string]string{
  4101  		"name": c.name,
  4102  	})
  4103  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4104  }
  4105  
  4106  // Do executes the "apphub.projects.locations.applications.workloads.delete" call.
  4107  // Any non-2xx status code is an error. Response headers are in either
  4108  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4109  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4110  // whether the returned error was because http.StatusNotModified was returned.
  4111  func (c *ProjectsLocationsApplicationsWorkloadsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4112  	gensupport.SetOptions(c.urlParams_, opts...)
  4113  	res, err := c.doRequest("json")
  4114  	if res != nil && res.StatusCode == http.StatusNotModified {
  4115  		if res.Body != nil {
  4116  			res.Body.Close()
  4117  		}
  4118  		return nil, gensupport.WrapError(&googleapi.Error{
  4119  			Code:   res.StatusCode,
  4120  			Header: res.Header,
  4121  		})
  4122  	}
  4123  	if err != nil {
  4124  		return nil, err
  4125  	}
  4126  	defer googleapi.CloseBody(res)
  4127  	if err := googleapi.CheckResponse(res); err != nil {
  4128  		return nil, gensupport.WrapError(err)
  4129  	}
  4130  	ret := &Operation{
  4131  		ServerResponse: googleapi.ServerResponse{
  4132  			Header:         res.Header,
  4133  			HTTPStatusCode: res.StatusCode,
  4134  		},
  4135  	}
  4136  	target := &ret
  4137  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4138  		return nil, err
  4139  	}
  4140  	return ret, nil
  4141  }
  4142  
  4143  type ProjectsLocationsApplicationsWorkloadsGetCall struct {
  4144  	s            *APIService
  4145  	name         string
  4146  	urlParams_   gensupport.URLParams
  4147  	ifNoneMatch_ string
  4148  	ctx_         context.Context
  4149  	header_      http.Header
  4150  }
  4151  
  4152  // Get: Gets a Workload in an Application.
  4153  //
  4154  //   - name: Fully qualified name of the Workload to fetch. Expected format:
  4155  //     `projects/{project}/locations/{location}/applications/{application}/workloa
  4156  //     ds/{workload}`.
  4157  func (r *ProjectsLocationsApplicationsWorkloadsService) Get(name string) *ProjectsLocationsApplicationsWorkloadsGetCall {
  4158  	c := &ProjectsLocationsApplicationsWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4159  	c.name = name
  4160  	return c
  4161  }
  4162  
  4163  // Fields allows partial responses to be retrieved. See
  4164  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4165  // details.
  4166  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsGetCall {
  4167  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4168  	return c
  4169  }
  4170  
  4171  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4172  // object's ETag matches the given value. This is useful for getting updates
  4173  // only after the object has changed since the last request.
  4174  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsGetCall {
  4175  	c.ifNoneMatch_ = entityTag
  4176  	return c
  4177  }
  4178  
  4179  // Context sets the context to be used in this call's Do method.
  4180  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsGetCall {
  4181  	c.ctx_ = ctx
  4182  	return c
  4183  }
  4184  
  4185  // Header returns a http.Header that can be modified by the caller to add
  4186  // headers to the request.
  4187  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Header() http.Header {
  4188  	if c.header_ == nil {
  4189  		c.header_ = make(http.Header)
  4190  	}
  4191  	return c.header_
  4192  }
  4193  
  4194  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) doRequest(alt string) (*http.Response, error) {
  4195  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4196  	if c.ifNoneMatch_ != "" {
  4197  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4198  	}
  4199  	var body io.Reader = nil
  4200  	c.urlParams_.Set("alt", alt)
  4201  	c.urlParams_.Set("prettyPrint", "false")
  4202  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4203  	urls += "?" + c.urlParams_.Encode()
  4204  	req, err := http.NewRequest("GET", urls, body)
  4205  	if err != nil {
  4206  		return nil, err
  4207  	}
  4208  	req.Header = reqHeaders
  4209  	googleapi.Expand(req.URL, map[string]string{
  4210  		"name": c.name,
  4211  	})
  4212  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4213  }
  4214  
  4215  // Do executes the "apphub.projects.locations.applications.workloads.get" call.
  4216  // Any non-2xx status code is an error. Response headers are in either
  4217  // *Workload.ServerResponse.Header or (if a response was returned at all) in
  4218  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4219  // whether the returned error was because http.StatusNotModified was returned.
  4220  func (c *ProjectsLocationsApplicationsWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*Workload, error) {
  4221  	gensupport.SetOptions(c.urlParams_, opts...)
  4222  	res, err := c.doRequest("json")
  4223  	if res != nil && res.StatusCode == http.StatusNotModified {
  4224  		if res.Body != nil {
  4225  			res.Body.Close()
  4226  		}
  4227  		return nil, gensupport.WrapError(&googleapi.Error{
  4228  			Code:   res.StatusCode,
  4229  			Header: res.Header,
  4230  		})
  4231  	}
  4232  	if err != nil {
  4233  		return nil, err
  4234  	}
  4235  	defer googleapi.CloseBody(res)
  4236  	if err := googleapi.CheckResponse(res); err != nil {
  4237  		return nil, gensupport.WrapError(err)
  4238  	}
  4239  	ret := &Workload{
  4240  		ServerResponse: googleapi.ServerResponse{
  4241  			Header:         res.Header,
  4242  			HTTPStatusCode: res.StatusCode,
  4243  		},
  4244  	}
  4245  	target := &ret
  4246  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4247  		return nil, err
  4248  	}
  4249  	return ret, nil
  4250  }
  4251  
  4252  type ProjectsLocationsApplicationsWorkloadsListCall struct {
  4253  	s            *APIService
  4254  	parent       string
  4255  	urlParams_   gensupport.URLParams
  4256  	ifNoneMatch_ string
  4257  	ctx_         context.Context
  4258  	header_      http.Header
  4259  }
  4260  
  4261  // List: Lists Workloads in an Application.
  4262  //
  4263  //   - parent: Fully qualified name of the parent Application to list Workloads
  4264  //     for. Expected format:
  4265  //     `projects/{project}/locations/{location}/applications/{application}`.
  4266  func (r *ProjectsLocationsApplicationsWorkloadsService) List(parent string) *ProjectsLocationsApplicationsWorkloadsListCall {
  4267  	c := &ProjectsLocationsApplicationsWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4268  	c.parent = parent
  4269  	return c
  4270  }
  4271  
  4272  // Filter sets the optional parameter "filter": Filtering results.
  4273  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Filter(filter string) *ProjectsLocationsApplicationsWorkloadsListCall {
  4274  	c.urlParams_.Set("filter", filter)
  4275  	return c
  4276  }
  4277  
  4278  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  4279  // results.
  4280  func (c *ProjectsLocationsApplicationsWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsApplicationsWorkloadsListCall {
  4281  	c.urlParams_.Set("orderBy", orderBy)
  4282  	return c
  4283  }
  4284  
  4285  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  4286  // may return fewer items than requested. If unspecified, server will pick an
  4287  // appropriate default.
  4288  func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsApplicationsWorkloadsListCall {
  4289  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4290  	return c
  4291  }
  4292  
  4293  // PageToken sets the optional parameter "pageToken": A token identifying a
  4294  // page of results the server should return.
  4295  func (c *ProjectsLocationsApplicationsWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsApplicationsWorkloadsListCall {
  4296  	c.urlParams_.Set("pageToken", pageToken)
  4297  	return c
  4298  }
  4299  
  4300  // Fields allows partial responses to be retrieved. See
  4301  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4302  // details.
  4303  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsListCall {
  4304  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4305  	return c
  4306  }
  4307  
  4308  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4309  // object's ETag matches the given value. This is useful for getting updates
  4310  // only after the object has changed since the last request.
  4311  func (c *ProjectsLocationsApplicationsWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsWorkloadsListCall {
  4312  	c.ifNoneMatch_ = entityTag
  4313  	return c
  4314  }
  4315  
  4316  // Context sets the context to be used in this call's Do method.
  4317  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsListCall {
  4318  	c.ctx_ = ctx
  4319  	return c
  4320  }
  4321  
  4322  // Header returns a http.Header that can be modified by the caller to add
  4323  // headers to the request.
  4324  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Header() http.Header {
  4325  	if c.header_ == nil {
  4326  		c.header_ = make(http.Header)
  4327  	}
  4328  	return c.header_
  4329  }
  4330  
  4331  func (c *ProjectsLocationsApplicationsWorkloadsListCall) doRequest(alt string) (*http.Response, error) {
  4332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4333  	if c.ifNoneMatch_ != "" {
  4334  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4335  	}
  4336  	var body io.Reader = nil
  4337  	c.urlParams_.Set("alt", alt)
  4338  	c.urlParams_.Set("prettyPrint", "false")
  4339  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workloads")
  4340  	urls += "?" + c.urlParams_.Encode()
  4341  	req, err := http.NewRequest("GET", urls, body)
  4342  	if err != nil {
  4343  		return nil, err
  4344  	}
  4345  	req.Header = reqHeaders
  4346  	googleapi.Expand(req.URL, map[string]string{
  4347  		"parent": c.parent,
  4348  	})
  4349  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4350  }
  4351  
  4352  // Do executes the "apphub.projects.locations.applications.workloads.list" call.
  4353  // Any non-2xx status code is an error. Response headers are in either
  4354  // *ListWorkloadsResponse.ServerResponse.Header or (if a response was returned
  4355  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4356  // check whether the returned error was because http.StatusNotModified was
  4357  // returned.
  4358  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListWorkloadsResponse, error) {
  4359  	gensupport.SetOptions(c.urlParams_, opts...)
  4360  	res, err := c.doRequest("json")
  4361  	if res != nil && res.StatusCode == http.StatusNotModified {
  4362  		if res.Body != nil {
  4363  			res.Body.Close()
  4364  		}
  4365  		return nil, gensupport.WrapError(&googleapi.Error{
  4366  			Code:   res.StatusCode,
  4367  			Header: res.Header,
  4368  		})
  4369  	}
  4370  	if err != nil {
  4371  		return nil, err
  4372  	}
  4373  	defer googleapi.CloseBody(res)
  4374  	if err := googleapi.CheckResponse(res); err != nil {
  4375  		return nil, gensupport.WrapError(err)
  4376  	}
  4377  	ret := &ListWorkloadsResponse{
  4378  		ServerResponse: googleapi.ServerResponse{
  4379  			Header:         res.Header,
  4380  			HTTPStatusCode: res.StatusCode,
  4381  		},
  4382  	}
  4383  	target := &ret
  4384  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4385  		return nil, err
  4386  	}
  4387  	return ret, nil
  4388  }
  4389  
  4390  // Pages invokes f for each page of results.
  4391  // A non-nil error returned from f will halt the iteration.
  4392  // The provided context supersedes any context provided to the Context method.
  4393  func (c *ProjectsLocationsApplicationsWorkloadsListCall) Pages(ctx context.Context, f func(*ListWorkloadsResponse) error) error {
  4394  	c.ctx_ = ctx
  4395  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4396  	for {
  4397  		x, err := c.Do()
  4398  		if err != nil {
  4399  			return err
  4400  		}
  4401  		if err := f(x); err != nil {
  4402  			return err
  4403  		}
  4404  		if x.NextPageToken == "" {
  4405  			return nil
  4406  		}
  4407  		c.PageToken(x.NextPageToken)
  4408  	}
  4409  }
  4410  
  4411  type ProjectsLocationsApplicationsWorkloadsPatchCall struct {
  4412  	s          *APIService
  4413  	name       string
  4414  	workload   *Workload
  4415  	urlParams_ gensupport.URLParams
  4416  	ctx_       context.Context
  4417  	header_    http.Header
  4418  }
  4419  
  4420  // Patch: Updates a Workload in an Application.
  4421  //
  4422  //   - name: Identifier. The resource name of the Workload. Format:
  4423  //     "projects/{host-project-id}/locations/{location}/applications/{application-
  4424  //     id}/workloads/{workload-id}".
  4425  func (r *ProjectsLocationsApplicationsWorkloadsService) Patch(name string, workload *Workload) *ProjectsLocationsApplicationsWorkloadsPatchCall {
  4426  	c := &ProjectsLocationsApplicationsWorkloadsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4427  	c.name = name
  4428  	c.workload = workload
  4429  	return c
  4430  }
  4431  
  4432  // RequestId sets the optional parameter "requestId": An optional request ID to
  4433  // identify requests. Specify a unique request ID so that if you must retry
  4434  // your request, the server will know to ignore the request if it has already
  4435  // been completed. The server will guarantee that for at least 60 minutes since
  4436  // the first request. For example, consider a situation where you make an
  4437  // initial request and the request times out. If you make the request again
  4438  // with the same request ID, the server can check if original operation with
  4439  // the same request ID was received, and if so, will ignore the second request.
  4440  // This prevents clients from accidentally creating duplicate commitments. The
  4441  // request ID must be a valid UUID with the exception that zero UUID is not
  4442  // supported (00000000-0000-0000-0000-000000000000).
  4443  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) RequestId(requestId string) *ProjectsLocationsApplicationsWorkloadsPatchCall {
  4444  	c.urlParams_.Set("requestId", requestId)
  4445  	return c
  4446  }
  4447  
  4448  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  4449  // used to specify the fields to be overwritten in the Workload resource by the
  4450  // update. The fields specified in the update_mask are relative to the
  4451  // resource, not the full request. The API changes the values of the fields as
  4452  // specified in the update_mask. The API ignores the values of all fields not
  4453  // covered by the update_mask. You can also unset a field by not specifying it
  4454  // in the updated message, but adding the field to the mask. This clears
  4455  // whatever value the field previously had.
  4456  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApplicationsWorkloadsPatchCall {
  4457  	c.urlParams_.Set("updateMask", updateMask)
  4458  	return c
  4459  }
  4460  
  4461  // Fields allows partial responses to be retrieved. See
  4462  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4463  // details.
  4464  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsWorkloadsPatchCall {
  4465  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4466  	return c
  4467  }
  4468  
  4469  // Context sets the context to be used in this call's Do method.
  4470  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Context(ctx context.Context) *ProjectsLocationsApplicationsWorkloadsPatchCall {
  4471  	c.ctx_ = ctx
  4472  	return c
  4473  }
  4474  
  4475  // Header returns a http.Header that can be modified by the caller to add
  4476  // headers to the request.
  4477  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Header() http.Header {
  4478  	if c.header_ == nil {
  4479  		c.header_ = make(http.Header)
  4480  	}
  4481  	return c.header_
  4482  }
  4483  
  4484  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) doRequest(alt string) (*http.Response, error) {
  4485  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4486  	var body io.Reader = nil
  4487  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workload)
  4488  	if err != nil {
  4489  		return nil, err
  4490  	}
  4491  	c.urlParams_.Set("alt", alt)
  4492  	c.urlParams_.Set("prettyPrint", "false")
  4493  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4494  	urls += "?" + c.urlParams_.Encode()
  4495  	req, err := http.NewRequest("PATCH", urls, body)
  4496  	if err != nil {
  4497  		return nil, err
  4498  	}
  4499  	req.Header = reqHeaders
  4500  	googleapi.Expand(req.URL, map[string]string{
  4501  		"name": c.name,
  4502  	})
  4503  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4504  }
  4505  
  4506  // Do executes the "apphub.projects.locations.applications.workloads.patch" call.
  4507  // Any non-2xx status code is an error. Response headers are in either
  4508  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4509  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4510  // whether the returned error was because http.StatusNotModified was returned.
  4511  func (c *ProjectsLocationsApplicationsWorkloadsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4512  	gensupport.SetOptions(c.urlParams_, opts...)
  4513  	res, err := c.doRequest("json")
  4514  	if res != nil && res.StatusCode == http.StatusNotModified {
  4515  		if res.Body != nil {
  4516  			res.Body.Close()
  4517  		}
  4518  		return nil, gensupport.WrapError(&googleapi.Error{
  4519  			Code:   res.StatusCode,
  4520  			Header: res.Header,
  4521  		})
  4522  	}
  4523  	if err != nil {
  4524  		return nil, err
  4525  	}
  4526  	defer googleapi.CloseBody(res)
  4527  	if err := googleapi.CheckResponse(res); err != nil {
  4528  		return nil, gensupport.WrapError(err)
  4529  	}
  4530  	ret := &Operation{
  4531  		ServerResponse: googleapi.ServerResponse{
  4532  			Header:         res.Header,
  4533  			HTTPStatusCode: res.StatusCode,
  4534  		},
  4535  	}
  4536  	target := &ret
  4537  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4538  		return nil, err
  4539  	}
  4540  	return ret, nil
  4541  }
  4542  
  4543  type ProjectsLocationsDiscoveredServicesFindUnregisteredCall struct {
  4544  	s            *APIService
  4545  	parent       string
  4546  	urlParams_   gensupport.URLParams
  4547  	ifNoneMatch_ string
  4548  	ctx_         context.Context
  4549  	header_      http.Header
  4550  }
  4551  
  4552  // FindUnregistered: Finds unregistered services in a host project and
  4553  // location.
  4554  //
  4555  //   - parent: Project and location to find unregistered Discovered Services on.
  4556  //     Expected format: `projects/{project}/locations/{location}`.
  4557  func (r *ProjectsLocationsDiscoveredServicesService) FindUnregistered(parent string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4558  	c := &ProjectsLocationsDiscoveredServicesFindUnregisteredCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4559  	c.parent = parent
  4560  	return c
  4561  }
  4562  
  4563  // Filter sets the optional parameter "filter": Filtering results.
  4564  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4565  	c.urlParams_.Set("filter", filter)
  4566  	return c
  4567  }
  4568  
  4569  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  4570  // results.
  4571  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4572  	c.urlParams_.Set("orderBy", orderBy)
  4573  	return c
  4574  }
  4575  
  4576  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  4577  // may return fewer items than requested. If unspecified, server will pick an
  4578  // appropriate default.
  4579  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4580  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4581  	return c
  4582  }
  4583  
  4584  // PageToken sets the optional parameter "pageToken": A token identifying a
  4585  // page of results the server should return.
  4586  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4587  	c.urlParams_.Set("pageToken", pageToken)
  4588  	return c
  4589  }
  4590  
  4591  // Fields allows partial responses to be retrieved. See
  4592  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4593  // details.
  4594  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4595  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4596  	return c
  4597  }
  4598  
  4599  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4600  // object's ETag matches the given value. This is useful for getting updates
  4601  // only after the object has changed since the last request.
  4602  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4603  	c.ifNoneMatch_ = entityTag
  4604  	return c
  4605  }
  4606  
  4607  // Context sets the context to be used in this call's Do method.
  4608  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesFindUnregisteredCall {
  4609  	c.ctx_ = ctx
  4610  	return c
  4611  }
  4612  
  4613  // Header returns a http.Header that can be modified by the caller to add
  4614  // headers to the request.
  4615  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Header() http.Header {
  4616  	if c.header_ == nil {
  4617  		c.header_ = make(http.Header)
  4618  	}
  4619  	return c.header_
  4620  }
  4621  
  4622  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) doRequest(alt string) (*http.Response, error) {
  4623  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4624  	if c.ifNoneMatch_ != "" {
  4625  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4626  	}
  4627  	var body io.Reader = nil
  4628  	c.urlParams_.Set("alt", alt)
  4629  	c.urlParams_.Set("prettyPrint", "false")
  4630  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices:findUnregistered")
  4631  	urls += "?" + c.urlParams_.Encode()
  4632  	req, err := http.NewRequest("GET", urls, body)
  4633  	if err != nil {
  4634  		return nil, err
  4635  	}
  4636  	req.Header = reqHeaders
  4637  	googleapi.Expand(req.URL, map[string]string{
  4638  		"parent": c.parent,
  4639  	})
  4640  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4641  }
  4642  
  4643  // Do executes the "apphub.projects.locations.discoveredServices.findUnregistered" call.
  4644  // Any non-2xx status code is an error. Response headers are in either
  4645  // *FindUnregisteredServicesResponse.ServerResponse.Header or (if a response
  4646  // was returned at all) in error.(*googleapi.Error).Header. Use
  4647  // googleapi.IsNotModified to check whether the returned error was because
  4648  // http.StatusNotModified was returned.
  4649  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Do(opts ...googleapi.CallOption) (*FindUnregisteredServicesResponse, error) {
  4650  	gensupport.SetOptions(c.urlParams_, opts...)
  4651  	res, err := c.doRequest("json")
  4652  	if res != nil && res.StatusCode == http.StatusNotModified {
  4653  		if res.Body != nil {
  4654  			res.Body.Close()
  4655  		}
  4656  		return nil, gensupport.WrapError(&googleapi.Error{
  4657  			Code:   res.StatusCode,
  4658  			Header: res.Header,
  4659  		})
  4660  	}
  4661  	if err != nil {
  4662  		return nil, err
  4663  	}
  4664  	defer googleapi.CloseBody(res)
  4665  	if err := googleapi.CheckResponse(res); err != nil {
  4666  		return nil, gensupport.WrapError(err)
  4667  	}
  4668  	ret := &FindUnregisteredServicesResponse{
  4669  		ServerResponse: googleapi.ServerResponse{
  4670  			Header:         res.Header,
  4671  			HTTPStatusCode: res.StatusCode,
  4672  		},
  4673  	}
  4674  	target := &ret
  4675  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4676  		return nil, err
  4677  	}
  4678  	return ret, nil
  4679  }
  4680  
  4681  // Pages invokes f for each page of results.
  4682  // A non-nil error returned from f will halt the iteration.
  4683  // The provided context supersedes any context provided to the Context method.
  4684  func (c *ProjectsLocationsDiscoveredServicesFindUnregisteredCall) Pages(ctx context.Context, f func(*FindUnregisteredServicesResponse) error) error {
  4685  	c.ctx_ = ctx
  4686  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4687  	for {
  4688  		x, err := c.Do()
  4689  		if err != nil {
  4690  			return err
  4691  		}
  4692  		if err := f(x); err != nil {
  4693  			return err
  4694  		}
  4695  		if x.NextPageToken == "" {
  4696  			return nil
  4697  		}
  4698  		c.PageToken(x.NextPageToken)
  4699  	}
  4700  }
  4701  
  4702  type ProjectsLocationsDiscoveredServicesGetCall struct {
  4703  	s            *APIService
  4704  	name         string
  4705  	urlParams_   gensupport.URLParams
  4706  	ifNoneMatch_ string
  4707  	ctx_         context.Context
  4708  	header_      http.Header
  4709  }
  4710  
  4711  // Get: Gets a Discovered Service in a host project and location.
  4712  //
  4713  //   - name: Fully qualified name of the Discovered Service to fetch. Expected
  4714  //     format:
  4715  //     `projects/{project}/locations/{location}/discoveredServices/{discoveredServ
  4716  //     ice}`.
  4717  func (r *ProjectsLocationsDiscoveredServicesService) Get(name string) *ProjectsLocationsDiscoveredServicesGetCall {
  4718  	c := &ProjectsLocationsDiscoveredServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4719  	c.name = name
  4720  	return c
  4721  }
  4722  
  4723  // Fields allows partial responses to be retrieved. See
  4724  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4725  // details.
  4726  func (c *ProjectsLocationsDiscoveredServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesGetCall {
  4727  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4728  	return c
  4729  }
  4730  
  4731  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4732  // object's ETag matches the given value. This is useful for getting updates
  4733  // only after the object has changed since the last request.
  4734  func (c *ProjectsLocationsDiscoveredServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesGetCall {
  4735  	c.ifNoneMatch_ = entityTag
  4736  	return c
  4737  }
  4738  
  4739  // Context sets the context to be used in this call's Do method.
  4740  func (c *ProjectsLocationsDiscoveredServicesGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesGetCall {
  4741  	c.ctx_ = ctx
  4742  	return c
  4743  }
  4744  
  4745  // Header returns a http.Header that can be modified by the caller to add
  4746  // headers to the request.
  4747  func (c *ProjectsLocationsDiscoveredServicesGetCall) Header() http.Header {
  4748  	if c.header_ == nil {
  4749  		c.header_ = make(http.Header)
  4750  	}
  4751  	return c.header_
  4752  }
  4753  
  4754  func (c *ProjectsLocationsDiscoveredServicesGetCall) doRequest(alt string) (*http.Response, error) {
  4755  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4756  	if c.ifNoneMatch_ != "" {
  4757  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4758  	}
  4759  	var body io.Reader = nil
  4760  	c.urlParams_.Set("alt", alt)
  4761  	c.urlParams_.Set("prettyPrint", "false")
  4762  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  4763  	urls += "?" + c.urlParams_.Encode()
  4764  	req, err := http.NewRequest("GET", urls, body)
  4765  	if err != nil {
  4766  		return nil, err
  4767  	}
  4768  	req.Header = reqHeaders
  4769  	googleapi.Expand(req.URL, map[string]string{
  4770  		"name": c.name,
  4771  	})
  4772  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4773  }
  4774  
  4775  // Do executes the "apphub.projects.locations.discoveredServices.get" call.
  4776  // Any non-2xx status code is an error. Response headers are in either
  4777  // *DiscoveredService.ServerResponse.Header or (if a response was returned at
  4778  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4779  // check whether the returned error was because http.StatusNotModified was
  4780  // returned.
  4781  func (c *ProjectsLocationsDiscoveredServicesGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredService, error) {
  4782  	gensupport.SetOptions(c.urlParams_, opts...)
  4783  	res, err := c.doRequest("json")
  4784  	if res != nil && res.StatusCode == http.StatusNotModified {
  4785  		if res.Body != nil {
  4786  			res.Body.Close()
  4787  		}
  4788  		return nil, gensupport.WrapError(&googleapi.Error{
  4789  			Code:   res.StatusCode,
  4790  			Header: res.Header,
  4791  		})
  4792  	}
  4793  	if err != nil {
  4794  		return nil, err
  4795  	}
  4796  	defer googleapi.CloseBody(res)
  4797  	if err := googleapi.CheckResponse(res); err != nil {
  4798  		return nil, gensupport.WrapError(err)
  4799  	}
  4800  	ret := &DiscoveredService{
  4801  		ServerResponse: googleapi.ServerResponse{
  4802  			Header:         res.Header,
  4803  			HTTPStatusCode: res.StatusCode,
  4804  		},
  4805  	}
  4806  	target := &ret
  4807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4808  		return nil, err
  4809  	}
  4810  	return ret, nil
  4811  }
  4812  
  4813  type ProjectsLocationsDiscoveredServicesListCall struct {
  4814  	s            *APIService
  4815  	parent       string
  4816  	urlParams_   gensupport.URLParams
  4817  	ifNoneMatch_ string
  4818  	ctx_         context.Context
  4819  	header_      http.Header
  4820  }
  4821  
  4822  // List: Lists Discovered Services that can be added to an Application in a
  4823  // host project and location.
  4824  //
  4825  //   - parent: Project and location to list Discovered Services on. Expected
  4826  //     format: `projects/{project}/locations/{location}`.
  4827  func (r *ProjectsLocationsDiscoveredServicesService) List(parent string) *ProjectsLocationsDiscoveredServicesListCall {
  4828  	c := &ProjectsLocationsDiscoveredServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4829  	c.parent = parent
  4830  	return c
  4831  }
  4832  
  4833  // Filter sets the optional parameter "filter": Filtering results.
  4834  func (c *ProjectsLocationsDiscoveredServicesListCall) Filter(filter string) *ProjectsLocationsDiscoveredServicesListCall {
  4835  	c.urlParams_.Set("filter", filter)
  4836  	return c
  4837  }
  4838  
  4839  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  4840  // results.
  4841  func (c *ProjectsLocationsDiscoveredServicesListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredServicesListCall {
  4842  	c.urlParams_.Set("orderBy", orderBy)
  4843  	return c
  4844  }
  4845  
  4846  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  4847  // may return fewer items than requested. If unspecified, server will pick an
  4848  // appropriate default.
  4849  func (c *ProjectsLocationsDiscoveredServicesListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredServicesListCall {
  4850  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4851  	return c
  4852  }
  4853  
  4854  // PageToken sets the optional parameter "pageToken": A token identifying a
  4855  // page of results the server should return.
  4856  func (c *ProjectsLocationsDiscoveredServicesListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredServicesListCall {
  4857  	c.urlParams_.Set("pageToken", pageToken)
  4858  	return c
  4859  }
  4860  
  4861  // Fields allows partial responses to be retrieved. See
  4862  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4863  // details.
  4864  func (c *ProjectsLocationsDiscoveredServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesListCall {
  4865  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4866  	return c
  4867  }
  4868  
  4869  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4870  // object's ETag matches the given value. This is useful for getting updates
  4871  // only after the object has changed since the last request.
  4872  func (c *ProjectsLocationsDiscoveredServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesListCall {
  4873  	c.ifNoneMatch_ = entityTag
  4874  	return c
  4875  }
  4876  
  4877  // Context sets the context to be used in this call's Do method.
  4878  func (c *ProjectsLocationsDiscoveredServicesListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesListCall {
  4879  	c.ctx_ = ctx
  4880  	return c
  4881  }
  4882  
  4883  // Header returns a http.Header that can be modified by the caller to add
  4884  // headers to the request.
  4885  func (c *ProjectsLocationsDiscoveredServicesListCall) Header() http.Header {
  4886  	if c.header_ == nil {
  4887  		c.header_ = make(http.Header)
  4888  	}
  4889  	return c.header_
  4890  }
  4891  
  4892  func (c *ProjectsLocationsDiscoveredServicesListCall) doRequest(alt string) (*http.Response, error) {
  4893  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4894  	if c.ifNoneMatch_ != "" {
  4895  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4896  	}
  4897  	var body io.Reader = nil
  4898  	c.urlParams_.Set("alt", alt)
  4899  	c.urlParams_.Set("prettyPrint", "false")
  4900  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices")
  4901  	urls += "?" + c.urlParams_.Encode()
  4902  	req, err := http.NewRequest("GET", urls, body)
  4903  	if err != nil {
  4904  		return nil, err
  4905  	}
  4906  	req.Header = reqHeaders
  4907  	googleapi.Expand(req.URL, map[string]string{
  4908  		"parent": c.parent,
  4909  	})
  4910  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4911  }
  4912  
  4913  // Do executes the "apphub.projects.locations.discoveredServices.list" call.
  4914  // Any non-2xx status code is an error. Response headers are in either
  4915  // *ListDiscoveredServicesResponse.ServerResponse.Header or (if a response was
  4916  // returned at all) in error.(*googleapi.Error).Header. Use
  4917  // googleapi.IsNotModified to check whether the returned error was because
  4918  // http.StatusNotModified was returned.
  4919  func (c *ProjectsLocationsDiscoveredServicesListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredServicesResponse, error) {
  4920  	gensupport.SetOptions(c.urlParams_, opts...)
  4921  	res, err := c.doRequest("json")
  4922  	if res != nil && res.StatusCode == http.StatusNotModified {
  4923  		if res.Body != nil {
  4924  			res.Body.Close()
  4925  		}
  4926  		return nil, gensupport.WrapError(&googleapi.Error{
  4927  			Code:   res.StatusCode,
  4928  			Header: res.Header,
  4929  		})
  4930  	}
  4931  	if err != nil {
  4932  		return nil, err
  4933  	}
  4934  	defer googleapi.CloseBody(res)
  4935  	if err := googleapi.CheckResponse(res); err != nil {
  4936  		return nil, gensupport.WrapError(err)
  4937  	}
  4938  	ret := &ListDiscoveredServicesResponse{
  4939  		ServerResponse: googleapi.ServerResponse{
  4940  			Header:         res.Header,
  4941  			HTTPStatusCode: res.StatusCode,
  4942  		},
  4943  	}
  4944  	target := &ret
  4945  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4946  		return nil, err
  4947  	}
  4948  	return ret, nil
  4949  }
  4950  
  4951  // Pages invokes f for each page of results.
  4952  // A non-nil error returned from f will halt the iteration.
  4953  // The provided context supersedes any context provided to the Context method.
  4954  func (c *ProjectsLocationsDiscoveredServicesListCall) Pages(ctx context.Context, f func(*ListDiscoveredServicesResponse) error) error {
  4955  	c.ctx_ = ctx
  4956  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4957  	for {
  4958  		x, err := c.Do()
  4959  		if err != nil {
  4960  			return err
  4961  		}
  4962  		if err := f(x); err != nil {
  4963  			return err
  4964  		}
  4965  		if x.NextPageToken == "" {
  4966  			return nil
  4967  		}
  4968  		c.PageToken(x.NextPageToken)
  4969  	}
  4970  }
  4971  
  4972  type ProjectsLocationsDiscoveredServicesLookupCall struct {
  4973  	s            *APIService
  4974  	parent       string
  4975  	urlParams_   gensupport.URLParams
  4976  	ifNoneMatch_ string
  4977  	ctx_         context.Context
  4978  	header_      http.Header
  4979  }
  4980  
  4981  // Lookup: Lists a Discovered Service in a host project and location, with a
  4982  // given resource URI.
  4983  //
  4984  //   - parent: Host project ID and location to lookup Discovered Service in.
  4985  //     Expected format: `projects/{project}/locations/{location}`.
  4986  func (r *ProjectsLocationsDiscoveredServicesService) Lookup(parent string) *ProjectsLocationsDiscoveredServicesLookupCall {
  4987  	c := &ProjectsLocationsDiscoveredServicesLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4988  	c.parent = parent
  4989  	return c
  4990  }
  4991  
  4992  // Uri sets the optional parameter "uri": Required. Resource URI to find
  4993  // DiscoveredService for. Accepts both project number and project ID and does
  4994  // translation when needed.
  4995  func (c *ProjectsLocationsDiscoveredServicesLookupCall) Uri(uri string) *ProjectsLocationsDiscoveredServicesLookupCall {
  4996  	c.urlParams_.Set("uri", uri)
  4997  	return c
  4998  }
  4999  
  5000  // Fields allows partial responses to be retrieved. See
  5001  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5002  // details.
  5003  func (c *ProjectsLocationsDiscoveredServicesLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredServicesLookupCall {
  5004  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5005  	return c
  5006  }
  5007  
  5008  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5009  // object's ETag matches the given value. This is useful for getting updates
  5010  // only after the object has changed since the last request.
  5011  func (c *ProjectsLocationsDiscoveredServicesLookupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredServicesLookupCall {
  5012  	c.ifNoneMatch_ = entityTag
  5013  	return c
  5014  }
  5015  
  5016  // Context sets the context to be used in this call's Do method.
  5017  func (c *ProjectsLocationsDiscoveredServicesLookupCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredServicesLookupCall {
  5018  	c.ctx_ = ctx
  5019  	return c
  5020  }
  5021  
  5022  // Header returns a http.Header that can be modified by the caller to add
  5023  // headers to the request.
  5024  func (c *ProjectsLocationsDiscoveredServicesLookupCall) Header() http.Header {
  5025  	if c.header_ == nil {
  5026  		c.header_ = make(http.Header)
  5027  	}
  5028  	return c.header_
  5029  }
  5030  
  5031  func (c *ProjectsLocationsDiscoveredServicesLookupCall) doRequest(alt string) (*http.Response, error) {
  5032  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5033  	if c.ifNoneMatch_ != "" {
  5034  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5035  	}
  5036  	var body io.Reader = nil
  5037  	c.urlParams_.Set("alt", alt)
  5038  	c.urlParams_.Set("prettyPrint", "false")
  5039  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredServices:lookup")
  5040  	urls += "?" + c.urlParams_.Encode()
  5041  	req, err := http.NewRequest("GET", urls, body)
  5042  	if err != nil {
  5043  		return nil, err
  5044  	}
  5045  	req.Header = reqHeaders
  5046  	googleapi.Expand(req.URL, map[string]string{
  5047  		"parent": c.parent,
  5048  	})
  5049  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5050  }
  5051  
  5052  // Do executes the "apphub.projects.locations.discoveredServices.lookup" call.
  5053  // Any non-2xx status code is an error. Response headers are in either
  5054  // *LookupDiscoveredServiceResponse.ServerResponse.Header or (if a response was
  5055  // returned at all) in error.(*googleapi.Error).Header. Use
  5056  // googleapi.IsNotModified to check whether the returned error was because
  5057  // http.StatusNotModified was returned.
  5058  func (c *ProjectsLocationsDiscoveredServicesLookupCall) Do(opts ...googleapi.CallOption) (*LookupDiscoveredServiceResponse, error) {
  5059  	gensupport.SetOptions(c.urlParams_, opts...)
  5060  	res, err := c.doRequest("json")
  5061  	if res != nil && res.StatusCode == http.StatusNotModified {
  5062  		if res.Body != nil {
  5063  			res.Body.Close()
  5064  		}
  5065  		return nil, gensupport.WrapError(&googleapi.Error{
  5066  			Code:   res.StatusCode,
  5067  			Header: res.Header,
  5068  		})
  5069  	}
  5070  	if err != nil {
  5071  		return nil, err
  5072  	}
  5073  	defer googleapi.CloseBody(res)
  5074  	if err := googleapi.CheckResponse(res); err != nil {
  5075  		return nil, gensupport.WrapError(err)
  5076  	}
  5077  	ret := &LookupDiscoveredServiceResponse{
  5078  		ServerResponse: googleapi.ServerResponse{
  5079  			Header:         res.Header,
  5080  			HTTPStatusCode: res.StatusCode,
  5081  		},
  5082  	}
  5083  	target := &ret
  5084  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5085  		return nil, err
  5086  	}
  5087  	return ret, nil
  5088  }
  5089  
  5090  type ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall struct {
  5091  	s            *APIService
  5092  	parent       string
  5093  	urlParams_   gensupport.URLParams
  5094  	ifNoneMatch_ string
  5095  	ctx_         context.Context
  5096  	header_      http.Header
  5097  }
  5098  
  5099  // FindUnregistered: Finds unregistered workloads in a host project and
  5100  // location.
  5101  //
  5102  //   - parent: Project and location to find unregistered Discovered Workloads on.
  5103  //     Expected format: `projects/{project}/locations/{location}`.
  5104  func (r *ProjectsLocationsDiscoveredWorkloadsService) FindUnregistered(parent string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5105  	c := &ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5106  	c.parent = parent
  5107  	return c
  5108  }
  5109  
  5110  // Filter sets the optional parameter "filter": Filtering results.
  5111  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5112  	c.urlParams_.Set("filter", filter)
  5113  	return c
  5114  }
  5115  
  5116  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  5117  // results.
  5118  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5119  	c.urlParams_.Set("orderBy", orderBy)
  5120  	return c
  5121  }
  5122  
  5123  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  5124  // may return fewer items than requested. If unspecified, server will pick an
  5125  // appropriate default.
  5126  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5127  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5128  	return c
  5129  }
  5130  
  5131  // PageToken sets the optional parameter "pageToken": A token identifying a
  5132  // page of results the server should return.
  5133  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5134  	c.urlParams_.Set("pageToken", pageToken)
  5135  	return c
  5136  }
  5137  
  5138  // Fields allows partial responses to be retrieved. See
  5139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5140  // details.
  5141  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5143  	return c
  5144  }
  5145  
  5146  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5147  // object's ETag matches the given value. This is useful for getting updates
  5148  // only after the object has changed since the last request.
  5149  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5150  	c.ifNoneMatch_ = entityTag
  5151  	return c
  5152  }
  5153  
  5154  // Context sets the context to be used in this call's Do method.
  5155  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall {
  5156  	c.ctx_ = ctx
  5157  	return c
  5158  }
  5159  
  5160  // Header returns a http.Header that can be modified by the caller to add
  5161  // headers to the request.
  5162  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Header() http.Header {
  5163  	if c.header_ == nil {
  5164  		c.header_ = make(http.Header)
  5165  	}
  5166  	return c.header_
  5167  }
  5168  
  5169  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) doRequest(alt string) (*http.Response, error) {
  5170  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5171  	if c.ifNoneMatch_ != "" {
  5172  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5173  	}
  5174  	var body io.Reader = nil
  5175  	c.urlParams_.Set("alt", alt)
  5176  	c.urlParams_.Set("prettyPrint", "false")
  5177  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads:findUnregistered")
  5178  	urls += "?" + c.urlParams_.Encode()
  5179  	req, err := http.NewRequest("GET", urls, body)
  5180  	if err != nil {
  5181  		return nil, err
  5182  	}
  5183  	req.Header = reqHeaders
  5184  	googleapi.Expand(req.URL, map[string]string{
  5185  		"parent": c.parent,
  5186  	})
  5187  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5188  }
  5189  
  5190  // Do executes the "apphub.projects.locations.discoveredWorkloads.findUnregistered" call.
  5191  // Any non-2xx status code is an error. Response headers are in either
  5192  // *FindUnregisteredWorkloadsResponse.ServerResponse.Header or (if a response
  5193  // was returned at all) in error.(*googleapi.Error).Header. Use
  5194  // googleapi.IsNotModified to check whether the returned error was because
  5195  // http.StatusNotModified was returned.
  5196  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Do(opts ...googleapi.CallOption) (*FindUnregisteredWorkloadsResponse, error) {
  5197  	gensupport.SetOptions(c.urlParams_, opts...)
  5198  	res, err := c.doRequest("json")
  5199  	if res != nil && res.StatusCode == http.StatusNotModified {
  5200  		if res.Body != nil {
  5201  			res.Body.Close()
  5202  		}
  5203  		return nil, gensupport.WrapError(&googleapi.Error{
  5204  			Code:   res.StatusCode,
  5205  			Header: res.Header,
  5206  		})
  5207  	}
  5208  	if err != nil {
  5209  		return nil, err
  5210  	}
  5211  	defer googleapi.CloseBody(res)
  5212  	if err := googleapi.CheckResponse(res); err != nil {
  5213  		return nil, gensupport.WrapError(err)
  5214  	}
  5215  	ret := &FindUnregisteredWorkloadsResponse{
  5216  		ServerResponse: googleapi.ServerResponse{
  5217  			Header:         res.Header,
  5218  			HTTPStatusCode: res.StatusCode,
  5219  		},
  5220  	}
  5221  	target := &ret
  5222  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5223  		return nil, err
  5224  	}
  5225  	return ret, nil
  5226  }
  5227  
  5228  // Pages invokes f for each page of results.
  5229  // A non-nil error returned from f will halt the iteration.
  5230  // The provided context supersedes any context provided to the Context method.
  5231  func (c *ProjectsLocationsDiscoveredWorkloadsFindUnregisteredCall) Pages(ctx context.Context, f func(*FindUnregisteredWorkloadsResponse) error) error {
  5232  	c.ctx_ = ctx
  5233  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5234  	for {
  5235  		x, err := c.Do()
  5236  		if err != nil {
  5237  			return err
  5238  		}
  5239  		if err := f(x); err != nil {
  5240  			return err
  5241  		}
  5242  		if x.NextPageToken == "" {
  5243  			return nil
  5244  		}
  5245  		c.PageToken(x.NextPageToken)
  5246  	}
  5247  }
  5248  
  5249  type ProjectsLocationsDiscoveredWorkloadsGetCall struct {
  5250  	s            *APIService
  5251  	name         string
  5252  	urlParams_   gensupport.URLParams
  5253  	ifNoneMatch_ string
  5254  	ctx_         context.Context
  5255  	header_      http.Header
  5256  }
  5257  
  5258  // Get: Gets a Discovered Workload in a host project and location.
  5259  //
  5260  //   - name: Fully qualified name of the Discovered Workload to fetch. Expected
  5261  //     format:
  5262  //     `projects/{project}/locations/{location}/discoveredWorkloads/{discoveredWor
  5263  //     kload}`.
  5264  func (r *ProjectsLocationsDiscoveredWorkloadsService) Get(name string) *ProjectsLocationsDiscoveredWorkloadsGetCall {
  5265  	c := &ProjectsLocationsDiscoveredWorkloadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5266  	c.name = name
  5267  	return c
  5268  }
  5269  
  5270  // Fields allows partial responses to be retrieved. See
  5271  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5272  // details.
  5273  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsGetCall {
  5274  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5275  	return c
  5276  }
  5277  
  5278  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5279  // object's ETag matches the given value. This is useful for getting updates
  5280  // only after the object has changed since the last request.
  5281  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsGetCall {
  5282  	c.ifNoneMatch_ = entityTag
  5283  	return c
  5284  }
  5285  
  5286  // Context sets the context to be used in this call's Do method.
  5287  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsGetCall {
  5288  	c.ctx_ = ctx
  5289  	return c
  5290  }
  5291  
  5292  // Header returns a http.Header that can be modified by the caller to add
  5293  // headers to the request.
  5294  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Header() http.Header {
  5295  	if c.header_ == nil {
  5296  		c.header_ = make(http.Header)
  5297  	}
  5298  	return c.header_
  5299  }
  5300  
  5301  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) doRequest(alt string) (*http.Response, error) {
  5302  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5303  	if c.ifNoneMatch_ != "" {
  5304  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5305  	}
  5306  	var body io.Reader = nil
  5307  	c.urlParams_.Set("alt", alt)
  5308  	c.urlParams_.Set("prettyPrint", "false")
  5309  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  5310  	urls += "?" + c.urlParams_.Encode()
  5311  	req, err := http.NewRequest("GET", urls, body)
  5312  	if err != nil {
  5313  		return nil, err
  5314  	}
  5315  	req.Header = reqHeaders
  5316  	googleapi.Expand(req.URL, map[string]string{
  5317  		"name": c.name,
  5318  	})
  5319  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5320  }
  5321  
  5322  // Do executes the "apphub.projects.locations.discoveredWorkloads.get" call.
  5323  // Any non-2xx status code is an error. Response headers are in either
  5324  // *DiscoveredWorkload.ServerResponse.Header or (if a response was returned at
  5325  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5326  // check whether the returned error was because http.StatusNotModified was
  5327  // returned.
  5328  func (c *ProjectsLocationsDiscoveredWorkloadsGetCall) Do(opts ...googleapi.CallOption) (*DiscoveredWorkload, error) {
  5329  	gensupport.SetOptions(c.urlParams_, opts...)
  5330  	res, err := c.doRequest("json")
  5331  	if res != nil && res.StatusCode == http.StatusNotModified {
  5332  		if res.Body != nil {
  5333  			res.Body.Close()
  5334  		}
  5335  		return nil, gensupport.WrapError(&googleapi.Error{
  5336  			Code:   res.StatusCode,
  5337  			Header: res.Header,
  5338  		})
  5339  	}
  5340  	if err != nil {
  5341  		return nil, err
  5342  	}
  5343  	defer googleapi.CloseBody(res)
  5344  	if err := googleapi.CheckResponse(res); err != nil {
  5345  		return nil, gensupport.WrapError(err)
  5346  	}
  5347  	ret := &DiscoveredWorkload{
  5348  		ServerResponse: googleapi.ServerResponse{
  5349  			Header:         res.Header,
  5350  			HTTPStatusCode: res.StatusCode,
  5351  		},
  5352  	}
  5353  	target := &ret
  5354  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5355  		return nil, err
  5356  	}
  5357  	return ret, nil
  5358  }
  5359  
  5360  type ProjectsLocationsDiscoveredWorkloadsListCall struct {
  5361  	s            *APIService
  5362  	parent       string
  5363  	urlParams_   gensupport.URLParams
  5364  	ifNoneMatch_ string
  5365  	ctx_         context.Context
  5366  	header_      http.Header
  5367  }
  5368  
  5369  // List: Lists Discovered Workloads that can be added to an Application in a
  5370  // host project and location.
  5371  //
  5372  //   - parent: Project and location to list Discovered Workloads on. Expected
  5373  //     format: `projects/{project}/locations/{location}`.
  5374  func (r *ProjectsLocationsDiscoveredWorkloadsService) List(parent string) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5375  	c := &ProjectsLocationsDiscoveredWorkloadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5376  	c.parent = parent
  5377  	return c
  5378  }
  5379  
  5380  // Filter sets the optional parameter "filter": Filtering results.
  5381  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Filter(filter string) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5382  	c.urlParams_.Set("filter", filter)
  5383  	return c
  5384  }
  5385  
  5386  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  5387  // results.
  5388  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5389  	c.urlParams_.Set("orderBy", orderBy)
  5390  	return c
  5391  }
  5392  
  5393  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  5394  // may return fewer items than requested. If unspecified, server will pick an
  5395  // appropriate default.
  5396  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5397  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5398  	return c
  5399  }
  5400  
  5401  // PageToken sets the optional parameter "pageToken": A token identifying a
  5402  // page of results the server should return.
  5403  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5404  	c.urlParams_.Set("pageToken", pageToken)
  5405  	return c
  5406  }
  5407  
  5408  // Fields allows partial responses to be retrieved. See
  5409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5410  // details.
  5411  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5413  	return c
  5414  }
  5415  
  5416  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5417  // object's ETag matches the given value. This is useful for getting updates
  5418  // only after the object has changed since the last request.
  5419  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5420  	c.ifNoneMatch_ = entityTag
  5421  	return c
  5422  }
  5423  
  5424  // Context sets the context to be used in this call's Do method.
  5425  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsListCall {
  5426  	c.ctx_ = ctx
  5427  	return c
  5428  }
  5429  
  5430  // Header returns a http.Header that can be modified by the caller to add
  5431  // headers to the request.
  5432  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Header() http.Header {
  5433  	if c.header_ == nil {
  5434  		c.header_ = make(http.Header)
  5435  	}
  5436  	return c.header_
  5437  }
  5438  
  5439  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) doRequest(alt string) (*http.Response, error) {
  5440  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5441  	if c.ifNoneMatch_ != "" {
  5442  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5443  	}
  5444  	var body io.Reader = nil
  5445  	c.urlParams_.Set("alt", alt)
  5446  	c.urlParams_.Set("prettyPrint", "false")
  5447  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads")
  5448  	urls += "?" + c.urlParams_.Encode()
  5449  	req, err := http.NewRequest("GET", urls, body)
  5450  	if err != nil {
  5451  		return nil, err
  5452  	}
  5453  	req.Header = reqHeaders
  5454  	googleapi.Expand(req.URL, map[string]string{
  5455  		"parent": c.parent,
  5456  	})
  5457  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5458  }
  5459  
  5460  // Do executes the "apphub.projects.locations.discoveredWorkloads.list" call.
  5461  // Any non-2xx status code is an error. Response headers are in either
  5462  // *ListDiscoveredWorkloadsResponse.ServerResponse.Header or (if a response was
  5463  // returned at all) in error.(*googleapi.Error).Header. Use
  5464  // googleapi.IsNotModified to check whether the returned error was because
  5465  // http.StatusNotModified was returned.
  5466  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Do(opts ...googleapi.CallOption) (*ListDiscoveredWorkloadsResponse, error) {
  5467  	gensupport.SetOptions(c.urlParams_, opts...)
  5468  	res, err := c.doRequest("json")
  5469  	if res != nil && res.StatusCode == http.StatusNotModified {
  5470  		if res.Body != nil {
  5471  			res.Body.Close()
  5472  		}
  5473  		return nil, gensupport.WrapError(&googleapi.Error{
  5474  			Code:   res.StatusCode,
  5475  			Header: res.Header,
  5476  		})
  5477  	}
  5478  	if err != nil {
  5479  		return nil, err
  5480  	}
  5481  	defer googleapi.CloseBody(res)
  5482  	if err := googleapi.CheckResponse(res); err != nil {
  5483  		return nil, gensupport.WrapError(err)
  5484  	}
  5485  	ret := &ListDiscoveredWorkloadsResponse{
  5486  		ServerResponse: googleapi.ServerResponse{
  5487  			Header:         res.Header,
  5488  			HTTPStatusCode: res.StatusCode,
  5489  		},
  5490  	}
  5491  	target := &ret
  5492  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5493  		return nil, err
  5494  	}
  5495  	return ret, nil
  5496  }
  5497  
  5498  // Pages invokes f for each page of results.
  5499  // A non-nil error returned from f will halt the iteration.
  5500  // The provided context supersedes any context provided to the Context method.
  5501  func (c *ProjectsLocationsDiscoveredWorkloadsListCall) Pages(ctx context.Context, f func(*ListDiscoveredWorkloadsResponse) error) error {
  5502  	c.ctx_ = ctx
  5503  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5504  	for {
  5505  		x, err := c.Do()
  5506  		if err != nil {
  5507  			return err
  5508  		}
  5509  		if err := f(x); err != nil {
  5510  			return err
  5511  		}
  5512  		if x.NextPageToken == "" {
  5513  			return nil
  5514  		}
  5515  		c.PageToken(x.NextPageToken)
  5516  	}
  5517  }
  5518  
  5519  type ProjectsLocationsDiscoveredWorkloadsLookupCall struct {
  5520  	s            *APIService
  5521  	parent       string
  5522  	urlParams_   gensupport.URLParams
  5523  	ifNoneMatch_ string
  5524  	ctx_         context.Context
  5525  	header_      http.Header
  5526  }
  5527  
  5528  // Lookup: Lists a Discovered Workload in a host project and location, with a
  5529  // given resource URI.
  5530  //
  5531  //   - parent: Host project ID and location to lookup Discovered Workload in.
  5532  //     Expected format: `projects/{project}/locations/{location}`.
  5533  func (r *ProjectsLocationsDiscoveredWorkloadsService) Lookup(parent string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
  5534  	c := &ProjectsLocationsDiscoveredWorkloadsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5535  	c.parent = parent
  5536  	return c
  5537  }
  5538  
  5539  // Uri sets the optional parameter "uri": Required. Resource URI to find
  5540  // Discovered Workload for. Accepts both project number and project ID and does
  5541  // translation when needed.
  5542  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Uri(uri string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
  5543  	c.urlParams_.Set("uri", uri)
  5544  	return c
  5545  }
  5546  
  5547  // Fields allows partial responses to be retrieved. See
  5548  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5549  // details.
  5550  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
  5551  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5552  	return c
  5553  }
  5554  
  5555  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5556  // object's ETag matches the given value. This is useful for getting updates
  5557  // only after the object has changed since the last request.
  5558  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
  5559  	c.ifNoneMatch_ = entityTag
  5560  	return c
  5561  }
  5562  
  5563  // Context sets the context to be used in this call's Do method.
  5564  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Context(ctx context.Context) *ProjectsLocationsDiscoveredWorkloadsLookupCall {
  5565  	c.ctx_ = ctx
  5566  	return c
  5567  }
  5568  
  5569  // Header returns a http.Header that can be modified by the caller to add
  5570  // headers to the request.
  5571  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Header() http.Header {
  5572  	if c.header_ == nil {
  5573  		c.header_ = make(http.Header)
  5574  	}
  5575  	return c.header_
  5576  }
  5577  
  5578  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) doRequest(alt string) (*http.Response, error) {
  5579  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5580  	if c.ifNoneMatch_ != "" {
  5581  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5582  	}
  5583  	var body io.Reader = nil
  5584  	c.urlParams_.Set("alt", alt)
  5585  	c.urlParams_.Set("prettyPrint", "false")
  5586  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/discoveredWorkloads:lookup")
  5587  	urls += "?" + c.urlParams_.Encode()
  5588  	req, err := http.NewRequest("GET", urls, body)
  5589  	if err != nil {
  5590  		return nil, err
  5591  	}
  5592  	req.Header = reqHeaders
  5593  	googleapi.Expand(req.URL, map[string]string{
  5594  		"parent": c.parent,
  5595  	})
  5596  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5597  }
  5598  
  5599  // Do executes the "apphub.projects.locations.discoveredWorkloads.lookup" call.
  5600  // Any non-2xx status code is an error. Response headers are in either
  5601  // *LookupDiscoveredWorkloadResponse.ServerResponse.Header or (if a response
  5602  // was returned at all) in error.(*googleapi.Error).Header. Use
  5603  // googleapi.IsNotModified to check whether the returned error was because
  5604  // http.StatusNotModified was returned.
  5605  func (c *ProjectsLocationsDiscoveredWorkloadsLookupCall) Do(opts ...googleapi.CallOption) (*LookupDiscoveredWorkloadResponse, error) {
  5606  	gensupport.SetOptions(c.urlParams_, opts...)
  5607  	res, err := c.doRequest("json")
  5608  	if res != nil && res.StatusCode == http.StatusNotModified {
  5609  		if res.Body != nil {
  5610  			res.Body.Close()
  5611  		}
  5612  		return nil, gensupport.WrapError(&googleapi.Error{
  5613  			Code:   res.StatusCode,
  5614  			Header: res.Header,
  5615  		})
  5616  	}
  5617  	if err != nil {
  5618  		return nil, err
  5619  	}
  5620  	defer googleapi.CloseBody(res)
  5621  	if err := googleapi.CheckResponse(res); err != nil {
  5622  		return nil, gensupport.WrapError(err)
  5623  	}
  5624  	ret := &LookupDiscoveredWorkloadResponse{
  5625  		ServerResponse: googleapi.ServerResponse{
  5626  			Header:         res.Header,
  5627  			HTTPStatusCode: res.StatusCode,
  5628  		},
  5629  	}
  5630  	target := &ret
  5631  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5632  		return nil, err
  5633  	}
  5634  	return ret, nil
  5635  }
  5636  
  5637  type ProjectsLocationsOperationsCancelCall struct {
  5638  	s                      *APIService
  5639  	name                   string
  5640  	canceloperationrequest *CancelOperationRequest
  5641  	urlParams_             gensupport.URLParams
  5642  	ctx_                   context.Context
  5643  	header_                http.Header
  5644  }
  5645  
  5646  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5647  // server makes a best effort to cancel the operation, but success is not
  5648  // guaranteed. If the server doesn't support this method, it returns
  5649  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5650  // other methods to check whether the cancellation succeeded or whether the
  5651  // operation completed despite cancellation. On successful cancellation, the
  5652  // operation is not deleted; instead, it becomes an operation with an
  5653  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5654  // `Code.CANCELLED`.
  5655  //
  5656  // - name: The name of the operation resource to be cancelled.
  5657  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  5658  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5659  	c.name = name
  5660  	c.canceloperationrequest = canceloperationrequest
  5661  	return c
  5662  }
  5663  
  5664  // Fields allows partial responses to be retrieved. See
  5665  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5666  // details.
  5667  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  5668  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5669  	return c
  5670  }
  5671  
  5672  // Context sets the context to be used in this call's Do method.
  5673  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  5674  	c.ctx_ = ctx
  5675  	return c
  5676  }
  5677  
  5678  // Header returns a http.Header that can be modified by the caller to add
  5679  // headers to the request.
  5680  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  5681  	if c.header_ == nil {
  5682  		c.header_ = make(http.Header)
  5683  	}
  5684  	return c.header_
  5685  }
  5686  
  5687  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5688  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5689  	var body io.Reader = nil
  5690  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  5691  	if err != nil {
  5692  		return nil, err
  5693  	}
  5694  	c.urlParams_.Set("alt", alt)
  5695  	c.urlParams_.Set("prettyPrint", "false")
  5696  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel")
  5697  	urls += "?" + c.urlParams_.Encode()
  5698  	req, err := http.NewRequest("POST", urls, body)
  5699  	if err != nil {
  5700  		return nil, err
  5701  	}
  5702  	req.Header = reqHeaders
  5703  	googleapi.Expand(req.URL, map[string]string{
  5704  		"name": c.name,
  5705  	})
  5706  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5707  }
  5708  
  5709  // Do executes the "apphub.projects.locations.operations.cancel" call.
  5710  // Any non-2xx status code is an error. Response headers are in either
  5711  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5712  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5713  // whether the returned error was because http.StatusNotModified was returned.
  5714  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5715  	gensupport.SetOptions(c.urlParams_, opts...)
  5716  	res, err := c.doRequest("json")
  5717  	if res != nil && res.StatusCode == http.StatusNotModified {
  5718  		if res.Body != nil {
  5719  			res.Body.Close()
  5720  		}
  5721  		return nil, gensupport.WrapError(&googleapi.Error{
  5722  			Code:   res.StatusCode,
  5723  			Header: res.Header,
  5724  		})
  5725  	}
  5726  	if err != nil {
  5727  		return nil, err
  5728  	}
  5729  	defer googleapi.CloseBody(res)
  5730  	if err := googleapi.CheckResponse(res); err != nil {
  5731  		return nil, gensupport.WrapError(err)
  5732  	}
  5733  	ret := &Empty{
  5734  		ServerResponse: googleapi.ServerResponse{
  5735  			Header:         res.Header,
  5736  			HTTPStatusCode: res.StatusCode,
  5737  		},
  5738  	}
  5739  	target := &ret
  5740  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5741  		return nil, err
  5742  	}
  5743  	return ret, nil
  5744  }
  5745  
  5746  type ProjectsLocationsOperationsDeleteCall struct {
  5747  	s          *APIService
  5748  	name       string
  5749  	urlParams_ gensupport.URLParams
  5750  	ctx_       context.Context
  5751  	header_    http.Header
  5752  }
  5753  
  5754  // Delete: Deletes a long-running operation. This method indicates that the
  5755  // client is no longer interested in the operation result. It does not cancel
  5756  // the operation. If the server doesn't support this method, it returns
  5757  // `google.rpc.Code.UNIMPLEMENTED`.
  5758  //
  5759  // - name: The name of the operation resource to be deleted.
  5760  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  5761  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5762  	c.name = name
  5763  	return c
  5764  }
  5765  
  5766  // Fields allows partial responses to be retrieved. See
  5767  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5768  // details.
  5769  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  5770  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5771  	return c
  5772  }
  5773  
  5774  // Context sets the context to be used in this call's Do method.
  5775  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  5776  	c.ctx_ = ctx
  5777  	return c
  5778  }
  5779  
  5780  // Header returns a http.Header that can be modified by the caller to add
  5781  // headers to the request.
  5782  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  5783  	if c.header_ == nil {
  5784  		c.header_ = make(http.Header)
  5785  	}
  5786  	return c.header_
  5787  }
  5788  
  5789  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5790  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5791  	var body io.Reader = nil
  5792  	c.urlParams_.Set("alt", alt)
  5793  	c.urlParams_.Set("prettyPrint", "false")
  5794  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  5795  	urls += "?" + c.urlParams_.Encode()
  5796  	req, err := http.NewRequest("DELETE", urls, body)
  5797  	if err != nil {
  5798  		return nil, err
  5799  	}
  5800  	req.Header = reqHeaders
  5801  	googleapi.Expand(req.URL, map[string]string{
  5802  		"name": c.name,
  5803  	})
  5804  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5805  }
  5806  
  5807  // Do executes the "apphub.projects.locations.operations.delete" call.
  5808  // Any non-2xx status code is an error. Response headers are in either
  5809  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5810  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5811  // whether the returned error was because http.StatusNotModified was returned.
  5812  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5813  	gensupport.SetOptions(c.urlParams_, opts...)
  5814  	res, err := c.doRequest("json")
  5815  	if res != nil && res.StatusCode == http.StatusNotModified {
  5816  		if res.Body != nil {
  5817  			res.Body.Close()
  5818  		}
  5819  		return nil, gensupport.WrapError(&googleapi.Error{
  5820  			Code:   res.StatusCode,
  5821  			Header: res.Header,
  5822  		})
  5823  	}
  5824  	if err != nil {
  5825  		return nil, err
  5826  	}
  5827  	defer googleapi.CloseBody(res)
  5828  	if err := googleapi.CheckResponse(res); err != nil {
  5829  		return nil, gensupport.WrapError(err)
  5830  	}
  5831  	ret := &Empty{
  5832  		ServerResponse: googleapi.ServerResponse{
  5833  			Header:         res.Header,
  5834  			HTTPStatusCode: res.StatusCode,
  5835  		},
  5836  	}
  5837  	target := &ret
  5838  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5839  		return nil, err
  5840  	}
  5841  	return ret, nil
  5842  }
  5843  
  5844  type ProjectsLocationsOperationsGetCall struct {
  5845  	s            *APIService
  5846  	name         string
  5847  	urlParams_   gensupport.URLParams
  5848  	ifNoneMatch_ string
  5849  	ctx_         context.Context
  5850  	header_      http.Header
  5851  }
  5852  
  5853  // Get: Gets the latest state of a long-running operation. Clients can use this
  5854  // method to poll the operation result at intervals as recommended by the API
  5855  // service.
  5856  //
  5857  // - name: The name of the operation resource.
  5858  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  5859  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5860  	c.name = name
  5861  	return c
  5862  }
  5863  
  5864  // Fields allows partial responses to be retrieved. See
  5865  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5866  // details.
  5867  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  5868  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5869  	return c
  5870  }
  5871  
  5872  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5873  // object's ETag matches the given value. This is useful for getting updates
  5874  // only after the object has changed since the last request.
  5875  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  5876  	c.ifNoneMatch_ = entityTag
  5877  	return c
  5878  }
  5879  
  5880  // Context sets the context to be used in this call's Do method.
  5881  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  5882  	c.ctx_ = ctx
  5883  	return c
  5884  }
  5885  
  5886  // Header returns a http.Header that can be modified by the caller to add
  5887  // headers to the request.
  5888  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  5889  	if c.header_ == nil {
  5890  		c.header_ = make(http.Header)
  5891  	}
  5892  	return c.header_
  5893  }
  5894  
  5895  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5896  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5897  	if c.ifNoneMatch_ != "" {
  5898  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5899  	}
  5900  	var body io.Reader = nil
  5901  	c.urlParams_.Set("alt", alt)
  5902  	c.urlParams_.Set("prettyPrint", "false")
  5903  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  5904  	urls += "?" + c.urlParams_.Encode()
  5905  	req, err := http.NewRequest("GET", urls, body)
  5906  	if err != nil {
  5907  		return nil, err
  5908  	}
  5909  	req.Header = reqHeaders
  5910  	googleapi.Expand(req.URL, map[string]string{
  5911  		"name": c.name,
  5912  	})
  5913  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5914  }
  5915  
  5916  // Do executes the "apphub.projects.locations.operations.get" call.
  5917  // Any non-2xx status code is an error. Response headers are in either
  5918  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5919  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5920  // whether the returned error was because http.StatusNotModified was returned.
  5921  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5922  	gensupport.SetOptions(c.urlParams_, opts...)
  5923  	res, err := c.doRequest("json")
  5924  	if res != nil && res.StatusCode == http.StatusNotModified {
  5925  		if res.Body != nil {
  5926  			res.Body.Close()
  5927  		}
  5928  		return nil, gensupport.WrapError(&googleapi.Error{
  5929  			Code:   res.StatusCode,
  5930  			Header: res.Header,
  5931  		})
  5932  	}
  5933  	if err != nil {
  5934  		return nil, err
  5935  	}
  5936  	defer googleapi.CloseBody(res)
  5937  	if err := googleapi.CheckResponse(res); err != nil {
  5938  		return nil, gensupport.WrapError(err)
  5939  	}
  5940  	ret := &Operation{
  5941  		ServerResponse: googleapi.ServerResponse{
  5942  			Header:         res.Header,
  5943  			HTTPStatusCode: res.StatusCode,
  5944  		},
  5945  	}
  5946  	target := &ret
  5947  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5948  		return nil, err
  5949  	}
  5950  	return ret, nil
  5951  }
  5952  
  5953  type ProjectsLocationsOperationsListCall struct {
  5954  	s            *APIService
  5955  	name         string
  5956  	urlParams_   gensupport.URLParams
  5957  	ifNoneMatch_ string
  5958  	ctx_         context.Context
  5959  	header_      http.Header
  5960  }
  5961  
  5962  // List: Lists operations that match the specified filter in the request. If
  5963  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5964  //
  5965  // - name: The name of the operation's parent resource.
  5966  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  5967  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5968  	c.name = name
  5969  	return c
  5970  }
  5971  
  5972  // Filter sets the optional parameter "filter": The standard list filter.
  5973  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  5974  	c.urlParams_.Set("filter", filter)
  5975  	return c
  5976  }
  5977  
  5978  // PageSize sets the optional parameter "pageSize": The standard list page
  5979  // size.
  5980  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  5981  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5982  	return c
  5983  }
  5984  
  5985  // PageToken sets the optional parameter "pageToken": The standard list page
  5986  // token.
  5987  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  5988  	c.urlParams_.Set("pageToken", pageToken)
  5989  	return c
  5990  }
  5991  
  5992  // Fields allows partial responses to be retrieved. See
  5993  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5994  // details.
  5995  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  5996  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5997  	return c
  5998  }
  5999  
  6000  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6001  // object's ETag matches the given value. This is useful for getting updates
  6002  // only after the object has changed since the last request.
  6003  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  6004  	c.ifNoneMatch_ = entityTag
  6005  	return c
  6006  }
  6007  
  6008  // Context sets the context to be used in this call's Do method.
  6009  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  6010  	c.ctx_ = ctx
  6011  	return c
  6012  }
  6013  
  6014  // Header returns a http.Header that can be modified by the caller to add
  6015  // headers to the request.
  6016  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  6017  	if c.header_ == nil {
  6018  		c.header_ = make(http.Header)
  6019  	}
  6020  	return c.header_
  6021  }
  6022  
  6023  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6024  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6025  	if c.ifNoneMatch_ != "" {
  6026  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6027  	}
  6028  	var body io.Reader = nil
  6029  	c.urlParams_.Set("alt", alt)
  6030  	c.urlParams_.Set("prettyPrint", "false")
  6031  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations")
  6032  	urls += "?" + c.urlParams_.Encode()
  6033  	req, err := http.NewRequest("GET", urls, body)
  6034  	if err != nil {
  6035  		return nil, err
  6036  	}
  6037  	req.Header = reqHeaders
  6038  	googleapi.Expand(req.URL, map[string]string{
  6039  		"name": c.name,
  6040  	})
  6041  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6042  }
  6043  
  6044  // Do executes the "apphub.projects.locations.operations.list" call.
  6045  // Any non-2xx status code is an error. Response headers are in either
  6046  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  6047  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6048  // check whether the returned error was because http.StatusNotModified was
  6049  // returned.
  6050  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6051  	gensupport.SetOptions(c.urlParams_, opts...)
  6052  	res, err := c.doRequest("json")
  6053  	if res != nil && res.StatusCode == http.StatusNotModified {
  6054  		if res.Body != nil {
  6055  			res.Body.Close()
  6056  		}
  6057  		return nil, gensupport.WrapError(&googleapi.Error{
  6058  			Code:   res.StatusCode,
  6059  			Header: res.Header,
  6060  		})
  6061  	}
  6062  	if err != nil {
  6063  		return nil, err
  6064  	}
  6065  	defer googleapi.CloseBody(res)
  6066  	if err := googleapi.CheckResponse(res); err != nil {
  6067  		return nil, gensupport.WrapError(err)
  6068  	}
  6069  	ret := &ListOperationsResponse{
  6070  		ServerResponse: googleapi.ServerResponse{
  6071  			Header:         res.Header,
  6072  			HTTPStatusCode: res.StatusCode,
  6073  		},
  6074  	}
  6075  	target := &ret
  6076  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6077  		return nil, err
  6078  	}
  6079  	return ret, nil
  6080  }
  6081  
  6082  // Pages invokes f for each page of results.
  6083  // A non-nil error returned from f will halt the iteration.
  6084  // The provided context supersedes any context provided to the Context method.
  6085  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  6086  	c.ctx_ = ctx
  6087  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6088  	for {
  6089  		x, err := c.Do()
  6090  		if err != nil {
  6091  			return err
  6092  		}
  6093  		if err := f(x); err != nil {
  6094  			return err
  6095  		}
  6096  		if x.NextPageToken == "" {
  6097  			return nil
  6098  		}
  6099  		c.PageToken(x.NextPageToken)
  6100  	}
  6101  }
  6102  
  6103  type ProjectsLocationsServiceProjectAttachmentsCreateCall struct {
  6104  	s                        *APIService
  6105  	parent                   string
  6106  	serviceprojectattachment *ServiceProjectAttachment
  6107  	urlParams_               gensupport.URLParams
  6108  	ctx_                     context.Context
  6109  	header_                  http.Header
  6110  }
  6111  
  6112  // Create: Attaches a service project to the host project.
  6113  //
  6114  //   - parent: Host project ID and location to which service project is being
  6115  //     attached. Only global location is supported. Expected format:
  6116  //     `projects/{project}/locations/{location}`.
  6117  func (r *ProjectsLocationsServiceProjectAttachmentsService) Create(parent string, serviceprojectattachment *ServiceProjectAttachment) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
  6118  	c := &ProjectsLocationsServiceProjectAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6119  	c.parent = parent
  6120  	c.serviceprojectattachment = serviceprojectattachment
  6121  	return c
  6122  }
  6123  
  6124  // RequestId sets the optional parameter "requestId": An optional request ID to
  6125  // identify requests. Specify a unique request ID so that if you must retry
  6126  // your request, the server will know to ignore the request if it has already
  6127  // been completed. The server will guarantee that for at least 60 minutes since
  6128  // the first request. For example, consider a situation where you make an
  6129  // initial request and the request times out. If you make the request again
  6130  // with the same request ID, the server can check if original operation with
  6131  // the same request ID was received, and if so, will ignore the second request.
  6132  // This prevents clients from accidentally creating duplicate commitments. The
  6133  // request ID must be a valid UUID with the exception that zero UUID is not
  6134  // supported (00000000-0000-0000-0000-000000000000).
  6135  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
  6136  	c.urlParams_.Set("requestId", requestId)
  6137  	return c
  6138  }
  6139  
  6140  // ServiceProjectAttachmentId sets the optional parameter
  6141  // "serviceProjectAttachmentId": Required. The service project attachment
  6142  // identifier must contain the project id of the service project specified in
  6143  // the service_project_attachment.service_project field.
  6144  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) ServiceProjectAttachmentId(serviceProjectAttachmentId string) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
  6145  	c.urlParams_.Set("serviceProjectAttachmentId", serviceProjectAttachmentId)
  6146  	return c
  6147  }
  6148  
  6149  // Fields allows partial responses to be retrieved. See
  6150  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6151  // details.
  6152  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
  6153  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6154  	return c
  6155  }
  6156  
  6157  // Context sets the context to be used in this call's Do method.
  6158  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsCreateCall {
  6159  	c.ctx_ = ctx
  6160  	return c
  6161  }
  6162  
  6163  // Header returns a http.Header that can be modified by the caller to add
  6164  // headers to the request.
  6165  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Header() http.Header {
  6166  	if c.header_ == nil {
  6167  		c.header_ = make(http.Header)
  6168  	}
  6169  	return c.header_
  6170  }
  6171  
  6172  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) {
  6173  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6174  	var body io.Reader = nil
  6175  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceprojectattachment)
  6176  	if err != nil {
  6177  		return nil, err
  6178  	}
  6179  	c.urlParams_.Set("alt", alt)
  6180  	c.urlParams_.Set("prettyPrint", "false")
  6181  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/serviceProjectAttachments")
  6182  	urls += "?" + c.urlParams_.Encode()
  6183  	req, err := http.NewRequest("POST", urls, body)
  6184  	if err != nil {
  6185  		return nil, err
  6186  	}
  6187  	req.Header = reqHeaders
  6188  	googleapi.Expand(req.URL, map[string]string{
  6189  		"parent": c.parent,
  6190  	})
  6191  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6192  }
  6193  
  6194  // Do executes the "apphub.projects.locations.serviceProjectAttachments.create" call.
  6195  // Any non-2xx status code is an error. Response headers are in either
  6196  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6197  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6198  // whether the returned error was because http.StatusNotModified was returned.
  6199  func (c *ProjectsLocationsServiceProjectAttachmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6200  	gensupport.SetOptions(c.urlParams_, opts...)
  6201  	res, err := c.doRequest("json")
  6202  	if res != nil && res.StatusCode == http.StatusNotModified {
  6203  		if res.Body != nil {
  6204  			res.Body.Close()
  6205  		}
  6206  		return nil, gensupport.WrapError(&googleapi.Error{
  6207  			Code:   res.StatusCode,
  6208  			Header: res.Header,
  6209  		})
  6210  	}
  6211  	if err != nil {
  6212  		return nil, err
  6213  	}
  6214  	defer googleapi.CloseBody(res)
  6215  	if err := googleapi.CheckResponse(res); err != nil {
  6216  		return nil, gensupport.WrapError(err)
  6217  	}
  6218  	ret := &Operation{
  6219  		ServerResponse: googleapi.ServerResponse{
  6220  			Header:         res.Header,
  6221  			HTTPStatusCode: res.StatusCode,
  6222  		},
  6223  	}
  6224  	target := &ret
  6225  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6226  		return nil, err
  6227  	}
  6228  	return ret, nil
  6229  }
  6230  
  6231  type ProjectsLocationsServiceProjectAttachmentsDeleteCall struct {
  6232  	s          *APIService
  6233  	name       string
  6234  	urlParams_ gensupport.URLParams
  6235  	ctx_       context.Context
  6236  	header_    http.Header
  6237  }
  6238  
  6239  // Delete: Deletes a service project attachment.
  6240  //
  6241  //   - name: Fully qualified name of the service project attachment to delete.
  6242  //     Expected format:
  6243  //     `projects/{project}/locations/{location}/serviceProjectAttachments/{service
  6244  //     ProjectAttachment}`.
  6245  func (r *ProjectsLocationsServiceProjectAttachmentsService) Delete(name string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
  6246  	c := &ProjectsLocationsServiceProjectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6247  	c.name = name
  6248  	return c
  6249  }
  6250  
  6251  // RequestId sets the optional parameter "requestId": An optional request ID to
  6252  // identify requests. Specify a unique request ID so that if you must retry
  6253  // your request, the server will know to ignore the request if it has already
  6254  // been completed. The server will guarantee that for at least 60 minutes after
  6255  // the first request. For example, consider a situation where you make an
  6256  // initial request and the request times out. If you make the request again
  6257  // with the same request ID, the server can check if original operation with
  6258  // the same request ID was received, and if so, will ignore the second request.
  6259  // This prevents clients from accidentally creating duplicate commitments. The
  6260  // request ID must be a valid UUID with the exception that zero UUID is not
  6261  // supported (00000000-0000-0000-0000-000000000000).
  6262  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
  6263  	c.urlParams_.Set("requestId", requestId)
  6264  	return c
  6265  }
  6266  
  6267  // Fields allows partial responses to be retrieved. See
  6268  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6269  // details.
  6270  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
  6271  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6272  	return c
  6273  }
  6274  
  6275  // Context sets the context to be used in this call's Do method.
  6276  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsDeleteCall {
  6277  	c.ctx_ = ctx
  6278  	return c
  6279  }
  6280  
  6281  // Header returns a http.Header that can be modified by the caller to add
  6282  // headers to the request.
  6283  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Header() http.Header {
  6284  	if c.header_ == nil {
  6285  		c.header_ = make(http.Header)
  6286  	}
  6287  	return c.header_
  6288  }
  6289  
  6290  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6291  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6292  	var body io.Reader = nil
  6293  	c.urlParams_.Set("alt", alt)
  6294  	c.urlParams_.Set("prettyPrint", "false")
  6295  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6296  	urls += "?" + c.urlParams_.Encode()
  6297  	req, err := http.NewRequest("DELETE", urls, body)
  6298  	if err != nil {
  6299  		return nil, err
  6300  	}
  6301  	req.Header = reqHeaders
  6302  	googleapi.Expand(req.URL, map[string]string{
  6303  		"name": c.name,
  6304  	})
  6305  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6306  }
  6307  
  6308  // Do executes the "apphub.projects.locations.serviceProjectAttachments.delete" call.
  6309  // Any non-2xx status code is an error. Response headers are in either
  6310  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6311  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6312  // whether the returned error was because http.StatusNotModified was returned.
  6313  func (c *ProjectsLocationsServiceProjectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6314  	gensupport.SetOptions(c.urlParams_, opts...)
  6315  	res, err := c.doRequest("json")
  6316  	if res != nil && res.StatusCode == http.StatusNotModified {
  6317  		if res.Body != nil {
  6318  			res.Body.Close()
  6319  		}
  6320  		return nil, gensupport.WrapError(&googleapi.Error{
  6321  			Code:   res.StatusCode,
  6322  			Header: res.Header,
  6323  		})
  6324  	}
  6325  	if err != nil {
  6326  		return nil, err
  6327  	}
  6328  	defer googleapi.CloseBody(res)
  6329  	if err := googleapi.CheckResponse(res); err != nil {
  6330  		return nil, gensupport.WrapError(err)
  6331  	}
  6332  	ret := &Operation{
  6333  		ServerResponse: googleapi.ServerResponse{
  6334  			Header:         res.Header,
  6335  			HTTPStatusCode: res.StatusCode,
  6336  		},
  6337  	}
  6338  	target := &ret
  6339  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6340  		return nil, err
  6341  	}
  6342  	return ret, nil
  6343  }
  6344  
  6345  type ProjectsLocationsServiceProjectAttachmentsGetCall struct {
  6346  	s            *APIService
  6347  	name         string
  6348  	urlParams_   gensupport.URLParams
  6349  	ifNoneMatch_ string
  6350  	ctx_         context.Context
  6351  	header_      http.Header
  6352  }
  6353  
  6354  // Get: Gets a service project attachment.
  6355  //
  6356  //   - name: Fully qualified name of the service project attachment to retrieve.
  6357  //     Expected format:
  6358  //     `projects/{project}/locations/{location}/serviceProjectAttachments/{service
  6359  //     ProjectAttachment}`.
  6360  func (r *ProjectsLocationsServiceProjectAttachmentsService) Get(name string) *ProjectsLocationsServiceProjectAttachmentsGetCall {
  6361  	c := &ProjectsLocationsServiceProjectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6362  	c.name = name
  6363  	return c
  6364  }
  6365  
  6366  // Fields allows partial responses to be retrieved. See
  6367  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6368  // details.
  6369  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsGetCall {
  6370  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6371  	return c
  6372  }
  6373  
  6374  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6375  // object's ETag matches the given value. This is useful for getting updates
  6376  // only after the object has changed since the last request.
  6377  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsGetCall {
  6378  	c.ifNoneMatch_ = entityTag
  6379  	return c
  6380  }
  6381  
  6382  // Context sets the context to be used in this call's Do method.
  6383  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsGetCall {
  6384  	c.ctx_ = ctx
  6385  	return c
  6386  }
  6387  
  6388  // Header returns a http.Header that can be modified by the caller to add
  6389  // headers to the request.
  6390  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Header() http.Header {
  6391  	if c.header_ == nil {
  6392  		c.header_ = make(http.Header)
  6393  	}
  6394  	return c.header_
  6395  }
  6396  
  6397  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
  6398  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6399  	if c.ifNoneMatch_ != "" {
  6400  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6401  	}
  6402  	var body io.Reader = nil
  6403  	c.urlParams_.Set("alt", alt)
  6404  	c.urlParams_.Set("prettyPrint", "false")
  6405  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}")
  6406  	urls += "?" + c.urlParams_.Encode()
  6407  	req, err := http.NewRequest("GET", urls, body)
  6408  	if err != nil {
  6409  		return nil, err
  6410  	}
  6411  	req.Header = reqHeaders
  6412  	googleapi.Expand(req.URL, map[string]string{
  6413  		"name": c.name,
  6414  	})
  6415  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6416  }
  6417  
  6418  // Do executes the "apphub.projects.locations.serviceProjectAttachments.get" call.
  6419  // Any non-2xx status code is an error. Response headers are in either
  6420  // *ServiceProjectAttachment.ServerResponse.Header or (if a response was
  6421  // returned at all) in error.(*googleapi.Error).Header. Use
  6422  // googleapi.IsNotModified to check whether the returned error was because
  6423  // http.StatusNotModified was returned.
  6424  func (c *ProjectsLocationsServiceProjectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*ServiceProjectAttachment, error) {
  6425  	gensupport.SetOptions(c.urlParams_, opts...)
  6426  	res, err := c.doRequest("json")
  6427  	if res != nil && res.StatusCode == http.StatusNotModified {
  6428  		if res.Body != nil {
  6429  			res.Body.Close()
  6430  		}
  6431  		return nil, gensupport.WrapError(&googleapi.Error{
  6432  			Code:   res.StatusCode,
  6433  			Header: res.Header,
  6434  		})
  6435  	}
  6436  	if err != nil {
  6437  		return nil, err
  6438  	}
  6439  	defer googleapi.CloseBody(res)
  6440  	if err := googleapi.CheckResponse(res); err != nil {
  6441  		return nil, gensupport.WrapError(err)
  6442  	}
  6443  	ret := &ServiceProjectAttachment{
  6444  		ServerResponse: googleapi.ServerResponse{
  6445  			Header:         res.Header,
  6446  			HTTPStatusCode: res.StatusCode,
  6447  		},
  6448  	}
  6449  	target := &ret
  6450  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6451  		return nil, err
  6452  	}
  6453  	return ret, nil
  6454  }
  6455  
  6456  type ProjectsLocationsServiceProjectAttachmentsListCall struct {
  6457  	s            *APIService
  6458  	parent       string
  6459  	urlParams_   gensupport.URLParams
  6460  	ifNoneMatch_ string
  6461  	ctx_         context.Context
  6462  	header_      http.Header
  6463  }
  6464  
  6465  // List: Lists service projects attached to the host project.
  6466  //
  6467  //   - parent: Host project ID and location to list service project attachments.
  6468  //     Only global location is supported. Expected format:
  6469  //     `projects/{project}/locations/{location}`.
  6470  func (r *ProjectsLocationsServiceProjectAttachmentsService) List(parent string) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6471  	c := &ProjectsLocationsServiceProjectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6472  	c.parent = parent
  6473  	return c
  6474  }
  6475  
  6476  // Filter sets the optional parameter "filter": Filtering results.
  6477  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Filter(filter string) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6478  	c.urlParams_.Set("filter", filter)
  6479  	return c
  6480  }
  6481  
  6482  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  6483  // results.
  6484  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6485  	c.urlParams_.Set("orderBy", orderBy)
  6486  	return c
  6487  }
  6488  
  6489  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  6490  // may return fewer items than requested. If unspecified, server will pick an
  6491  // appropriate default.
  6492  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6493  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6494  	return c
  6495  }
  6496  
  6497  // PageToken sets the optional parameter "pageToken": A token identifying a
  6498  // page of results the server should return.
  6499  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) PageToken(pageToken string) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6500  	c.urlParams_.Set("pageToken", pageToken)
  6501  	return c
  6502  }
  6503  
  6504  // Fields allows partial responses to be retrieved. See
  6505  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6506  // details.
  6507  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6508  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6509  	return c
  6510  }
  6511  
  6512  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6513  // object's ETag matches the given value. This is useful for getting updates
  6514  // only after the object has changed since the last request.
  6515  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6516  	c.ifNoneMatch_ = entityTag
  6517  	return c
  6518  }
  6519  
  6520  // Context sets the context to be used in this call's Do method.
  6521  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Context(ctx context.Context) *ProjectsLocationsServiceProjectAttachmentsListCall {
  6522  	c.ctx_ = ctx
  6523  	return c
  6524  }
  6525  
  6526  // Header returns a http.Header that can be modified by the caller to add
  6527  // headers to the request.
  6528  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Header() http.Header {
  6529  	if c.header_ == nil {
  6530  		c.header_ = make(http.Header)
  6531  	}
  6532  	return c.header_
  6533  }
  6534  
  6535  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
  6536  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6537  	if c.ifNoneMatch_ != "" {
  6538  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6539  	}
  6540  	var body io.Reader = nil
  6541  	c.urlParams_.Set("alt", alt)
  6542  	c.urlParams_.Set("prettyPrint", "false")
  6543  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/serviceProjectAttachments")
  6544  	urls += "?" + c.urlParams_.Encode()
  6545  	req, err := http.NewRequest("GET", urls, body)
  6546  	if err != nil {
  6547  		return nil, err
  6548  	}
  6549  	req.Header = reqHeaders
  6550  	googleapi.Expand(req.URL, map[string]string{
  6551  		"parent": c.parent,
  6552  	})
  6553  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6554  }
  6555  
  6556  // Do executes the "apphub.projects.locations.serviceProjectAttachments.list" call.
  6557  // Any non-2xx status code is an error. Response headers are in either
  6558  // *ListServiceProjectAttachmentsResponse.ServerResponse.Header or (if a
  6559  // response was returned at all) in error.(*googleapi.Error).Header. Use
  6560  // googleapi.IsNotModified to check whether the returned error was because
  6561  // http.StatusNotModified was returned.
  6562  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListServiceProjectAttachmentsResponse, error) {
  6563  	gensupport.SetOptions(c.urlParams_, opts...)
  6564  	res, err := c.doRequest("json")
  6565  	if res != nil && res.StatusCode == http.StatusNotModified {
  6566  		if res.Body != nil {
  6567  			res.Body.Close()
  6568  		}
  6569  		return nil, gensupport.WrapError(&googleapi.Error{
  6570  			Code:   res.StatusCode,
  6571  			Header: res.Header,
  6572  		})
  6573  	}
  6574  	if err != nil {
  6575  		return nil, err
  6576  	}
  6577  	defer googleapi.CloseBody(res)
  6578  	if err := googleapi.CheckResponse(res); err != nil {
  6579  		return nil, gensupport.WrapError(err)
  6580  	}
  6581  	ret := &ListServiceProjectAttachmentsResponse{
  6582  		ServerResponse: googleapi.ServerResponse{
  6583  			Header:         res.Header,
  6584  			HTTPStatusCode: res.StatusCode,
  6585  		},
  6586  	}
  6587  	target := &ret
  6588  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6589  		return nil, err
  6590  	}
  6591  	return ret, nil
  6592  }
  6593  
  6594  // Pages invokes f for each page of results.
  6595  // A non-nil error returned from f will halt the iteration.
  6596  // The provided context supersedes any context provided to the Context method.
  6597  func (c *ProjectsLocationsServiceProjectAttachmentsListCall) Pages(ctx context.Context, f func(*ListServiceProjectAttachmentsResponse) error) error {
  6598  	c.ctx_ = ctx
  6599  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6600  	for {
  6601  		x, err := c.Do()
  6602  		if err != nil {
  6603  			return err
  6604  		}
  6605  		if err := f(x); err != nil {
  6606  			return err
  6607  		}
  6608  		if x.NextPageToken == "" {
  6609  			return nil
  6610  		}
  6611  		c.PageToken(x.NextPageToken)
  6612  	}
  6613  }
  6614  

View as plain text