...

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

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

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

View as plain text