...

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

Documentation: google.golang.org/api/certificatemanager/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 certificatemanager provides access to the Certificate Manager API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/certificate-manager
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/certificatemanager/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	certificatemanagerService, err := certificatemanager.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  //	certificatemanagerService, err := certificatemanager.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  //	certificatemanagerService, err := certificatemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package certificatemanager // import "google.golang.org/api/certificatemanager/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 = "certificatemanager:v1"
    90  const apiName = "certificatemanager"
    91  const apiVersion = "v1"
    92  const basePath = "https://certificatemanager.googleapis.com/"
    93  const basePathTemplate = "https://certificatemanager.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://certificatemanager.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.CertificateIssuanceConfigs = NewProjectsLocationsCertificateIssuanceConfigsService(s)
   172  	rs.CertificateMaps = NewProjectsLocationsCertificateMapsService(s)
   173  	rs.Certificates = NewProjectsLocationsCertificatesService(s)
   174  	rs.DnsAuthorizations = NewProjectsLocationsDnsAuthorizationsService(s)
   175  	rs.Operations = NewProjectsLocationsOperationsService(s)
   176  	rs.TrustConfigs = NewProjectsLocationsTrustConfigsService(s)
   177  	return rs
   178  }
   179  
   180  type ProjectsLocationsService struct {
   181  	s *Service
   182  
   183  	CertificateIssuanceConfigs *ProjectsLocationsCertificateIssuanceConfigsService
   184  
   185  	CertificateMaps *ProjectsLocationsCertificateMapsService
   186  
   187  	Certificates *ProjectsLocationsCertificatesService
   188  
   189  	DnsAuthorizations *ProjectsLocationsDnsAuthorizationsService
   190  
   191  	Operations *ProjectsLocationsOperationsService
   192  
   193  	TrustConfigs *ProjectsLocationsTrustConfigsService
   194  }
   195  
   196  func NewProjectsLocationsCertificateIssuanceConfigsService(s *Service) *ProjectsLocationsCertificateIssuanceConfigsService {
   197  	rs := &ProjectsLocationsCertificateIssuanceConfigsService{s: s}
   198  	return rs
   199  }
   200  
   201  type ProjectsLocationsCertificateIssuanceConfigsService struct {
   202  	s *Service
   203  }
   204  
   205  func NewProjectsLocationsCertificateMapsService(s *Service) *ProjectsLocationsCertificateMapsService {
   206  	rs := &ProjectsLocationsCertificateMapsService{s: s}
   207  	rs.CertificateMapEntries = NewProjectsLocationsCertificateMapsCertificateMapEntriesService(s)
   208  	return rs
   209  }
   210  
   211  type ProjectsLocationsCertificateMapsService struct {
   212  	s *Service
   213  
   214  	CertificateMapEntries *ProjectsLocationsCertificateMapsCertificateMapEntriesService
   215  }
   216  
   217  func NewProjectsLocationsCertificateMapsCertificateMapEntriesService(s *Service) *ProjectsLocationsCertificateMapsCertificateMapEntriesService {
   218  	rs := &ProjectsLocationsCertificateMapsCertificateMapEntriesService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsCertificateMapsCertificateMapEntriesService struct {
   223  	s *Service
   224  }
   225  
   226  func NewProjectsLocationsCertificatesService(s *Service) *ProjectsLocationsCertificatesService {
   227  	rs := &ProjectsLocationsCertificatesService{s: s}
   228  	return rs
   229  }
   230  
   231  type ProjectsLocationsCertificatesService struct {
   232  	s *Service
   233  }
   234  
   235  func NewProjectsLocationsDnsAuthorizationsService(s *Service) *ProjectsLocationsDnsAuthorizationsService {
   236  	rs := &ProjectsLocationsDnsAuthorizationsService{s: s}
   237  	return rs
   238  }
   239  
   240  type ProjectsLocationsDnsAuthorizationsService struct {
   241  	s *Service
   242  }
   243  
   244  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   245  	rs := &ProjectsLocationsOperationsService{s: s}
   246  	return rs
   247  }
   248  
   249  type ProjectsLocationsOperationsService struct {
   250  	s *Service
   251  }
   252  
   253  func NewProjectsLocationsTrustConfigsService(s *Service) *ProjectsLocationsTrustConfigsService {
   254  	rs := &ProjectsLocationsTrustConfigsService{s: s}
   255  	return rs
   256  }
   257  
   258  type ProjectsLocationsTrustConfigsService struct {
   259  	s *Service
   260  }
   261  
   262  // AllowlistedCertificate: Defines an allowlisted certificate.
   263  type AllowlistedCertificate struct {
   264  	// PemCertificate: Required. PEM certificate that is allowlisted. The
   265  	// certificate can be up to 5k bytes, and must be a parseable X.509
   266  	// certificate.
   267  	PemCertificate string `json:"pemCertificate,omitempty"`
   268  	// ForceSendFields is a list of field names (e.g. "PemCertificate") to
   269  	// unconditionally include in API requests. By default, fields with empty or
   270  	// default values are omitted from API requests. See
   271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   272  	// details.
   273  	ForceSendFields []string `json:"-"`
   274  	// NullFields is a list of field names (e.g. "PemCertificate") to include in
   275  	// API requests with the JSON null value. By default, fields with empty values
   276  	// are omitted from API requests. See
   277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   278  	NullFields []string `json:"-"`
   279  }
   280  
   281  func (s *AllowlistedCertificate) MarshalJSON() ([]byte, error) {
   282  	type NoMethod AllowlistedCertificate
   283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   284  }
   285  
   286  // AuthorizationAttemptInfo: State of the latest attempt to authorize a domain
   287  // for certificate issuance.
   288  type AuthorizationAttemptInfo struct {
   289  	// Details: Output only. Human readable explanation for reaching the state.
   290  	// Provided to help address the configuration issues. Not guaranteed to be
   291  	// stable. For programmatic access use FailureReason enum.
   292  	Details string `json:"details,omitempty"`
   293  	// Domain: Domain name of the authorization attempt.
   294  	Domain string `json:"domain,omitempty"`
   295  	// FailureReason: Output only. Reason for failure of the authorization attempt
   296  	// for the domain.
   297  	//
   298  	// Possible values:
   299  	//   "FAILURE_REASON_UNSPECIFIED" - FailureReason is unspecified.
   300  	//   "CONFIG" - There was a problem with the user's DNS or load balancer
   301  	// configuration for this domain.
   302  	//   "CAA" - Certificate issuance forbidden by an explicit CAA record for the
   303  	// domain or a failure to check CAA records for the domain.
   304  	//   "RATE_LIMITED" - Reached a CA or internal rate-limit for the domain, e.g.
   305  	// for certificates per top-level private domain.
   306  	FailureReason string `json:"failureReason,omitempty"`
   307  	// State: Output only. State of the domain for managed certificate issuance.
   308  	//
   309  	// Possible values:
   310  	//   "STATE_UNSPECIFIED" - State is unspecified.
   311  	//   "AUTHORIZING" - Certificate provisioning for this domain is under way.
   312  	// Google Cloud will attempt to authorize the domain.
   313  	//   "AUTHORIZED" - A managed certificate can be provisioned, no issues for
   314  	// this domain.
   315  	//   "FAILED" - Attempt to authorize the domain failed. This prevents the
   316  	// Managed Certificate from being issued. See `failure_reason` and `details`
   317  	// fields for more information.
   318  	State string `json:"state,omitempty"`
   319  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
   320  	// include in API requests. By default, fields with empty or default values are
   321  	// omitted from API requests. See
   322  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   323  	// details.
   324  	ForceSendFields []string `json:"-"`
   325  	// NullFields is a list of field names (e.g. "Details") to include in API
   326  	// requests with the JSON null value. By default, fields with empty values are
   327  	// omitted from API requests. See
   328  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   329  	NullFields []string `json:"-"`
   330  }
   331  
   332  func (s *AuthorizationAttemptInfo) MarshalJSON() ([]byte, error) {
   333  	type NoMethod AuthorizationAttemptInfo
   334  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   335  }
   336  
   337  // CancelOperationRequest: The request message for Operations.CancelOperation.
   338  type CancelOperationRequest struct {
   339  }
   340  
   341  // Certificate: Defines TLS certificate.
   342  type Certificate struct {
   343  	// CreateTime: Output only. The creation timestamp of a Certificate.
   344  	CreateTime string `json:"createTime,omitempty"`
   345  	// Description: One or more paragraphs of text description of a certificate.
   346  	Description string `json:"description,omitempty"`
   347  	// ExpireTime: Output only. The expiry timestamp of a Certificate.
   348  	ExpireTime string `json:"expireTime,omitempty"`
   349  	// Labels: Set of labels associated with a Certificate.
   350  	Labels map[string]string `json:"labels,omitempty"`
   351  	// Managed: If set, contains configuration and state of a managed certificate.
   352  	Managed *ManagedCertificate `json:"managed,omitempty"`
   353  	// Name: A user-defined name of the certificate. Certificate names must be
   354  	// unique globally and match pattern `projects/*/locations/*/certificates/*`.
   355  	Name string `json:"name,omitempty"`
   356  	// PemCertificate: Output only. The PEM-encoded certificate chain.
   357  	PemCertificate string `json:"pemCertificate,omitempty"`
   358  	// SanDnsnames: Output only. The list of Subject Alternative Names of dnsName
   359  	// type defined in the certificate (see RFC 5280 4.2.1.6). Managed certificates
   360  	// that haven't been provisioned yet have this field populated with a value of
   361  	// the managed.domains field.
   362  	SanDnsnames []string `json:"sanDnsnames,omitempty"`
   363  	// Scope: Immutable. The scope of the certificate.
   364  	//
   365  	// Possible values:
   366  	//   "DEFAULT" - Certificates with default scope are served from core Google
   367  	// data centers. If unsure, choose this option.
   368  	//   "EDGE_CACHE" - Certificates with scope EDGE_CACHE are special-purposed
   369  	// certificates, served from Edge Points of Presence. See
   370  	// https://cloud.google.com/vpc/docs/edge-locations.
   371  	//   "ALL_REGIONS" - Certificates with ALL_REGIONS scope are served from all
   372  	// Google Cloud regions. See
   373  	// https://cloud.google.com/compute/docs/regions-zones.
   374  	Scope string `json:"scope,omitempty"`
   375  	// SelfManaged: If set, defines data of a self-managed certificate.
   376  	SelfManaged *SelfManagedCertificate `json:"selfManaged,omitempty"`
   377  	// UpdateTime: Output only. The last update timestamp of a Certificate.
   378  	UpdateTime string `json:"updateTime,omitempty"`
   379  
   380  	// ServerResponse contains the HTTP response code and headers from the server.
   381  	googleapi.ServerResponse `json:"-"`
   382  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   383  	// unconditionally include in API requests. By default, fields with empty or
   384  	// default values are omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   386  	// details.
   387  	ForceSendFields []string `json:"-"`
   388  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   389  	// requests with the JSON null value. By default, fields with empty values are
   390  	// omitted from API requests. See
   391  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   392  	NullFields []string `json:"-"`
   393  }
   394  
   395  func (s *Certificate) MarshalJSON() ([]byte, error) {
   396  	type NoMethod Certificate
   397  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   398  }
   399  
   400  // CertificateAuthorityConfig: The CA that issues the workload certificate. It
   401  // includes CA address, type, authentication to CA service, etc.
   402  type CertificateAuthorityConfig struct {
   403  	// CertificateAuthorityServiceConfig: Defines a
   404  	// CertificateAuthorityServiceConfig.
   405  	CertificateAuthorityServiceConfig *CertificateAuthorityServiceConfig `json:"certificateAuthorityServiceConfig,omitempty"`
   406  	// ForceSendFields is a list of field names (e.g.
   407  	// "CertificateAuthorityServiceConfig") to unconditionally include in API
   408  	// requests. By default, fields with empty or default values are omitted from
   409  	// 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.
   414  	// "CertificateAuthorityServiceConfig") to include in API requests with the
   415  	// JSON null value. By default, fields with empty values are omitted from API
   416  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for
   417  	// more details.
   418  	NullFields []string `json:"-"`
   419  }
   420  
   421  func (s *CertificateAuthorityConfig) MarshalJSON() ([]byte, error) {
   422  	type NoMethod CertificateAuthorityConfig
   423  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   424  }
   425  
   426  // CertificateAuthorityServiceConfig: Contains information required to contact
   427  // CA service.
   428  type CertificateAuthorityServiceConfig struct {
   429  	// CaPool: Required. A CA pool resource used to issue a certificate. The CA
   430  	// pool string has a relative resource path following the form
   431  	// "projects/{project}/locations/{location}/caPools/{ca_pool}".
   432  	CaPool string `json:"caPool,omitempty"`
   433  	// ForceSendFields is a list of field names (e.g. "CaPool") to unconditionally
   434  	// include in API requests. By default, fields with empty or default values are
   435  	// omitted from API requests. See
   436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   437  	// details.
   438  	ForceSendFields []string `json:"-"`
   439  	// NullFields is a list of field names (e.g. "CaPool") to include in API
   440  	// requests with the JSON null value. By default, fields with empty values are
   441  	// omitted from API requests. See
   442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   443  	NullFields []string `json:"-"`
   444  }
   445  
   446  func (s *CertificateAuthorityServiceConfig) MarshalJSON() ([]byte, error) {
   447  	type NoMethod CertificateAuthorityServiceConfig
   448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   449  }
   450  
   451  // CertificateIssuanceConfig: CertificateIssuanceConfig specifies how to issue
   452  // and manage a certificate.
   453  type CertificateIssuanceConfig struct {
   454  	// CertificateAuthorityConfig: Required. The CA that issues the workload
   455  	// certificate. It includes the CA address, type, authentication to CA service,
   456  	// etc.
   457  	CertificateAuthorityConfig *CertificateAuthorityConfig `json:"certificateAuthorityConfig,omitempty"`
   458  	// CreateTime: Output only. The creation timestamp of a
   459  	// CertificateIssuanceConfig.
   460  	CreateTime string `json:"createTime,omitempty"`
   461  	// Description: One or more paragraphs of text description of a
   462  	// CertificateIssuanceConfig.
   463  	Description string `json:"description,omitempty"`
   464  	// KeyAlgorithm: Required. The key algorithm to use when generating the private
   465  	// key.
   466  	//
   467  	// Possible values:
   468  	//   "KEY_ALGORITHM_UNSPECIFIED" - Unspecified key algorithm.
   469  	//   "RSA_2048" - Specifies RSA with a 2048-bit modulus.
   470  	//   "ECDSA_P256" - Specifies ECDSA with curve P256.
   471  	KeyAlgorithm string `json:"keyAlgorithm,omitempty"`
   472  	// Labels: Set of labels associated with a CertificateIssuanceConfig.
   473  	Labels map[string]string `json:"labels,omitempty"`
   474  	// Lifetime: Required. Workload certificate lifetime requested.
   475  	Lifetime string `json:"lifetime,omitempty"`
   476  	// Name: A user-defined name of the certificate issuance config.
   477  	// CertificateIssuanceConfig names must be unique globally and match pattern
   478  	// `projects/*/locations/*/certificateIssuanceConfigs/*`.
   479  	Name string `json:"name,omitempty"`
   480  	// RotationWindowPercentage: Required. Specifies the percentage of elapsed time
   481  	// of the certificate lifetime to wait before renewing the certificate. Must be
   482  	// a number between 1-99, inclusive.
   483  	RotationWindowPercentage int64 `json:"rotationWindowPercentage,omitempty"`
   484  	// UpdateTime: Output only. The last update timestamp of a
   485  	// CertificateIssuanceConfig.
   486  	UpdateTime string `json:"updateTime,omitempty"`
   487  
   488  	// ServerResponse contains the HTTP response code and headers from the server.
   489  	googleapi.ServerResponse `json:"-"`
   490  	// ForceSendFields is a list of field names (e.g. "CertificateAuthorityConfig")
   491  	// to unconditionally include in API requests. By default, fields with empty or
   492  	// default values are omitted from API requests. See
   493  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   494  	// details.
   495  	ForceSendFields []string `json:"-"`
   496  	// NullFields is a list of field names (e.g. "CertificateAuthorityConfig") to
   497  	// include in API requests with the JSON null value. By default, fields with
   498  	// empty values are omitted from API requests. See
   499  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   500  	NullFields []string `json:"-"`
   501  }
   502  
   503  func (s *CertificateIssuanceConfig) MarshalJSON() ([]byte, error) {
   504  	type NoMethod CertificateIssuanceConfig
   505  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   506  }
   507  
   508  // CertificateMap: Defines a collection of certificate configurations.
   509  type CertificateMap struct {
   510  	// CreateTime: Output only. The creation timestamp of a Certificate Map.
   511  	CreateTime string `json:"createTime,omitempty"`
   512  	// Description: One or more paragraphs of text description of a certificate
   513  	// map.
   514  	Description string `json:"description,omitempty"`
   515  	// GclbTargets: Output only. A list of GCLB targets that use this Certificate
   516  	// Map. A Target Proxy is only present on this list if it's attached to a
   517  	// Forwarding Rule.
   518  	GclbTargets []*GclbTarget `json:"gclbTargets,omitempty"`
   519  	// Labels: Set of labels associated with a Certificate Map.
   520  	Labels map[string]string `json:"labels,omitempty"`
   521  	// Name: A user-defined name of the Certificate Map. Certificate Map names must
   522  	// be unique globally and match pattern
   523  	// `projects/*/locations/*/certificateMaps/*`.
   524  	Name string `json:"name,omitempty"`
   525  	// UpdateTime: Output only. The update timestamp of a Certificate Map.
   526  	UpdateTime string `json:"updateTime,omitempty"`
   527  
   528  	// ServerResponse contains the HTTP response code and headers from the server.
   529  	googleapi.ServerResponse `json:"-"`
   530  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   531  	// unconditionally include in API requests. By default, fields with empty or
   532  	// default values are omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   534  	// details.
   535  	ForceSendFields []string `json:"-"`
   536  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   537  	// requests with the JSON null value. By default, fields with empty values are
   538  	// omitted from API requests. See
   539  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   540  	NullFields []string `json:"-"`
   541  }
   542  
   543  func (s *CertificateMap) MarshalJSON() ([]byte, error) {
   544  	type NoMethod CertificateMap
   545  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   546  }
   547  
   548  // CertificateMapEntry: Defines a certificate map entry.
   549  type CertificateMapEntry struct {
   550  	// Certificates: A set of Certificates defines for the given `hostname`. There
   551  	// can be defined up to four certificates in each Certificate Map Entry. Each
   552  	// certificate must match pattern `projects/*/locations/*/certificates/*`.
   553  	Certificates []string `json:"certificates,omitempty"`
   554  	// CreateTime: Output only. The creation timestamp of a Certificate Map Entry.
   555  	CreateTime string `json:"createTime,omitempty"`
   556  	// Description: One or more paragraphs of text description of a certificate map
   557  	// entry.
   558  	Description string `json:"description,omitempty"`
   559  	// Hostname: A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname
   560  	// expression (`*.example.com`) for a set of hostnames with common suffix. Used
   561  	// as Server Name Indication (SNI) for selecting a proper certificate.
   562  	Hostname string `json:"hostname,omitempty"`
   563  	// Labels: Set of labels associated with a Certificate Map Entry.
   564  	Labels map[string]string `json:"labels,omitempty"`
   565  	// Matcher: A predefined matcher for particular cases, other than SNI
   566  	// selection.
   567  	//
   568  	// Possible values:
   569  	//   "MATCHER_UNSPECIFIED" - A matcher has't been recognized.
   570  	//   "PRIMARY" - A primary certificate that is served when SNI wasn't specified
   571  	// in the request or SNI couldn't be found in the map.
   572  	Matcher string `json:"matcher,omitempty"`
   573  	// Name: A user-defined name of the Certificate Map Entry. Certificate Map
   574  	// Entry names must be unique globally and match pattern
   575  	// `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
   576  	Name string `json:"name,omitempty"`
   577  	// State: Output only. A serving state of this Certificate Map Entry.
   578  	//
   579  	// Possible values:
   580  	//   "SERVING_STATE_UNSPECIFIED" - The status is undefined.
   581  	//   "ACTIVE" - The configuration is serving.
   582  	//   "PENDING" - Update is in progress. Some frontends may serve this
   583  	// configuration.
   584  	State string `json:"state,omitempty"`
   585  	// UpdateTime: Output only. The update timestamp of a Certificate Map Entry.
   586  	UpdateTime string `json:"updateTime,omitempty"`
   587  
   588  	// ServerResponse contains the HTTP response code and headers from the server.
   589  	googleapi.ServerResponse `json:"-"`
   590  	// ForceSendFields is a list of field names (e.g. "Certificates") to
   591  	// unconditionally include in API requests. By default, fields with empty or
   592  	// default values are omitted from API requests. See
   593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   594  	// details.
   595  	ForceSendFields []string `json:"-"`
   596  	// NullFields is a list of field names (e.g. "Certificates") to include in API
   597  	// requests with the JSON null value. By default, fields with empty values are
   598  	// omitted from API requests. See
   599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   600  	NullFields []string `json:"-"`
   601  }
   602  
   603  func (s *CertificateMapEntry) MarshalJSON() ([]byte, error) {
   604  	type NoMethod CertificateMapEntry
   605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   606  }
   607  
   608  // DnsAuthorization: A DnsAuthorization resource describes a way to perform
   609  // domain authorization for certificate issuance.
   610  type DnsAuthorization struct {
   611  	// CreateTime: Output only. The creation timestamp of a DnsAuthorization.
   612  	CreateTime string `json:"createTime,omitempty"`
   613  	// Description: One or more paragraphs of text description of a
   614  	// DnsAuthorization.
   615  	Description string `json:"description,omitempty"`
   616  	// DnsResourceRecord: Output only. DNS Resource Record that needs to be added
   617  	// to DNS configuration.
   618  	DnsResourceRecord *DnsResourceRecord `json:"dnsResourceRecord,omitempty"`
   619  	// Domain: Required. Immutable. A domain that is being authorized. A
   620  	// DnsAuthorization resource covers a single domain and its wildcard, e.g.
   621  	// authorization for `example.com` can be used to issue certificates for
   622  	// `example.com` and `*.example.com`.
   623  	Domain string `json:"domain,omitempty"`
   624  	// Labels: Set of labels associated with a DnsAuthorization.
   625  	Labels map[string]string `json:"labels,omitempty"`
   626  	// Name: A user-defined name of the dns authorization. DnsAuthorization names
   627  	// must be unique globally and match pattern
   628  	// `projects/*/locations/*/dnsAuthorizations/*`.
   629  	Name string `json:"name,omitempty"`
   630  	// Type: Immutable. Type of DnsAuthorization. If unset during resource creation
   631  	// the following default will be used: - in location global: FIXED_RECORD.
   632  	//
   633  	// Possible values:
   634  	//   "TYPE_UNSPECIFIED" - Type is unspecified.
   635  	//   "FIXED_RECORD" - FIXED_RECORD DNS authorization uses DNS-01 validation
   636  	// method.
   637  	//   "PER_PROJECT_RECORD" - PER_PROJECT_RECORD DNS authorization allows for
   638  	// independent management of Google-managed certificates with DNS authorization
   639  	// across multiple projects.
   640  	Type string `json:"type,omitempty"`
   641  	// UpdateTime: Output only. The last update timestamp of a DnsAuthorization.
   642  	UpdateTime string `json:"updateTime,omitempty"`
   643  
   644  	// ServerResponse contains the HTTP response code and headers from the server.
   645  	googleapi.ServerResponse `json:"-"`
   646  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   647  	// unconditionally include in API requests. By default, fields with empty or
   648  	// default values are omitted from API requests. See
   649  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   650  	// details.
   651  	ForceSendFields []string `json:"-"`
   652  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   653  	// requests with the JSON null value. By default, fields with empty values are
   654  	// omitted from API requests. See
   655  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   656  	NullFields []string `json:"-"`
   657  }
   658  
   659  func (s *DnsAuthorization) MarshalJSON() ([]byte, error) {
   660  	type NoMethod DnsAuthorization
   661  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   662  }
   663  
   664  // DnsResourceRecord: The structure describing the DNS Resource Record that
   665  // needs to be added to DNS configuration for the authorization to be usable by
   666  // certificate.
   667  type DnsResourceRecord struct {
   668  	// Data: Output only. Data of the DNS Resource Record.
   669  	Data string `json:"data,omitempty"`
   670  	// Name: Output only. Fully qualified name of the DNS Resource Record. e.g.
   671  	// `_acme-challenge.example.com`
   672  	Name string `json:"name,omitempty"`
   673  	// Type: Output only. Type of the DNS Resource Record. Currently always set to
   674  	// "CNAME".
   675  	Type string `json:"type,omitempty"`
   676  	// ForceSendFields is a list of field names (e.g. "Data") to unconditionally
   677  	// include in API requests. By default, fields with empty or default values are
   678  	// omitted from API requests. See
   679  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   680  	// details.
   681  	ForceSendFields []string `json:"-"`
   682  	// NullFields is a list of field names (e.g. "Data") to include in API requests
   683  	// with the JSON null value. By default, fields with empty values are omitted
   684  	// from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   686  	NullFields []string `json:"-"`
   687  }
   688  
   689  func (s *DnsResourceRecord) MarshalJSON() ([]byte, error) {
   690  	type NoMethod DnsResourceRecord
   691  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   692  }
   693  
   694  // Empty: A generic empty message that you can re-use to avoid defining
   695  // duplicated empty messages in your APIs. A typical example is to use it as
   696  // the request or the response type of an API method. For instance: service Foo
   697  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   698  type Empty struct {
   699  	// ServerResponse contains the HTTP response code and headers from the server.
   700  	googleapi.ServerResponse `json:"-"`
   701  }
   702  
   703  // GclbTarget: Describes a Target Proxy that uses this Certificate Map.
   704  type GclbTarget struct {
   705  	// IpConfigs: Output only. IP configurations for this Target Proxy where the
   706  	// Certificate Map is serving.
   707  	IpConfigs []*IpConfig `json:"ipConfigs,omitempty"`
   708  	// TargetHttpsProxy: Output only. This field returns the resource name in the
   709  	// following format:
   710  	// `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`.
   711  	TargetHttpsProxy string `json:"targetHttpsProxy,omitempty"`
   712  	// TargetSslProxy: Output only. This field returns the resource name in the
   713  	// following format:
   714  	// `//compute.googleapis.com/projects/*/global/targetSslProxies/*`.
   715  	TargetSslProxy string `json:"targetSslProxy,omitempty"`
   716  	// ForceSendFields is a list of field names (e.g. "IpConfigs") to
   717  	// unconditionally include in API requests. By default, fields with empty or
   718  	// default values are omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   720  	// details.
   721  	ForceSendFields []string `json:"-"`
   722  	// NullFields is a list of field names (e.g. "IpConfigs") to include in API
   723  	// requests with the JSON null value. By default, fields with empty values are
   724  	// omitted from API requests. See
   725  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   726  	NullFields []string `json:"-"`
   727  }
   728  
   729  func (s *GclbTarget) MarshalJSON() ([]byte, error) {
   730  	type NoMethod GclbTarget
   731  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   732  }
   733  
   734  // IntermediateCA: Defines an intermediate CA.
   735  type IntermediateCA struct {
   736  	// PemCertificate: PEM intermediate certificate used for building up paths for
   737  	// validation. Each certificate provided in PEM format may occupy up to 5kB.
   738  	PemCertificate string `json:"pemCertificate,omitempty"`
   739  	// ForceSendFields is a list of field names (e.g. "PemCertificate") to
   740  	// unconditionally include in API requests. By default, fields with empty or
   741  	// default values are omitted from API requests. See
   742  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   743  	// details.
   744  	ForceSendFields []string `json:"-"`
   745  	// NullFields is a list of field names (e.g. "PemCertificate") to include in
   746  	// API requests with the JSON null value. By default, fields with empty values
   747  	// are omitted from API requests. See
   748  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   749  	NullFields []string `json:"-"`
   750  }
   751  
   752  func (s *IntermediateCA) MarshalJSON() ([]byte, error) {
   753  	type NoMethod IntermediateCA
   754  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   755  }
   756  
   757  // IpConfig: Defines IP configuration where this Certificate Map is serving.
   758  type IpConfig struct {
   759  	// IpAddress: Output only. An external IP address.
   760  	IpAddress string `json:"ipAddress,omitempty"`
   761  	// Ports: Output only. Ports.
   762  	Ports []int64 `json:"ports,omitempty"`
   763  	// ForceSendFields is a list of field names (e.g. "IpAddress") to
   764  	// unconditionally include in API requests. By default, fields with empty or
   765  	// default values are omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   767  	// details.
   768  	ForceSendFields []string `json:"-"`
   769  	// NullFields is a list of field names (e.g. "IpAddress") to include in API
   770  	// requests with the JSON null value. By default, fields with empty values are
   771  	// omitted from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   773  	NullFields []string `json:"-"`
   774  }
   775  
   776  func (s *IpConfig) MarshalJSON() ([]byte, error) {
   777  	type NoMethod IpConfig
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // ListCertificateIssuanceConfigsResponse: Response for the
   782  // `ListCertificateIssuanceConfigs` method.
   783  type ListCertificateIssuanceConfigsResponse struct {
   784  	// CertificateIssuanceConfigs: A list of certificate configs for the parent
   785  	// resource.
   786  	CertificateIssuanceConfigs []*CertificateIssuanceConfig `json:"certificateIssuanceConfigs,omitempty"`
   787  	// NextPageToken: If there might be more results than those appearing in this
   788  	// response, then `next_page_token` is included. To get the next set of
   789  	// results, call this method again using the value of `next_page_token` as
   790  	// `page_token`.
   791  	NextPageToken string `json:"nextPageToken,omitempty"`
   792  	// Unreachable: Locations that could not be reached.
   793  	Unreachable []string `json:"unreachable,omitempty"`
   794  
   795  	// ServerResponse contains the HTTP response code and headers from the server.
   796  	googleapi.ServerResponse `json:"-"`
   797  	// ForceSendFields is a list of field names (e.g. "CertificateIssuanceConfigs")
   798  	// to unconditionally include in API requests. By default, fields with empty or
   799  	// default values are omitted from API requests. See
   800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   801  	// details.
   802  	ForceSendFields []string `json:"-"`
   803  	// NullFields is a list of field names (e.g. "CertificateIssuanceConfigs") to
   804  	// include in API requests with the JSON null value. By default, fields with
   805  	// empty values are omitted from API requests. See
   806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   807  	NullFields []string `json:"-"`
   808  }
   809  
   810  func (s *ListCertificateIssuanceConfigsResponse) MarshalJSON() ([]byte, error) {
   811  	type NoMethod ListCertificateIssuanceConfigsResponse
   812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   813  }
   814  
   815  // ListCertificateMapEntriesResponse: Response for the
   816  // `ListCertificateMapEntries` method.
   817  type ListCertificateMapEntriesResponse struct {
   818  	// CertificateMapEntries: A list of certificate map entries for the parent
   819  	// resource.
   820  	CertificateMapEntries []*CertificateMapEntry `json:"certificateMapEntries,omitempty"`
   821  	// NextPageToken: If there might be more results than those appearing in this
   822  	// response, then `next_page_token` is included. To get the next set of
   823  	// results, call this method again using the value of `next_page_token` as
   824  	// `page_token`.
   825  	NextPageToken string `json:"nextPageToken,omitempty"`
   826  	// Unreachable: Locations that could not be reached.
   827  	Unreachable []string `json:"unreachable,omitempty"`
   828  
   829  	// ServerResponse contains the HTTP response code and headers from the server.
   830  	googleapi.ServerResponse `json:"-"`
   831  	// ForceSendFields is a list of field names (e.g. "CertificateMapEntries") to
   832  	// unconditionally include in API requests. By default, fields with empty or
   833  	// default values are omitted from API requests. See
   834  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   835  	// details.
   836  	ForceSendFields []string `json:"-"`
   837  	// NullFields is a list of field names (e.g. "CertificateMapEntries") to
   838  	// include in API requests with the JSON null value. By default, fields with
   839  	// empty values are omitted from API requests. See
   840  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   841  	NullFields []string `json:"-"`
   842  }
   843  
   844  func (s *ListCertificateMapEntriesResponse) MarshalJSON() ([]byte, error) {
   845  	type NoMethod ListCertificateMapEntriesResponse
   846  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   847  }
   848  
   849  // ListCertificateMapsResponse: Response for the `ListCertificateMaps` method.
   850  type ListCertificateMapsResponse struct {
   851  	// CertificateMaps: A list of certificate maps for the parent resource.
   852  	CertificateMaps []*CertificateMap `json:"certificateMaps,omitempty"`
   853  	// NextPageToken: If there might be more results than those appearing in this
   854  	// response, then `next_page_token` is included. To get the next set of
   855  	// results, call this method again using the value of `next_page_token` as
   856  	// `page_token`.
   857  	NextPageToken string `json:"nextPageToken,omitempty"`
   858  	// Unreachable: Locations that could not be reached.
   859  	Unreachable []string `json:"unreachable,omitempty"`
   860  
   861  	// ServerResponse contains the HTTP response code and headers from the server.
   862  	googleapi.ServerResponse `json:"-"`
   863  	// ForceSendFields is a list of field names (e.g. "CertificateMaps") to
   864  	// unconditionally include in API requests. By default, fields with empty or
   865  	// default values are omitted from API requests. See
   866  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   867  	// details.
   868  	ForceSendFields []string `json:"-"`
   869  	// NullFields is a list of field names (e.g. "CertificateMaps") to include in
   870  	// API requests with the JSON null value. By default, fields with empty values
   871  	// are omitted from API requests. See
   872  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   873  	NullFields []string `json:"-"`
   874  }
   875  
   876  func (s *ListCertificateMapsResponse) MarshalJSON() ([]byte, error) {
   877  	type NoMethod ListCertificateMapsResponse
   878  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   879  }
   880  
   881  // ListCertificatesResponse: Response for the `ListCertificates` method.
   882  type ListCertificatesResponse struct {
   883  	// Certificates: A list of certificates for the parent resource.
   884  	Certificates []*Certificate `json:"certificates,omitempty"`
   885  	// NextPageToken: If there might be more results than those appearing in this
   886  	// response, then `next_page_token` is included. To get the next set of
   887  	// results, call this method again using the value of `next_page_token` as
   888  	// `page_token`.
   889  	NextPageToken string `json:"nextPageToken,omitempty"`
   890  	// Unreachable: A list of locations that could not be reached.
   891  	Unreachable []string `json:"unreachable,omitempty"`
   892  
   893  	// ServerResponse contains the HTTP response code and headers from the server.
   894  	googleapi.ServerResponse `json:"-"`
   895  	// ForceSendFields is a list of field names (e.g. "Certificates") to
   896  	// unconditionally include in API requests. By default, fields with empty or
   897  	// default values are omitted from API requests. See
   898  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   899  	// details.
   900  	ForceSendFields []string `json:"-"`
   901  	// NullFields is a list of field names (e.g. "Certificates") to include in API
   902  	// requests with the JSON null value. By default, fields with empty values are
   903  	// omitted from API requests. See
   904  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   905  	NullFields []string `json:"-"`
   906  }
   907  
   908  func (s *ListCertificatesResponse) MarshalJSON() ([]byte, error) {
   909  	type NoMethod ListCertificatesResponse
   910  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   911  }
   912  
   913  // ListDnsAuthorizationsResponse: Response for the `ListDnsAuthorizations`
   914  // method.
   915  type ListDnsAuthorizationsResponse struct {
   916  	// DnsAuthorizations: A list of dns authorizations for the parent resource.
   917  	DnsAuthorizations []*DnsAuthorization `json:"dnsAuthorizations,omitempty"`
   918  	// NextPageToken: If there might be more results than those appearing in this
   919  	// response, then `next_page_token` is included. To get the next set of
   920  	// results, call this method again using the value of `next_page_token` as
   921  	// `page_token`.
   922  	NextPageToken string `json:"nextPageToken,omitempty"`
   923  	// Unreachable: Locations that could not be reached.
   924  	Unreachable []string `json:"unreachable,omitempty"`
   925  
   926  	// ServerResponse contains the HTTP response code and headers from the server.
   927  	googleapi.ServerResponse `json:"-"`
   928  	// ForceSendFields is a list of field names (e.g. "DnsAuthorizations") to
   929  	// unconditionally include in API requests. By default, fields with empty or
   930  	// default values are omitted from API requests. See
   931  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   932  	// details.
   933  	ForceSendFields []string `json:"-"`
   934  	// NullFields is a list of field names (e.g. "DnsAuthorizations") to include in
   935  	// API requests with the JSON null value. By default, fields with empty values
   936  	// are omitted from API requests. See
   937  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   938  	NullFields []string `json:"-"`
   939  }
   940  
   941  func (s *ListDnsAuthorizationsResponse) MarshalJSON() ([]byte, error) {
   942  	type NoMethod ListDnsAuthorizationsResponse
   943  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   944  }
   945  
   946  // ListLocationsResponse: The response message for Locations.ListLocations.
   947  type ListLocationsResponse struct {
   948  	// Locations: A list of locations that matches the specified filter in the
   949  	// request.
   950  	Locations []*Location `json:"locations,omitempty"`
   951  	// NextPageToken: The standard List next-page token.
   952  	NextPageToken string `json:"nextPageToken,omitempty"`
   953  
   954  	// ServerResponse contains the HTTP response code and headers from the server.
   955  	googleapi.ServerResponse `json:"-"`
   956  	// ForceSendFields is a list of field names (e.g. "Locations") to
   957  	// unconditionally include in API requests. By default, fields with empty or
   958  	// default values are omitted from API requests. See
   959  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   960  	// details.
   961  	ForceSendFields []string `json:"-"`
   962  	// NullFields is a list of field names (e.g. "Locations") to include in API
   963  	// requests with the JSON null value. By default, fields with empty values are
   964  	// omitted from API requests. See
   965  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   966  	NullFields []string `json:"-"`
   967  }
   968  
   969  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   970  	type NoMethod ListLocationsResponse
   971  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   972  }
   973  
   974  // ListOperationsResponse: The response message for Operations.ListOperations.
   975  type ListOperationsResponse struct {
   976  	// NextPageToken: The standard List next-page token.
   977  	NextPageToken string `json:"nextPageToken,omitempty"`
   978  	// Operations: A list of operations that matches the specified filter in the
   979  	// request.
   980  	Operations []*Operation `json:"operations,omitempty"`
   981  
   982  	// ServerResponse contains the HTTP response code and headers from the server.
   983  	googleapi.ServerResponse `json:"-"`
   984  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   985  	// unconditionally include in API requests. By default, fields with empty or
   986  	// default values are omitted from API requests. See
   987  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   988  	// details.
   989  	ForceSendFields []string `json:"-"`
   990  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   991  	// requests with the JSON null value. By default, fields with empty values are
   992  	// omitted from API requests. See
   993  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   994  	NullFields []string `json:"-"`
   995  }
   996  
   997  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   998  	type NoMethod ListOperationsResponse
   999  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1000  }
  1001  
  1002  // ListTrustConfigsResponse: Response for the `ListTrustConfigs` method.
  1003  type ListTrustConfigsResponse struct {
  1004  	// NextPageToken: If there might be more results than those appearing in this
  1005  	// response, then `next_page_token` is included. To get the next set of
  1006  	// results, call this method again using the value of `next_page_token` as
  1007  	// `page_token`.
  1008  	NextPageToken string `json:"nextPageToken,omitempty"`
  1009  	// TrustConfigs: A list of TrustConfigs for the parent resource.
  1010  	TrustConfigs []*TrustConfig `json:"trustConfigs,omitempty"`
  1011  	// Unreachable: Locations that could not be reached.
  1012  	Unreachable []string `json:"unreachable,omitempty"`
  1013  
  1014  	// ServerResponse contains the HTTP response code and headers from the server.
  1015  	googleapi.ServerResponse `json:"-"`
  1016  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1017  	// unconditionally include in API requests. By default, fields with empty or
  1018  	// default values are omitted from API requests. See
  1019  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1020  	// details.
  1021  	ForceSendFields []string `json:"-"`
  1022  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1023  	// requests with the JSON null value. By default, fields with empty values are
  1024  	// omitted from API requests. See
  1025  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1026  	NullFields []string `json:"-"`
  1027  }
  1028  
  1029  func (s *ListTrustConfigsResponse) MarshalJSON() ([]byte, error) {
  1030  	type NoMethod ListTrustConfigsResponse
  1031  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1032  }
  1033  
  1034  // Location: A resource that represents a Google Cloud location.
  1035  type Location struct {
  1036  	// DisplayName: The friendly name for this location, typically a nearby city
  1037  	// name. For example, "Tokyo".
  1038  	DisplayName string `json:"displayName,omitempty"`
  1039  	// Labels: Cross-service attributes for the location. For example
  1040  	// {"cloud.googleapis.com/region": "us-east1"}
  1041  	Labels map[string]string `json:"labels,omitempty"`
  1042  	// LocationId: The canonical id for this location. For example: "us-east1".
  1043  	LocationId string `json:"locationId,omitempty"`
  1044  	// Metadata: Service-specific metadata. For example the available capacity at
  1045  	// the given location.
  1046  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1047  	// Name: Resource name for the location, which may vary between
  1048  	// implementations. For example:
  1049  	// "projects/example-project/locations/us-east1"
  1050  	Name string `json:"name,omitempty"`
  1051  
  1052  	// ServerResponse contains the HTTP response code and headers from the server.
  1053  	googleapi.ServerResponse `json:"-"`
  1054  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1055  	// unconditionally include in API requests. By default, fields with empty or
  1056  	// default values are omitted from API requests. See
  1057  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1058  	// details.
  1059  	ForceSendFields []string `json:"-"`
  1060  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1061  	// requests with the JSON null value. By default, fields with empty values are
  1062  	// omitted from API requests. See
  1063  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1064  	NullFields []string `json:"-"`
  1065  }
  1066  
  1067  func (s *Location) MarshalJSON() ([]byte, error) {
  1068  	type NoMethod Location
  1069  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1070  }
  1071  
  1072  // ManagedCertificate: Configuration and state of a Managed Certificate.
  1073  // Certificate Manager provisions and renews Managed Certificates
  1074  // automatically, for as long as it's authorized to do so.
  1075  type ManagedCertificate struct {
  1076  	// AuthorizationAttemptInfo: Output only. Detailed state of the latest
  1077  	// authorization attempt for each domain specified for managed certificate
  1078  	// resource.
  1079  	AuthorizationAttemptInfo []*AuthorizationAttemptInfo `json:"authorizationAttemptInfo,omitempty"`
  1080  	// DnsAuthorizations: Immutable. Authorizations that will be used for
  1081  	// performing domain authorization.
  1082  	DnsAuthorizations []string `json:"dnsAuthorizations,omitempty"`
  1083  	// Domains: Immutable. The domains for which a managed SSL certificate will be
  1084  	// generated. Wildcard domains are only supported with DNS challenge
  1085  	// resolution.
  1086  	Domains []string `json:"domains,omitempty"`
  1087  	// IssuanceConfig: Immutable. The resource name for a CertificateIssuanceConfig
  1088  	// used to configure private PKI certificates in the format
  1089  	// `projects/*/locations/*/certificateIssuanceConfigs/*`. If this field is not
  1090  	// set, the certificates will instead be publicly signed as documented at
  1091  	// https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa.
  1092  	IssuanceConfig string `json:"issuanceConfig,omitempty"`
  1093  	// ProvisioningIssue: Output only. Information about issues with provisioning a
  1094  	// Managed Certificate.
  1095  	ProvisioningIssue *ProvisioningIssue `json:"provisioningIssue,omitempty"`
  1096  	// State: Output only. State of the managed certificate resource.
  1097  	//
  1098  	// Possible values:
  1099  	//   "STATE_UNSPECIFIED" - State is unspecified.
  1100  	//   "PROVISIONING" - Certificate Manager attempts to provision or renew the
  1101  	// certificate. If the process takes longer than expected, consult the
  1102  	// `provisioning_issue` field.
  1103  	//   "FAILED" - Multiple certificate provisioning attempts failed and
  1104  	// Certificate Manager gave up. To try again, delete and create a new managed
  1105  	// Certificate resource. For details see the `provisioning_issue` field.
  1106  	//   "ACTIVE" - The certificate management is working, and a certificate has
  1107  	// been provisioned.
  1108  	State string `json:"state,omitempty"`
  1109  	// ForceSendFields is a list of field names (e.g. "AuthorizationAttemptInfo")
  1110  	// to unconditionally include in API requests. By default, fields with empty or
  1111  	// default values are omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1113  	// details.
  1114  	ForceSendFields []string `json:"-"`
  1115  	// NullFields is a list of field names (e.g. "AuthorizationAttemptInfo") to
  1116  	// include in API requests with the JSON null value. By default, fields with
  1117  	// empty values are omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *ManagedCertificate) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod ManagedCertificate
  1124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1125  }
  1126  
  1127  // Operation: This resource represents a long-running operation that is the
  1128  // result of a network API call.
  1129  type Operation struct {
  1130  	// Done: If the value is `false`, it means the operation is still in progress.
  1131  	// If `true`, the operation is completed, and either `error` or `response` is
  1132  	// available.
  1133  	Done bool `json:"done,omitempty"`
  1134  	// Error: The error result of the operation in case of failure or cancellation.
  1135  	Error *Status `json:"error,omitempty"`
  1136  	// Metadata: Service-specific metadata associated with the operation. It
  1137  	// typically contains progress information and common metadata such as create
  1138  	// time. Some services might not provide such metadata. Any method that returns
  1139  	// a long-running operation should document the metadata type, if any.
  1140  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1141  	// Name: The server-assigned name, which is only unique within the same service
  1142  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1143  	// should be a resource name ending with `operations/{unique_id}`.
  1144  	Name string `json:"name,omitempty"`
  1145  	// Response: The normal, successful response of the operation. If the original
  1146  	// method returns no data on success, such as `Delete`, the response is
  1147  	// `google.protobuf.Empty`. If the original method is standard
  1148  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1149  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1150  	// original method name. For example, if the original method name is
  1151  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1152  	Response googleapi.RawMessage `json:"response,omitempty"`
  1153  
  1154  	// ServerResponse contains the HTTP response code and headers from the server.
  1155  	googleapi.ServerResponse `json:"-"`
  1156  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1157  	// include in API requests. By default, fields with empty or default values are
  1158  	// omitted from API requests. See
  1159  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1160  	// details.
  1161  	ForceSendFields []string `json:"-"`
  1162  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1163  	// with the JSON null value. By default, fields with empty values are omitted
  1164  	// from API requests. See
  1165  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1166  	NullFields []string `json:"-"`
  1167  }
  1168  
  1169  func (s *Operation) MarshalJSON() ([]byte, error) {
  1170  	type NoMethod Operation
  1171  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1172  }
  1173  
  1174  // OperationMetadata: Represents the metadata of the long-running operation.
  1175  // Output only.
  1176  type OperationMetadata struct {
  1177  	// ApiVersion: API version used to start the operation.
  1178  	ApiVersion string `json:"apiVersion,omitempty"`
  1179  	// CreateTime: The time the operation was created.
  1180  	CreateTime string `json:"createTime,omitempty"`
  1181  	// EndTime: The time the operation finished running.
  1182  	EndTime string `json:"endTime,omitempty"`
  1183  	// RequestedCancellation: Identifies whether the user has requested
  1184  	// cancellation of the operation. Operations that have successfully been
  1185  	// cancelled have Operation.error value with a google.rpc.Status.code of 1,
  1186  	// corresponding to `Code.CANCELLED`.
  1187  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1188  	// StatusMessage: Human-readable status of the operation, if any.
  1189  	StatusMessage string `json:"statusMessage,omitempty"`
  1190  	// Target: Server-defined resource path for the target of the operation.
  1191  	Target string `json:"target,omitempty"`
  1192  	// Verb: Name of the verb executed by the operation.
  1193  	Verb string `json:"verb,omitempty"`
  1194  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1195  	// unconditionally include in API requests. By default, fields with empty or
  1196  	// default values are omitted from API requests. See
  1197  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1198  	// details.
  1199  	ForceSendFields []string `json:"-"`
  1200  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1201  	// requests with the JSON null value. By default, fields with empty values are
  1202  	// omitted from API requests. See
  1203  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1204  	NullFields []string `json:"-"`
  1205  }
  1206  
  1207  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1208  	type NoMethod OperationMetadata
  1209  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1210  }
  1211  
  1212  // ProvisioningIssue: Information about issues with provisioning a Managed
  1213  // Certificate.
  1214  type ProvisioningIssue struct {
  1215  	// Details: Output only. Human readable explanation about the issue. Provided
  1216  	// to help address the configuration issues. Not guaranteed to be stable. For
  1217  	// programmatic access use Reason enum.
  1218  	Details string `json:"details,omitempty"`
  1219  	// Reason: Output only. Reason for provisioning failures.
  1220  	//
  1221  	// Possible values:
  1222  	//   "REASON_UNSPECIFIED" - Reason is unspecified.
  1223  	//   "AUTHORIZATION_ISSUE" - Certificate provisioning failed due to an issue
  1224  	// with one or more of the domains on the certificate. For details of which
  1225  	// domains failed, consult the `authorization_attempt_info` field.
  1226  	//   "RATE_LIMITED" - Exceeded Certificate Authority quotas or internal rate
  1227  	// limits of the system. Provisioning may take longer to complete.
  1228  	Reason string `json:"reason,omitempty"`
  1229  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
  1230  	// include in API requests. By default, fields with empty or default values are
  1231  	// omitted from API requests. See
  1232  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1233  	// details.
  1234  	ForceSendFields []string `json:"-"`
  1235  	// NullFields is a list of field names (e.g. "Details") to include in API
  1236  	// requests with the JSON null value. By default, fields with empty values are
  1237  	// omitted from API requests. See
  1238  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1239  	NullFields []string `json:"-"`
  1240  }
  1241  
  1242  func (s *ProvisioningIssue) MarshalJSON() ([]byte, error) {
  1243  	type NoMethod ProvisioningIssue
  1244  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1245  }
  1246  
  1247  // SelfManagedCertificate: Certificate data for a SelfManaged Certificate.
  1248  // SelfManaged Certificates are uploaded by the user. Updating such
  1249  // certificates before they expire remains the user's responsibility.
  1250  type SelfManagedCertificate struct {
  1251  	// PemCertificate: Input only. The PEM-encoded certificate chain. Leaf
  1252  	// certificate comes first, followed by intermediate ones if any.
  1253  	PemCertificate string `json:"pemCertificate,omitempty"`
  1254  	// PemPrivateKey: Input only. The PEM-encoded private key of the leaf
  1255  	// certificate.
  1256  	PemPrivateKey string `json:"pemPrivateKey,omitempty"`
  1257  	// ForceSendFields is a list of field names (e.g. "PemCertificate") to
  1258  	// unconditionally include in API requests. By default, fields with empty or
  1259  	// default values are omitted from API requests. See
  1260  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1261  	// details.
  1262  	ForceSendFields []string `json:"-"`
  1263  	// NullFields is a list of field names (e.g. "PemCertificate") to include in
  1264  	// API requests with the JSON null value. By default, fields with empty values
  1265  	// are omitted from API requests. See
  1266  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1267  	NullFields []string `json:"-"`
  1268  }
  1269  
  1270  func (s *SelfManagedCertificate) MarshalJSON() ([]byte, error) {
  1271  	type NoMethod SelfManagedCertificate
  1272  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1273  }
  1274  
  1275  // Status: The `Status` type defines a logical error model that is suitable for
  1276  // different programming environments, including REST APIs and RPC APIs. It is
  1277  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1278  // pieces of data: error code, error message, and error details. You can find
  1279  // out more about this error model and how to work with it in the API Design
  1280  // Guide (https://cloud.google.com/apis/design/errors).
  1281  type Status struct {
  1282  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1283  	Code int64 `json:"code,omitempty"`
  1284  	// Details: A list of messages that carry the error details. There is a common
  1285  	// set of message types for APIs to use.
  1286  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1287  	// Message: A developer-facing error message, which should be in English. Any
  1288  	// user-facing error message should be localized and sent in the
  1289  	// google.rpc.Status.details field, or localized by the client.
  1290  	Message string `json:"message,omitempty"`
  1291  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1292  	// include in API requests. By default, fields with empty or default values are
  1293  	// omitted from API requests. See
  1294  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1295  	// details.
  1296  	ForceSendFields []string `json:"-"`
  1297  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1298  	// with the JSON null value. By default, fields with empty values are omitted
  1299  	// from API requests. See
  1300  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1301  	NullFields []string `json:"-"`
  1302  }
  1303  
  1304  func (s *Status) MarshalJSON() ([]byte, error) {
  1305  	type NoMethod Status
  1306  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1307  }
  1308  
  1309  // TrustAnchor: Defines a trust anchor.
  1310  type TrustAnchor struct {
  1311  	// PemCertificate: PEM root certificate of the PKI used for validation. Each
  1312  	// certificate provided in PEM format may occupy up to 5kB.
  1313  	PemCertificate string `json:"pemCertificate,omitempty"`
  1314  	// ForceSendFields is a list of field names (e.g. "PemCertificate") to
  1315  	// unconditionally include in API requests. By default, fields with empty or
  1316  	// default values are omitted from API requests. See
  1317  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1318  	// details.
  1319  	ForceSendFields []string `json:"-"`
  1320  	// NullFields is a list of field names (e.g. "PemCertificate") to include in
  1321  	// API requests with the JSON null value. By default, fields with empty values
  1322  	// are omitted from API requests. See
  1323  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1324  	NullFields []string `json:"-"`
  1325  }
  1326  
  1327  func (s *TrustAnchor) MarshalJSON() ([]byte, error) {
  1328  	type NoMethod TrustAnchor
  1329  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1330  }
  1331  
  1332  // TrustConfig: Defines a trust config.
  1333  type TrustConfig struct {
  1334  	// AllowlistedCertificates: Optional. A certificate matching an allowlisted
  1335  	// certificate is always considered valid as long as the certificate is
  1336  	// parseable, proof of private key possession is established, and constraints
  1337  	// on the certificate's SAN field are met.
  1338  	AllowlistedCertificates []*AllowlistedCertificate `json:"allowlistedCertificates,omitempty"`
  1339  	// CreateTime: Output only. The creation timestamp of a TrustConfig.
  1340  	CreateTime string `json:"createTime,omitempty"`
  1341  	// Description: One or more paragraphs of text description of a TrustConfig.
  1342  	Description string `json:"description,omitempty"`
  1343  	// Etag: This checksum is computed by the server based on the value of other
  1344  	// fields, and may be sent on update and delete requests to ensure the client
  1345  	// has an up-to-date value before proceeding.
  1346  	Etag string `json:"etag,omitempty"`
  1347  	// Labels: Set of labels associated with a TrustConfig.
  1348  	Labels map[string]string `json:"labels,omitempty"`
  1349  	// Name: A user-defined name of the trust config. TrustConfig names must be
  1350  	// unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.
  1351  	Name string `json:"name,omitempty"`
  1352  	// TrustStores: Set of trust stores to perform validation against. This field
  1353  	// is supported when TrustConfig is configured with Load Balancers, currently
  1354  	// not supported for SPIFFE certificate validation. Only one TrustStore
  1355  	// specified is currently allowed.
  1356  	TrustStores []*TrustStore `json:"trustStores,omitempty"`
  1357  	// UpdateTime: Output only. The last update timestamp of a TrustConfig.
  1358  	UpdateTime string `json:"updateTime,omitempty"`
  1359  
  1360  	// ServerResponse contains the HTTP response code and headers from the server.
  1361  	googleapi.ServerResponse `json:"-"`
  1362  	// ForceSendFields is a list of field names (e.g. "AllowlistedCertificates") to
  1363  	// unconditionally include in API requests. By default, fields with empty or
  1364  	// default values are omitted from API requests. See
  1365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1366  	// details.
  1367  	ForceSendFields []string `json:"-"`
  1368  	// NullFields is a list of field names (e.g. "AllowlistedCertificates") to
  1369  	// include in API requests with the JSON null value. By default, fields with
  1370  	// empty values are omitted from API requests. See
  1371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1372  	NullFields []string `json:"-"`
  1373  }
  1374  
  1375  func (s *TrustConfig) MarshalJSON() ([]byte, error) {
  1376  	type NoMethod TrustConfig
  1377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1378  }
  1379  
  1380  // TrustStore: Defines a trust store.
  1381  type TrustStore struct {
  1382  	// IntermediateCas: Set of intermediate CA certificates used for the path
  1383  	// building phase of chain validation. The field is currently not supported if
  1384  	// TrustConfig is used for the workload certificate feature.
  1385  	IntermediateCas []*IntermediateCA `json:"intermediateCas,omitempty"`
  1386  	// TrustAnchors: List of Trust Anchors to be used while performing validation
  1387  	// against a given TrustStore.
  1388  	TrustAnchors []*TrustAnchor `json:"trustAnchors,omitempty"`
  1389  	// ForceSendFields is a list of field names (e.g. "IntermediateCas") to
  1390  	// unconditionally include in API requests. By default, fields with empty or
  1391  	// default values are omitted from API requests. See
  1392  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1393  	// details.
  1394  	ForceSendFields []string `json:"-"`
  1395  	// NullFields is a list of field names (e.g. "IntermediateCas") to include in
  1396  	// API requests with the JSON null value. By default, fields with empty values
  1397  	// are omitted from API requests. See
  1398  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1399  	NullFields []string `json:"-"`
  1400  }
  1401  
  1402  func (s *TrustStore) MarshalJSON() ([]byte, error) {
  1403  	type NoMethod TrustStore
  1404  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1405  }
  1406  
  1407  type ProjectsLocationsGetCall struct {
  1408  	s            *Service
  1409  	name         string
  1410  	urlParams_   gensupport.URLParams
  1411  	ifNoneMatch_ string
  1412  	ctx_         context.Context
  1413  	header_      http.Header
  1414  }
  1415  
  1416  // Get: Gets information about a location.
  1417  //
  1418  // - name: Resource name for the location.
  1419  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1420  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1421  	c.name = name
  1422  	return c
  1423  }
  1424  
  1425  // Fields allows partial responses to be retrieved. See
  1426  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1427  // details.
  1428  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1429  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1430  	return c
  1431  }
  1432  
  1433  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1434  // object's ETag matches the given value. This is useful for getting updates
  1435  // only after the object has changed since the last request.
  1436  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1437  	c.ifNoneMatch_ = entityTag
  1438  	return c
  1439  }
  1440  
  1441  // Context sets the context to be used in this call's Do method.
  1442  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1443  	c.ctx_ = ctx
  1444  	return c
  1445  }
  1446  
  1447  // Header returns a http.Header that can be modified by the caller to add
  1448  // headers to the request.
  1449  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1450  	if c.header_ == nil {
  1451  		c.header_ = make(http.Header)
  1452  	}
  1453  	return c.header_
  1454  }
  1455  
  1456  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1457  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1458  	if c.ifNoneMatch_ != "" {
  1459  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1460  	}
  1461  	var body io.Reader = nil
  1462  	c.urlParams_.Set("alt", alt)
  1463  	c.urlParams_.Set("prettyPrint", "false")
  1464  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1465  	urls += "?" + c.urlParams_.Encode()
  1466  	req, err := http.NewRequest("GET", urls, body)
  1467  	if err != nil {
  1468  		return nil, err
  1469  	}
  1470  	req.Header = reqHeaders
  1471  	googleapi.Expand(req.URL, map[string]string{
  1472  		"name": c.name,
  1473  	})
  1474  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1475  }
  1476  
  1477  // Do executes the "certificatemanager.projects.locations.get" call.
  1478  // Any non-2xx status code is an error. Response headers are in either
  1479  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1480  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1481  // whether the returned error was because http.StatusNotModified was returned.
  1482  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1483  	gensupport.SetOptions(c.urlParams_, opts...)
  1484  	res, err := c.doRequest("json")
  1485  	if res != nil && res.StatusCode == http.StatusNotModified {
  1486  		if res.Body != nil {
  1487  			res.Body.Close()
  1488  		}
  1489  		return nil, gensupport.WrapError(&googleapi.Error{
  1490  			Code:   res.StatusCode,
  1491  			Header: res.Header,
  1492  		})
  1493  	}
  1494  	if err != nil {
  1495  		return nil, err
  1496  	}
  1497  	defer googleapi.CloseBody(res)
  1498  	if err := googleapi.CheckResponse(res); err != nil {
  1499  		return nil, gensupport.WrapError(err)
  1500  	}
  1501  	ret := &Location{
  1502  		ServerResponse: googleapi.ServerResponse{
  1503  			Header:         res.Header,
  1504  			HTTPStatusCode: res.StatusCode,
  1505  		},
  1506  	}
  1507  	target := &ret
  1508  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1509  		return nil, err
  1510  	}
  1511  	return ret, nil
  1512  }
  1513  
  1514  type ProjectsLocationsListCall struct {
  1515  	s            *Service
  1516  	name         string
  1517  	urlParams_   gensupport.URLParams
  1518  	ifNoneMatch_ string
  1519  	ctx_         context.Context
  1520  	header_      http.Header
  1521  }
  1522  
  1523  // List: Lists information about the supported locations for this service.
  1524  //
  1525  // - name: The resource that owns the locations collection, if applicable.
  1526  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1527  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1528  	c.name = name
  1529  	return c
  1530  }
  1531  
  1532  // Filter sets the optional parameter "filter": A filter to narrow down results
  1533  // to a preferred subset. The filtering language accepts strings like
  1534  // "displayName=tokyo", and is documented in more detail in AIP-160
  1535  // (https://google.aip.dev/160).
  1536  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1537  	c.urlParams_.Set("filter", filter)
  1538  	return c
  1539  }
  1540  
  1541  // PageSize sets the optional parameter "pageSize": The maximum number of
  1542  // results to return. If not set, the service selects a default.
  1543  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1544  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1545  	return c
  1546  }
  1547  
  1548  // PageToken sets the optional parameter "pageToken": A page token received
  1549  // from the `next_page_token` field in the response. Send that page token to
  1550  // receive the subsequent page.
  1551  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1552  	c.urlParams_.Set("pageToken", pageToken)
  1553  	return c
  1554  }
  1555  
  1556  // Fields allows partial responses to be retrieved. See
  1557  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1558  // details.
  1559  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1560  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1561  	return c
  1562  }
  1563  
  1564  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1565  // object's ETag matches the given value. This is useful for getting updates
  1566  // only after the object has changed since the last request.
  1567  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1568  	c.ifNoneMatch_ = entityTag
  1569  	return c
  1570  }
  1571  
  1572  // Context sets the context to be used in this call's Do method.
  1573  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1574  	c.ctx_ = ctx
  1575  	return c
  1576  }
  1577  
  1578  // Header returns a http.Header that can be modified by the caller to add
  1579  // headers to the request.
  1580  func (c *ProjectsLocationsListCall) Header() http.Header {
  1581  	if c.header_ == nil {
  1582  		c.header_ = make(http.Header)
  1583  	}
  1584  	return c.header_
  1585  }
  1586  
  1587  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1588  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1589  	if c.ifNoneMatch_ != "" {
  1590  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1591  	}
  1592  	var body io.Reader = nil
  1593  	c.urlParams_.Set("alt", alt)
  1594  	c.urlParams_.Set("prettyPrint", "false")
  1595  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  1596  	urls += "?" + c.urlParams_.Encode()
  1597  	req, err := http.NewRequest("GET", urls, body)
  1598  	if err != nil {
  1599  		return nil, err
  1600  	}
  1601  	req.Header = reqHeaders
  1602  	googleapi.Expand(req.URL, map[string]string{
  1603  		"name": c.name,
  1604  	})
  1605  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1606  }
  1607  
  1608  // Do executes the "certificatemanager.projects.locations.list" call.
  1609  // Any non-2xx status code is an error. Response headers are in either
  1610  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1611  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1612  // check whether the returned error was because http.StatusNotModified was
  1613  // returned.
  1614  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1615  	gensupport.SetOptions(c.urlParams_, opts...)
  1616  	res, err := c.doRequest("json")
  1617  	if res != nil && res.StatusCode == http.StatusNotModified {
  1618  		if res.Body != nil {
  1619  			res.Body.Close()
  1620  		}
  1621  		return nil, gensupport.WrapError(&googleapi.Error{
  1622  			Code:   res.StatusCode,
  1623  			Header: res.Header,
  1624  		})
  1625  	}
  1626  	if err != nil {
  1627  		return nil, err
  1628  	}
  1629  	defer googleapi.CloseBody(res)
  1630  	if err := googleapi.CheckResponse(res); err != nil {
  1631  		return nil, gensupport.WrapError(err)
  1632  	}
  1633  	ret := &ListLocationsResponse{
  1634  		ServerResponse: googleapi.ServerResponse{
  1635  			Header:         res.Header,
  1636  			HTTPStatusCode: res.StatusCode,
  1637  		},
  1638  	}
  1639  	target := &ret
  1640  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1641  		return nil, err
  1642  	}
  1643  	return ret, nil
  1644  }
  1645  
  1646  // Pages invokes f for each page of results.
  1647  // A non-nil error returned from f will halt the iteration.
  1648  // The provided context supersedes any context provided to the Context method.
  1649  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1650  	c.ctx_ = ctx
  1651  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1652  	for {
  1653  		x, err := c.Do()
  1654  		if err != nil {
  1655  			return err
  1656  		}
  1657  		if err := f(x); err != nil {
  1658  			return err
  1659  		}
  1660  		if x.NextPageToken == "" {
  1661  			return nil
  1662  		}
  1663  		c.PageToken(x.NextPageToken)
  1664  	}
  1665  }
  1666  
  1667  type ProjectsLocationsCertificateIssuanceConfigsCreateCall struct {
  1668  	s                         *Service
  1669  	parent                    string
  1670  	certificateissuanceconfig *CertificateIssuanceConfig
  1671  	urlParams_                gensupport.URLParams
  1672  	ctx_                      context.Context
  1673  	header_                   http.Header
  1674  }
  1675  
  1676  // Create: Creates a new CertificateIssuanceConfig in a given project and
  1677  // location.
  1678  //
  1679  //   - parent: The parent resource of the certificate issuance config. Must be in
  1680  //     the format `projects/*/locations/*`.
  1681  func (r *ProjectsLocationsCertificateIssuanceConfigsService) Create(parent string, certificateissuanceconfig *CertificateIssuanceConfig) *ProjectsLocationsCertificateIssuanceConfigsCreateCall {
  1682  	c := &ProjectsLocationsCertificateIssuanceConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1683  	c.parent = parent
  1684  	c.certificateissuanceconfig = certificateissuanceconfig
  1685  	return c
  1686  }
  1687  
  1688  // CertificateIssuanceConfigId sets the optional parameter
  1689  // "certificateIssuanceConfigId": Required. A user-provided name of the
  1690  // certificate config.
  1691  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) CertificateIssuanceConfigId(certificateIssuanceConfigId string) *ProjectsLocationsCertificateIssuanceConfigsCreateCall {
  1692  	c.urlParams_.Set("certificateIssuanceConfigId", certificateIssuanceConfigId)
  1693  	return c
  1694  }
  1695  
  1696  // Fields allows partial responses to be retrieved. See
  1697  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1698  // details.
  1699  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateIssuanceConfigsCreateCall {
  1700  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1701  	return c
  1702  }
  1703  
  1704  // Context sets the context to be used in this call's Do method.
  1705  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateIssuanceConfigsCreateCall {
  1706  	c.ctx_ = ctx
  1707  	return c
  1708  }
  1709  
  1710  // Header returns a http.Header that can be modified by the caller to add
  1711  // headers to the request.
  1712  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) Header() http.Header {
  1713  	if c.header_ == nil {
  1714  		c.header_ = make(http.Header)
  1715  	}
  1716  	return c.header_
  1717  }
  1718  
  1719  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  1720  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1721  	var body io.Reader = nil
  1722  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificateissuanceconfig)
  1723  	if err != nil {
  1724  		return nil, err
  1725  	}
  1726  	c.urlParams_.Set("alt", alt)
  1727  	c.urlParams_.Set("prettyPrint", "false")
  1728  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateIssuanceConfigs")
  1729  	urls += "?" + c.urlParams_.Encode()
  1730  	req, err := http.NewRequest("POST", urls, body)
  1731  	if err != nil {
  1732  		return nil, err
  1733  	}
  1734  	req.Header = reqHeaders
  1735  	googleapi.Expand(req.URL, map[string]string{
  1736  		"parent": c.parent,
  1737  	})
  1738  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1739  }
  1740  
  1741  // Do executes the "certificatemanager.projects.locations.certificateIssuanceConfigs.create" call.
  1742  // Any non-2xx status code is an error. Response headers are in either
  1743  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1744  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1745  // whether the returned error was because http.StatusNotModified was returned.
  1746  func (c *ProjectsLocationsCertificateIssuanceConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1747  	gensupport.SetOptions(c.urlParams_, opts...)
  1748  	res, err := c.doRequest("json")
  1749  	if res != nil && res.StatusCode == http.StatusNotModified {
  1750  		if res.Body != nil {
  1751  			res.Body.Close()
  1752  		}
  1753  		return nil, gensupport.WrapError(&googleapi.Error{
  1754  			Code:   res.StatusCode,
  1755  			Header: res.Header,
  1756  		})
  1757  	}
  1758  	if err != nil {
  1759  		return nil, err
  1760  	}
  1761  	defer googleapi.CloseBody(res)
  1762  	if err := googleapi.CheckResponse(res); err != nil {
  1763  		return nil, gensupport.WrapError(err)
  1764  	}
  1765  	ret := &Operation{
  1766  		ServerResponse: googleapi.ServerResponse{
  1767  			Header:         res.Header,
  1768  			HTTPStatusCode: res.StatusCode,
  1769  		},
  1770  	}
  1771  	target := &ret
  1772  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1773  		return nil, err
  1774  	}
  1775  	return ret, nil
  1776  }
  1777  
  1778  type ProjectsLocationsCertificateIssuanceConfigsDeleteCall struct {
  1779  	s          *Service
  1780  	name       string
  1781  	urlParams_ gensupport.URLParams
  1782  	ctx_       context.Context
  1783  	header_    http.Header
  1784  }
  1785  
  1786  // Delete: Deletes a single CertificateIssuanceConfig.
  1787  //
  1788  //   - name: A name of the certificate issuance config to delete. Must be in the
  1789  //     format `projects/*/locations/*/certificateIssuanceConfigs/*`.
  1790  func (r *ProjectsLocationsCertificateIssuanceConfigsService) Delete(name string) *ProjectsLocationsCertificateIssuanceConfigsDeleteCall {
  1791  	c := &ProjectsLocationsCertificateIssuanceConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1792  	c.name = name
  1793  	return c
  1794  }
  1795  
  1796  // Fields allows partial responses to be retrieved. See
  1797  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1798  // details.
  1799  func (c *ProjectsLocationsCertificateIssuanceConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateIssuanceConfigsDeleteCall {
  1800  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1801  	return c
  1802  }
  1803  
  1804  // Context sets the context to be used in this call's Do method.
  1805  func (c *ProjectsLocationsCertificateIssuanceConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificateIssuanceConfigsDeleteCall {
  1806  	c.ctx_ = ctx
  1807  	return c
  1808  }
  1809  
  1810  // Header returns a http.Header that can be modified by the caller to add
  1811  // headers to the request.
  1812  func (c *ProjectsLocationsCertificateIssuanceConfigsDeleteCall) Header() http.Header {
  1813  	if c.header_ == nil {
  1814  		c.header_ = make(http.Header)
  1815  	}
  1816  	return c.header_
  1817  }
  1818  
  1819  func (c *ProjectsLocationsCertificateIssuanceConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1820  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1821  	var body io.Reader = nil
  1822  	c.urlParams_.Set("alt", alt)
  1823  	c.urlParams_.Set("prettyPrint", "false")
  1824  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1825  	urls += "?" + c.urlParams_.Encode()
  1826  	req, err := http.NewRequest("DELETE", urls, body)
  1827  	if err != nil {
  1828  		return nil, err
  1829  	}
  1830  	req.Header = reqHeaders
  1831  	googleapi.Expand(req.URL, map[string]string{
  1832  		"name": c.name,
  1833  	})
  1834  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1835  }
  1836  
  1837  // Do executes the "certificatemanager.projects.locations.certificateIssuanceConfigs.delete" call.
  1838  // Any non-2xx status code is an error. Response headers are in either
  1839  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1840  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1841  // whether the returned error was because http.StatusNotModified was returned.
  1842  func (c *ProjectsLocationsCertificateIssuanceConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1843  	gensupport.SetOptions(c.urlParams_, opts...)
  1844  	res, err := c.doRequest("json")
  1845  	if res != nil && res.StatusCode == http.StatusNotModified {
  1846  		if res.Body != nil {
  1847  			res.Body.Close()
  1848  		}
  1849  		return nil, gensupport.WrapError(&googleapi.Error{
  1850  			Code:   res.StatusCode,
  1851  			Header: res.Header,
  1852  		})
  1853  	}
  1854  	if err != nil {
  1855  		return nil, err
  1856  	}
  1857  	defer googleapi.CloseBody(res)
  1858  	if err := googleapi.CheckResponse(res); err != nil {
  1859  		return nil, gensupport.WrapError(err)
  1860  	}
  1861  	ret := &Operation{
  1862  		ServerResponse: googleapi.ServerResponse{
  1863  			Header:         res.Header,
  1864  			HTTPStatusCode: res.StatusCode,
  1865  		},
  1866  	}
  1867  	target := &ret
  1868  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1869  		return nil, err
  1870  	}
  1871  	return ret, nil
  1872  }
  1873  
  1874  type ProjectsLocationsCertificateIssuanceConfigsGetCall struct {
  1875  	s            *Service
  1876  	name         string
  1877  	urlParams_   gensupport.URLParams
  1878  	ifNoneMatch_ string
  1879  	ctx_         context.Context
  1880  	header_      http.Header
  1881  }
  1882  
  1883  // Get: Gets details of a single CertificateIssuanceConfig.
  1884  //
  1885  //   - name: A name of the certificate issuance config to describe. Must be in
  1886  //     the format `projects/*/locations/*/certificateIssuanceConfigs/*`.
  1887  func (r *ProjectsLocationsCertificateIssuanceConfigsService) Get(name string) *ProjectsLocationsCertificateIssuanceConfigsGetCall {
  1888  	c := &ProjectsLocationsCertificateIssuanceConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1889  	c.name = name
  1890  	return c
  1891  }
  1892  
  1893  // Fields allows partial responses to be retrieved. See
  1894  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1895  // details.
  1896  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateIssuanceConfigsGetCall {
  1897  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1898  	return c
  1899  }
  1900  
  1901  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1902  // object's ETag matches the given value. This is useful for getting updates
  1903  // only after the object has changed since the last request.
  1904  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateIssuanceConfigsGetCall {
  1905  	c.ifNoneMatch_ = entityTag
  1906  	return c
  1907  }
  1908  
  1909  // Context sets the context to be used in this call's Do method.
  1910  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateIssuanceConfigsGetCall {
  1911  	c.ctx_ = ctx
  1912  	return c
  1913  }
  1914  
  1915  // Header returns a http.Header that can be modified by the caller to add
  1916  // headers to the request.
  1917  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) Header() http.Header {
  1918  	if c.header_ == nil {
  1919  		c.header_ = make(http.Header)
  1920  	}
  1921  	return c.header_
  1922  }
  1923  
  1924  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  1925  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1926  	if c.ifNoneMatch_ != "" {
  1927  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1928  	}
  1929  	var body io.Reader = nil
  1930  	c.urlParams_.Set("alt", alt)
  1931  	c.urlParams_.Set("prettyPrint", "false")
  1932  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1933  	urls += "?" + c.urlParams_.Encode()
  1934  	req, err := http.NewRequest("GET", urls, body)
  1935  	if err != nil {
  1936  		return nil, err
  1937  	}
  1938  	req.Header = reqHeaders
  1939  	googleapi.Expand(req.URL, map[string]string{
  1940  		"name": c.name,
  1941  	})
  1942  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1943  }
  1944  
  1945  // Do executes the "certificatemanager.projects.locations.certificateIssuanceConfigs.get" call.
  1946  // Any non-2xx status code is an error. Response headers are in either
  1947  // *CertificateIssuanceConfig.ServerResponse.Header or (if a response was
  1948  // returned at all) in error.(*googleapi.Error).Header. Use
  1949  // googleapi.IsNotModified to check whether the returned error was because
  1950  // http.StatusNotModified was returned.
  1951  func (c *ProjectsLocationsCertificateIssuanceConfigsGetCall) Do(opts ...googleapi.CallOption) (*CertificateIssuanceConfig, error) {
  1952  	gensupport.SetOptions(c.urlParams_, opts...)
  1953  	res, err := c.doRequest("json")
  1954  	if res != nil && res.StatusCode == http.StatusNotModified {
  1955  		if res.Body != nil {
  1956  			res.Body.Close()
  1957  		}
  1958  		return nil, gensupport.WrapError(&googleapi.Error{
  1959  			Code:   res.StatusCode,
  1960  			Header: res.Header,
  1961  		})
  1962  	}
  1963  	if err != nil {
  1964  		return nil, err
  1965  	}
  1966  	defer googleapi.CloseBody(res)
  1967  	if err := googleapi.CheckResponse(res); err != nil {
  1968  		return nil, gensupport.WrapError(err)
  1969  	}
  1970  	ret := &CertificateIssuanceConfig{
  1971  		ServerResponse: googleapi.ServerResponse{
  1972  			Header:         res.Header,
  1973  			HTTPStatusCode: res.StatusCode,
  1974  		},
  1975  	}
  1976  	target := &ret
  1977  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1978  		return nil, err
  1979  	}
  1980  	return ret, nil
  1981  }
  1982  
  1983  type ProjectsLocationsCertificateIssuanceConfigsListCall struct {
  1984  	s            *Service
  1985  	parent       string
  1986  	urlParams_   gensupport.URLParams
  1987  	ifNoneMatch_ string
  1988  	ctx_         context.Context
  1989  	header_      http.Header
  1990  }
  1991  
  1992  // List: Lists CertificateIssuanceConfigs in a given project and location.
  1993  //
  1994  //   - parent: The project and location from which the certificate should be
  1995  //     listed, specified in the format `projects/*/locations/*`.
  1996  func (r *ProjectsLocationsCertificateIssuanceConfigsService) List(parent string) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  1997  	c := &ProjectsLocationsCertificateIssuanceConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1998  	c.parent = parent
  1999  	return c
  2000  }
  2001  
  2002  // Filter sets the optional parameter "filter": Filter expression to restrict
  2003  // the Certificates Configs returned.
  2004  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Filter(filter string) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2005  	c.urlParams_.Set("filter", filter)
  2006  	return c
  2007  }
  2008  
  2009  // OrderBy sets the optional parameter "orderBy": A list of Certificate Config
  2010  // field names used to specify the order of the returned results. The default
  2011  // sorting order is ascending. To specify descending order for a field, add a
  2012  // suffix " desc".
  2013  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2014  	c.urlParams_.Set("orderBy", orderBy)
  2015  	return c
  2016  }
  2017  
  2018  // PageSize sets the optional parameter "pageSize": Maximum number of
  2019  // certificate configs to return per call.
  2020  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2021  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2022  	return c
  2023  }
  2024  
  2025  // PageToken sets the optional parameter "pageToken": The value returned by the
  2026  // last `ListCertificateIssuanceConfigsResponse`. Indicates that this is a
  2027  // continuation of a prior `ListCertificateIssuanceConfigs` call, and that the
  2028  // system should return the next page of data.
  2029  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2030  	c.urlParams_.Set("pageToken", pageToken)
  2031  	return c
  2032  }
  2033  
  2034  // Fields allows partial responses to be retrieved. See
  2035  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2036  // details.
  2037  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2038  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2039  	return c
  2040  }
  2041  
  2042  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2043  // object's ETag matches the given value. This is useful for getting updates
  2044  // only after the object has changed since the last request.
  2045  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2046  	c.ifNoneMatch_ = entityTag
  2047  	return c
  2048  }
  2049  
  2050  // Context sets the context to be used in this call's Do method.
  2051  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCertificateIssuanceConfigsListCall {
  2052  	c.ctx_ = ctx
  2053  	return c
  2054  }
  2055  
  2056  // Header returns a http.Header that can be modified by the caller to add
  2057  // headers to the request.
  2058  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Header() http.Header {
  2059  	if c.header_ == nil {
  2060  		c.header_ = make(http.Header)
  2061  	}
  2062  	return c.header_
  2063  }
  2064  
  2065  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) doRequest(alt string) (*http.Response, error) {
  2066  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2067  	if c.ifNoneMatch_ != "" {
  2068  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2069  	}
  2070  	var body io.Reader = nil
  2071  	c.urlParams_.Set("alt", alt)
  2072  	c.urlParams_.Set("prettyPrint", "false")
  2073  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateIssuanceConfigs")
  2074  	urls += "?" + c.urlParams_.Encode()
  2075  	req, err := http.NewRequest("GET", urls, body)
  2076  	if err != nil {
  2077  		return nil, err
  2078  	}
  2079  	req.Header = reqHeaders
  2080  	googleapi.Expand(req.URL, map[string]string{
  2081  		"parent": c.parent,
  2082  	})
  2083  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2084  }
  2085  
  2086  // Do executes the "certificatemanager.projects.locations.certificateIssuanceConfigs.list" call.
  2087  // Any non-2xx status code is an error. Response headers are in either
  2088  // *ListCertificateIssuanceConfigsResponse.ServerResponse.Header or (if a
  2089  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2090  // googleapi.IsNotModified to check whether the returned error was because
  2091  // http.StatusNotModified was returned.
  2092  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Do(opts ...googleapi.CallOption) (*ListCertificateIssuanceConfigsResponse, error) {
  2093  	gensupport.SetOptions(c.urlParams_, opts...)
  2094  	res, err := c.doRequest("json")
  2095  	if res != nil && res.StatusCode == http.StatusNotModified {
  2096  		if res.Body != nil {
  2097  			res.Body.Close()
  2098  		}
  2099  		return nil, gensupport.WrapError(&googleapi.Error{
  2100  			Code:   res.StatusCode,
  2101  			Header: res.Header,
  2102  		})
  2103  	}
  2104  	if err != nil {
  2105  		return nil, err
  2106  	}
  2107  	defer googleapi.CloseBody(res)
  2108  	if err := googleapi.CheckResponse(res); err != nil {
  2109  		return nil, gensupport.WrapError(err)
  2110  	}
  2111  	ret := &ListCertificateIssuanceConfigsResponse{
  2112  		ServerResponse: googleapi.ServerResponse{
  2113  			Header:         res.Header,
  2114  			HTTPStatusCode: res.StatusCode,
  2115  		},
  2116  	}
  2117  	target := &ret
  2118  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2119  		return nil, err
  2120  	}
  2121  	return ret, nil
  2122  }
  2123  
  2124  // Pages invokes f for each page of results.
  2125  // A non-nil error returned from f will halt the iteration.
  2126  // The provided context supersedes any context provided to the Context method.
  2127  func (c *ProjectsLocationsCertificateIssuanceConfigsListCall) Pages(ctx context.Context, f func(*ListCertificateIssuanceConfigsResponse) error) error {
  2128  	c.ctx_ = ctx
  2129  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2130  	for {
  2131  		x, err := c.Do()
  2132  		if err != nil {
  2133  			return err
  2134  		}
  2135  		if err := f(x); err != nil {
  2136  			return err
  2137  		}
  2138  		if x.NextPageToken == "" {
  2139  			return nil
  2140  		}
  2141  		c.PageToken(x.NextPageToken)
  2142  	}
  2143  }
  2144  
  2145  type ProjectsLocationsCertificateMapsCreateCall struct {
  2146  	s              *Service
  2147  	parent         string
  2148  	certificatemap *CertificateMap
  2149  	urlParams_     gensupport.URLParams
  2150  	ctx_           context.Context
  2151  	header_        http.Header
  2152  }
  2153  
  2154  // Create: Creates a new CertificateMap in a given project and location.
  2155  //
  2156  //   - parent: The parent resource of the certificate map. Must be in the format
  2157  //     `projects/*/locations/*`.
  2158  func (r *ProjectsLocationsCertificateMapsService) Create(parent string, certificatemap *CertificateMap) *ProjectsLocationsCertificateMapsCreateCall {
  2159  	c := &ProjectsLocationsCertificateMapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2160  	c.parent = parent
  2161  	c.certificatemap = certificatemap
  2162  	return c
  2163  }
  2164  
  2165  // CertificateMapId sets the optional parameter "certificateMapId": Required. A
  2166  // user-provided name of the certificate map.
  2167  func (c *ProjectsLocationsCertificateMapsCreateCall) CertificateMapId(certificateMapId string) *ProjectsLocationsCertificateMapsCreateCall {
  2168  	c.urlParams_.Set("certificateMapId", certificateMapId)
  2169  	return c
  2170  }
  2171  
  2172  // Fields allows partial responses to be retrieved. See
  2173  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2174  // details.
  2175  func (c *ProjectsLocationsCertificateMapsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCreateCall {
  2176  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2177  	return c
  2178  }
  2179  
  2180  // Context sets the context to be used in this call's Do method.
  2181  func (c *ProjectsLocationsCertificateMapsCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCreateCall {
  2182  	c.ctx_ = ctx
  2183  	return c
  2184  }
  2185  
  2186  // Header returns a http.Header that can be modified by the caller to add
  2187  // headers to the request.
  2188  func (c *ProjectsLocationsCertificateMapsCreateCall) Header() http.Header {
  2189  	if c.header_ == nil {
  2190  		c.header_ = make(http.Header)
  2191  	}
  2192  	return c.header_
  2193  }
  2194  
  2195  func (c *ProjectsLocationsCertificateMapsCreateCall) doRequest(alt string) (*http.Response, error) {
  2196  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2197  	var body io.Reader = nil
  2198  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatemap)
  2199  	if err != nil {
  2200  		return nil, err
  2201  	}
  2202  	c.urlParams_.Set("alt", alt)
  2203  	c.urlParams_.Set("prettyPrint", "false")
  2204  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateMaps")
  2205  	urls += "?" + c.urlParams_.Encode()
  2206  	req, err := http.NewRequest("POST", urls, body)
  2207  	if err != nil {
  2208  		return nil, err
  2209  	}
  2210  	req.Header = reqHeaders
  2211  	googleapi.Expand(req.URL, map[string]string{
  2212  		"parent": c.parent,
  2213  	})
  2214  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2215  }
  2216  
  2217  // Do executes the "certificatemanager.projects.locations.certificateMaps.create" call.
  2218  // Any non-2xx status code is an error. Response headers are in either
  2219  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2220  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2221  // whether the returned error was because http.StatusNotModified was returned.
  2222  func (c *ProjectsLocationsCertificateMapsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2223  	gensupport.SetOptions(c.urlParams_, opts...)
  2224  	res, err := c.doRequest("json")
  2225  	if res != nil && res.StatusCode == http.StatusNotModified {
  2226  		if res.Body != nil {
  2227  			res.Body.Close()
  2228  		}
  2229  		return nil, gensupport.WrapError(&googleapi.Error{
  2230  			Code:   res.StatusCode,
  2231  			Header: res.Header,
  2232  		})
  2233  	}
  2234  	if err != nil {
  2235  		return nil, err
  2236  	}
  2237  	defer googleapi.CloseBody(res)
  2238  	if err := googleapi.CheckResponse(res); err != nil {
  2239  		return nil, gensupport.WrapError(err)
  2240  	}
  2241  	ret := &Operation{
  2242  		ServerResponse: googleapi.ServerResponse{
  2243  			Header:         res.Header,
  2244  			HTTPStatusCode: res.StatusCode,
  2245  		},
  2246  	}
  2247  	target := &ret
  2248  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2249  		return nil, err
  2250  	}
  2251  	return ret, nil
  2252  }
  2253  
  2254  type ProjectsLocationsCertificateMapsDeleteCall struct {
  2255  	s          *Service
  2256  	name       string
  2257  	urlParams_ gensupport.URLParams
  2258  	ctx_       context.Context
  2259  	header_    http.Header
  2260  }
  2261  
  2262  // Delete: Deletes a single CertificateMap. A Certificate Map can't be deleted
  2263  // if it contains Certificate Map Entries. Remove all the entries from the map
  2264  // before calling this method.
  2265  //
  2266  //   - name: A name of the certificate map to delete. Must be in the format
  2267  //     `projects/*/locations/*/certificateMaps/*`.
  2268  func (r *ProjectsLocationsCertificateMapsService) Delete(name string) *ProjectsLocationsCertificateMapsDeleteCall {
  2269  	c := &ProjectsLocationsCertificateMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2270  	c.name = name
  2271  	return c
  2272  }
  2273  
  2274  // Fields allows partial responses to be retrieved. See
  2275  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2276  // details.
  2277  func (c *ProjectsLocationsCertificateMapsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsDeleteCall {
  2278  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2279  	return c
  2280  }
  2281  
  2282  // Context sets the context to be used in this call's Do method.
  2283  func (c *ProjectsLocationsCertificateMapsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsDeleteCall {
  2284  	c.ctx_ = ctx
  2285  	return c
  2286  }
  2287  
  2288  // Header returns a http.Header that can be modified by the caller to add
  2289  // headers to the request.
  2290  func (c *ProjectsLocationsCertificateMapsDeleteCall) Header() http.Header {
  2291  	if c.header_ == nil {
  2292  		c.header_ = make(http.Header)
  2293  	}
  2294  	return c.header_
  2295  }
  2296  
  2297  func (c *ProjectsLocationsCertificateMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2298  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2299  	var body io.Reader = nil
  2300  	c.urlParams_.Set("alt", alt)
  2301  	c.urlParams_.Set("prettyPrint", "false")
  2302  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2303  	urls += "?" + c.urlParams_.Encode()
  2304  	req, err := http.NewRequest("DELETE", urls, body)
  2305  	if err != nil {
  2306  		return nil, err
  2307  	}
  2308  	req.Header = reqHeaders
  2309  	googleapi.Expand(req.URL, map[string]string{
  2310  		"name": c.name,
  2311  	})
  2312  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2313  }
  2314  
  2315  // Do executes the "certificatemanager.projects.locations.certificateMaps.delete" call.
  2316  // Any non-2xx status code is an error. Response headers are in either
  2317  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2318  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2319  // whether the returned error was because http.StatusNotModified was returned.
  2320  func (c *ProjectsLocationsCertificateMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2321  	gensupport.SetOptions(c.urlParams_, opts...)
  2322  	res, err := c.doRequest("json")
  2323  	if res != nil && res.StatusCode == http.StatusNotModified {
  2324  		if res.Body != nil {
  2325  			res.Body.Close()
  2326  		}
  2327  		return nil, gensupport.WrapError(&googleapi.Error{
  2328  			Code:   res.StatusCode,
  2329  			Header: res.Header,
  2330  		})
  2331  	}
  2332  	if err != nil {
  2333  		return nil, err
  2334  	}
  2335  	defer googleapi.CloseBody(res)
  2336  	if err := googleapi.CheckResponse(res); err != nil {
  2337  		return nil, gensupport.WrapError(err)
  2338  	}
  2339  	ret := &Operation{
  2340  		ServerResponse: googleapi.ServerResponse{
  2341  			Header:         res.Header,
  2342  			HTTPStatusCode: res.StatusCode,
  2343  		},
  2344  	}
  2345  	target := &ret
  2346  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2347  		return nil, err
  2348  	}
  2349  	return ret, nil
  2350  }
  2351  
  2352  type ProjectsLocationsCertificateMapsGetCall struct {
  2353  	s            *Service
  2354  	name         string
  2355  	urlParams_   gensupport.URLParams
  2356  	ifNoneMatch_ string
  2357  	ctx_         context.Context
  2358  	header_      http.Header
  2359  }
  2360  
  2361  // Get: Gets details of a single CertificateMap.
  2362  //
  2363  //   - name: A name of the certificate map to describe. Must be in the format
  2364  //     `projects/*/locations/*/certificateMaps/*`.
  2365  func (r *ProjectsLocationsCertificateMapsService) Get(name string) *ProjectsLocationsCertificateMapsGetCall {
  2366  	c := &ProjectsLocationsCertificateMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2367  	c.name = name
  2368  	return c
  2369  }
  2370  
  2371  // Fields allows partial responses to be retrieved. See
  2372  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2373  // details.
  2374  func (c *ProjectsLocationsCertificateMapsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsGetCall {
  2375  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2376  	return c
  2377  }
  2378  
  2379  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2380  // object's ETag matches the given value. This is useful for getting updates
  2381  // only after the object has changed since the last request.
  2382  func (c *ProjectsLocationsCertificateMapsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateMapsGetCall {
  2383  	c.ifNoneMatch_ = entityTag
  2384  	return c
  2385  }
  2386  
  2387  // Context sets the context to be used in this call's Do method.
  2388  func (c *ProjectsLocationsCertificateMapsGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsGetCall {
  2389  	c.ctx_ = ctx
  2390  	return c
  2391  }
  2392  
  2393  // Header returns a http.Header that can be modified by the caller to add
  2394  // headers to the request.
  2395  func (c *ProjectsLocationsCertificateMapsGetCall) Header() http.Header {
  2396  	if c.header_ == nil {
  2397  		c.header_ = make(http.Header)
  2398  	}
  2399  	return c.header_
  2400  }
  2401  
  2402  func (c *ProjectsLocationsCertificateMapsGetCall) doRequest(alt string) (*http.Response, error) {
  2403  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2404  	if c.ifNoneMatch_ != "" {
  2405  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2406  	}
  2407  	var body io.Reader = nil
  2408  	c.urlParams_.Set("alt", alt)
  2409  	c.urlParams_.Set("prettyPrint", "false")
  2410  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2411  	urls += "?" + c.urlParams_.Encode()
  2412  	req, err := http.NewRequest("GET", urls, body)
  2413  	if err != nil {
  2414  		return nil, err
  2415  	}
  2416  	req.Header = reqHeaders
  2417  	googleapi.Expand(req.URL, map[string]string{
  2418  		"name": c.name,
  2419  	})
  2420  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2421  }
  2422  
  2423  // Do executes the "certificatemanager.projects.locations.certificateMaps.get" call.
  2424  // Any non-2xx status code is an error. Response headers are in either
  2425  // *CertificateMap.ServerResponse.Header or (if a response was returned at all)
  2426  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2427  // whether the returned error was because http.StatusNotModified was returned.
  2428  func (c *ProjectsLocationsCertificateMapsGetCall) Do(opts ...googleapi.CallOption) (*CertificateMap, error) {
  2429  	gensupport.SetOptions(c.urlParams_, opts...)
  2430  	res, err := c.doRequest("json")
  2431  	if res != nil && res.StatusCode == http.StatusNotModified {
  2432  		if res.Body != nil {
  2433  			res.Body.Close()
  2434  		}
  2435  		return nil, gensupport.WrapError(&googleapi.Error{
  2436  			Code:   res.StatusCode,
  2437  			Header: res.Header,
  2438  		})
  2439  	}
  2440  	if err != nil {
  2441  		return nil, err
  2442  	}
  2443  	defer googleapi.CloseBody(res)
  2444  	if err := googleapi.CheckResponse(res); err != nil {
  2445  		return nil, gensupport.WrapError(err)
  2446  	}
  2447  	ret := &CertificateMap{
  2448  		ServerResponse: googleapi.ServerResponse{
  2449  			Header:         res.Header,
  2450  			HTTPStatusCode: res.StatusCode,
  2451  		},
  2452  	}
  2453  	target := &ret
  2454  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2455  		return nil, err
  2456  	}
  2457  	return ret, nil
  2458  }
  2459  
  2460  type ProjectsLocationsCertificateMapsListCall struct {
  2461  	s            *Service
  2462  	parent       string
  2463  	urlParams_   gensupport.URLParams
  2464  	ifNoneMatch_ string
  2465  	ctx_         context.Context
  2466  	header_      http.Header
  2467  }
  2468  
  2469  // List: Lists CertificateMaps in a given project and location.
  2470  //
  2471  //   - parent: The project and location from which the certificate maps should be
  2472  //     listed, specified in the format `projects/*/locations/*`.
  2473  func (r *ProjectsLocationsCertificateMapsService) List(parent string) *ProjectsLocationsCertificateMapsListCall {
  2474  	c := &ProjectsLocationsCertificateMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2475  	c.parent = parent
  2476  	return c
  2477  }
  2478  
  2479  // Filter sets the optional parameter "filter": Filter expression to restrict
  2480  // the Certificates Maps returned.
  2481  func (c *ProjectsLocationsCertificateMapsListCall) Filter(filter string) *ProjectsLocationsCertificateMapsListCall {
  2482  	c.urlParams_.Set("filter", filter)
  2483  	return c
  2484  }
  2485  
  2486  // OrderBy sets the optional parameter "orderBy": A list of Certificate Map
  2487  // field names used to specify the order of the returned results. The default
  2488  // sorting order is ascending. To specify descending order for a field, add a
  2489  // suffix " desc".
  2490  func (c *ProjectsLocationsCertificateMapsListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateMapsListCall {
  2491  	c.urlParams_.Set("orderBy", orderBy)
  2492  	return c
  2493  }
  2494  
  2495  // PageSize sets the optional parameter "pageSize": Maximum number of
  2496  // certificate maps to return per call.
  2497  func (c *ProjectsLocationsCertificateMapsListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateMapsListCall {
  2498  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2499  	return c
  2500  }
  2501  
  2502  // PageToken sets the optional parameter "pageToken": The value returned by the
  2503  // last `ListCertificateMapsResponse`. Indicates that this is a continuation of
  2504  // a prior `ListCertificateMaps` call, and that the system should return the
  2505  // next page of data.
  2506  func (c *ProjectsLocationsCertificateMapsListCall) PageToken(pageToken string) *ProjectsLocationsCertificateMapsListCall {
  2507  	c.urlParams_.Set("pageToken", pageToken)
  2508  	return c
  2509  }
  2510  
  2511  // Fields allows partial responses to be retrieved. See
  2512  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2513  // details.
  2514  func (c *ProjectsLocationsCertificateMapsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsListCall {
  2515  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2516  	return c
  2517  }
  2518  
  2519  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2520  // object's ETag matches the given value. This is useful for getting updates
  2521  // only after the object has changed since the last request.
  2522  func (c *ProjectsLocationsCertificateMapsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateMapsListCall {
  2523  	c.ifNoneMatch_ = entityTag
  2524  	return c
  2525  }
  2526  
  2527  // Context sets the context to be used in this call's Do method.
  2528  func (c *ProjectsLocationsCertificateMapsListCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsListCall {
  2529  	c.ctx_ = ctx
  2530  	return c
  2531  }
  2532  
  2533  // Header returns a http.Header that can be modified by the caller to add
  2534  // headers to the request.
  2535  func (c *ProjectsLocationsCertificateMapsListCall) Header() http.Header {
  2536  	if c.header_ == nil {
  2537  		c.header_ = make(http.Header)
  2538  	}
  2539  	return c.header_
  2540  }
  2541  
  2542  func (c *ProjectsLocationsCertificateMapsListCall) doRequest(alt string) (*http.Response, error) {
  2543  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2544  	if c.ifNoneMatch_ != "" {
  2545  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2546  	}
  2547  	var body io.Reader = nil
  2548  	c.urlParams_.Set("alt", alt)
  2549  	c.urlParams_.Set("prettyPrint", "false")
  2550  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateMaps")
  2551  	urls += "?" + c.urlParams_.Encode()
  2552  	req, err := http.NewRequest("GET", urls, body)
  2553  	if err != nil {
  2554  		return nil, err
  2555  	}
  2556  	req.Header = reqHeaders
  2557  	googleapi.Expand(req.URL, map[string]string{
  2558  		"parent": c.parent,
  2559  	})
  2560  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2561  }
  2562  
  2563  // Do executes the "certificatemanager.projects.locations.certificateMaps.list" call.
  2564  // Any non-2xx status code is an error. Response headers are in either
  2565  // *ListCertificateMapsResponse.ServerResponse.Header or (if a response was
  2566  // returned at all) in error.(*googleapi.Error).Header. Use
  2567  // googleapi.IsNotModified to check whether the returned error was because
  2568  // http.StatusNotModified was returned.
  2569  func (c *ProjectsLocationsCertificateMapsListCall) Do(opts ...googleapi.CallOption) (*ListCertificateMapsResponse, error) {
  2570  	gensupport.SetOptions(c.urlParams_, opts...)
  2571  	res, err := c.doRequest("json")
  2572  	if res != nil && res.StatusCode == http.StatusNotModified {
  2573  		if res.Body != nil {
  2574  			res.Body.Close()
  2575  		}
  2576  		return nil, gensupport.WrapError(&googleapi.Error{
  2577  			Code:   res.StatusCode,
  2578  			Header: res.Header,
  2579  		})
  2580  	}
  2581  	if err != nil {
  2582  		return nil, err
  2583  	}
  2584  	defer googleapi.CloseBody(res)
  2585  	if err := googleapi.CheckResponse(res); err != nil {
  2586  		return nil, gensupport.WrapError(err)
  2587  	}
  2588  	ret := &ListCertificateMapsResponse{
  2589  		ServerResponse: googleapi.ServerResponse{
  2590  			Header:         res.Header,
  2591  			HTTPStatusCode: res.StatusCode,
  2592  		},
  2593  	}
  2594  	target := &ret
  2595  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2596  		return nil, err
  2597  	}
  2598  	return ret, nil
  2599  }
  2600  
  2601  // Pages invokes f for each page of results.
  2602  // A non-nil error returned from f will halt the iteration.
  2603  // The provided context supersedes any context provided to the Context method.
  2604  func (c *ProjectsLocationsCertificateMapsListCall) Pages(ctx context.Context, f func(*ListCertificateMapsResponse) error) error {
  2605  	c.ctx_ = ctx
  2606  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2607  	for {
  2608  		x, err := c.Do()
  2609  		if err != nil {
  2610  			return err
  2611  		}
  2612  		if err := f(x); err != nil {
  2613  			return err
  2614  		}
  2615  		if x.NextPageToken == "" {
  2616  			return nil
  2617  		}
  2618  		c.PageToken(x.NextPageToken)
  2619  	}
  2620  }
  2621  
  2622  type ProjectsLocationsCertificateMapsPatchCall struct {
  2623  	s              *Service
  2624  	name           string
  2625  	certificatemap *CertificateMap
  2626  	urlParams_     gensupport.URLParams
  2627  	ctx_           context.Context
  2628  	header_        http.Header
  2629  }
  2630  
  2631  // Patch: Updates a CertificateMap.
  2632  //
  2633  //   - name: A user-defined name of the Certificate Map. Certificate Map names
  2634  //     must be unique globally and match pattern
  2635  //     `projects/*/locations/*/certificateMaps/*`.
  2636  func (r *ProjectsLocationsCertificateMapsService) Patch(name string, certificatemap *CertificateMap) *ProjectsLocationsCertificateMapsPatchCall {
  2637  	c := &ProjectsLocationsCertificateMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2638  	c.name = name
  2639  	c.certificatemap = certificatemap
  2640  	return c
  2641  }
  2642  
  2643  // UpdateMask sets the optional parameter "updateMask": Required. The update
  2644  // mask applies to the resource. For the `FieldMask` definition, see
  2645  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
  2646  func (c *ProjectsLocationsCertificateMapsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateMapsPatchCall {
  2647  	c.urlParams_.Set("updateMask", updateMask)
  2648  	return c
  2649  }
  2650  
  2651  // Fields allows partial responses to be retrieved. See
  2652  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2653  // details.
  2654  func (c *ProjectsLocationsCertificateMapsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsPatchCall {
  2655  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2656  	return c
  2657  }
  2658  
  2659  // Context sets the context to be used in this call's Do method.
  2660  func (c *ProjectsLocationsCertificateMapsPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsPatchCall {
  2661  	c.ctx_ = ctx
  2662  	return c
  2663  }
  2664  
  2665  // Header returns a http.Header that can be modified by the caller to add
  2666  // headers to the request.
  2667  func (c *ProjectsLocationsCertificateMapsPatchCall) Header() http.Header {
  2668  	if c.header_ == nil {
  2669  		c.header_ = make(http.Header)
  2670  	}
  2671  	return c.header_
  2672  }
  2673  
  2674  func (c *ProjectsLocationsCertificateMapsPatchCall) doRequest(alt string) (*http.Response, error) {
  2675  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2676  	var body io.Reader = nil
  2677  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatemap)
  2678  	if err != nil {
  2679  		return nil, err
  2680  	}
  2681  	c.urlParams_.Set("alt", alt)
  2682  	c.urlParams_.Set("prettyPrint", "false")
  2683  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2684  	urls += "?" + c.urlParams_.Encode()
  2685  	req, err := http.NewRequest("PATCH", urls, body)
  2686  	if err != nil {
  2687  		return nil, err
  2688  	}
  2689  	req.Header = reqHeaders
  2690  	googleapi.Expand(req.URL, map[string]string{
  2691  		"name": c.name,
  2692  	})
  2693  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2694  }
  2695  
  2696  // Do executes the "certificatemanager.projects.locations.certificateMaps.patch" call.
  2697  // Any non-2xx status code is an error. Response headers are in either
  2698  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2699  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2700  // whether the returned error was because http.StatusNotModified was returned.
  2701  func (c *ProjectsLocationsCertificateMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2702  	gensupport.SetOptions(c.urlParams_, opts...)
  2703  	res, err := c.doRequest("json")
  2704  	if res != nil && res.StatusCode == http.StatusNotModified {
  2705  		if res.Body != nil {
  2706  			res.Body.Close()
  2707  		}
  2708  		return nil, gensupport.WrapError(&googleapi.Error{
  2709  			Code:   res.StatusCode,
  2710  			Header: res.Header,
  2711  		})
  2712  	}
  2713  	if err != nil {
  2714  		return nil, err
  2715  	}
  2716  	defer googleapi.CloseBody(res)
  2717  	if err := googleapi.CheckResponse(res); err != nil {
  2718  		return nil, gensupport.WrapError(err)
  2719  	}
  2720  	ret := &Operation{
  2721  		ServerResponse: googleapi.ServerResponse{
  2722  			Header:         res.Header,
  2723  			HTTPStatusCode: res.StatusCode,
  2724  		},
  2725  	}
  2726  	target := &ret
  2727  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2728  		return nil, err
  2729  	}
  2730  	return ret, nil
  2731  }
  2732  
  2733  type ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall struct {
  2734  	s                   *Service
  2735  	parent              string
  2736  	certificatemapentry *CertificateMapEntry
  2737  	urlParams_          gensupport.URLParams
  2738  	ctx_                context.Context
  2739  	header_             http.Header
  2740  }
  2741  
  2742  // Create: Creates a new CertificateMapEntry in a given project and location.
  2743  //
  2744  //   - parent: The parent resource of the certificate map entry. Must be in the
  2745  //     format `projects/*/locations/*/certificateMaps/*`.
  2746  func (r *ProjectsLocationsCertificateMapsCertificateMapEntriesService) Create(parent string, certificatemapentry *CertificateMapEntry) *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall {
  2747  	c := &ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2748  	c.parent = parent
  2749  	c.certificatemapentry = certificatemapentry
  2750  	return c
  2751  }
  2752  
  2753  // CertificateMapEntryId sets the optional parameter "certificateMapEntryId":
  2754  // Required. A user-provided name of the certificate map entry.
  2755  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) CertificateMapEntryId(certificateMapEntryId string) *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall {
  2756  	c.urlParams_.Set("certificateMapEntryId", certificateMapEntryId)
  2757  	return c
  2758  }
  2759  
  2760  // Fields allows partial responses to be retrieved. See
  2761  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2762  // details.
  2763  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall {
  2764  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2765  	return c
  2766  }
  2767  
  2768  // Context sets the context to be used in this call's Do method.
  2769  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall {
  2770  	c.ctx_ = ctx
  2771  	return c
  2772  }
  2773  
  2774  // Header returns a http.Header that can be modified by the caller to add
  2775  // headers to the request.
  2776  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) Header() http.Header {
  2777  	if c.header_ == nil {
  2778  		c.header_ = make(http.Header)
  2779  	}
  2780  	return c.header_
  2781  }
  2782  
  2783  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) doRequest(alt string) (*http.Response, error) {
  2784  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2785  	var body io.Reader = nil
  2786  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatemapentry)
  2787  	if err != nil {
  2788  		return nil, err
  2789  	}
  2790  	c.urlParams_.Set("alt", alt)
  2791  	c.urlParams_.Set("prettyPrint", "false")
  2792  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateMapEntries")
  2793  	urls += "?" + c.urlParams_.Encode()
  2794  	req, err := http.NewRequest("POST", urls, body)
  2795  	if err != nil {
  2796  		return nil, err
  2797  	}
  2798  	req.Header = reqHeaders
  2799  	googleapi.Expand(req.URL, map[string]string{
  2800  		"parent": c.parent,
  2801  	})
  2802  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2803  }
  2804  
  2805  // Do executes the "certificatemanager.projects.locations.certificateMaps.certificateMapEntries.create" call.
  2806  // Any non-2xx status code is an error. Response headers are in either
  2807  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2808  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2809  // whether the returned error was because http.StatusNotModified was returned.
  2810  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2811  	gensupport.SetOptions(c.urlParams_, opts...)
  2812  	res, err := c.doRequest("json")
  2813  	if res != nil && res.StatusCode == http.StatusNotModified {
  2814  		if res.Body != nil {
  2815  			res.Body.Close()
  2816  		}
  2817  		return nil, gensupport.WrapError(&googleapi.Error{
  2818  			Code:   res.StatusCode,
  2819  			Header: res.Header,
  2820  		})
  2821  	}
  2822  	if err != nil {
  2823  		return nil, err
  2824  	}
  2825  	defer googleapi.CloseBody(res)
  2826  	if err := googleapi.CheckResponse(res); err != nil {
  2827  		return nil, gensupport.WrapError(err)
  2828  	}
  2829  	ret := &Operation{
  2830  		ServerResponse: googleapi.ServerResponse{
  2831  			Header:         res.Header,
  2832  			HTTPStatusCode: res.StatusCode,
  2833  		},
  2834  	}
  2835  	target := &ret
  2836  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2837  		return nil, err
  2838  	}
  2839  	return ret, nil
  2840  }
  2841  
  2842  type ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall struct {
  2843  	s          *Service
  2844  	name       string
  2845  	urlParams_ gensupport.URLParams
  2846  	ctx_       context.Context
  2847  	header_    http.Header
  2848  }
  2849  
  2850  // Delete: Deletes a single CertificateMapEntry.
  2851  //
  2852  //   - name: A name of the certificate map entry to delete. Must be in the format
  2853  //     `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
  2854  func (r *ProjectsLocationsCertificateMapsCertificateMapEntriesService) Delete(name string) *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall {
  2855  	c := &ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2856  	c.name = name
  2857  	return c
  2858  }
  2859  
  2860  // Fields allows partial responses to be retrieved. See
  2861  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2862  // details.
  2863  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall {
  2864  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2865  	return c
  2866  }
  2867  
  2868  // Context sets the context to be used in this call's Do method.
  2869  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall {
  2870  	c.ctx_ = ctx
  2871  	return c
  2872  }
  2873  
  2874  // Header returns a http.Header that can be modified by the caller to add
  2875  // headers to the request.
  2876  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall) Header() http.Header {
  2877  	if c.header_ == nil {
  2878  		c.header_ = make(http.Header)
  2879  	}
  2880  	return c.header_
  2881  }
  2882  
  2883  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2884  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2885  	var body io.Reader = nil
  2886  	c.urlParams_.Set("alt", alt)
  2887  	c.urlParams_.Set("prettyPrint", "false")
  2888  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2889  	urls += "?" + c.urlParams_.Encode()
  2890  	req, err := http.NewRequest("DELETE", urls, body)
  2891  	if err != nil {
  2892  		return nil, err
  2893  	}
  2894  	req.Header = reqHeaders
  2895  	googleapi.Expand(req.URL, map[string]string{
  2896  		"name": c.name,
  2897  	})
  2898  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2899  }
  2900  
  2901  // Do executes the "certificatemanager.projects.locations.certificateMaps.certificateMapEntries.delete" call.
  2902  // Any non-2xx status code is an error. Response headers are in either
  2903  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2904  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2905  // whether the returned error was because http.StatusNotModified was returned.
  2906  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2907  	gensupport.SetOptions(c.urlParams_, opts...)
  2908  	res, err := c.doRequest("json")
  2909  	if res != nil && res.StatusCode == http.StatusNotModified {
  2910  		if res.Body != nil {
  2911  			res.Body.Close()
  2912  		}
  2913  		return nil, gensupport.WrapError(&googleapi.Error{
  2914  			Code:   res.StatusCode,
  2915  			Header: res.Header,
  2916  		})
  2917  	}
  2918  	if err != nil {
  2919  		return nil, err
  2920  	}
  2921  	defer googleapi.CloseBody(res)
  2922  	if err := googleapi.CheckResponse(res); err != nil {
  2923  		return nil, gensupport.WrapError(err)
  2924  	}
  2925  	ret := &Operation{
  2926  		ServerResponse: googleapi.ServerResponse{
  2927  			Header:         res.Header,
  2928  			HTTPStatusCode: res.StatusCode,
  2929  		},
  2930  	}
  2931  	target := &ret
  2932  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2933  		return nil, err
  2934  	}
  2935  	return ret, nil
  2936  }
  2937  
  2938  type ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall struct {
  2939  	s            *Service
  2940  	name         string
  2941  	urlParams_   gensupport.URLParams
  2942  	ifNoneMatch_ string
  2943  	ctx_         context.Context
  2944  	header_      http.Header
  2945  }
  2946  
  2947  // Get: Gets details of a single CertificateMapEntry.
  2948  //
  2949  //   - name: A name of the certificate map entry to describe. Must be in the
  2950  //     format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
  2951  func (r *ProjectsLocationsCertificateMapsCertificateMapEntriesService) Get(name string) *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall {
  2952  	c := &ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2953  	c.name = name
  2954  	return c
  2955  }
  2956  
  2957  // Fields allows partial responses to be retrieved. See
  2958  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2959  // details.
  2960  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall {
  2961  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2962  	return c
  2963  }
  2964  
  2965  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2966  // object's ETag matches the given value. This is useful for getting updates
  2967  // only after the object has changed since the last request.
  2968  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall {
  2969  	c.ifNoneMatch_ = entityTag
  2970  	return c
  2971  }
  2972  
  2973  // Context sets the context to be used in this call's Do method.
  2974  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall {
  2975  	c.ctx_ = ctx
  2976  	return c
  2977  }
  2978  
  2979  // Header returns a http.Header that can be modified by the caller to add
  2980  // headers to the request.
  2981  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) Header() http.Header {
  2982  	if c.header_ == nil {
  2983  		c.header_ = make(http.Header)
  2984  	}
  2985  	return c.header_
  2986  }
  2987  
  2988  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) doRequest(alt string) (*http.Response, error) {
  2989  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2990  	if c.ifNoneMatch_ != "" {
  2991  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2992  	}
  2993  	var body io.Reader = nil
  2994  	c.urlParams_.Set("alt", alt)
  2995  	c.urlParams_.Set("prettyPrint", "false")
  2996  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2997  	urls += "?" + c.urlParams_.Encode()
  2998  	req, err := http.NewRequest("GET", urls, body)
  2999  	if err != nil {
  3000  		return nil, err
  3001  	}
  3002  	req.Header = reqHeaders
  3003  	googleapi.Expand(req.URL, map[string]string{
  3004  		"name": c.name,
  3005  	})
  3006  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3007  }
  3008  
  3009  // Do executes the "certificatemanager.projects.locations.certificateMaps.certificateMapEntries.get" call.
  3010  // Any non-2xx status code is an error. Response headers are in either
  3011  // *CertificateMapEntry.ServerResponse.Header or (if a response was returned at
  3012  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3013  // check whether the returned error was because http.StatusNotModified was
  3014  // returned.
  3015  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesGetCall) Do(opts ...googleapi.CallOption) (*CertificateMapEntry, error) {
  3016  	gensupport.SetOptions(c.urlParams_, opts...)
  3017  	res, err := c.doRequest("json")
  3018  	if res != nil && res.StatusCode == http.StatusNotModified {
  3019  		if res.Body != nil {
  3020  			res.Body.Close()
  3021  		}
  3022  		return nil, gensupport.WrapError(&googleapi.Error{
  3023  			Code:   res.StatusCode,
  3024  			Header: res.Header,
  3025  		})
  3026  	}
  3027  	if err != nil {
  3028  		return nil, err
  3029  	}
  3030  	defer googleapi.CloseBody(res)
  3031  	if err := googleapi.CheckResponse(res); err != nil {
  3032  		return nil, gensupport.WrapError(err)
  3033  	}
  3034  	ret := &CertificateMapEntry{
  3035  		ServerResponse: googleapi.ServerResponse{
  3036  			Header:         res.Header,
  3037  			HTTPStatusCode: res.StatusCode,
  3038  		},
  3039  	}
  3040  	target := &ret
  3041  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3042  		return nil, err
  3043  	}
  3044  	return ret, nil
  3045  }
  3046  
  3047  type ProjectsLocationsCertificateMapsCertificateMapEntriesListCall struct {
  3048  	s            *Service
  3049  	parent       string
  3050  	urlParams_   gensupport.URLParams
  3051  	ifNoneMatch_ string
  3052  	ctx_         context.Context
  3053  	header_      http.Header
  3054  }
  3055  
  3056  // List: Lists CertificateMapEntries in a given project and location.
  3057  //
  3058  //   - parent: The project, location and certificate map from which the
  3059  //     certificate map entries should be listed, specified in the format
  3060  //     `projects/*/locations/*/certificateMaps/*`.
  3061  func (r *ProjectsLocationsCertificateMapsCertificateMapEntriesService) List(parent string) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3062  	c := &ProjectsLocationsCertificateMapsCertificateMapEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3063  	c.parent = parent
  3064  	return c
  3065  }
  3066  
  3067  // Filter sets the optional parameter "filter": Filter expression to restrict
  3068  // the returned Certificate Map Entries.
  3069  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Filter(filter string) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3070  	c.urlParams_.Set("filter", filter)
  3071  	return c
  3072  }
  3073  
  3074  // OrderBy sets the optional parameter "orderBy": A list of Certificate Map
  3075  // Entry field names used to specify the order of the returned results. The
  3076  // default sorting order is ascending. To specify descending order for a field,
  3077  // add a suffix " desc".
  3078  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3079  	c.urlParams_.Set("orderBy", orderBy)
  3080  	return c
  3081  }
  3082  
  3083  // PageSize sets the optional parameter "pageSize": Maximum number of
  3084  // certificate map entries to return. The service may return fewer than this
  3085  // value. If unspecified, at most 50 certificate map entries will be returned.
  3086  // The maximum value is 1000; values above 1000 will be coerced to 1000.
  3087  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3088  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3089  	return c
  3090  }
  3091  
  3092  // PageToken sets the optional parameter "pageToken": The value returned by the
  3093  // last `ListCertificateMapEntriesResponse`. Indicates that this is a
  3094  // continuation of a prior `ListCertificateMapEntries` call, and that the
  3095  // system should return the next page of data.
  3096  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) PageToken(pageToken string) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3097  	c.urlParams_.Set("pageToken", pageToken)
  3098  	return c
  3099  }
  3100  
  3101  // Fields allows partial responses to be retrieved. See
  3102  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3103  // details.
  3104  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3105  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3106  	return c
  3107  }
  3108  
  3109  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3110  // object's ETag matches the given value. This is useful for getting updates
  3111  // only after the object has changed since the last request.
  3112  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3113  	c.ifNoneMatch_ = entityTag
  3114  	return c
  3115  }
  3116  
  3117  // Context sets the context to be used in this call's Do method.
  3118  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall {
  3119  	c.ctx_ = ctx
  3120  	return c
  3121  }
  3122  
  3123  // Header returns a http.Header that can be modified by the caller to add
  3124  // headers to the request.
  3125  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Header() http.Header {
  3126  	if c.header_ == nil {
  3127  		c.header_ = make(http.Header)
  3128  	}
  3129  	return c.header_
  3130  }
  3131  
  3132  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) doRequest(alt string) (*http.Response, error) {
  3133  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3134  	if c.ifNoneMatch_ != "" {
  3135  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3136  	}
  3137  	var body io.Reader = nil
  3138  	c.urlParams_.Set("alt", alt)
  3139  	c.urlParams_.Set("prettyPrint", "false")
  3140  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateMapEntries")
  3141  	urls += "?" + c.urlParams_.Encode()
  3142  	req, err := http.NewRequest("GET", urls, body)
  3143  	if err != nil {
  3144  		return nil, err
  3145  	}
  3146  	req.Header = reqHeaders
  3147  	googleapi.Expand(req.URL, map[string]string{
  3148  		"parent": c.parent,
  3149  	})
  3150  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3151  }
  3152  
  3153  // Do executes the "certificatemanager.projects.locations.certificateMaps.certificateMapEntries.list" call.
  3154  // Any non-2xx status code is an error. Response headers are in either
  3155  // *ListCertificateMapEntriesResponse.ServerResponse.Header or (if a response
  3156  // was returned at all) in error.(*googleapi.Error).Header. Use
  3157  // googleapi.IsNotModified to check whether the returned error was because
  3158  // http.StatusNotModified was returned.
  3159  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Do(opts ...googleapi.CallOption) (*ListCertificateMapEntriesResponse, error) {
  3160  	gensupport.SetOptions(c.urlParams_, opts...)
  3161  	res, err := c.doRequest("json")
  3162  	if res != nil && res.StatusCode == http.StatusNotModified {
  3163  		if res.Body != nil {
  3164  			res.Body.Close()
  3165  		}
  3166  		return nil, gensupport.WrapError(&googleapi.Error{
  3167  			Code:   res.StatusCode,
  3168  			Header: res.Header,
  3169  		})
  3170  	}
  3171  	if err != nil {
  3172  		return nil, err
  3173  	}
  3174  	defer googleapi.CloseBody(res)
  3175  	if err := googleapi.CheckResponse(res); err != nil {
  3176  		return nil, gensupport.WrapError(err)
  3177  	}
  3178  	ret := &ListCertificateMapEntriesResponse{
  3179  		ServerResponse: googleapi.ServerResponse{
  3180  			Header:         res.Header,
  3181  			HTTPStatusCode: res.StatusCode,
  3182  		},
  3183  	}
  3184  	target := &ret
  3185  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3186  		return nil, err
  3187  	}
  3188  	return ret, nil
  3189  }
  3190  
  3191  // Pages invokes f for each page of results.
  3192  // A non-nil error returned from f will halt the iteration.
  3193  // The provided context supersedes any context provided to the Context method.
  3194  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesListCall) Pages(ctx context.Context, f func(*ListCertificateMapEntriesResponse) error) error {
  3195  	c.ctx_ = ctx
  3196  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3197  	for {
  3198  		x, err := c.Do()
  3199  		if err != nil {
  3200  			return err
  3201  		}
  3202  		if err := f(x); err != nil {
  3203  			return err
  3204  		}
  3205  		if x.NextPageToken == "" {
  3206  			return nil
  3207  		}
  3208  		c.PageToken(x.NextPageToken)
  3209  	}
  3210  }
  3211  
  3212  type ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall struct {
  3213  	s                   *Service
  3214  	name                string
  3215  	certificatemapentry *CertificateMapEntry
  3216  	urlParams_          gensupport.URLParams
  3217  	ctx_                context.Context
  3218  	header_             http.Header
  3219  }
  3220  
  3221  // Patch: Updates a CertificateMapEntry.
  3222  //
  3223  //   - name: A user-defined name of the Certificate Map Entry. Certificate Map
  3224  //     Entry names must be unique globally and match pattern
  3225  //     `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`.
  3226  func (r *ProjectsLocationsCertificateMapsCertificateMapEntriesService) Patch(name string, certificatemapentry *CertificateMapEntry) *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall {
  3227  	c := &ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3228  	c.name = name
  3229  	c.certificatemapentry = certificatemapentry
  3230  	return c
  3231  }
  3232  
  3233  // UpdateMask sets the optional parameter "updateMask": Required. The update
  3234  // mask applies to the resource. For the `FieldMask` definition, see
  3235  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
  3236  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall {
  3237  	c.urlParams_.Set("updateMask", updateMask)
  3238  	return c
  3239  }
  3240  
  3241  // Fields allows partial responses to be retrieved. See
  3242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3243  // details.
  3244  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall {
  3245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3246  	return c
  3247  }
  3248  
  3249  // Context sets the context to be used in this call's Do method.
  3250  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall {
  3251  	c.ctx_ = ctx
  3252  	return c
  3253  }
  3254  
  3255  // Header returns a http.Header that can be modified by the caller to add
  3256  // headers to the request.
  3257  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) Header() http.Header {
  3258  	if c.header_ == nil {
  3259  		c.header_ = make(http.Header)
  3260  	}
  3261  	return c.header_
  3262  }
  3263  
  3264  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) doRequest(alt string) (*http.Response, error) {
  3265  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3266  	var body io.Reader = nil
  3267  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatemapentry)
  3268  	if err != nil {
  3269  		return nil, err
  3270  	}
  3271  	c.urlParams_.Set("alt", alt)
  3272  	c.urlParams_.Set("prettyPrint", "false")
  3273  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3274  	urls += "?" + c.urlParams_.Encode()
  3275  	req, err := http.NewRequest("PATCH", urls, body)
  3276  	if err != nil {
  3277  		return nil, err
  3278  	}
  3279  	req.Header = reqHeaders
  3280  	googleapi.Expand(req.URL, map[string]string{
  3281  		"name": c.name,
  3282  	})
  3283  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3284  }
  3285  
  3286  // Do executes the "certificatemanager.projects.locations.certificateMaps.certificateMapEntries.patch" call.
  3287  // Any non-2xx status code is an error. Response headers are in either
  3288  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3289  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3290  // whether the returned error was because http.StatusNotModified was returned.
  3291  func (c *ProjectsLocationsCertificateMapsCertificateMapEntriesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3292  	gensupport.SetOptions(c.urlParams_, opts...)
  3293  	res, err := c.doRequest("json")
  3294  	if res != nil && res.StatusCode == http.StatusNotModified {
  3295  		if res.Body != nil {
  3296  			res.Body.Close()
  3297  		}
  3298  		return nil, gensupport.WrapError(&googleapi.Error{
  3299  			Code:   res.StatusCode,
  3300  			Header: res.Header,
  3301  		})
  3302  	}
  3303  	if err != nil {
  3304  		return nil, err
  3305  	}
  3306  	defer googleapi.CloseBody(res)
  3307  	if err := googleapi.CheckResponse(res); err != nil {
  3308  		return nil, gensupport.WrapError(err)
  3309  	}
  3310  	ret := &Operation{
  3311  		ServerResponse: googleapi.ServerResponse{
  3312  			Header:         res.Header,
  3313  			HTTPStatusCode: res.StatusCode,
  3314  		},
  3315  	}
  3316  	target := &ret
  3317  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3318  		return nil, err
  3319  	}
  3320  	return ret, nil
  3321  }
  3322  
  3323  type ProjectsLocationsCertificatesCreateCall struct {
  3324  	s           *Service
  3325  	parent      string
  3326  	certificate *Certificate
  3327  	urlParams_  gensupport.URLParams
  3328  	ctx_        context.Context
  3329  	header_     http.Header
  3330  }
  3331  
  3332  // Create: Creates a new Certificate in a given project and location.
  3333  //
  3334  //   - parent: The parent resource of the certificate. Must be in the format
  3335  //     `projects/*/locations/*`.
  3336  func (r *ProjectsLocationsCertificatesService) Create(parent string, certificate *Certificate) *ProjectsLocationsCertificatesCreateCall {
  3337  	c := &ProjectsLocationsCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3338  	c.parent = parent
  3339  	c.certificate = certificate
  3340  	return c
  3341  }
  3342  
  3343  // CertificateId sets the optional parameter "certificateId": Required. A
  3344  // user-provided name of the certificate.
  3345  func (c *ProjectsLocationsCertificatesCreateCall) CertificateId(certificateId string) *ProjectsLocationsCertificatesCreateCall {
  3346  	c.urlParams_.Set("certificateId", certificateId)
  3347  	return c
  3348  }
  3349  
  3350  // Fields allows partial responses to be retrieved. See
  3351  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3352  // details.
  3353  func (c *ProjectsLocationsCertificatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificatesCreateCall {
  3354  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3355  	return c
  3356  }
  3357  
  3358  // Context sets the context to be used in this call's Do method.
  3359  func (c *ProjectsLocationsCertificatesCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificatesCreateCall {
  3360  	c.ctx_ = ctx
  3361  	return c
  3362  }
  3363  
  3364  // Header returns a http.Header that can be modified by the caller to add
  3365  // headers to the request.
  3366  func (c *ProjectsLocationsCertificatesCreateCall) Header() http.Header {
  3367  	if c.header_ == nil {
  3368  		c.header_ = make(http.Header)
  3369  	}
  3370  	return c.header_
  3371  }
  3372  
  3373  func (c *ProjectsLocationsCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
  3374  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3375  	var body io.Reader = nil
  3376  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate)
  3377  	if err != nil {
  3378  		return nil, err
  3379  	}
  3380  	c.urlParams_.Set("alt", alt)
  3381  	c.urlParams_.Set("prettyPrint", "false")
  3382  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificates")
  3383  	urls += "?" + c.urlParams_.Encode()
  3384  	req, err := http.NewRequest("POST", urls, body)
  3385  	if err != nil {
  3386  		return nil, err
  3387  	}
  3388  	req.Header = reqHeaders
  3389  	googleapi.Expand(req.URL, map[string]string{
  3390  		"parent": c.parent,
  3391  	})
  3392  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3393  }
  3394  
  3395  // Do executes the "certificatemanager.projects.locations.certificates.create" call.
  3396  // Any non-2xx status code is an error. Response headers are in either
  3397  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3398  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3399  // whether the returned error was because http.StatusNotModified was returned.
  3400  func (c *ProjectsLocationsCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3401  	gensupport.SetOptions(c.urlParams_, opts...)
  3402  	res, err := c.doRequest("json")
  3403  	if res != nil && res.StatusCode == http.StatusNotModified {
  3404  		if res.Body != nil {
  3405  			res.Body.Close()
  3406  		}
  3407  		return nil, gensupport.WrapError(&googleapi.Error{
  3408  			Code:   res.StatusCode,
  3409  			Header: res.Header,
  3410  		})
  3411  	}
  3412  	if err != nil {
  3413  		return nil, err
  3414  	}
  3415  	defer googleapi.CloseBody(res)
  3416  	if err := googleapi.CheckResponse(res); err != nil {
  3417  		return nil, gensupport.WrapError(err)
  3418  	}
  3419  	ret := &Operation{
  3420  		ServerResponse: googleapi.ServerResponse{
  3421  			Header:         res.Header,
  3422  			HTTPStatusCode: res.StatusCode,
  3423  		},
  3424  	}
  3425  	target := &ret
  3426  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3427  		return nil, err
  3428  	}
  3429  	return ret, nil
  3430  }
  3431  
  3432  type ProjectsLocationsCertificatesDeleteCall struct {
  3433  	s          *Service
  3434  	name       string
  3435  	urlParams_ gensupport.URLParams
  3436  	ctx_       context.Context
  3437  	header_    http.Header
  3438  }
  3439  
  3440  // Delete: Deletes a single Certificate.
  3441  //
  3442  //   - name: A name of the certificate to delete. Must be in the format
  3443  //     `projects/*/locations/*/certificates/*`.
  3444  func (r *ProjectsLocationsCertificatesService) Delete(name string) *ProjectsLocationsCertificatesDeleteCall {
  3445  	c := &ProjectsLocationsCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3446  	c.name = name
  3447  	return c
  3448  }
  3449  
  3450  // Fields allows partial responses to be retrieved. See
  3451  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3452  // details.
  3453  func (c *ProjectsLocationsCertificatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificatesDeleteCall {
  3454  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3455  	return c
  3456  }
  3457  
  3458  // Context sets the context to be used in this call's Do method.
  3459  func (c *ProjectsLocationsCertificatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificatesDeleteCall {
  3460  	c.ctx_ = ctx
  3461  	return c
  3462  }
  3463  
  3464  // Header returns a http.Header that can be modified by the caller to add
  3465  // headers to the request.
  3466  func (c *ProjectsLocationsCertificatesDeleteCall) Header() http.Header {
  3467  	if c.header_ == nil {
  3468  		c.header_ = make(http.Header)
  3469  	}
  3470  	return c.header_
  3471  }
  3472  
  3473  func (c *ProjectsLocationsCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
  3474  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3475  	var body io.Reader = nil
  3476  	c.urlParams_.Set("alt", alt)
  3477  	c.urlParams_.Set("prettyPrint", "false")
  3478  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3479  	urls += "?" + c.urlParams_.Encode()
  3480  	req, err := http.NewRequest("DELETE", urls, body)
  3481  	if err != nil {
  3482  		return nil, err
  3483  	}
  3484  	req.Header = reqHeaders
  3485  	googleapi.Expand(req.URL, map[string]string{
  3486  		"name": c.name,
  3487  	})
  3488  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3489  }
  3490  
  3491  // Do executes the "certificatemanager.projects.locations.certificates.delete" call.
  3492  // Any non-2xx status code is an error. Response headers are in either
  3493  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3494  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3495  // whether the returned error was because http.StatusNotModified was returned.
  3496  func (c *ProjectsLocationsCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3497  	gensupport.SetOptions(c.urlParams_, opts...)
  3498  	res, err := c.doRequest("json")
  3499  	if res != nil && res.StatusCode == http.StatusNotModified {
  3500  		if res.Body != nil {
  3501  			res.Body.Close()
  3502  		}
  3503  		return nil, gensupport.WrapError(&googleapi.Error{
  3504  			Code:   res.StatusCode,
  3505  			Header: res.Header,
  3506  		})
  3507  	}
  3508  	if err != nil {
  3509  		return nil, err
  3510  	}
  3511  	defer googleapi.CloseBody(res)
  3512  	if err := googleapi.CheckResponse(res); err != nil {
  3513  		return nil, gensupport.WrapError(err)
  3514  	}
  3515  	ret := &Operation{
  3516  		ServerResponse: googleapi.ServerResponse{
  3517  			Header:         res.Header,
  3518  			HTTPStatusCode: res.StatusCode,
  3519  		},
  3520  	}
  3521  	target := &ret
  3522  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3523  		return nil, err
  3524  	}
  3525  	return ret, nil
  3526  }
  3527  
  3528  type ProjectsLocationsCertificatesGetCall struct {
  3529  	s            *Service
  3530  	name         string
  3531  	urlParams_   gensupport.URLParams
  3532  	ifNoneMatch_ string
  3533  	ctx_         context.Context
  3534  	header_      http.Header
  3535  }
  3536  
  3537  // Get: Gets details of a single Certificate.
  3538  //
  3539  //   - name: A name of the certificate to describe. Must be in the format
  3540  //     `projects/*/locations/*/certificates/*`.
  3541  func (r *ProjectsLocationsCertificatesService) Get(name string) *ProjectsLocationsCertificatesGetCall {
  3542  	c := &ProjectsLocationsCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3543  	c.name = name
  3544  	return c
  3545  }
  3546  
  3547  // Fields allows partial responses to be retrieved. See
  3548  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3549  // details.
  3550  func (c *ProjectsLocationsCertificatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificatesGetCall {
  3551  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3552  	return c
  3553  }
  3554  
  3555  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3556  // object's ETag matches the given value. This is useful for getting updates
  3557  // only after the object has changed since the last request.
  3558  func (c *ProjectsLocationsCertificatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificatesGetCall {
  3559  	c.ifNoneMatch_ = entityTag
  3560  	return c
  3561  }
  3562  
  3563  // Context sets the context to be used in this call's Do method.
  3564  func (c *ProjectsLocationsCertificatesGetCall) Context(ctx context.Context) *ProjectsLocationsCertificatesGetCall {
  3565  	c.ctx_ = ctx
  3566  	return c
  3567  }
  3568  
  3569  // Header returns a http.Header that can be modified by the caller to add
  3570  // headers to the request.
  3571  func (c *ProjectsLocationsCertificatesGetCall) Header() http.Header {
  3572  	if c.header_ == nil {
  3573  		c.header_ = make(http.Header)
  3574  	}
  3575  	return c.header_
  3576  }
  3577  
  3578  func (c *ProjectsLocationsCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
  3579  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3580  	if c.ifNoneMatch_ != "" {
  3581  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3582  	}
  3583  	var body io.Reader = nil
  3584  	c.urlParams_.Set("alt", alt)
  3585  	c.urlParams_.Set("prettyPrint", "false")
  3586  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3587  	urls += "?" + c.urlParams_.Encode()
  3588  	req, err := http.NewRequest("GET", urls, body)
  3589  	if err != nil {
  3590  		return nil, err
  3591  	}
  3592  	req.Header = reqHeaders
  3593  	googleapi.Expand(req.URL, map[string]string{
  3594  		"name": c.name,
  3595  	})
  3596  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3597  }
  3598  
  3599  // Do executes the "certificatemanager.projects.locations.certificates.get" call.
  3600  // Any non-2xx status code is an error. Response headers are in either
  3601  // *Certificate.ServerResponse.Header or (if a response was returned at all) in
  3602  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3603  // whether the returned error was because http.StatusNotModified was returned.
  3604  func (c *ProjectsLocationsCertificatesGetCall) Do(opts ...googleapi.CallOption) (*Certificate, error) {
  3605  	gensupport.SetOptions(c.urlParams_, opts...)
  3606  	res, err := c.doRequest("json")
  3607  	if res != nil && res.StatusCode == http.StatusNotModified {
  3608  		if res.Body != nil {
  3609  			res.Body.Close()
  3610  		}
  3611  		return nil, gensupport.WrapError(&googleapi.Error{
  3612  			Code:   res.StatusCode,
  3613  			Header: res.Header,
  3614  		})
  3615  	}
  3616  	if err != nil {
  3617  		return nil, err
  3618  	}
  3619  	defer googleapi.CloseBody(res)
  3620  	if err := googleapi.CheckResponse(res); err != nil {
  3621  		return nil, gensupport.WrapError(err)
  3622  	}
  3623  	ret := &Certificate{
  3624  		ServerResponse: googleapi.ServerResponse{
  3625  			Header:         res.Header,
  3626  			HTTPStatusCode: res.StatusCode,
  3627  		},
  3628  	}
  3629  	target := &ret
  3630  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3631  		return nil, err
  3632  	}
  3633  	return ret, nil
  3634  }
  3635  
  3636  type ProjectsLocationsCertificatesListCall struct {
  3637  	s            *Service
  3638  	parent       string
  3639  	urlParams_   gensupport.URLParams
  3640  	ifNoneMatch_ string
  3641  	ctx_         context.Context
  3642  	header_      http.Header
  3643  }
  3644  
  3645  // List: Lists Certificates in a given project and location.
  3646  //
  3647  //   - parent: The project and location from which the certificate should be
  3648  //     listed, specified in the format `projects/*/locations/*`.
  3649  func (r *ProjectsLocationsCertificatesService) List(parent string) *ProjectsLocationsCertificatesListCall {
  3650  	c := &ProjectsLocationsCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3651  	c.parent = parent
  3652  	return c
  3653  }
  3654  
  3655  // Filter sets the optional parameter "filter": Filter expression to restrict
  3656  // the Certificates returned.
  3657  func (c *ProjectsLocationsCertificatesListCall) Filter(filter string) *ProjectsLocationsCertificatesListCall {
  3658  	c.urlParams_.Set("filter", filter)
  3659  	return c
  3660  }
  3661  
  3662  // OrderBy sets the optional parameter "orderBy": A list of Certificate field
  3663  // names used to specify the order of the returned results. The default sorting
  3664  // order is ascending. To specify descending order for a field, add a suffix "
  3665  // desc".
  3666  func (c *ProjectsLocationsCertificatesListCall) OrderBy(orderBy string) *ProjectsLocationsCertificatesListCall {
  3667  	c.urlParams_.Set("orderBy", orderBy)
  3668  	return c
  3669  }
  3670  
  3671  // PageSize sets the optional parameter "pageSize": Maximum number of
  3672  // certificates to return per call.
  3673  func (c *ProjectsLocationsCertificatesListCall) PageSize(pageSize int64) *ProjectsLocationsCertificatesListCall {
  3674  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3675  	return c
  3676  }
  3677  
  3678  // PageToken sets the optional parameter "pageToken": The value returned by the
  3679  // last `ListCertificatesResponse`. Indicates that this is a continuation of a
  3680  // prior `ListCertificates` call, and that the system should return the next
  3681  // page of data.
  3682  func (c *ProjectsLocationsCertificatesListCall) PageToken(pageToken string) *ProjectsLocationsCertificatesListCall {
  3683  	c.urlParams_.Set("pageToken", pageToken)
  3684  	return c
  3685  }
  3686  
  3687  // Fields allows partial responses to be retrieved. See
  3688  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3689  // details.
  3690  func (c *ProjectsLocationsCertificatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificatesListCall {
  3691  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3692  	return c
  3693  }
  3694  
  3695  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3696  // object's ETag matches the given value. This is useful for getting updates
  3697  // only after the object has changed since the last request.
  3698  func (c *ProjectsLocationsCertificatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificatesListCall {
  3699  	c.ifNoneMatch_ = entityTag
  3700  	return c
  3701  }
  3702  
  3703  // Context sets the context to be used in this call's Do method.
  3704  func (c *ProjectsLocationsCertificatesListCall) Context(ctx context.Context) *ProjectsLocationsCertificatesListCall {
  3705  	c.ctx_ = ctx
  3706  	return c
  3707  }
  3708  
  3709  // Header returns a http.Header that can be modified by the caller to add
  3710  // headers to the request.
  3711  func (c *ProjectsLocationsCertificatesListCall) Header() http.Header {
  3712  	if c.header_ == nil {
  3713  		c.header_ = make(http.Header)
  3714  	}
  3715  	return c.header_
  3716  }
  3717  
  3718  func (c *ProjectsLocationsCertificatesListCall) doRequest(alt string) (*http.Response, error) {
  3719  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3720  	if c.ifNoneMatch_ != "" {
  3721  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3722  	}
  3723  	var body io.Reader = nil
  3724  	c.urlParams_.Set("alt", alt)
  3725  	c.urlParams_.Set("prettyPrint", "false")
  3726  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificates")
  3727  	urls += "?" + c.urlParams_.Encode()
  3728  	req, err := http.NewRequest("GET", urls, body)
  3729  	if err != nil {
  3730  		return nil, err
  3731  	}
  3732  	req.Header = reqHeaders
  3733  	googleapi.Expand(req.URL, map[string]string{
  3734  		"parent": c.parent,
  3735  	})
  3736  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3737  }
  3738  
  3739  // Do executes the "certificatemanager.projects.locations.certificates.list" call.
  3740  // Any non-2xx status code is an error. Response headers are in either
  3741  // *ListCertificatesResponse.ServerResponse.Header or (if a response was
  3742  // returned at all) in error.(*googleapi.Error).Header. Use
  3743  // googleapi.IsNotModified to check whether the returned error was because
  3744  // http.StatusNotModified was returned.
  3745  func (c *ProjectsLocationsCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListCertificatesResponse, error) {
  3746  	gensupport.SetOptions(c.urlParams_, opts...)
  3747  	res, err := c.doRequest("json")
  3748  	if res != nil && res.StatusCode == http.StatusNotModified {
  3749  		if res.Body != nil {
  3750  			res.Body.Close()
  3751  		}
  3752  		return nil, gensupport.WrapError(&googleapi.Error{
  3753  			Code:   res.StatusCode,
  3754  			Header: res.Header,
  3755  		})
  3756  	}
  3757  	if err != nil {
  3758  		return nil, err
  3759  	}
  3760  	defer googleapi.CloseBody(res)
  3761  	if err := googleapi.CheckResponse(res); err != nil {
  3762  		return nil, gensupport.WrapError(err)
  3763  	}
  3764  	ret := &ListCertificatesResponse{
  3765  		ServerResponse: googleapi.ServerResponse{
  3766  			Header:         res.Header,
  3767  			HTTPStatusCode: res.StatusCode,
  3768  		},
  3769  	}
  3770  	target := &ret
  3771  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3772  		return nil, err
  3773  	}
  3774  	return ret, nil
  3775  }
  3776  
  3777  // Pages invokes f for each page of results.
  3778  // A non-nil error returned from f will halt the iteration.
  3779  // The provided context supersedes any context provided to the Context method.
  3780  func (c *ProjectsLocationsCertificatesListCall) Pages(ctx context.Context, f func(*ListCertificatesResponse) error) error {
  3781  	c.ctx_ = ctx
  3782  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3783  	for {
  3784  		x, err := c.Do()
  3785  		if err != nil {
  3786  			return err
  3787  		}
  3788  		if err := f(x); err != nil {
  3789  			return err
  3790  		}
  3791  		if x.NextPageToken == "" {
  3792  			return nil
  3793  		}
  3794  		c.PageToken(x.NextPageToken)
  3795  	}
  3796  }
  3797  
  3798  type ProjectsLocationsCertificatesPatchCall struct {
  3799  	s           *Service
  3800  	name        string
  3801  	certificate *Certificate
  3802  	urlParams_  gensupport.URLParams
  3803  	ctx_        context.Context
  3804  	header_     http.Header
  3805  }
  3806  
  3807  // Patch: Updates a Certificate.
  3808  //
  3809  //   - name: A user-defined name of the certificate. Certificate names must be
  3810  //     unique globally and match pattern `projects/*/locations/*/certificates/*`.
  3811  func (r *ProjectsLocationsCertificatesService) Patch(name string, certificate *Certificate) *ProjectsLocationsCertificatesPatchCall {
  3812  	c := &ProjectsLocationsCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3813  	c.name = name
  3814  	c.certificate = certificate
  3815  	return c
  3816  }
  3817  
  3818  // UpdateMask sets the optional parameter "updateMask": Required. The update
  3819  // mask applies to the resource. For the `FieldMask` definition, see
  3820  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
  3821  func (c *ProjectsLocationsCertificatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificatesPatchCall {
  3822  	c.urlParams_.Set("updateMask", updateMask)
  3823  	return c
  3824  }
  3825  
  3826  // Fields allows partial responses to be retrieved. See
  3827  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3828  // details.
  3829  func (c *ProjectsLocationsCertificatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificatesPatchCall {
  3830  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3831  	return c
  3832  }
  3833  
  3834  // Context sets the context to be used in this call's Do method.
  3835  func (c *ProjectsLocationsCertificatesPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificatesPatchCall {
  3836  	c.ctx_ = ctx
  3837  	return c
  3838  }
  3839  
  3840  // Header returns a http.Header that can be modified by the caller to add
  3841  // headers to the request.
  3842  func (c *ProjectsLocationsCertificatesPatchCall) Header() http.Header {
  3843  	if c.header_ == nil {
  3844  		c.header_ = make(http.Header)
  3845  	}
  3846  	return c.header_
  3847  }
  3848  
  3849  func (c *ProjectsLocationsCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
  3850  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3851  	var body io.Reader = nil
  3852  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate)
  3853  	if err != nil {
  3854  		return nil, err
  3855  	}
  3856  	c.urlParams_.Set("alt", alt)
  3857  	c.urlParams_.Set("prettyPrint", "false")
  3858  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3859  	urls += "?" + c.urlParams_.Encode()
  3860  	req, err := http.NewRequest("PATCH", urls, body)
  3861  	if err != nil {
  3862  		return nil, err
  3863  	}
  3864  	req.Header = reqHeaders
  3865  	googleapi.Expand(req.URL, map[string]string{
  3866  		"name": c.name,
  3867  	})
  3868  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3869  }
  3870  
  3871  // Do executes the "certificatemanager.projects.locations.certificates.patch" call.
  3872  // Any non-2xx status code is an error. Response headers are in either
  3873  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3874  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3875  // whether the returned error was because http.StatusNotModified was returned.
  3876  func (c *ProjectsLocationsCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3877  	gensupport.SetOptions(c.urlParams_, opts...)
  3878  	res, err := c.doRequest("json")
  3879  	if res != nil && res.StatusCode == http.StatusNotModified {
  3880  		if res.Body != nil {
  3881  			res.Body.Close()
  3882  		}
  3883  		return nil, gensupport.WrapError(&googleapi.Error{
  3884  			Code:   res.StatusCode,
  3885  			Header: res.Header,
  3886  		})
  3887  	}
  3888  	if err != nil {
  3889  		return nil, err
  3890  	}
  3891  	defer googleapi.CloseBody(res)
  3892  	if err := googleapi.CheckResponse(res); err != nil {
  3893  		return nil, gensupport.WrapError(err)
  3894  	}
  3895  	ret := &Operation{
  3896  		ServerResponse: googleapi.ServerResponse{
  3897  			Header:         res.Header,
  3898  			HTTPStatusCode: res.StatusCode,
  3899  		},
  3900  	}
  3901  	target := &ret
  3902  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3903  		return nil, err
  3904  	}
  3905  	return ret, nil
  3906  }
  3907  
  3908  type ProjectsLocationsDnsAuthorizationsCreateCall struct {
  3909  	s                *Service
  3910  	parent           string
  3911  	dnsauthorization *DnsAuthorization
  3912  	urlParams_       gensupport.URLParams
  3913  	ctx_             context.Context
  3914  	header_          http.Header
  3915  }
  3916  
  3917  // Create: Creates a new DnsAuthorization in a given project and location.
  3918  //
  3919  //   - parent: The parent resource of the dns authorization. Must be in the
  3920  //     format `projects/*/locations/*`.
  3921  func (r *ProjectsLocationsDnsAuthorizationsService) Create(parent string, dnsauthorization *DnsAuthorization) *ProjectsLocationsDnsAuthorizationsCreateCall {
  3922  	c := &ProjectsLocationsDnsAuthorizationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3923  	c.parent = parent
  3924  	c.dnsauthorization = dnsauthorization
  3925  	return c
  3926  }
  3927  
  3928  // DnsAuthorizationId sets the optional parameter "dnsAuthorizationId":
  3929  // Required. A user-provided name of the dns authorization.
  3930  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) DnsAuthorizationId(dnsAuthorizationId string) *ProjectsLocationsDnsAuthorizationsCreateCall {
  3931  	c.urlParams_.Set("dnsAuthorizationId", dnsAuthorizationId)
  3932  	return c
  3933  }
  3934  
  3935  // Fields allows partial responses to be retrieved. See
  3936  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3937  // details.
  3938  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsAuthorizationsCreateCall {
  3939  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3940  	return c
  3941  }
  3942  
  3943  // Context sets the context to be used in this call's Do method.
  3944  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDnsAuthorizationsCreateCall {
  3945  	c.ctx_ = ctx
  3946  	return c
  3947  }
  3948  
  3949  // Header returns a http.Header that can be modified by the caller to add
  3950  // headers to the request.
  3951  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) Header() http.Header {
  3952  	if c.header_ == nil {
  3953  		c.header_ = make(http.Header)
  3954  	}
  3955  	return c.header_
  3956  }
  3957  
  3958  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) doRequest(alt string) (*http.Response, error) {
  3959  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3960  	var body io.Reader = nil
  3961  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dnsauthorization)
  3962  	if err != nil {
  3963  		return nil, err
  3964  	}
  3965  	c.urlParams_.Set("alt", alt)
  3966  	c.urlParams_.Set("prettyPrint", "false")
  3967  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsAuthorizations")
  3968  	urls += "?" + c.urlParams_.Encode()
  3969  	req, err := http.NewRequest("POST", urls, body)
  3970  	if err != nil {
  3971  		return nil, err
  3972  	}
  3973  	req.Header = reqHeaders
  3974  	googleapi.Expand(req.URL, map[string]string{
  3975  		"parent": c.parent,
  3976  	})
  3977  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3978  }
  3979  
  3980  // Do executes the "certificatemanager.projects.locations.dnsAuthorizations.create" call.
  3981  // Any non-2xx status code is an error. Response headers are in either
  3982  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3983  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3984  // whether the returned error was because http.StatusNotModified was returned.
  3985  func (c *ProjectsLocationsDnsAuthorizationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3986  	gensupport.SetOptions(c.urlParams_, opts...)
  3987  	res, err := c.doRequest("json")
  3988  	if res != nil && res.StatusCode == http.StatusNotModified {
  3989  		if res.Body != nil {
  3990  			res.Body.Close()
  3991  		}
  3992  		return nil, gensupport.WrapError(&googleapi.Error{
  3993  			Code:   res.StatusCode,
  3994  			Header: res.Header,
  3995  		})
  3996  	}
  3997  	if err != nil {
  3998  		return nil, err
  3999  	}
  4000  	defer googleapi.CloseBody(res)
  4001  	if err := googleapi.CheckResponse(res); err != nil {
  4002  		return nil, gensupport.WrapError(err)
  4003  	}
  4004  	ret := &Operation{
  4005  		ServerResponse: googleapi.ServerResponse{
  4006  			Header:         res.Header,
  4007  			HTTPStatusCode: res.StatusCode,
  4008  		},
  4009  	}
  4010  	target := &ret
  4011  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4012  		return nil, err
  4013  	}
  4014  	return ret, nil
  4015  }
  4016  
  4017  type ProjectsLocationsDnsAuthorizationsDeleteCall struct {
  4018  	s          *Service
  4019  	name       string
  4020  	urlParams_ gensupport.URLParams
  4021  	ctx_       context.Context
  4022  	header_    http.Header
  4023  }
  4024  
  4025  // Delete: Deletes a single DnsAuthorization.
  4026  //
  4027  //   - name: A name of the dns authorization to delete. Must be in the format
  4028  //     `projects/*/locations/*/dnsAuthorizations/*`.
  4029  func (r *ProjectsLocationsDnsAuthorizationsService) Delete(name string) *ProjectsLocationsDnsAuthorizationsDeleteCall {
  4030  	c := &ProjectsLocationsDnsAuthorizationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4031  	c.name = name
  4032  	return c
  4033  }
  4034  
  4035  // Fields allows partial responses to be retrieved. See
  4036  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4037  // details.
  4038  func (c *ProjectsLocationsDnsAuthorizationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsAuthorizationsDeleteCall {
  4039  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4040  	return c
  4041  }
  4042  
  4043  // Context sets the context to be used in this call's Do method.
  4044  func (c *ProjectsLocationsDnsAuthorizationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDnsAuthorizationsDeleteCall {
  4045  	c.ctx_ = ctx
  4046  	return c
  4047  }
  4048  
  4049  // Header returns a http.Header that can be modified by the caller to add
  4050  // headers to the request.
  4051  func (c *ProjectsLocationsDnsAuthorizationsDeleteCall) Header() http.Header {
  4052  	if c.header_ == nil {
  4053  		c.header_ = make(http.Header)
  4054  	}
  4055  	return c.header_
  4056  }
  4057  
  4058  func (c *ProjectsLocationsDnsAuthorizationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4059  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4060  	var body io.Reader = nil
  4061  	c.urlParams_.Set("alt", alt)
  4062  	c.urlParams_.Set("prettyPrint", "false")
  4063  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4064  	urls += "?" + c.urlParams_.Encode()
  4065  	req, err := http.NewRequest("DELETE", urls, body)
  4066  	if err != nil {
  4067  		return nil, err
  4068  	}
  4069  	req.Header = reqHeaders
  4070  	googleapi.Expand(req.URL, map[string]string{
  4071  		"name": c.name,
  4072  	})
  4073  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4074  }
  4075  
  4076  // Do executes the "certificatemanager.projects.locations.dnsAuthorizations.delete" call.
  4077  // Any non-2xx status code is an error. Response headers are in either
  4078  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4079  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4080  // whether the returned error was because http.StatusNotModified was returned.
  4081  func (c *ProjectsLocationsDnsAuthorizationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4082  	gensupport.SetOptions(c.urlParams_, opts...)
  4083  	res, err := c.doRequest("json")
  4084  	if res != nil && res.StatusCode == http.StatusNotModified {
  4085  		if res.Body != nil {
  4086  			res.Body.Close()
  4087  		}
  4088  		return nil, gensupport.WrapError(&googleapi.Error{
  4089  			Code:   res.StatusCode,
  4090  			Header: res.Header,
  4091  		})
  4092  	}
  4093  	if err != nil {
  4094  		return nil, err
  4095  	}
  4096  	defer googleapi.CloseBody(res)
  4097  	if err := googleapi.CheckResponse(res); err != nil {
  4098  		return nil, gensupport.WrapError(err)
  4099  	}
  4100  	ret := &Operation{
  4101  		ServerResponse: googleapi.ServerResponse{
  4102  			Header:         res.Header,
  4103  			HTTPStatusCode: res.StatusCode,
  4104  		},
  4105  	}
  4106  	target := &ret
  4107  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4108  		return nil, err
  4109  	}
  4110  	return ret, nil
  4111  }
  4112  
  4113  type ProjectsLocationsDnsAuthorizationsGetCall struct {
  4114  	s            *Service
  4115  	name         string
  4116  	urlParams_   gensupport.URLParams
  4117  	ifNoneMatch_ string
  4118  	ctx_         context.Context
  4119  	header_      http.Header
  4120  }
  4121  
  4122  // Get: Gets details of a single DnsAuthorization.
  4123  //
  4124  //   - name: A name of the dns authorization to describe. Must be in the format
  4125  //     `projects/*/locations/*/dnsAuthorizations/*`.
  4126  func (r *ProjectsLocationsDnsAuthorizationsService) Get(name string) *ProjectsLocationsDnsAuthorizationsGetCall {
  4127  	c := &ProjectsLocationsDnsAuthorizationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4128  	c.name = name
  4129  	return c
  4130  }
  4131  
  4132  // Fields allows partial responses to be retrieved. See
  4133  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4134  // details.
  4135  func (c *ProjectsLocationsDnsAuthorizationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsAuthorizationsGetCall {
  4136  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4137  	return c
  4138  }
  4139  
  4140  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4141  // object's ETag matches the given value. This is useful for getting updates
  4142  // only after the object has changed since the last request.
  4143  func (c *ProjectsLocationsDnsAuthorizationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDnsAuthorizationsGetCall {
  4144  	c.ifNoneMatch_ = entityTag
  4145  	return c
  4146  }
  4147  
  4148  // Context sets the context to be used in this call's Do method.
  4149  func (c *ProjectsLocationsDnsAuthorizationsGetCall) Context(ctx context.Context) *ProjectsLocationsDnsAuthorizationsGetCall {
  4150  	c.ctx_ = ctx
  4151  	return c
  4152  }
  4153  
  4154  // Header returns a http.Header that can be modified by the caller to add
  4155  // headers to the request.
  4156  func (c *ProjectsLocationsDnsAuthorizationsGetCall) Header() http.Header {
  4157  	if c.header_ == nil {
  4158  		c.header_ = make(http.Header)
  4159  	}
  4160  	return c.header_
  4161  }
  4162  
  4163  func (c *ProjectsLocationsDnsAuthorizationsGetCall) doRequest(alt string) (*http.Response, error) {
  4164  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4165  	if c.ifNoneMatch_ != "" {
  4166  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4167  	}
  4168  	var body io.Reader = nil
  4169  	c.urlParams_.Set("alt", alt)
  4170  	c.urlParams_.Set("prettyPrint", "false")
  4171  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4172  	urls += "?" + c.urlParams_.Encode()
  4173  	req, err := http.NewRequest("GET", urls, body)
  4174  	if err != nil {
  4175  		return nil, err
  4176  	}
  4177  	req.Header = reqHeaders
  4178  	googleapi.Expand(req.URL, map[string]string{
  4179  		"name": c.name,
  4180  	})
  4181  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4182  }
  4183  
  4184  // Do executes the "certificatemanager.projects.locations.dnsAuthorizations.get" call.
  4185  // Any non-2xx status code is an error. Response headers are in either
  4186  // *DnsAuthorization.ServerResponse.Header or (if a response was returned at
  4187  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4188  // check whether the returned error was because http.StatusNotModified was
  4189  // returned.
  4190  func (c *ProjectsLocationsDnsAuthorizationsGetCall) Do(opts ...googleapi.CallOption) (*DnsAuthorization, error) {
  4191  	gensupport.SetOptions(c.urlParams_, opts...)
  4192  	res, err := c.doRequest("json")
  4193  	if res != nil && res.StatusCode == http.StatusNotModified {
  4194  		if res.Body != nil {
  4195  			res.Body.Close()
  4196  		}
  4197  		return nil, gensupport.WrapError(&googleapi.Error{
  4198  			Code:   res.StatusCode,
  4199  			Header: res.Header,
  4200  		})
  4201  	}
  4202  	if err != nil {
  4203  		return nil, err
  4204  	}
  4205  	defer googleapi.CloseBody(res)
  4206  	if err := googleapi.CheckResponse(res); err != nil {
  4207  		return nil, gensupport.WrapError(err)
  4208  	}
  4209  	ret := &DnsAuthorization{
  4210  		ServerResponse: googleapi.ServerResponse{
  4211  			Header:         res.Header,
  4212  			HTTPStatusCode: res.StatusCode,
  4213  		},
  4214  	}
  4215  	target := &ret
  4216  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4217  		return nil, err
  4218  	}
  4219  	return ret, nil
  4220  }
  4221  
  4222  type ProjectsLocationsDnsAuthorizationsListCall struct {
  4223  	s            *Service
  4224  	parent       string
  4225  	urlParams_   gensupport.URLParams
  4226  	ifNoneMatch_ string
  4227  	ctx_         context.Context
  4228  	header_      http.Header
  4229  }
  4230  
  4231  // List: Lists DnsAuthorizations in a given project and location.
  4232  //
  4233  //   - parent: The project and location from which the dns authorizations should
  4234  //     be listed, specified in the format `projects/*/locations/*`.
  4235  func (r *ProjectsLocationsDnsAuthorizationsService) List(parent string) *ProjectsLocationsDnsAuthorizationsListCall {
  4236  	c := &ProjectsLocationsDnsAuthorizationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4237  	c.parent = parent
  4238  	return c
  4239  }
  4240  
  4241  // Filter sets the optional parameter "filter": Filter expression to restrict
  4242  // the Dns Authorizations returned.
  4243  func (c *ProjectsLocationsDnsAuthorizationsListCall) Filter(filter string) *ProjectsLocationsDnsAuthorizationsListCall {
  4244  	c.urlParams_.Set("filter", filter)
  4245  	return c
  4246  }
  4247  
  4248  // OrderBy sets the optional parameter "orderBy": A list of Dns Authorization
  4249  // field names used to specify the order of the returned results. The default
  4250  // sorting order is ascending. To specify descending order for a field, add a
  4251  // suffix " desc".
  4252  func (c *ProjectsLocationsDnsAuthorizationsListCall) OrderBy(orderBy string) *ProjectsLocationsDnsAuthorizationsListCall {
  4253  	c.urlParams_.Set("orderBy", orderBy)
  4254  	return c
  4255  }
  4256  
  4257  // PageSize sets the optional parameter "pageSize": Maximum number of dns
  4258  // authorizations to return per call.
  4259  func (c *ProjectsLocationsDnsAuthorizationsListCall) PageSize(pageSize int64) *ProjectsLocationsDnsAuthorizationsListCall {
  4260  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4261  	return c
  4262  }
  4263  
  4264  // PageToken sets the optional parameter "pageToken": The value returned by the
  4265  // last `ListDnsAuthorizationsResponse`. Indicates that this is a continuation
  4266  // of a prior `ListDnsAuthorizations` call, and that the system should return
  4267  // the next page of data.
  4268  func (c *ProjectsLocationsDnsAuthorizationsListCall) PageToken(pageToken string) *ProjectsLocationsDnsAuthorizationsListCall {
  4269  	c.urlParams_.Set("pageToken", pageToken)
  4270  	return c
  4271  }
  4272  
  4273  // Fields allows partial responses to be retrieved. See
  4274  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4275  // details.
  4276  func (c *ProjectsLocationsDnsAuthorizationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsAuthorizationsListCall {
  4277  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4278  	return c
  4279  }
  4280  
  4281  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4282  // object's ETag matches the given value. This is useful for getting updates
  4283  // only after the object has changed since the last request.
  4284  func (c *ProjectsLocationsDnsAuthorizationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDnsAuthorizationsListCall {
  4285  	c.ifNoneMatch_ = entityTag
  4286  	return c
  4287  }
  4288  
  4289  // Context sets the context to be used in this call's Do method.
  4290  func (c *ProjectsLocationsDnsAuthorizationsListCall) Context(ctx context.Context) *ProjectsLocationsDnsAuthorizationsListCall {
  4291  	c.ctx_ = ctx
  4292  	return c
  4293  }
  4294  
  4295  // Header returns a http.Header that can be modified by the caller to add
  4296  // headers to the request.
  4297  func (c *ProjectsLocationsDnsAuthorizationsListCall) Header() http.Header {
  4298  	if c.header_ == nil {
  4299  		c.header_ = make(http.Header)
  4300  	}
  4301  	return c.header_
  4302  }
  4303  
  4304  func (c *ProjectsLocationsDnsAuthorizationsListCall) doRequest(alt string) (*http.Response, error) {
  4305  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4306  	if c.ifNoneMatch_ != "" {
  4307  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4308  	}
  4309  	var body io.Reader = nil
  4310  	c.urlParams_.Set("alt", alt)
  4311  	c.urlParams_.Set("prettyPrint", "false")
  4312  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dnsAuthorizations")
  4313  	urls += "?" + c.urlParams_.Encode()
  4314  	req, err := http.NewRequest("GET", urls, body)
  4315  	if err != nil {
  4316  		return nil, err
  4317  	}
  4318  	req.Header = reqHeaders
  4319  	googleapi.Expand(req.URL, map[string]string{
  4320  		"parent": c.parent,
  4321  	})
  4322  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4323  }
  4324  
  4325  // Do executes the "certificatemanager.projects.locations.dnsAuthorizations.list" call.
  4326  // Any non-2xx status code is an error. Response headers are in either
  4327  // *ListDnsAuthorizationsResponse.ServerResponse.Header or (if a response was
  4328  // returned at all) in error.(*googleapi.Error).Header. Use
  4329  // googleapi.IsNotModified to check whether the returned error was because
  4330  // http.StatusNotModified was returned.
  4331  func (c *ProjectsLocationsDnsAuthorizationsListCall) Do(opts ...googleapi.CallOption) (*ListDnsAuthorizationsResponse, error) {
  4332  	gensupport.SetOptions(c.urlParams_, opts...)
  4333  	res, err := c.doRequest("json")
  4334  	if res != nil && res.StatusCode == http.StatusNotModified {
  4335  		if res.Body != nil {
  4336  			res.Body.Close()
  4337  		}
  4338  		return nil, gensupport.WrapError(&googleapi.Error{
  4339  			Code:   res.StatusCode,
  4340  			Header: res.Header,
  4341  		})
  4342  	}
  4343  	if err != nil {
  4344  		return nil, err
  4345  	}
  4346  	defer googleapi.CloseBody(res)
  4347  	if err := googleapi.CheckResponse(res); err != nil {
  4348  		return nil, gensupport.WrapError(err)
  4349  	}
  4350  	ret := &ListDnsAuthorizationsResponse{
  4351  		ServerResponse: googleapi.ServerResponse{
  4352  			Header:         res.Header,
  4353  			HTTPStatusCode: res.StatusCode,
  4354  		},
  4355  	}
  4356  	target := &ret
  4357  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4358  		return nil, err
  4359  	}
  4360  	return ret, nil
  4361  }
  4362  
  4363  // Pages invokes f for each page of results.
  4364  // A non-nil error returned from f will halt the iteration.
  4365  // The provided context supersedes any context provided to the Context method.
  4366  func (c *ProjectsLocationsDnsAuthorizationsListCall) Pages(ctx context.Context, f func(*ListDnsAuthorizationsResponse) error) error {
  4367  	c.ctx_ = ctx
  4368  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4369  	for {
  4370  		x, err := c.Do()
  4371  		if err != nil {
  4372  			return err
  4373  		}
  4374  		if err := f(x); err != nil {
  4375  			return err
  4376  		}
  4377  		if x.NextPageToken == "" {
  4378  			return nil
  4379  		}
  4380  		c.PageToken(x.NextPageToken)
  4381  	}
  4382  }
  4383  
  4384  type ProjectsLocationsDnsAuthorizationsPatchCall struct {
  4385  	s                *Service
  4386  	name             string
  4387  	dnsauthorization *DnsAuthorization
  4388  	urlParams_       gensupport.URLParams
  4389  	ctx_             context.Context
  4390  	header_          http.Header
  4391  }
  4392  
  4393  // Patch: Updates a DnsAuthorization.
  4394  //
  4395  //   - name: A user-defined name of the dns authorization. DnsAuthorization names
  4396  //     must be unique globally and match pattern
  4397  //     `projects/*/locations/*/dnsAuthorizations/*`.
  4398  func (r *ProjectsLocationsDnsAuthorizationsService) Patch(name string, dnsauthorization *DnsAuthorization) *ProjectsLocationsDnsAuthorizationsPatchCall {
  4399  	c := &ProjectsLocationsDnsAuthorizationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4400  	c.name = name
  4401  	c.dnsauthorization = dnsauthorization
  4402  	return c
  4403  }
  4404  
  4405  // UpdateMask sets the optional parameter "updateMask": Required. The update
  4406  // mask applies to the resource. For the `FieldMask` definition, see
  4407  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
  4408  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDnsAuthorizationsPatchCall {
  4409  	c.urlParams_.Set("updateMask", updateMask)
  4410  	return c
  4411  }
  4412  
  4413  // Fields allows partial responses to be retrieved. See
  4414  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4415  // details.
  4416  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDnsAuthorizationsPatchCall {
  4417  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4418  	return c
  4419  }
  4420  
  4421  // Context sets the context to be used in this call's Do method.
  4422  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDnsAuthorizationsPatchCall {
  4423  	c.ctx_ = ctx
  4424  	return c
  4425  }
  4426  
  4427  // Header returns a http.Header that can be modified by the caller to add
  4428  // headers to the request.
  4429  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) Header() http.Header {
  4430  	if c.header_ == nil {
  4431  		c.header_ = make(http.Header)
  4432  	}
  4433  	return c.header_
  4434  }
  4435  
  4436  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) doRequest(alt string) (*http.Response, error) {
  4437  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4438  	var body io.Reader = nil
  4439  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.dnsauthorization)
  4440  	if err != nil {
  4441  		return nil, err
  4442  	}
  4443  	c.urlParams_.Set("alt", alt)
  4444  	c.urlParams_.Set("prettyPrint", "false")
  4445  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4446  	urls += "?" + c.urlParams_.Encode()
  4447  	req, err := http.NewRequest("PATCH", urls, body)
  4448  	if err != nil {
  4449  		return nil, err
  4450  	}
  4451  	req.Header = reqHeaders
  4452  	googleapi.Expand(req.URL, map[string]string{
  4453  		"name": c.name,
  4454  	})
  4455  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4456  }
  4457  
  4458  // Do executes the "certificatemanager.projects.locations.dnsAuthorizations.patch" call.
  4459  // Any non-2xx status code is an error. Response headers are in either
  4460  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4461  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4462  // whether the returned error was because http.StatusNotModified was returned.
  4463  func (c *ProjectsLocationsDnsAuthorizationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4464  	gensupport.SetOptions(c.urlParams_, opts...)
  4465  	res, err := c.doRequest("json")
  4466  	if res != nil && res.StatusCode == http.StatusNotModified {
  4467  		if res.Body != nil {
  4468  			res.Body.Close()
  4469  		}
  4470  		return nil, gensupport.WrapError(&googleapi.Error{
  4471  			Code:   res.StatusCode,
  4472  			Header: res.Header,
  4473  		})
  4474  	}
  4475  	if err != nil {
  4476  		return nil, err
  4477  	}
  4478  	defer googleapi.CloseBody(res)
  4479  	if err := googleapi.CheckResponse(res); err != nil {
  4480  		return nil, gensupport.WrapError(err)
  4481  	}
  4482  	ret := &Operation{
  4483  		ServerResponse: googleapi.ServerResponse{
  4484  			Header:         res.Header,
  4485  			HTTPStatusCode: res.StatusCode,
  4486  		},
  4487  	}
  4488  	target := &ret
  4489  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4490  		return nil, err
  4491  	}
  4492  	return ret, nil
  4493  }
  4494  
  4495  type ProjectsLocationsOperationsCancelCall struct {
  4496  	s                      *Service
  4497  	name                   string
  4498  	canceloperationrequest *CancelOperationRequest
  4499  	urlParams_             gensupport.URLParams
  4500  	ctx_                   context.Context
  4501  	header_                http.Header
  4502  }
  4503  
  4504  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4505  // server makes a best effort to cancel the operation, but success is not
  4506  // guaranteed. If the server doesn't support this method, it returns
  4507  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4508  // other methods to check whether the cancellation succeeded or whether the
  4509  // operation completed despite cancellation. On successful cancellation, the
  4510  // operation is not deleted; instead, it becomes an operation with an
  4511  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4512  // `Code.CANCELLED`.
  4513  //
  4514  // - name: The name of the operation resource to be cancelled.
  4515  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  4516  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4517  	c.name = name
  4518  	c.canceloperationrequest = canceloperationrequest
  4519  	return c
  4520  }
  4521  
  4522  // Fields allows partial responses to be retrieved. See
  4523  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4524  // details.
  4525  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  4526  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4527  	return c
  4528  }
  4529  
  4530  // Context sets the context to be used in this call's Do method.
  4531  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  4532  	c.ctx_ = ctx
  4533  	return c
  4534  }
  4535  
  4536  // Header returns a http.Header that can be modified by the caller to add
  4537  // headers to the request.
  4538  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  4539  	if c.header_ == nil {
  4540  		c.header_ = make(http.Header)
  4541  	}
  4542  	return c.header_
  4543  }
  4544  
  4545  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4546  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4547  	var body io.Reader = nil
  4548  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  4549  	if err != nil {
  4550  		return nil, err
  4551  	}
  4552  	c.urlParams_.Set("alt", alt)
  4553  	c.urlParams_.Set("prettyPrint", "false")
  4554  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  4555  	urls += "?" + c.urlParams_.Encode()
  4556  	req, err := http.NewRequest("POST", urls, body)
  4557  	if err != nil {
  4558  		return nil, err
  4559  	}
  4560  	req.Header = reqHeaders
  4561  	googleapi.Expand(req.URL, map[string]string{
  4562  		"name": c.name,
  4563  	})
  4564  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4565  }
  4566  
  4567  // Do executes the "certificatemanager.projects.locations.operations.cancel" call.
  4568  // Any non-2xx status code is an error. Response headers are in either
  4569  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4570  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4571  // whether the returned error was because http.StatusNotModified was returned.
  4572  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4573  	gensupport.SetOptions(c.urlParams_, opts...)
  4574  	res, err := c.doRequest("json")
  4575  	if res != nil && res.StatusCode == http.StatusNotModified {
  4576  		if res.Body != nil {
  4577  			res.Body.Close()
  4578  		}
  4579  		return nil, gensupport.WrapError(&googleapi.Error{
  4580  			Code:   res.StatusCode,
  4581  			Header: res.Header,
  4582  		})
  4583  	}
  4584  	if err != nil {
  4585  		return nil, err
  4586  	}
  4587  	defer googleapi.CloseBody(res)
  4588  	if err := googleapi.CheckResponse(res); err != nil {
  4589  		return nil, gensupport.WrapError(err)
  4590  	}
  4591  	ret := &Empty{
  4592  		ServerResponse: googleapi.ServerResponse{
  4593  			Header:         res.Header,
  4594  			HTTPStatusCode: res.StatusCode,
  4595  		},
  4596  	}
  4597  	target := &ret
  4598  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4599  		return nil, err
  4600  	}
  4601  	return ret, nil
  4602  }
  4603  
  4604  type ProjectsLocationsOperationsDeleteCall struct {
  4605  	s          *Service
  4606  	name       string
  4607  	urlParams_ gensupport.URLParams
  4608  	ctx_       context.Context
  4609  	header_    http.Header
  4610  }
  4611  
  4612  // Delete: Deletes a long-running operation. This method indicates that the
  4613  // client is no longer interested in the operation result. It does not cancel
  4614  // the operation. If the server doesn't support this method, it returns
  4615  // `google.rpc.Code.UNIMPLEMENTED`.
  4616  //
  4617  // - name: The name of the operation resource to be deleted.
  4618  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  4619  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4620  	c.name = name
  4621  	return c
  4622  }
  4623  
  4624  // Fields allows partial responses to be retrieved. See
  4625  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4626  // details.
  4627  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  4628  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4629  	return c
  4630  }
  4631  
  4632  // Context sets the context to be used in this call's Do method.
  4633  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  4634  	c.ctx_ = ctx
  4635  	return c
  4636  }
  4637  
  4638  // Header returns a http.Header that can be modified by the caller to add
  4639  // headers to the request.
  4640  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  4641  	if c.header_ == nil {
  4642  		c.header_ = make(http.Header)
  4643  	}
  4644  	return c.header_
  4645  }
  4646  
  4647  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4648  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4649  	var body io.Reader = nil
  4650  	c.urlParams_.Set("alt", alt)
  4651  	c.urlParams_.Set("prettyPrint", "false")
  4652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4653  	urls += "?" + c.urlParams_.Encode()
  4654  	req, err := http.NewRequest("DELETE", urls, body)
  4655  	if err != nil {
  4656  		return nil, err
  4657  	}
  4658  	req.Header = reqHeaders
  4659  	googleapi.Expand(req.URL, map[string]string{
  4660  		"name": c.name,
  4661  	})
  4662  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4663  }
  4664  
  4665  // Do executes the "certificatemanager.projects.locations.operations.delete" call.
  4666  // Any non-2xx status code is an error. Response headers are in either
  4667  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4668  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4669  // whether the returned error was because http.StatusNotModified was returned.
  4670  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4671  	gensupport.SetOptions(c.urlParams_, opts...)
  4672  	res, err := c.doRequest("json")
  4673  	if res != nil && res.StatusCode == http.StatusNotModified {
  4674  		if res.Body != nil {
  4675  			res.Body.Close()
  4676  		}
  4677  		return nil, gensupport.WrapError(&googleapi.Error{
  4678  			Code:   res.StatusCode,
  4679  			Header: res.Header,
  4680  		})
  4681  	}
  4682  	if err != nil {
  4683  		return nil, err
  4684  	}
  4685  	defer googleapi.CloseBody(res)
  4686  	if err := googleapi.CheckResponse(res); err != nil {
  4687  		return nil, gensupport.WrapError(err)
  4688  	}
  4689  	ret := &Empty{
  4690  		ServerResponse: googleapi.ServerResponse{
  4691  			Header:         res.Header,
  4692  			HTTPStatusCode: res.StatusCode,
  4693  		},
  4694  	}
  4695  	target := &ret
  4696  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4697  		return nil, err
  4698  	}
  4699  	return ret, nil
  4700  }
  4701  
  4702  type ProjectsLocationsOperationsGetCall struct {
  4703  	s            *Service
  4704  	name         string
  4705  	urlParams_   gensupport.URLParams
  4706  	ifNoneMatch_ string
  4707  	ctx_         context.Context
  4708  	header_      http.Header
  4709  }
  4710  
  4711  // Get: Gets the latest state of a long-running operation. Clients can use this
  4712  // method to poll the operation result at intervals as recommended by the API
  4713  // service.
  4714  //
  4715  // - name: The name of the operation resource.
  4716  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  4717  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4718  	c.name = name
  4719  	return c
  4720  }
  4721  
  4722  // Fields allows partial responses to be retrieved. See
  4723  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4724  // details.
  4725  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  4726  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4727  	return c
  4728  }
  4729  
  4730  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4731  // object's ETag matches the given value. This is useful for getting updates
  4732  // only after the object has changed since the last request.
  4733  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  4734  	c.ifNoneMatch_ = entityTag
  4735  	return c
  4736  }
  4737  
  4738  // Context sets the context to be used in this call's Do method.
  4739  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  4740  	c.ctx_ = ctx
  4741  	return c
  4742  }
  4743  
  4744  // Header returns a http.Header that can be modified by the caller to add
  4745  // headers to the request.
  4746  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  4747  	if c.header_ == nil {
  4748  		c.header_ = make(http.Header)
  4749  	}
  4750  	return c.header_
  4751  }
  4752  
  4753  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4754  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4755  	if c.ifNoneMatch_ != "" {
  4756  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4757  	}
  4758  	var body io.Reader = nil
  4759  	c.urlParams_.Set("alt", alt)
  4760  	c.urlParams_.Set("prettyPrint", "false")
  4761  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4762  	urls += "?" + c.urlParams_.Encode()
  4763  	req, err := http.NewRequest("GET", urls, body)
  4764  	if err != nil {
  4765  		return nil, err
  4766  	}
  4767  	req.Header = reqHeaders
  4768  	googleapi.Expand(req.URL, map[string]string{
  4769  		"name": c.name,
  4770  	})
  4771  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4772  }
  4773  
  4774  // Do executes the "certificatemanager.projects.locations.operations.get" call.
  4775  // Any non-2xx status code is an error. Response headers are in either
  4776  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4777  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4778  // whether the returned error was because http.StatusNotModified was returned.
  4779  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4780  	gensupport.SetOptions(c.urlParams_, opts...)
  4781  	res, err := c.doRequest("json")
  4782  	if res != nil && res.StatusCode == http.StatusNotModified {
  4783  		if res.Body != nil {
  4784  			res.Body.Close()
  4785  		}
  4786  		return nil, gensupport.WrapError(&googleapi.Error{
  4787  			Code:   res.StatusCode,
  4788  			Header: res.Header,
  4789  		})
  4790  	}
  4791  	if err != nil {
  4792  		return nil, err
  4793  	}
  4794  	defer googleapi.CloseBody(res)
  4795  	if err := googleapi.CheckResponse(res); err != nil {
  4796  		return nil, gensupport.WrapError(err)
  4797  	}
  4798  	ret := &Operation{
  4799  		ServerResponse: googleapi.ServerResponse{
  4800  			Header:         res.Header,
  4801  			HTTPStatusCode: res.StatusCode,
  4802  		},
  4803  	}
  4804  	target := &ret
  4805  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4806  		return nil, err
  4807  	}
  4808  	return ret, nil
  4809  }
  4810  
  4811  type ProjectsLocationsOperationsListCall struct {
  4812  	s            *Service
  4813  	name         string
  4814  	urlParams_   gensupport.URLParams
  4815  	ifNoneMatch_ string
  4816  	ctx_         context.Context
  4817  	header_      http.Header
  4818  }
  4819  
  4820  // List: Lists operations that match the specified filter in the request. If
  4821  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4822  //
  4823  // - name: The name of the operation's parent resource.
  4824  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  4825  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4826  	c.name = name
  4827  	return c
  4828  }
  4829  
  4830  // Filter sets the optional parameter "filter": The standard list filter.
  4831  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  4832  	c.urlParams_.Set("filter", filter)
  4833  	return c
  4834  }
  4835  
  4836  // PageSize sets the optional parameter "pageSize": The standard list page
  4837  // size.
  4838  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  4839  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4840  	return c
  4841  }
  4842  
  4843  // PageToken sets the optional parameter "pageToken": The standard list page
  4844  // token.
  4845  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  4846  	c.urlParams_.Set("pageToken", pageToken)
  4847  	return c
  4848  }
  4849  
  4850  // Fields allows partial responses to be retrieved. See
  4851  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4852  // details.
  4853  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  4854  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4855  	return c
  4856  }
  4857  
  4858  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4859  // object's ETag matches the given value. This is useful for getting updates
  4860  // only after the object has changed since the last request.
  4861  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  4862  	c.ifNoneMatch_ = entityTag
  4863  	return c
  4864  }
  4865  
  4866  // Context sets the context to be used in this call's Do method.
  4867  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  4868  	c.ctx_ = ctx
  4869  	return c
  4870  }
  4871  
  4872  // Header returns a http.Header that can be modified by the caller to add
  4873  // headers to the request.
  4874  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  4875  	if c.header_ == nil {
  4876  		c.header_ = make(http.Header)
  4877  	}
  4878  	return c.header_
  4879  }
  4880  
  4881  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4882  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4883  	if c.ifNoneMatch_ != "" {
  4884  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4885  	}
  4886  	var body io.Reader = nil
  4887  	c.urlParams_.Set("alt", alt)
  4888  	c.urlParams_.Set("prettyPrint", "false")
  4889  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  4890  	urls += "?" + c.urlParams_.Encode()
  4891  	req, err := http.NewRequest("GET", urls, body)
  4892  	if err != nil {
  4893  		return nil, err
  4894  	}
  4895  	req.Header = reqHeaders
  4896  	googleapi.Expand(req.URL, map[string]string{
  4897  		"name": c.name,
  4898  	})
  4899  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4900  }
  4901  
  4902  // Do executes the "certificatemanager.projects.locations.operations.list" call.
  4903  // Any non-2xx status code is an error. Response headers are in either
  4904  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  4905  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4906  // check whether the returned error was because http.StatusNotModified was
  4907  // returned.
  4908  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  4909  	gensupport.SetOptions(c.urlParams_, opts...)
  4910  	res, err := c.doRequest("json")
  4911  	if res != nil && res.StatusCode == http.StatusNotModified {
  4912  		if res.Body != nil {
  4913  			res.Body.Close()
  4914  		}
  4915  		return nil, gensupport.WrapError(&googleapi.Error{
  4916  			Code:   res.StatusCode,
  4917  			Header: res.Header,
  4918  		})
  4919  	}
  4920  	if err != nil {
  4921  		return nil, err
  4922  	}
  4923  	defer googleapi.CloseBody(res)
  4924  	if err := googleapi.CheckResponse(res); err != nil {
  4925  		return nil, gensupport.WrapError(err)
  4926  	}
  4927  	ret := &ListOperationsResponse{
  4928  		ServerResponse: googleapi.ServerResponse{
  4929  			Header:         res.Header,
  4930  			HTTPStatusCode: res.StatusCode,
  4931  		},
  4932  	}
  4933  	target := &ret
  4934  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4935  		return nil, err
  4936  	}
  4937  	return ret, nil
  4938  }
  4939  
  4940  // Pages invokes f for each page of results.
  4941  // A non-nil error returned from f will halt the iteration.
  4942  // The provided context supersedes any context provided to the Context method.
  4943  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  4944  	c.ctx_ = ctx
  4945  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4946  	for {
  4947  		x, err := c.Do()
  4948  		if err != nil {
  4949  			return err
  4950  		}
  4951  		if err := f(x); err != nil {
  4952  			return err
  4953  		}
  4954  		if x.NextPageToken == "" {
  4955  			return nil
  4956  		}
  4957  		c.PageToken(x.NextPageToken)
  4958  	}
  4959  }
  4960  
  4961  type ProjectsLocationsTrustConfigsCreateCall struct {
  4962  	s           *Service
  4963  	parent      string
  4964  	trustconfig *TrustConfig
  4965  	urlParams_  gensupport.URLParams
  4966  	ctx_        context.Context
  4967  	header_     http.Header
  4968  }
  4969  
  4970  // Create: Creates a new TrustConfig in a given project and location.
  4971  //
  4972  //   - parent: The parent resource of the TrustConfig. Must be in the format
  4973  //     `projects/*/locations/*`.
  4974  func (r *ProjectsLocationsTrustConfigsService) Create(parent string, trustconfig *TrustConfig) *ProjectsLocationsTrustConfigsCreateCall {
  4975  	c := &ProjectsLocationsTrustConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4976  	c.parent = parent
  4977  	c.trustconfig = trustconfig
  4978  	return c
  4979  }
  4980  
  4981  // TrustConfigId sets the optional parameter "trustConfigId": Required. A
  4982  // user-provided name of the TrustConfig. Must match the regexp
  4983  // `[a-z0-9-]{1,63}`.
  4984  func (c *ProjectsLocationsTrustConfigsCreateCall) TrustConfigId(trustConfigId string) *ProjectsLocationsTrustConfigsCreateCall {
  4985  	c.urlParams_.Set("trustConfigId", trustConfigId)
  4986  	return c
  4987  }
  4988  
  4989  // Fields allows partial responses to be retrieved. See
  4990  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4991  // details.
  4992  func (c *ProjectsLocationsTrustConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsCreateCall {
  4993  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4994  	return c
  4995  }
  4996  
  4997  // Context sets the context to be used in this call's Do method.
  4998  func (c *ProjectsLocationsTrustConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsCreateCall {
  4999  	c.ctx_ = ctx
  5000  	return c
  5001  }
  5002  
  5003  // Header returns a http.Header that can be modified by the caller to add
  5004  // headers to the request.
  5005  func (c *ProjectsLocationsTrustConfigsCreateCall) Header() http.Header {
  5006  	if c.header_ == nil {
  5007  		c.header_ = make(http.Header)
  5008  	}
  5009  	return c.header_
  5010  }
  5011  
  5012  func (c *ProjectsLocationsTrustConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  5013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5014  	var body io.Reader = nil
  5015  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.trustconfig)
  5016  	if err != nil {
  5017  		return nil, err
  5018  	}
  5019  	c.urlParams_.Set("alt", alt)
  5020  	c.urlParams_.Set("prettyPrint", "false")
  5021  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trustConfigs")
  5022  	urls += "?" + c.urlParams_.Encode()
  5023  	req, err := http.NewRequest("POST", urls, body)
  5024  	if err != nil {
  5025  		return nil, err
  5026  	}
  5027  	req.Header = reqHeaders
  5028  	googleapi.Expand(req.URL, map[string]string{
  5029  		"parent": c.parent,
  5030  	})
  5031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5032  }
  5033  
  5034  // Do executes the "certificatemanager.projects.locations.trustConfigs.create" call.
  5035  // Any non-2xx status code is an error. Response headers are in either
  5036  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5037  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5038  // whether the returned error was because http.StatusNotModified was returned.
  5039  func (c *ProjectsLocationsTrustConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5040  	gensupport.SetOptions(c.urlParams_, opts...)
  5041  	res, err := c.doRequest("json")
  5042  	if res != nil && res.StatusCode == http.StatusNotModified {
  5043  		if res.Body != nil {
  5044  			res.Body.Close()
  5045  		}
  5046  		return nil, gensupport.WrapError(&googleapi.Error{
  5047  			Code:   res.StatusCode,
  5048  			Header: res.Header,
  5049  		})
  5050  	}
  5051  	if err != nil {
  5052  		return nil, err
  5053  	}
  5054  	defer googleapi.CloseBody(res)
  5055  	if err := googleapi.CheckResponse(res); err != nil {
  5056  		return nil, gensupport.WrapError(err)
  5057  	}
  5058  	ret := &Operation{
  5059  		ServerResponse: googleapi.ServerResponse{
  5060  			Header:         res.Header,
  5061  			HTTPStatusCode: res.StatusCode,
  5062  		},
  5063  	}
  5064  	target := &ret
  5065  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5066  		return nil, err
  5067  	}
  5068  	return ret, nil
  5069  }
  5070  
  5071  type ProjectsLocationsTrustConfigsDeleteCall struct {
  5072  	s          *Service
  5073  	name       string
  5074  	urlParams_ gensupport.URLParams
  5075  	ctx_       context.Context
  5076  	header_    http.Header
  5077  }
  5078  
  5079  // Delete: Deletes a single TrustConfig.
  5080  //
  5081  //   - name: A name of the TrustConfig to delete. Must be in the format
  5082  //     `projects/*/locations/*/trustConfigs/*`.
  5083  func (r *ProjectsLocationsTrustConfigsService) Delete(name string) *ProjectsLocationsTrustConfigsDeleteCall {
  5084  	c := &ProjectsLocationsTrustConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5085  	c.name = name
  5086  	return c
  5087  }
  5088  
  5089  // Etag sets the optional parameter "etag": The current etag of the
  5090  // TrustConfig. If an etag is provided and does not match the current etag of
  5091  // the resource, deletion will be blocked and an ABORTED error will be
  5092  // returned.
  5093  func (c *ProjectsLocationsTrustConfigsDeleteCall) Etag(etag string) *ProjectsLocationsTrustConfigsDeleteCall {
  5094  	c.urlParams_.Set("etag", etag)
  5095  	return c
  5096  }
  5097  
  5098  // Fields allows partial responses to be retrieved. See
  5099  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5100  // details.
  5101  func (c *ProjectsLocationsTrustConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsDeleteCall {
  5102  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5103  	return c
  5104  }
  5105  
  5106  // Context sets the context to be used in this call's Do method.
  5107  func (c *ProjectsLocationsTrustConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsDeleteCall {
  5108  	c.ctx_ = ctx
  5109  	return c
  5110  }
  5111  
  5112  // Header returns a http.Header that can be modified by the caller to add
  5113  // headers to the request.
  5114  func (c *ProjectsLocationsTrustConfigsDeleteCall) Header() http.Header {
  5115  	if c.header_ == nil {
  5116  		c.header_ = make(http.Header)
  5117  	}
  5118  	return c.header_
  5119  }
  5120  
  5121  func (c *ProjectsLocationsTrustConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5122  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5123  	var body io.Reader = nil
  5124  	c.urlParams_.Set("alt", alt)
  5125  	c.urlParams_.Set("prettyPrint", "false")
  5126  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5127  	urls += "?" + c.urlParams_.Encode()
  5128  	req, err := http.NewRequest("DELETE", urls, body)
  5129  	if err != nil {
  5130  		return nil, err
  5131  	}
  5132  	req.Header = reqHeaders
  5133  	googleapi.Expand(req.URL, map[string]string{
  5134  		"name": c.name,
  5135  	})
  5136  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5137  }
  5138  
  5139  // Do executes the "certificatemanager.projects.locations.trustConfigs.delete" call.
  5140  // Any non-2xx status code is an error. Response headers are in either
  5141  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5142  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5143  // whether the returned error was because http.StatusNotModified was returned.
  5144  func (c *ProjectsLocationsTrustConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5145  	gensupport.SetOptions(c.urlParams_, opts...)
  5146  	res, err := c.doRequest("json")
  5147  	if res != nil && res.StatusCode == http.StatusNotModified {
  5148  		if res.Body != nil {
  5149  			res.Body.Close()
  5150  		}
  5151  		return nil, gensupport.WrapError(&googleapi.Error{
  5152  			Code:   res.StatusCode,
  5153  			Header: res.Header,
  5154  		})
  5155  	}
  5156  	if err != nil {
  5157  		return nil, err
  5158  	}
  5159  	defer googleapi.CloseBody(res)
  5160  	if err := googleapi.CheckResponse(res); err != nil {
  5161  		return nil, gensupport.WrapError(err)
  5162  	}
  5163  	ret := &Operation{
  5164  		ServerResponse: googleapi.ServerResponse{
  5165  			Header:         res.Header,
  5166  			HTTPStatusCode: res.StatusCode,
  5167  		},
  5168  	}
  5169  	target := &ret
  5170  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5171  		return nil, err
  5172  	}
  5173  	return ret, nil
  5174  }
  5175  
  5176  type ProjectsLocationsTrustConfigsGetCall struct {
  5177  	s            *Service
  5178  	name         string
  5179  	urlParams_   gensupport.URLParams
  5180  	ifNoneMatch_ string
  5181  	ctx_         context.Context
  5182  	header_      http.Header
  5183  }
  5184  
  5185  // Get: Gets details of a single TrustConfig.
  5186  //
  5187  //   - name: A name of the TrustConfig to describe. Must be in the format
  5188  //     `projects/*/locations/*/trustConfigs/*`.
  5189  func (r *ProjectsLocationsTrustConfigsService) Get(name string) *ProjectsLocationsTrustConfigsGetCall {
  5190  	c := &ProjectsLocationsTrustConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5191  	c.name = name
  5192  	return c
  5193  }
  5194  
  5195  // Fields allows partial responses to be retrieved. See
  5196  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5197  // details.
  5198  func (c *ProjectsLocationsTrustConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsGetCall {
  5199  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5200  	return c
  5201  }
  5202  
  5203  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5204  // object's ETag matches the given value. This is useful for getting updates
  5205  // only after the object has changed since the last request.
  5206  func (c *ProjectsLocationsTrustConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTrustConfigsGetCall {
  5207  	c.ifNoneMatch_ = entityTag
  5208  	return c
  5209  }
  5210  
  5211  // Context sets the context to be used in this call's Do method.
  5212  func (c *ProjectsLocationsTrustConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsGetCall {
  5213  	c.ctx_ = ctx
  5214  	return c
  5215  }
  5216  
  5217  // Header returns a http.Header that can be modified by the caller to add
  5218  // headers to the request.
  5219  func (c *ProjectsLocationsTrustConfigsGetCall) Header() http.Header {
  5220  	if c.header_ == nil {
  5221  		c.header_ = make(http.Header)
  5222  	}
  5223  	return c.header_
  5224  }
  5225  
  5226  func (c *ProjectsLocationsTrustConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  5227  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5228  	if c.ifNoneMatch_ != "" {
  5229  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5230  	}
  5231  	var body io.Reader = nil
  5232  	c.urlParams_.Set("alt", alt)
  5233  	c.urlParams_.Set("prettyPrint", "false")
  5234  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5235  	urls += "?" + c.urlParams_.Encode()
  5236  	req, err := http.NewRequest("GET", urls, body)
  5237  	if err != nil {
  5238  		return nil, err
  5239  	}
  5240  	req.Header = reqHeaders
  5241  	googleapi.Expand(req.URL, map[string]string{
  5242  		"name": c.name,
  5243  	})
  5244  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5245  }
  5246  
  5247  // Do executes the "certificatemanager.projects.locations.trustConfigs.get" call.
  5248  // Any non-2xx status code is an error. Response headers are in either
  5249  // *TrustConfig.ServerResponse.Header or (if a response was returned at all) in
  5250  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5251  // whether the returned error was because http.StatusNotModified was returned.
  5252  func (c *ProjectsLocationsTrustConfigsGetCall) Do(opts ...googleapi.CallOption) (*TrustConfig, error) {
  5253  	gensupport.SetOptions(c.urlParams_, opts...)
  5254  	res, err := c.doRequest("json")
  5255  	if res != nil && res.StatusCode == http.StatusNotModified {
  5256  		if res.Body != nil {
  5257  			res.Body.Close()
  5258  		}
  5259  		return nil, gensupport.WrapError(&googleapi.Error{
  5260  			Code:   res.StatusCode,
  5261  			Header: res.Header,
  5262  		})
  5263  	}
  5264  	if err != nil {
  5265  		return nil, err
  5266  	}
  5267  	defer googleapi.CloseBody(res)
  5268  	if err := googleapi.CheckResponse(res); err != nil {
  5269  		return nil, gensupport.WrapError(err)
  5270  	}
  5271  	ret := &TrustConfig{
  5272  		ServerResponse: googleapi.ServerResponse{
  5273  			Header:         res.Header,
  5274  			HTTPStatusCode: res.StatusCode,
  5275  		},
  5276  	}
  5277  	target := &ret
  5278  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5279  		return nil, err
  5280  	}
  5281  	return ret, nil
  5282  }
  5283  
  5284  type ProjectsLocationsTrustConfigsListCall struct {
  5285  	s            *Service
  5286  	parent       string
  5287  	urlParams_   gensupport.URLParams
  5288  	ifNoneMatch_ string
  5289  	ctx_         context.Context
  5290  	header_      http.Header
  5291  }
  5292  
  5293  // List: Lists TrustConfigs in a given project and location.
  5294  //
  5295  //   - parent: The project and location from which the TrustConfigs should be
  5296  //     listed, specified in the format `projects/*/locations/*`.
  5297  func (r *ProjectsLocationsTrustConfigsService) List(parent string) *ProjectsLocationsTrustConfigsListCall {
  5298  	c := &ProjectsLocationsTrustConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5299  	c.parent = parent
  5300  	return c
  5301  }
  5302  
  5303  // Filter sets the optional parameter "filter": Filter expression to restrict
  5304  // the TrustConfigs returned.
  5305  func (c *ProjectsLocationsTrustConfigsListCall) Filter(filter string) *ProjectsLocationsTrustConfigsListCall {
  5306  	c.urlParams_.Set("filter", filter)
  5307  	return c
  5308  }
  5309  
  5310  // OrderBy sets the optional parameter "orderBy": A list of TrustConfig field
  5311  // names used to specify the order of the returned results. The default sorting
  5312  // order is ascending. To specify descending order for a field, add a suffix "
  5313  // desc".
  5314  func (c *ProjectsLocationsTrustConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsTrustConfigsListCall {
  5315  	c.urlParams_.Set("orderBy", orderBy)
  5316  	return c
  5317  }
  5318  
  5319  // PageSize sets the optional parameter "pageSize": Maximum number of
  5320  // TrustConfigs to return per call.
  5321  func (c *ProjectsLocationsTrustConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsTrustConfigsListCall {
  5322  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5323  	return c
  5324  }
  5325  
  5326  // PageToken sets the optional parameter "pageToken": The value returned by the
  5327  // last `ListTrustConfigsResponse`. Indicates that this is a continuation of a
  5328  // prior `ListTrustConfigs` call, and that the system should return the next
  5329  // page of data.
  5330  func (c *ProjectsLocationsTrustConfigsListCall) PageToken(pageToken string) *ProjectsLocationsTrustConfigsListCall {
  5331  	c.urlParams_.Set("pageToken", pageToken)
  5332  	return c
  5333  }
  5334  
  5335  // Fields allows partial responses to be retrieved. See
  5336  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5337  // details.
  5338  func (c *ProjectsLocationsTrustConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsListCall {
  5339  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5340  	return c
  5341  }
  5342  
  5343  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5344  // object's ETag matches the given value. This is useful for getting updates
  5345  // only after the object has changed since the last request.
  5346  func (c *ProjectsLocationsTrustConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTrustConfigsListCall {
  5347  	c.ifNoneMatch_ = entityTag
  5348  	return c
  5349  }
  5350  
  5351  // Context sets the context to be used in this call's Do method.
  5352  func (c *ProjectsLocationsTrustConfigsListCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsListCall {
  5353  	c.ctx_ = ctx
  5354  	return c
  5355  }
  5356  
  5357  // Header returns a http.Header that can be modified by the caller to add
  5358  // headers to the request.
  5359  func (c *ProjectsLocationsTrustConfigsListCall) Header() http.Header {
  5360  	if c.header_ == nil {
  5361  		c.header_ = make(http.Header)
  5362  	}
  5363  	return c.header_
  5364  }
  5365  
  5366  func (c *ProjectsLocationsTrustConfigsListCall) doRequest(alt string) (*http.Response, error) {
  5367  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5368  	if c.ifNoneMatch_ != "" {
  5369  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5370  	}
  5371  	var body io.Reader = nil
  5372  	c.urlParams_.Set("alt", alt)
  5373  	c.urlParams_.Set("prettyPrint", "false")
  5374  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trustConfigs")
  5375  	urls += "?" + c.urlParams_.Encode()
  5376  	req, err := http.NewRequest("GET", urls, body)
  5377  	if err != nil {
  5378  		return nil, err
  5379  	}
  5380  	req.Header = reqHeaders
  5381  	googleapi.Expand(req.URL, map[string]string{
  5382  		"parent": c.parent,
  5383  	})
  5384  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5385  }
  5386  
  5387  // Do executes the "certificatemanager.projects.locations.trustConfigs.list" call.
  5388  // Any non-2xx status code is an error. Response headers are in either
  5389  // *ListTrustConfigsResponse.ServerResponse.Header or (if a response was
  5390  // returned at all) in error.(*googleapi.Error).Header. Use
  5391  // googleapi.IsNotModified to check whether the returned error was because
  5392  // http.StatusNotModified was returned.
  5393  func (c *ProjectsLocationsTrustConfigsListCall) Do(opts ...googleapi.CallOption) (*ListTrustConfigsResponse, error) {
  5394  	gensupport.SetOptions(c.urlParams_, opts...)
  5395  	res, err := c.doRequest("json")
  5396  	if res != nil && res.StatusCode == http.StatusNotModified {
  5397  		if res.Body != nil {
  5398  			res.Body.Close()
  5399  		}
  5400  		return nil, gensupport.WrapError(&googleapi.Error{
  5401  			Code:   res.StatusCode,
  5402  			Header: res.Header,
  5403  		})
  5404  	}
  5405  	if err != nil {
  5406  		return nil, err
  5407  	}
  5408  	defer googleapi.CloseBody(res)
  5409  	if err := googleapi.CheckResponse(res); err != nil {
  5410  		return nil, gensupport.WrapError(err)
  5411  	}
  5412  	ret := &ListTrustConfigsResponse{
  5413  		ServerResponse: googleapi.ServerResponse{
  5414  			Header:         res.Header,
  5415  			HTTPStatusCode: res.StatusCode,
  5416  		},
  5417  	}
  5418  	target := &ret
  5419  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5420  		return nil, err
  5421  	}
  5422  	return ret, nil
  5423  }
  5424  
  5425  // Pages invokes f for each page of results.
  5426  // A non-nil error returned from f will halt the iteration.
  5427  // The provided context supersedes any context provided to the Context method.
  5428  func (c *ProjectsLocationsTrustConfigsListCall) Pages(ctx context.Context, f func(*ListTrustConfigsResponse) error) error {
  5429  	c.ctx_ = ctx
  5430  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5431  	for {
  5432  		x, err := c.Do()
  5433  		if err != nil {
  5434  			return err
  5435  		}
  5436  		if err := f(x); err != nil {
  5437  			return err
  5438  		}
  5439  		if x.NextPageToken == "" {
  5440  			return nil
  5441  		}
  5442  		c.PageToken(x.NextPageToken)
  5443  	}
  5444  }
  5445  
  5446  type ProjectsLocationsTrustConfigsPatchCall struct {
  5447  	s           *Service
  5448  	name        string
  5449  	trustconfig *TrustConfig
  5450  	urlParams_  gensupport.URLParams
  5451  	ctx_        context.Context
  5452  	header_     http.Header
  5453  }
  5454  
  5455  // Patch: Updates a TrustConfig.
  5456  //
  5457  //   - name: A user-defined name of the trust config. TrustConfig names must be
  5458  //     unique globally and match pattern `projects/*/locations/*/trustConfigs/*`.
  5459  func (r *ProjectsLocationsTrustConfigsService) Patch(name string, trustconfig *TrustConfig) *ProjectsLocationsTrustConfigsPatchCall {
  5460  	c := &ProjectsLocationsTrustConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5461  	c.name = name
  5462  	c.trustconfig = trustconfig
  5463  	return c
  5464  }
  5465  
  5466  // UpdateMask sets the optional parameter "updateMask": Required. The update
  5467  // mask applies to the resource. For the `FieldMask` definition, see
  5468  // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
  5469  func (c *ProjectsLocationsTrustConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTrustConfigsPatchCall {
  5470  	c.urlParams_.Set("updateMask", updateMask)
  5471  	return c
  5472  }
  5473  
  5474  // Fields allows partial responses to be retrieved. See
  5475  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5476  // details.
  5477  func (c *ProjectsLocationsTrustConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTrustConfigsPatchCall {
  5478  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5479  	return c
  5480  }
  5481  
  5482  // Context sets the context to be used in this call's Do method.
  5483  func (c *ProjectsLocationsTrustConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsTrustConfigsPatchCall {
  5484  	c.ctx_ = ctx
  5485  	return c
  5486  }
  5487  
  5488  // Header returns a http.Header that can be modified by the caller to add
  5489  // headers to the request.
  5490  func (c *ProjectsLocationsTrustConfigsPatchCall) Header() http.Header {
  5491  	if c.header_ == nil {
  5492  		c.header_ = make(http.Header)
  5493  	}
  5494  	return c.header_
  5495  }
  5496  
  5497  func (c *ProjectsLocationsTrustConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  5498  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5499  	var body io.Reader = nil
  5500  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.trustconfig)
  5501  	if err != nil {
  5502  		return nil, err
  5503  	}
  5504  	c.urlParams_.Set("alt", alt)
  5505  	c.urlParams_.Set("prettyPrint", "false")
  5506  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5507  	urls += "?" + c.urlParams_.Encode()
  5508  	req, err := http.NewRequest("PATCH", urls, body)
  5509  	if err != nil {
  5510  		return nil, err
  5511  	}
  5512  	req.Header = reqHeaders
  5513  	googleapi.Expand(req.URL, map[string]string{
  5514  		"name": c.name,
  5515  	})
  5516  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5517  }
  5518  
  5519  // Do executes the "certificatemanager.projects.locations.trustConfigs.patch" call.
  5520  // Any non-2xx status code is an error. Response headers are in either
  5521  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5522  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5523  // whether the returned error was because http.StatusNotModified was returned.
  5524  func (c *ProjectsLocationsTrustConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5525  	gensupport.SetOptions(c.urlParams_, opts...)
  5526  	res, err := c.doRequest("json")
  5527  	if res != nil && res.StatusCode == http.StatusNotModified {
  5528  		if res.Body != nil {
  5529  			res.Body.Close()
  5530  		}
  5531  		return nil, gensupport.WrapError(&googleapi.Error{
  5532  			Code:   res.StatusCode,
  5533  			Header: res.Header,
  5534  		})
  5535  	}
  5536  	if err != nil {
  5537  		return nil, err
  5538  	}
  5539  	defer googleapi.CloseBody(res)
  5540  	if err := googleapi.CheckResponse(res); err != nil {
  5541  		return nil, gensupport.WrapError(err)
  5542  	}
  5543  	ret := &Operation{
  5544  		ServerResponse: googleapi.ServerResponse{
  5545  			Header:         res.Header,
  5546  			HTTPStatusCode: res.StatusCode,
  5547  		},
  5548  	}
  5549  	target := &ret
  5550  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5551  		return nil, err
  5552  	}
  5553  	return ret, nil
  5554  }
  5555  

View as plain text